f6b578bec360cd5f87bf9264ede1f93467eb949f
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
4 (OBJS): Add "pathstuff.o".
5 * server.c (current_directory): New global variable.
6 (captured_main): Initialize "current_directory".
7
8 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9
10 * tdesc.c: Use common/tdesc.h.
11 * tdesc.h: Likewise.
12
13 2018-02-20 Alan Hayward <alan.hayward@arm.com>
14 Simon Marchi <simon.marchi@ericsson.com>
15
16 * Makefile.in: Switch order of make rules.
17
18 2018-02-19 Alan Hayward <alan.hayward@arm.com>
19
20 * Makefile.in: Add common directory in build.
21 * configure.ac: Add common reference.
22 * configure: Regenerate.
23
24 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
25
26 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
27 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
28 * spu-low.c (spu_target_ops): Likewise.
29 * win32-low.c (win32_target_ops): Likewise.
30 * server.c (supported_btrace_packets): Report packets unconditionally.
31 * target.h (target_ops) <supports_btrace>: Remove.
32 (target_supports_btrace): Remove.
33
34 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
35
36 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
37 (handle_btrace_disable): Change return type to void. Use exceptions
38 to report errors.
39 (handle_btrace_general_set): Catch exception and copy message to
40 return message.
41
42 2018-02-08 Tom Tromey <tom@tromey.com>
43
44 * linux-low.c (install_software_single_step_breakpoints): Use
45 make_scoped_restore.
46 * inferiors.c (make_cleanup_restore_current_thread): Remove.
47 (do_restore_current_thread_cleanup): Remove.
48 * gdbthread.h (make_cleanup_restore_current_thread): Don't
49 declare.
50
51 2018-02-08 Tom Tromey <tom@tromey.com>
52
53 * mem-break.c (set_raw_breakpoint_at): Use
54 gdb::unique_xmalloc_ptr.
55
56 2018-01-30 Pedro Alves <palves@redhat.com>
57
58 PR gdb/13211
59 * target.c (target_terminal::terminal_state): Rename to ...
60 (target_terminal::m_terminal_state): ... this.
61
62 2018-01-19 James Clarke <jrtc27@jrtc27.com>
63
64 * linux-low.c (handle_extended_wait): Surround call to
65 thread_db_notice_clone with #ifdef USE_THREAD_DB.
66
67 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
68
69 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
70 linux_ptrace_attach_fail_reason_string now returning an
71 std::string.
72 (linux_attach): Likewise.
73 * thread-db.c (attach_thread): Likewise.
74
75 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
76
77 PR gdb/21559
78 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
79 checking for fs_base/gs_base fields in struct user_regs_struct.
80 * configure: Regenerate.
81
82 2018-01-16 Yao Qi <yao.qi@linaro.org>
83
84 PR gdb/18749
85 * linux-low.c (fetch_register): Call supply_register instead of
86 error.
87
88 2018-01-08 Yao Qi <yao.qi@linaro.org>
89 Simon Marchi <simon.marchi@ericsson.com>
90
91 * Makefile.in (OBS): Remove selftest.o.
92 * configure.ac: Set srv_selftest_objs if $development is true.
93 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
94 * configure: Re-generated.
95 * server.c (captured_main): Wrap variable selftest_filter with
96 GDB_SELF_TEST.
97
98 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
99
100 * server.c (parse_debug_format_options): Return std::string.
101 (handle_monitor_command, captured_main): Adjust.
102
103 2018-01-05 Pedro Alves <palves@redhat.com>
104
105 PR gdb/18653
106 * server.c (captured_main): Pass quiet=false to
107 save_original_signals_state.
108
109 2018-01-01 Joel Brobecker <brobecker@adacore.com>
110
111 * gdbreplay.c (gdbreplay_version): Update copyright year in
112 version message.
113 * server.c (gdbserver_version): Likewise.
114
115 2017-12-08 Tom Tromey <tom@tromey.com>
116
117 * ax.c (ax_printf): Update.
118
119 2017-12-07 Yao Qi <yao.qi@linaro.org>
120
121 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
122 aarch64_linux_read_description.
123 * linux-amd64-ipa.c (idx2mask): New array.
124 (get_ipa_tdesc): Move idx2mask out.
125 (initialize_low_tracepoint): Initialize target descriptions.
126 * linux-i386-ipa.c (idx2mask): New array.
127 (get_ipa_tdesc): Move idx2mask out.
128 (initialize_low_tracepoint): Initialize target descriptions.
129
130 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
131
132 * tdesc.c (struct tdesc_type): Change return type.
133 (tdesc_add_flag): Change parameter type.
134 (tdesc_add_bitfield): Likewise.
135 (tdesc_add_field): Likewise.
136 (tdesc_set_struct_size): Likewise.
137
138 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
139
140 * regcache.c (registers_to_string): Remove unused variable.
141
142 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
143
144 * inferiors.c (for_each_inferior_with_data): Remove.
145 * inferiors.h (for_each_inferior_with_data): Remove.
146 * server.c (handle_qxfer_threads_worker): Change parameter type.
147 (handle_qxfer_threads_proper): Use for_each_thread.
148
149 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
150
151 * inferiors.c (for_each_inferior): Remove.
152 (clear_inferiors): Use for_each_thread.
153 * inferiors.h (for_each_inferior): Remove.
154 * linux-low.c (linux_wait_for_event_filtered): Use
155 for_each_thread.
156 (linux_stabilize_threads): Likewise.
157 * regcache.c (regcache_release): Likewise.
158 * server.c (gdb_wants_all_threads_stopped): Likewise.
159 (clear_pending_status_callback): Remove.
160 (handle_status): Use for_each_thread.
161 (captured_main): Likewise.
162 * win32-low.c (child_init_thread_list): Likewise.
163 (win32_clear_inferiors): Likewise.
164 (fake_breakpoint_event): Likewise.
165
166 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
167
168 * inferiors.h (find_inferior): Remove.
169 * inferiors.c (find_inferior): Remove.
170
171 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
172
173 * linux-low.c (resume_status_pending_p): Update comment.
174 (need_step_over_p): Update comment.
175
176 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
177
178 * linux-low.c (proceed_one_lwp): Return void, change parameter
179 type.
180 (unsuspend_and_proceed_one_lwp): Likewise.
181 (proceed_all_lwps): Use for_each_thread.
182 (unstop_all_lwps): Likewise.
183
184 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
185
186 * linux-low.c (linux_resume_one_thread): Return void, take
187 parameter directly.
188 (linux_resume): Use for_each_thread.
189
190 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
191
192 * linux-low.c (send_sigstop_callback): Return void, change
193 parameter type. Rename to...
194 (send_sigstop): ... this.
195 (suspend_and_send_sigstop_callback): Return void, change parameter
196 type. Rename to...
197 (suspend_and_send_sigstop): ... this.
198 (stop_all_lwps): Use for_each_thread.
199
200 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
201
202 * linux-low.c (lwp_running): Return bool, remove unused
203 argument.
204 (linux_stabilize_threads): Use find_thread.
205
206 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
207
208 * linux-low.c (select_singlestep_lwp_callback): Remove.
209 (count_events_callback): Remove.
210 (select_event_lwp_callback): Remove.
211 (select_event_lwp): Use find_thread/for_each_thread.
212
213 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
214
215 * linux-low.c (not_stopped_callback): Return bool, take filter
216 argument directly.
217 (linux_wait_for_event_filtered): Use find_thread.
218 (linux_wait_1): Likewise.
219
220 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
221
222 * linux-low.c (same_lwp): Remove.
223 (find_lwp_pid): Use find_thread.
224
225 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
226
227 * linux-low.c (delete_lwp_callback): Remove.
228 (linux_mourn): Use for_each_thread.
229
230 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
231
232 * linux-low.c (linux_detach_lwp_callback): Return void, remove
233 args parameter, don't check for pid.
234 (linux_detach): Use for_each_thread.
235
236 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
237
238 * linux-low.c (struct counter): Remove.
239 (second_thread_of_pid_p): Remove.
240 (last_thread_of_process_p): Use find_thread.
241
242 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
243
244 * inferiors.c (find_inferior_in_random): Remove.
245 * inferiors.h (find_inferior_in_random): Remove.
246 * linux-low.c (status_pending_p_callback): Return bool, accept
247 parameter ptid directly.
248 (linux_wait_for_event_filtered): Use find_thread_in_random.
249 (linux_wait_1): Likewise.
250
251 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
252
253 * inferiors.c (find_inferior_id): Remove.
254 (find_thread_ptid): Move implemention from find_inferior_id to
255 here.
256 * inferiors.h (find_inferior_id): Remove.
257 * server.c (handle_status): Use find_thread_ptid.
258 (process_serial_event): Likewise.
259 * thread-db.c (find_one_thread): Likewise.
260 (thread_db_thread_handle): Likewise.
261 * win32-low.c (thread_rec): Likewise.
262 (child_delete_thread): Likewise.
263 (win32_thread_alive): Likewise.
264 (get_child_debug_event): Likewise.
265
266 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
267
268 * linux-mips-low.c (update_watch_registers_callback): Return
269 void, remove pid_p parameter, don't check for pid.
270 (mips_insert_point, mips_remove_point): Use for_each_thread.
271
272 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * lynx.low (lynx_delete_thread_callback): Remove.
275 (lynx_mourn): Use for_each_thread.
276
277 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
278
279 * regcache.c (regcache_invalidate_one): Remove.
280 (regcache_invalidate_pid): use for_each_thread.
281
282 2017-11-26 Tom Tromey <tom@tromey.com>
283
284 * linux-low.c (linux_create_inferior): Update.
285
286 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
287
288 * spu-low.c (spu_create_inferior): Fix typo in argument name.
289
290 2017-11-24 Alan Hayward <alan.hayward@arm.com>
291
292 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
293 * linux-aarch64-low.c (initialize_low_arch): Call init func.
294 * linux-aarch64-tdesc-selftest.c: New file.
295 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
296
297 2017-11-24 Alan Hayward <alan.hayward@arm.com>
298
299 * configure.srv: Add new file.
300 * linux-aarch64-low.c (initialize_low_arch): Call init func.
301 * linux-aarch64-tdesc-selftest.c: New file.
302 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
303
304 2017-11-24 Alan Hayward <alan.hayward@arm.com>
305
306 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
307 * linux-aarch64-low.c (initialize_low_arch): Remove init.
308 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
309
310 2017-11-24 Alan Hayward <alan.hayward@arm.com>
311
312 * configure.srv: Add new files.
313 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
314 aarch64_linux_read_description.
315 * linux-aarch64-low.c (aarch64_linux_read_description):
316 Merge with aarch64_arch_setup.
317 (aarch64_arch_setup): Call aarch64_linux_read_description.
318 * linux-aarch64-tdesc.c: New file.
319 * linux-aarch64-tdesc.h: New file.
320
321 2017-11-24 Yao Qi <yao.qi@linaro.org>
322
323 * configure.srv: Set $srv_regobj for tic6x-linux.
324 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
325 (tic6x_read_description): Move some code to tic6x_arch_setup.
326 (tic6x_tdesc_test): New function.
327 (initialize_low_arch): Call selftests::register_test.
328
329 2017-11-22 Yao Qi <yao.qi@linaro.org>
330
331 * remote-utils.c (prepare_resume_reply): Use memcpy.
332
333 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
334
335 * linux-low.c (kill_one_lwp_callback): Return void, take
336 argument directly, don't filter on pid.
337 (linux_kill): Use for_each_thread.
338
339 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
340
341 * linux-low.c (need_step_over_p): Return bool, remove dummy
342 argument.
343 (linux_resume, proceed_all_lwps): Use find_thread.
344
345 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
346
347 * linux-low.c (resume_status_pending_p): Return bool, remove
348 flag_p argument.
349 (linux_resume): Use find_thread.
350
351 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
352
353 * linux-low.c (struct thread_resume_array): Remove.
354 (linux_set_resume_request): Return void, take arguments
355 directly.
356 (linux_resume): Use for_each_thread.
357
358 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
359
360 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
361 return bool, remove data argument.
362 (linux_stabilize_threads): Use find_thread.
363
364 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
365
366 * linux-low.c (unsuspend_one_lwp): Remove.
367 (unsuspend_all_lwps): Use for_each_thread, inline code from
368 unsuspend_one_lwp.
369
370 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
371
372 * gdbthread.h (find_thread): Add overload with ptid_t filter.
373 * linux-low.c (struct iterate_over_lwps_args): Remove.
374 (iterate_over_lwps_filter): Remove.
375 (iterate_over_lwps): Use find_thread.
376
377 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
378
379 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
380 (linux_handle_new_gdb_connection): Use for_each_thread, inline
381 code from reset_lwp_ptrace_options_callback.
382
383 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
384
385 * linux-arm-low.c (struct update_registers_data): Remove.
386 (update_registers_callback): Return void, take arguments
387 directly, don't check thread's pid.
388 (arm_insert_point, arm_remove_point): Use for_each_thread.
389
390 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
391
392 * win32-low.c (continue_one_thread): Return void, take argument
393 directly.
394 (child_continue): Use for_each_thread.
395
396 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
397
398 * win32-i386-low.c (update_debug_registers_callback): Rename
399 to ...
400 (update_debug_registers): ... this, return void, remove pid_p arg.
401 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
402
403 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
404
405 * inferiors.h (struct process_info): Add constructor, initialize
406 fields..
407 <syscalls_to_catch>: Change type to std::vector<int>.
408 * inferiors.c (add_process): Allocate process_info with new.
409 (remove_process): Free process_info with delete.
410 * linux-low.c (handle_extended_wait): Adjust.
411 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
412 * server.c (handle_general_set): Adjust.
413
414 2017-11-16 Pedro Alves <palves@redhat.com>
415
416 * remote-utils.c (remote_close): Block SIGIO signals instead of
417 uninstalling the SIGIO handler.
418
419 2017-11-16 Alan Hayward <alan.hayward@arm.com>
420
421 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
422
423 2017-11-16 Yao Qi <yao.qi@linaro.org>
424
425 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
426 (tic6x_store_gregset): Likewise.
427 (tic6x_usrregs_info): Move it up.
428
429 2017-11-15 Alan Hayward <alan.hayward@arm.com>
430
431 * Makefile.in: Update arch rules.
432 * configure.srv: Explicitly mark arch/ files.
433
434 2017-11-13 Andreas Schwab <schwab@suse.de>
435
436 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
437 function.
438 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
439
440 2017-11-06 Pedro Alves <palves@redhat.com>
441
442 * config.in, configure: Regenerate.
443
444 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
445
446 * target.c (struct thread_search): Remove.
447 (thread_search_callback): Remove.
448 (prepare_to_access_memory): Use for_each_thread instead of
449 find_inferior. Inline code from thread_search_callback.
450
451 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
452
453 * server.c (struct visit_actioned_threads_data): Remove.
454 (visit_actioned_threads): Change prototype to take arguments
455 directly.
456 (resume): Use find_thread instead of find_inferior.
457
458 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
459
460 * server.c (queue_stop_reply_callback): Change prototype, return
461 void.
462 (find_status_pending_thread_callback): Remove.
463 (handle_status): Replace find_inferior with find_thread and
464 for_each_thread.
465
466 2017-10-25 Alan Hayward <alan.hayward@arm.com>
467
468 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
469 with REGNO.
470 (aarch64_store_gregset): Likewise.
471 (aarch64_fill_fpregset): Likewise.
472 (aarch64_store_fpregset): Likewise.
473
474 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
475
476 * gdbthread.h (find_thread, for_each_thread): New functions.
477 * inferiors.c (thread_of_pid): Remove.
478 (find_any_thread_of_pid): Use find_thread.
479 * linux-low.c (num_lwps): Use for_each_thread.
480
481 2017-10-17 Yao Qi <yao.qi@linaro.org>
482
483 * Makefile.in: Remove one rule.
484 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
485
486 2017-10-17 Yao Qi <yao.qi@linaro.org>
487
488 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
489 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
490
491 2017-10-17 Yao Qi <yao.qi@linaro.org>
492
493 * configure.srv: Rename arm.o with arch/arm.o.
494
495 2017-10-17 Yao Qi <yao.qi@linaro.org>
496
497 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
498 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
499 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
500 (arch-i386.o, arch-amd64.o): Remove rules.
501 (arch/%.o): New rule.
502 Update POSTCOMPILE and COMPILE.pre.
503 * configure.ac: Invoke AC_CONFIG_COMMANDS.
504 * configure: Re-generated.
505 * configure.srv: Replace arch-i386.o with arch/i386.o.
506 Replace arch-amd64.o with arch/amd64.o.
507
508 2017-10-16 Yao Qi <yao.qi@linaro.org>
509
510 * configure: Regenerated.
511
512 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
513
514 * inferiors.h: (struct inferior_list): Remove.
515 (struct inferior_list_entry); Remove.
516 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
517 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
518 get_first_inferior): Remove.
519 (for_each_inferior, for_each_inferior_with_data, find_inferior,
520 find_inferior_id, find_inferior_in_random): Change signature.
521 * inferiors.c (all_threads): Change type to
522 std::list<thread_info *>.
523 (get_thread): Remove macro.
524 (find_inferior, find_inferior_id): Change signature, implement
525 using find_thread.
526 (find_inferior_in_random): Change signature, implement using
527 find_thread_in_random.
528 (for_each_inferior, for_each_inferior_with_data): Change
529 signature, implement using for_each_thread.
530 (add_inferior_to_list, remove_inferior): Remove.
531 (add_thread, get_first_thread, thread_of_pid,
532 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
533 (get_first_inferior, one_inferior_p, clear_inferior_list):
534 Remove.
535 (clear_inferiors, get_thread_process): Update.
536 * gdbthread.h: Include <list>.
537 (struct thread_info) <entry>: Remove field.
538 <id>: New field.
539 (all_threads): Change type to std::list<thread_info *>.
540 (get_first_inferior): Add doc.
541 (find_thread, for_each_thread, find_thread_in_random): New
542 functions.
543 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
544 * linux-arm-low.c (update_registers_callback): Update.
545 * linux-low.c (second_thread_of_pid_p): Update.
546 (kill_one_lwp_callback, linux_detach_lwp_callback,
547 delete_lwp_callback, status_pending_p_callback, same_lwp,
548 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
549 iterate_over_lwps, not_stopped_callback,
550 resume_stopped_resumed_lwps, count_events_callback,
551 select_singlestep_lwp_callback, select_event_lwp_callback,
552 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
553 suspend_and_send_sigstop_callback, wait_for_sigstop,
554 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
555 lwp_running, linux_set_resume_request, resume_status_pending_p,
556 need_step_over_p, start_step_over, linux_resume_one_thread,
557 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
558 reset_lwp_ptrace_options_callback): Update.
559 * linux-mips-low.c (update_watch_registers_callback): Update.
560 * regcache.c (regcache_invalidate_one, regcache_invalidate):
561 Update.
562 (free_register_cache_thread_one): Remove.
563 (regcache_release): Update.
564 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
565 handle_qxfer_threads_worker): Update.
566 (handle_query): Update, use list iterator.
567 (visit_actioned_threads, handle_pending_status,
568 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
569 clear_pending_status_callback, set_pending_status_callback,
570 find_status_pending_thread_callback, handle_status,
571 process_serial_event): Update.
572 * target.c (thread_search_callback): Update.
573 * thread-db.c (thread_db_get_tls_address): Update.
574 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
575 Update.
576 * win32-i386-low.c (update_debug_registers_callback): Update.
577 * win32-low.c (delete_thread_info, child_delete_thread,
578 continue_one_thread, suspend_one_thread,
579 get_child_debug_event): Adjust.
580
581 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
582
583 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
584 * inferiors.h: Include <list>.
585 (struct process_info) <entry>: Remove field.
586 <pid>: New field.
587 (pid_of): Change macro to function.
588 (ptid_of, lwpid_of): Remove macro.
589 (all_processes): Change type to std::list<process_info *>.
590 (ALL_PROCESSES): Remove macro.
591 (for_each_process, find_process): New function.
592 * inferiors.c (all_processes): Change type to
593 std::list<process_info *>.
594 (find_thread_process): Adjust.
595 (add_process): Likewise.
596 (remove_process): Likewise.
597 (find_process_pid): Likewise.
598 (get_first_process): Likewise.
599 (started_inferior_callback): Remove.
600 (have_started_inferiors_p): Adjust.
601 (attached_inferior_callback): Remove.
602 (have_attached_inferiors_p): Adjust.
603 * linux-low.c (check_zombie_leaders): Likewise.
604 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
605 (x86_linux_update_xmltarget): Adjust.
606 * server.c (handle_query): Likewise.
607 (gdb_reattached_process): Remove.
608 (handle_status): Adjust.
609 (kill_inferior_callback): Likewise.
610 (detach_or_kill_inferior): Remove.
611 (print_started_pid): Likewise.
612 (print_attached_pid): Likewise.
613 (detach_or_kill_for_exit): Update.
614 (process_serial_event): Likewise.
615 * linux-arm-low.c (arm_new_fork): Likewise.
616
617 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
618
619 * dll.h: Include <list>.
620 (struct dll_info): Add constructor.
621 <entry>: Remove field.
622 (all_dlls): Change type to std::list<dll_info>.
623 * dll.c: Include <algorithm>.
624 (get_dll): Remove macro.
625 (all_dlls): Change type to std::list<dll_info *>.
626 (free_one_dll): Remove.
627 (match_dll): Likewise.
628 (loaded_dll): Adjust.
629 (unloaded_dll): Adjust to all_dlls type change, use
630 std::find_if. Inline code from match_dll.
631 (clear_dlls): Adjust to all_dlls type change.
632 * server.c (emit_dll_description): Remove.
633 (handle_qxfer_libraries): Adjust to all_dlls type change,
634 integrate emit_dll_description's functionality.
635
636 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
637
638 * linux-low.h (struct linux_target_ops) <delete_process>: New
639 field.
640 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
641 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
642 (struct linux_target_ops): Add delete_process callback.
643 * linux-arm-low.c (arm_delete_process): New.
644 (struct linux_target_ops): Add delete_process callback.
645 * linux-bfin-low.c (struct linux_target_ops): Likewise.
646 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
647 * linux-m32r-low.c (struct linux_target_ops): Likewise.
648 * linux-mips-low.c (mips_linux_delete_process): New.
649 (struct linux_target_ops): Add delete_process callback.
650 * linux-ppc-low.c (struct linux_target_ops): Likewise.
651 * linux-s390-low.c (struct linux_target_ops): Likewise.
652 * linux-sh-low.c (struct linux_target_ops): Likewise.
653 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
654 * linux-tile-low.c (struct linux_target_ops): Likewise.
655 * linux-x86-low.c (x86_linux_delete_process): New.
656 (struct linux_target_ops): Add delete_process callback.
657 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
658
659 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
660
661 * linux-aarch64-low.c (the_low_target): Add thread delete
662 callback.
663 * linux-arm-low.c (arm_delete_thread): New function.
664 (the_low_target): Add thread delete callback.
665 * linux-bfin-low.c (the_low_target): Likewise.
666 * linux-crisv32-low.c (the_low_target): Likewise.
667 * linux-low.c (delete_lwp): Invoke delete_thread callback if
668 set.
669 * linux-low.h (struct linux_target_ops) <delete_thread>: New
670 field.
671 * linux-m32r-low.c (the_low_target): Add thread delete callback.
672 * linux-mips-low.c (mips_linux_delete_thread): New function.
673 (the_low_target): Add thread delete callback.
674 * linux-ppc-low.c (the_low_target): Likewise.
675 * linux-s390-low.c (the_low_target): Likewise.
676 * linux-sh-low.c (the_low_target): Likewise.
677 * linux-tic6x-low.c (the_low_target): Likewise.
678 * linux-tile-low.c (the_low_target): Likewise.
679 * linux-x86-low.c (the_low_target): Likewise.
680 * linux-xtensa-low.c (the_low_target): Likewise.
681
682 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
683
684 * win32-low.c: Include "common-inferior.h".
685
686 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
687
688 * inferiors.c (set_inferior_cwd): New function.
689 * server.c (handle_general_set): Handle QSetWorkingDir packet.
690 (handle_query): Inform that QSetWorkingDir is supported.
691 * win32-low.c (create_process): Pass the inferior's cwd to
692 CreateProcess.
693
694 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
695
696 * inferiors.c (current_inferior_cwd): New global variable.
697 (get_inferior_cwd): New function.
698 * inferiors.h (struct process_info) <cwd>: New field.
699
700 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
701
702 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
703 (OBS): Add gdb_tilde_expand.o.
704
705 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
706
707 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
708 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
709
710 2017-09-29 Pedro Alves <palves@redhat.com>
711
712 * ax.c (gdb_parse_agent_expr): Constify.
713 * ax.h (gdb_parse_agent_expr): Constify.
714 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
715 Constify.
716 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
717 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
718 * remote-utils.h (read_ptid): Constify.
719 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
720 (process_point_options, process_serial_event): Constify.
721 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
722 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
723 (cmd_qtbuffer): Constify.
724
725 2017-09-29 Pedro Alves <palves@redhat.com>
726
727 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
728 fails.
729
730 2017-09-29 Pedro Alves <palves@redhat.com>
731
732 * linux-low.c (handle_extended_wait): Pass parent thread instead
733 of process to thread_db_notice_clone.
734 * linux-low.h (thread_db_notice_clone): Replace parent process
735 parameter with parent thread parameter.
736 * thread-db.c (find_one_thread): Add comment.
737 (thread_db_notice_clone): Replace parent process parameter with
738 parent thread parameter. Temporarily switch to the parent thread.
739
740 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
741
742 * gdbthread.h: Include "common-gdbthread.h".
743 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
744 "if" when validating the ptid.
745 * remote-utils.c: Include "gdbthread.h".
746 (prepare_resume_reply): Use "switch_to_thread".
747 * target.c (done_accessing_memory): Likewise.
748
749 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
750
751 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
752 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
753 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
754 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
755 s390x-gs-linux64-ipa.o to ipa_obj.
756 * linux-s390-low.c (HWCAP_S390_GS): New define.
757 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
758 New functions.
759 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
760 (s390_arch_setup): Check for guarded-storage support and choose
761 appropriate tdesc.
762 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
763 init_registers_s390x_gs_linux64.
764 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
765 enum value.
766 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
767 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
768
769 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
770
771 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
772
773 2017-09-21 Kevin Buettner <kevinb@redhat.com>
774
775 * linux-low.h (struct lwp_info): Add new field, thread_handle.
776 (thread_db_thread_handle): Declare.
777 * linux-low.c (linux_target_ops): Initialize thread_handle.
778 * server.c (handle_qxfer_threads_worker): Add support for
779 "handle" attribute.
780 * target.h (struct target_ops): Add new function pointer,
781 thread_handle.
782 (target_thread_handle): Define.
783 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
784 field in lwp.
785 (thread_db_thread_handle): New function.
786
787 2017-09-21 Kevin Buettner <kevinb@redhat.com>
788
789 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
790 * linux-low.h (thread_db_notice_clone): Declare.
791 * thread-db.c (thread_db_notice_clone): New function.
792
793 2017-09-21 Pedro Alves <palves@redhat.com>
794
795 * server.c (gdb_read_memory, handle_status, process_serial_event)
796 (handle_serial_event, handle_target_event): Adjust to
797 set_desired_thread prototype change.
798 * target.c (set_desired_thread): Remove 'use_general' parameter
799 and adjust.
800 * target.h (set_desired_thread): Remove 'use_general' parameter.
801
802 2017-09-20 Tom Tromey <tom@tromey.com>
803
804 * target.c (target_terminal::terminal_state): Define.
805 (target_terminal::init): Rename from target_terminal_init.
806 (target_terminal::inferior): Rename from
807 target_terminal_inferior.
808 (target_terminal::ours): Rename from target_terminal_ours.
809 (target_terminal::ours_for_output, target_terminal::info): New.
810
811 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
812
813 * server.c (accumulate_file_name_length): Remove.
814 (emit_dll_description): Adjust to std::string change.
815 (handle_qxfer_libraries): Use std::string to hold document.
816
817 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
818
819 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
820 return type of xml_escape_text.
821 * server.c (emit_dll_description): Likewise.
822
823 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
824
825 * server.c (captured_main): Accept argument for --selftest.
826 Update run_tests call.
827 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
828 when registering selftests.
829
830 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
831
832 * regcache.c (get_thread_regcache): Update code to use "std::vector"
833 instead of "VEC" for "target_desc.reg_defs".
834 (regcache_cpy): Likewise.
835 (registers_to_string): Likewise.
836 (registers_from_string): Likewise.
837 (find_regno): Likewise.
838 (supply_regblock): Likewise.
839 (regcache_raw_read_unsigned): Likewise.
840 * tdesc.c (init_target_desc): Likewise.
841 (tdesc_create_reg): Likewise.
842 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
843 (struct target_desc) <reg_defs>: Convert to "std::vector".
844 (target_desc): Do not initialize "reg_defs".
845 (~target_desc): Update code to use "std::vector" instead of "VEC"
846 for "target_desc.reg_defs".
847 (operator==): Likewise.
848
849 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
850
851 * inferiors.h (thread_to_gdb_id): Remove.
852 * inferiors.c (thread_to_gdb_id): Remove.
853 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
854 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
855 lynx_store_registers, lynx_read_memory, lynx_write_memory):
856 Likewise.
857 * nto-low.c (nto_fetch_registers, nto_store_registers,
858 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
859
860 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
861
862 * inferiors.h (gdb_id_to_thread_id): Remove.
863 * inferiors.c (gdb_id_to_thread_id): Remove.
864 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
865 removal. Move pid declaration closer to where it's used.
866
867 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
868
869 * server.c (handle_detach): New function.
870 (process_serial_event): Move code out, call handle_detach.
871
872 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
873
874 * server.c (require_running): Rename to ...
875 (require_running_or_return): ... this ...
876 (require_running_or_break): ... and this.
877 (handle_query, process_serial_event): Adjust.
878
879 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
880
881 * linux-low.c (linux_set_resume_request): Remove unused
882 variables.
883
884 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
885
886 * server.c (first_thread_of): Remove.
887 (process_serial_event): Replace usage of first_thread_of with
888 find_any_thread_of_pid.
889 * tracepoint.c (same_process_p): Remove.
890 (gdb_agent_about_to_close): Replace usage of same_process_p with
891 find_any_thread_of_pid.
892 * linux-x86-low.c (same_process_callback): Remove.
893 (x86_arch_setup_process_callback): Replace usage of
894 same_process_callback with find_any_thread_of_pid.
895 * thread-db.c (any_thread_of): Remove.
896 (switch_to_process): Replace usage of any_thread_of with
897 find_any_thread_of_pid.
898 * inferiors.c (thread_pid_matches_callback): Remove.
899 (find_thread_process): Adjust to use find_any_thread_of_pid.
900
901 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
902
903 * regcache.c (get_thread_regcache): Guard calls to "memset"
904 with "!VEC_empty".
905
906 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
907
908 * linux-low.c (handle_extended_wait): Use
909 "allocate_target_description" instead of "XNEW".
910 * linux-x86-low.c (initialize_low_arch): Likewise.
911
912 2017-09-05 Yao Qi <yao.qi@linaro.org>
913
914 * configure.srv (srv_i386_regobj): Remove.
915 (srv_amd64_regobj): Remove.
916 (srv_regobj): Set it to "" for x86 non-linux targets.
917 * linux-x86-tdesc.c (i386_linux_read_description):
918 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
919 (init_registers_i386): Remove the declaration.
920 (tdesc_i386): Remove the declaration.
921 (lynx_i386_arch_setup): Call i386_create_target_description.
922 * nto-x86-low.c: Likewise.
923 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
924 [!__x86_64__]: include arch/i386.h.
925 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
926
927 2017-09-05 Yao Qi <yao.qi@linaro.org>
928
929 * configure.srv (srv_amd64_linux_xmlfiles): Remove
930 i386/amd64-XXX-linux from it.
931
932 2017-09-05 Yao Qi <yao.qi@linaro.org>
933
934 * configure.srv: Empty srv_amd64_linux_regobj if $development is
935 false.
936 (ipa_amd64_linux_regobj): Remove.
937 (ipa_x32_linux_regobj): Remove.
938
939 2017-09-05 Yao Qi <yao.qi@linaro.org>
940
941 * Makefile.in (arch-amd64.o): New rule.
942 * configure.srv: Append arch-amd64.o.
943 * linux-amd64-ipa.c: Include common/x86-xstate.h.
944 (get_ipa_tdesc): Call amd64_linux_read_description.
945 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
946 and init_registers_amd64_XXX.
947 * linux-x86-low.c (x86_linux_read_description): Call
948 amd64_linux_read_description.
949 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
950 (initialize_low_arch): Don't call init_registers_x32_XXX and
951 init_registers_amd64_XXX.
952 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
953 and tdesc_amd64_XXX.
954 [__x86_64__] (amd64_tdesc_test): New function.
955 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
956 and init_registers_amd64_XXX.
957 * linux-x86-tdesc.c: Include arch/amd64.h.
958 (xcr0_to_tdesc_idx): New function.
959 (i386_linux_read_description): New function.
960 (amd64_get_ipa_tdesc_idx): New function.
961 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
962 (amd64_get_ipa_tdesc): Declare.
963
964 2017-09-05 Yao Qi <yao.qi@linaro.org>
965
966 * configure.srv (srv_i386_linux_xmlfiles): Remove
967 i386/i386-XXX-linux.xml from it.
968
969 2017-09-05 Yao Qi <yao.qi@linaro.org>
970
971 * configure.srv: Set srv_i386_linux_regobj empty if $development
972 is false.
973 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
974 initialize_low_tdesc.
975 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
976 with #if initialize_low_tdesc.
977 * linux-x86-tdesc-selftest.c: New file.
978 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
979
980 2017-09-05 Yao Qi <yao.qi@linaro.org>
981
982 * Makefile.in (arch-i386.o): New rule.
983 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
984 (x86_64-*-linux*): Likewise.
985 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
986 include arch/i386.h.
987 (i386_linux_read_description): Remove code and call
988 i386_create_target_description.
989 * tdesc.c (allocate_target_description): New function.
990 * tdesc.h (set_tdesc_architecture): Remove declaration.
991 (set_tdesc_osabi): Likewise.
992
993 2017-09-05 Yao Qi <yao.qi@linaro.org>
994
995 * linux-x86-tdesc.c: Don't include <inttypes.h>.
996 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
997 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
998 .xmltarget.
999 * server.c (get_features_xml): Call tdesc_get_features_xml.
1000 * tdesc.c (set_tdesc_architecture): New function.
1001 (set_tdesc_osabi): New function.
1002 (tdesc_get_features_xml): New function.
1003 (tdesc_create_feature): Add an argument.
1004 * tdesc.h (struct target_desc) <features>: New field.
1005 <arch, osabi>: New field.
1006 (~target_desc): xfree features, arch, and osabi.
1007 (target_desc::oerator==): Don't compare .xmltarget.
1008 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1009 (set_tdesc_osabi): Likewise.
1010 (tdesc_get_features_xml): Likewise.
1011
1012 2017-09-05 Yao Qi <yao.qi@linaro.org>
1013
1014 * linux-x86-tdesc.c: Include selftest.h.
1015 (i386_tdesc_test): New function.
1016 (initialize_low_tdesc): Call selftests::register_test.
1017 * tdesc.h: Include regdef.h.
1018 (target_desc): Override operator == and !=.
1019
1020 2017-09-05 Yao Qi <yao.qi@linaro.org>
1021
1022 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1023 (ipa_obj): Likewise.
1024 * linux-i386-ipa.c: Include common/x86-xstate.h
1025 (get_ipa_tdesc): Call i386_linux_read_description.
1026 (initialize_low_tracepoint): Don't call init_registers_XXX
1027 functions, call initialize_low_tdesc instead.
1028 * linux-x86-low.c (x86_linux_read_description): Call
1029 i386_linux_read_description.
1030 (initialize_low_arch): Don't call init_registers_i386_XXX
1031 functions, call initialize_low_tdesc.
1032 * linux-x86-tdesc.c: New file.
1033 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1034 (i386_get_ipa_tdesc_idx): Declare.
1035 (i386_get_ipa_tdesc): Declare.
1036 (initialize_low_tdesc): Declare.
1037
1038 2017-09-05 Yao Qi <yao.qi@linaro.org>
1039
1040 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1041 instead of 0.
1042
1043 2017-09-05 Yao Qi <yao.qi@linaro.org>
1044
1045 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1046 * regcache.c (get_thread_regcache): Use VEC_length.
1047 (init_register_cache): Likewise.
1048 (regcache_cpy): Likewise.
1049 (registers_to_string): Iterate reg_defs via VEC_iterate.
1050 (find_regno): Likewise.
1051 (find_register_by_number): Use VEC_index.
1052 (register_size): Call find_register_by_number.
1053 (register_data): Call find_register_by_number.
1054 (supply_regblock): Use VEC_length.
1055 (regcache_raw_read_unsigned): Likewise.
1056 * tdesc.c (init_target_desc): Iterate reg_defs via
1057 VEC_iterate.
1058 (default_description): Update initializer.
1059 (copy_target_description): Don't update field num_registers.
1060 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1061 <num_registers>: Remove.
1062
1063 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1064
1065 * Makefile.in (.SECONDARY): Define target.
1066
1067 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1068
1069 * linux-low.c (linux_wait_1): Adjust.
1070 * server.c (queue_stop_reply_callback): Adjust.
1071
1072 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1073
1074 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1075 QEnvironmentUnset and QEnvironmentReset packets.
1076 (handle_query): Inform remote that QEnvironmentHexEncoded,
1077 QEnvironmentUnset and QEnvironmentReset are supported.
1078
1079 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1080
1081 * inferiors.h (inferior_target_data): Rename to ...
1082 (thread_target_data): ... this.
1083 (inferior_regcache_data): Rename to ...
1084 (thread_regcache_data): ... this.
1085 (set_inferior_regcache_data): Rename to ...
1086 (set_thread_regcache_data): ... this.
1087 * inferiors.c (inferior_target_data): Rename to ...
1088 (thread_target_data): ... this.
1089 (inferior_regcache_data): Rename to ...
1090 (thread_regcache_data): ... this.
1091 (set_inferior_regcache_data): Rename to ...
1092 (set_thread_regcache_data): ... this.
1093 (free_one_thread): Update.
1094 * linux-low.h (get_thread_lwp): Update.
1095 * regcache.c (get_thread_regcache): Update.
1096 (regcache_invalidate_thread): Update.
1097 (free_register_cache_thread): Update.
1098 * win32-i386-low.c (update_debug_registers_callback): Update.
1099 (win32_get_current_dr): Update.
1100 * win32-low.c (thread_rec): Update.
1101 (delete_thread_info): Update.
1102 (continue_one_thread): Update.
1103 (suspend_one_thread): Update.
1104
1105 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1106
1107 * inferiors.c (set_inferior_target_data): Remove.
1108 * inferiors.h (set_inferior_target_data): Remove.
1109
1110 2017-08-18 Yao Qi <yao.qi@linaro.org>
1111
1112 * Makefile.in (OBS): Add selftest.o.
1113 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1114 * configure, config.in: Re-generated.
1115 * server.c: Include common/sefltest.h.
1116 (captured_main): Handle option --selftest.
1117
1118 2017-08-09 Yao Qi <yao.qi@linaro.org>
1119
1120 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1121 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1122 i386-avx-mpx.o and i386-mmx.o.
1123 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1124 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1125 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1126 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1127 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1128 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1129 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1130 i386/amd64-avx-mpx.xml.
1131
1132 2017-08-09 Yao Qi <yao.qi@linaro.org>
1133
1134 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1135 and x32-avx-avx512.o.
1136 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1137 i386/x32-avx-avx512.xml.
1138
1139 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1140
1141 * tracepoint.h (enum class fast_tpoint_collect_result): New
1142 enumeration.
1143 (fast_tracepoint_collecting): Change return type to
1144 fast_tpoint_collect_result.
1145 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1146 * linux-low.h: Include tracepoint.h.
1147 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1148 fast_tpoint_collect_result.
1149 * linux-low.c (handle_tracepoints): Adjust.
1150 (linux_fast_tracepoint_collecting): Change return type to
1151 fast_tpoint_collect_result.
1152 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1153 linux_wait_1, stuck_in_jump_pad_callback,
1154 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1155 proceed_one_lwp): Adjust to type change.
1156
1157 2017-07-10 Yao Qi <yao.qi@linaro.org>
1158
1159 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1160
1161 2017-06-29 Yao Qi <yao.qi@linaro.org>
1162
1163 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1164 Remove.
1165 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1166
1167 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1168
1169 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1170
1171 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1172
1173 * linux-low.c (linux_create_inferior): Adjust code to access the
1174 environment information via 'gdb_environ' class.
1175 * lynx-low.c (lynx_create_inferior): Likewise.
1176 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1177 (get_environ): Return a pointer to 'our_environ'.
1178 (captured_main): Initialize 'our_environ'.
1179 * server.h (get_environ): Adjust prototype.
1180 * spu-low.c (spu_create_inferior): Adjust code to access the
1181 environment information via 'gdb_environ' class.
1182
1183 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1184
1185 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1186 usage of "register" keyword.
1187
1188 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1189
1190 * configure: Re-generate.
1191
1192 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1193
1194 * configure: Re-generate.
1195
1196 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1197
1198 * Makefile.in (COMPILE.pre): Add "-x c++".
1199
1200 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1201
1202 * fork-child.c: Conditionally include <signal.h>.
1203
1204 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1205
1206 * server.c (handle_general_set): Handle new packet
1207 "QStartupWithShell".
1208 (handle_query): Add "QStartupWithShell" to the list of supported
1209 packets.
1210 (gdbserver_usage): Add help text explaining the
1211 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1212 options.
1213 (captured_main): Recognize and act upon the presence of the new
1214 CLI options.
1215
1216 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1217 Pedro Alves <palves@redhat.com>
1218
1219 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1220 * configure: Regenerate.
1221 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1222 "fork-inferior.o".
1223 (i[34567]86-*-lynxos*): Likewise.
1224 (spu*-*-*): Likewise.
1225 * fork-child.c: New file.
1226 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1227 and "environ.h".
1228 (linux_ptrace_fun): New function.
1229 (linux_create_inferior): Adjust function prototype to reflect
1230 change on "target.h". Adjust function code to use
1231 "fork_inferior".
1232 (linux_request_interrupt): Delete "signal_pid".
1233 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1234 (lynx_ptrace_fun): New function.
1235 (lynx_create_inferior): Adjust function prototype to reflect
1236 change on "target.h". Adjust function code to use
1237 "fork_inferior".
1238 * nto-low.c (nto_create_inferior): Adjust function prototype and
1239 code to reflect change on "target.h". Update comments.
1240 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1241 "common-terminal.h" and "environ.h".
1242 (terminal_fd): Moved to fork-child.c.
1243 (old_foreground_pgrp): Likewise.
1244 (restore_old_foreground_pgrp): Likewise.
1245 (last_status): Make it global.
1246 (last_ptid): Likewise.
1247 (our_environ): New variable.
1248 (startup_with_shell): Likewise.
1249 (program_name): Likewise.
1250 (program_argv): Rename to...
1251 (program_args): ...this.
1252 (wrapper_argv): New variable.
1253 (start_inferior): Delete function.
1254 (get_exec_wrapper): New function.
1255 (get_exec_file): Likewise.
1256 (get_environ): Likewise.
1257 (prefork_hook): Likewise.
1258 (post_fork_inferior): Likewise.
1259 (postfork_hook): Likewise.
1260 (postfork_child_hook): Likewise.
1261 (handle_v_run): Update code to deal with arguments coming from the
1262 remote host. Update calls from "start_inferior" to
1263 "create_inferior".
1264 (captured_main): Likewise. Initialize environment variable. Call
1265 "have_job_control".
1266 * server.h (post_fork_inferior): New prototype.
1267 (get_environ): Likewise.
1268 (last_status): Declare.
1269 (last_ptid): Likewise.
1270 (signal_pid): Likewise.
1271 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1272 (spu_ptrace_fun): New function.
1273 (spu_create_inferior): Adjust function prototype to reflect change
1274 on "target.h". Adjust function code to use "fork_inferior".
1275 * target.c (target_terminal_init): New function.
1276 (target_terminal_inferior): Likewise.
1277 (target_terminal_ours): Likewise.
1278 * target.h: Include <vector>.
1279 (struct target_ops) <create_inferior>: Update prototype.
1280 (create_inferior): Update macro.
1281 * utils.c (gdb_flush_out_err): New function.
1282 * win32-low.c (win32_create_inferior): Adjust function prototype
1283 and code to reflect change on "target.h".
1284
1285 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1286
1287 * inferiors.c (switch_to_thread): New function.
1288
1289 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1290
1291 * Makefile.in (SFILE): Add "common/job-control.c".
1292 (OBS): Add "job-control.o".
1293
1294 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1295
1296 * Makefile: Remove "@host_makefile_frag@".
1297
1298 2017-05-05 Pedro Alves <palves@redhat.com>
1299
1300 * configure: Regenerate.
1301
1302 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1303
1304 * configure: Regenerate.
1305
1306 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1307
1308 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1309 software_single_step change of return type to
1310 std::vector<CORE_ADDR>.
1311 * linux-low.c (install_software_single_step_breakpoints):
1312 Likewise.
1313 * linux-low.h (install_software_single_step_breakpoints):
1314 Likewise.
1315
1316 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1317
1318 * remote-utils.c: Include "gdb_termios.h" instead of
1319 "terminal.h".
1320 * terminal.h: Delete file.
1321
1322 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1323
1324 * server.c: Include <vector>.
1325 <program_argv, wrapper_argv>: Convert to std::vector.
1326 (start_inferior): Rewrite function to use C++.
1327 (handle_v_run): Likewise. Update code that calculates the argv
1328 based on the vRun packet; use C++.
1329 (captured_main): Likewise.
1330
1331 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1332
1333 * server.c (handle_v_cont): Initialize thread_resume::thread
1334 with null_ptid.
1335
1336 2017-04-05 Pedro Alves <palves@redhat.com>
1337
1338 * configure: Regenerate.
1339
1340 2017-04-05 Pedro Alves <palves@redhat.com>
1341
1342 * gdbreplay.c (sync_error): Constify.
1343 * linux-x86-low.c (push_opcode): Constify.
1344
1345 2017-04-05 Pedro Alves <palves@redhat.com>
1346
1347 * win32-low.c (get_child_debug_event)
1348 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1349 Report TARGET_WAITKIND_SPURIOUS instead.
1350
1351 2017-04-05 Pedro Alves <palves@redhat.com>
1352
1353 * remote-utils.c (remote_prepare, remote_open): Constify.
1354 * remote-utils.h (remote_prepare, remote_open): Constify.
1355 * server.c (captured_main): Constify 'port' handling.
1356
1357 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1358
1359 * Makefile.in (clean): Clear .deps.
1360
1361 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1362
1363 * .gitignore: Remove generated files, replace with wildcard.
1364 * (clean): Replace removal of generated files with wildcard.
1365 (version.c): Replace with...
1366 (version-generated.c): ...this.
1367 (xml-builtin.c): Replace with...
1368 (xml-builtin-generated.c): ...this.
1369 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1370 (%.c: *regformats*): Replace with...
1371 (%-generated.c: *regformats*): ...this.
1372
1373 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1374
1375 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1376 (xtensa_fill_gregset): Call collect_register_by_name for
1377 threadptr register.
1378 (xtensa_store_gregset): Call supply_register_by_name for
1379 threadptr register.
1380
1381 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1382
1383 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1384 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1385 (xtensa_store_gregset): Call supply_register for all registers in
1386 a0_regnum..a0_regnum + C0_NREGS range.
1387
1388 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1389
1390 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1391 (ax-ipa.o: ax.c): Remove.
1392 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1393 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1394 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1395 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1396 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1397
1398 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1399
1400 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1401 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1402 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1403 (errors-ipa.o: ../common/errors.c): Remove.
1404 (format-ipa.o: ../common/format.c): Remove.
1405 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1406
1407 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1408
1409 * Makefile.in (%-ipa.o: %.c): New rule.
1410 (tracepoint-ipa.o: tracepoint.c): Remove.
1411 (utils-ipa.o: utils.c): Remove.
1412 (remote-utils-ipa.o: remote-utils.c): Remove.
1413 (regcache-ipa.o: regcache.c): Remove.
1414 (i386-linux-ipa.o: i386-linux.c): Remove.
1415 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1416 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1417 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1418 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1419 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1420 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1421 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1422 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1423 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1424 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1425 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1426 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1427 (aarch64-ipa.o: aarch64.c): Remove.
1428 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1429 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1430 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1431 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1432 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1433 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1434 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1435 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1436 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1437 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1438 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1439 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1440 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1441 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1442 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1443 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1444 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1445 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1446 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1447 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1448 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1449 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1450 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1451 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1452 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1453 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1454 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1455 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1456 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1457 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1458 (tdesc-ipa.o: tdesc.c): Remove.
1459 (x32-linux-ipa.o: x32-linux.c): Remove.
1460 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1461 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1462
1463 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1464
1465 * Makefile.in (%.o: ../arch/%.c): New rule.
1466 (arm.o: ../arch/arm.c): Remove.
1467 (arm-linux.o: ../arch/arm-linux.c): Remove.
1468 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1469 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1470
1471 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1472
1473 * Makefile.in (%.o: ../nat/%.c): New rule.
1474 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1475 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1476 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1477 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1478 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1479 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1480 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1481 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1482 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1483 (linux-personality.o: ../nat/linux-personality.c): Remove.
1484 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1485 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1486 (x86-linux.o: ../nat/x86-linux.c): Remove.
1487 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1488 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1489
1490 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1491
1492 * Makefile.in (%.o: ../common/%.c): New rule.
1493 (signals.o: ../common/signals.c): Remove.
1494 (print-utils.o: ../common/print-utils.c): Remove.
1495 (rsp-low.o: ../common/rsp-low.c): Remove.
1496 (common-utils.o: ../common/common-utils.c): Remove.
1497 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1498 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1499 (vec.o: ../common/vec.c): Remove.
1500 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1501 (xml-utils.o: ../common/xml-utils.c): Remove.
1502 (ptid.o: ../common/ptid.c): Remove.
1503 (buffer.o: ../common/buffer.c): Remove.
1504 (format.o: ../common/format.c): Remove.
1505 (filestuff.o: ../common/filestuff.c): Remove.
1506 (agent.o: ../common/agent.c): Remove.
1507 (errors.o: ../common/errors.c): Remove.
1508 (environ.o: ../common/environ.c): Remove.
1509 (common-debug.o: ../common/common-debug.c): Remove.
1510 (cleanups.o: ../common/cleanups.c): Remove.
1511 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1512 (fileio.o: ../common/fileio.c): Remove.
1513 (common-regcache.o: ../common/common-regcache.c): Remove.
1514 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1515 (new-op.o: ../common/new-op.c): Remove.
1516 (btrace-common.o: ../common/btrace-common.c): Remove.
1517
1518 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1519
1520 * Makefile.in (%.o: ../target/%.c): New rule.
1521 (waitstatus.o: ../target/waitstatus.c): Remove.
1522
1523 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1524
1525 * Makefile.in
1526 (%.c: ../regformats/%.dat,
1527 (%.c: ../regformats/arm/%.dat,
1528 (%.c: ../regformats/i386/%.dat,
1529 (%.c: ../regformats/rs6000/%.dat): New rules.
1530 (aarch64.c): Remove.
1531 (reg-arm.c): Remove.
1532 (arm-with-iwmmxt.c): Remove.
1533 (arm-with-vfpv2.c): Remove.
1534 (arm-with-vfpv3.c): Remove.
1535 (arm-with-neon.c): Remove.
1536 (reg-bfin.c): Remove.
1537 (reg-cris.c): Remove.
1538 (reg-crisv32.c): Remove.
1539 (i386.c): Remove.
1540 (i386-linux.c): Remove.
1541 (i386-avx.c): Remove.
1542 (i386-avx-linux.c): Remove.
1543 (i386-avx-avx512.c): Remove.
1544 (i386-avx-avx512-linux.c): Remove.
1545 (i386-mpx.c): Remove.
1546 (i386-mpx-linux.c): Remove.
1547 (i386-avx-mpx-avx512-pku.c): Remove.
1548 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1549 (i386-avx-mpx.c): Remove.
1550 (i386-avx-mpx-linux.c): Remove.
1551 (i386-mmx.c): Remove.
1552 (i386-mmx-linux.c): Remove.
1553 (reg-ia64.c): Remove.
1554 (reg-m32r.c): Remove.
1555 (reg-m68k.c): Remove.
1556 (reg-cf.c): Remove.
1557 (mips-linux.c): Remove.
1558 (mips-dsp-linux.c): Remove.
1559 (mips64-linux.c): Remove.
1560 (mips64-dsp-linux.c): Remove.
1561 (nios2-linux.c): Remove.
1562 (powerpc-32.c): Remove.
1563 (powerpc-32l.c): Remove.
1564 (powerpc-altivec32l.c): Remove.
1565 (powerpc-cell32l.c): Remove.
1566 (powerpc-vsx32l.c): Remove.
1567 (powerpc-isa205-32l.c): Remove.
1568 (powerpc-isa205-altivec32l.c): Remove.
1569 (powerpc-isa205-vsx32l.c): Remove.
1570 (powerpc-e500l.c): Remove.
1571 (powerpc-64l.c): Remove.
1572 (powerpc-altivec64l.c): Remove.
1573 (powerpc-cell64l.c): Remove.
1574 (powerpc-vsx64l.c): Remove.
1575 (powerpc-isa205-64l.c): Remove.
1576 (powerpc-isa205-altivec64l.c): Remove.
1577 (powerpc-isa205-vsx64l.c): Remove.
1578 (s390-linux32.c): Remove.
1579 (s390-linux32v1.c): Remove.
1580 (s390-linux32v2.c): Remove.
1581 (s390-linux64.c): Remove.
1582 (s390-linux64v1.c): Remove.
1583 (s390-linux64v2.c): Remove.
1584 (s390-te-linux64.c): Remove.
1585 (s390-vx-linux64.c): Remove.
1586 (s390-tevx-linux64.c): Remove.
1587 (s390x-linux64.c): Remove.
1588 (s390x-linux64v1.c): Remove.
1589 (s390x-linux64v2.c): Remove.
1590 (s390x-te-linux64.c): Remove.
1591 (s390x-vx-linux64.c): Remove.
1592 (s390x-tevx-linux64.c): Remove.
1593 (tic6x-c64xp-linux.c): Remove.
1594 (tic6x-c64x-linux.c): Remove.
1595 (tic6x-c62x-linux.c): Remove.
1596 (reg-sh.c): Remove.
1597 (reg-sparc64.c): Remove.
1598 (reg-spu.c): Remove.
1599 (amd64.c): Remove.
1600 (amd64-linux.c): Remove.
1601 (amd64-avx.c): Remove.
1602 (amd64-avx-linux.c): Remove.
1603 (amd64-avx-avx512.c): Remove.
1604 (amd64-avx-avx512-linux.c): Remove.
1605 (amd64-mpx.c): Remove.
1606 (amd64-mpx-linux.c): Remove.
1607 (amd64-avx-mpx-avx512-pku.c): Remove.
1608 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1609 (amd64-avx-mpx.c): Remove.
1610 (amd64-avx-mpx-linux.c): Remove.
1611 (x32.c): Remove.
1612 (x32-linux.c): Remove.
1613 (x32-avx.c): Remove.
1614 (x32-avx-linux.c): Remove.
1615 (x32-avx-avx512.c): Remove.
1616 (x32-avx-avx512-linux.c): Remove.
1617 (reg-xtensa.c): Remove.
1618 (reg-tilegx.c): Remove.
1619 (reg-tilegx32.c): Remove.
1620
1621 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1622
1623 * Makefile.in (SFILES): Add "common/environ.c".
1624 (OBJS): Add "common/environ.h".
1625
1626 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1627
1628 * configure.ac: Check if the fs_base and gs_base members of
1629 `struct user_regs_struct' exist.
1630 * config.in: Regenerated.
1631 * configure: Likewise.
1632
1633 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1634
1635 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1636 target_read_memory.
1637 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1638 (get_next_pcs_syscall_next_pc): Likewise.
1639
1640 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1641
1642 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1643 * nto-x86-low.c: Likewise.
1644
1645 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1646
1647 * Makefile.in: Include disable-implicit-rules.mk.
1648
1649 2016-11-23 Pedro Alves <palves@redhat.com>
1650
1651 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1652 (debug_vprintf): Use std::chrono::steady_clock instead of
1653 gettimeofday. Use '.' instead of ':'.
1654 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1655 (get_timestamp): Use std::chrono::steady_clock instead of
1656 gettimeofday.
1657
1658 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1659
1660 * Makefile.in: Fix whitespace formatting.
1661
1662 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1663
1664 * Makefile.in (SFILES, OBS): Flatten list and order
1665 alphabetically.
1666
1667 2016-11-23 Pedro Alves <palves@redhat.com>
1668
1669 * event-loop.c (handle_file_event): Use warning.
1670 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1671 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1672 Use warning.
1673
1674 2016-11-23 Pedro Alves <palves@redhat.com>
1675
1676 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1677 output.
1678 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1679 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1680 debug_printf and debug_flush for debug output.
1681 * server.c (handle_general_set): Likewise.
1682 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1683 output.
1684
1685 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1686
1687 * Makefile.in (.c.o): Replace rule with ...
1688 (%.o: %.c): ... this one.
1689
1690 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1691
1692 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1693 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1694 make.
1695 * configure.ac: Remove checks for the make program.
1696 * configure: Re-generate.
1697
1698 2016-10-28 Pedro Alves <palves@redhat.com>
1699
1700 * Makefile.in (CXX_DIALECT): Get from configure.
1701 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1702 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1703 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1704 * config.in: Regenerate.
1705 * configure: Regenerate.
1706
1707 2016-10-27 Yao Qi <yao.qi@linaro.org>
1708
1709 * linux-low.c (linux_supports_range_stepping): Return true if
1710 can_software_single_step return true.
1711
1712 2016-10-27 Yao Qi <yao.qi@linaro.org>
1713
1714 * inferiors.c (find_inferior_in_random): New function.
1715 * inferiors.h (find_inferior_in_random): Declare.
1716 * linux-low.c (linux_wait_for_event_filtered): Call
1717 find_inferior_in_random instead of find_inferior.
1718
1719 2016-10-27 Yao Qi <yao.qi@linaro.org>
1720
1721 * linux-low.c (linux_wait_1): If single-step breakpoints are
1722 inserted, remove them.
1723
1724 2016-10-26 Pedro Alves <palves@redhat.com>
1725
1726 * linux-low.c (handle_extended_wait): Link parent/child fork
1727 threads.
1728 (linux_wait_1): Unlink them.
1729 (linux_set_resume_request): Ignore resume requests for
1730 already-resumed and unhandled fork child threads.
1731 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1732 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1733 New functions.
1734 (handle_v_requests) <vCont>: Don't call require_running.
1735 * server.h (in_queued_stop_replies): New declaration.
1736
1737 2016-10-24 Yao Qi <yao.qi@linaro.org>
1738
1739 PR server/20733
1740 * linux-aarch64-low.c (append_insns): Cast the return value to
1741 'uint32_t *'.
1742
1743 2016-10-10 Yao Qi <yao.qi@linaro.org>
1744
1745 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1746
1747 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1748
1749 * target.c (target_supports_multi_process): New function, moved
1750 from...
1751 * target.h (target_supports_multi_process): ... here. Remove
1752 macro.
1753
1754 2016-10-05 Tom Tromey <tom@tromey.com>
1755
1756 PR remote/20655:
1757 * tracepoint.c (handle_tracepoint_bkpts): Check
1758 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1759
1760 2016-10-05 Yao Qi <yao.qi@linaro.org>
1761
1762 * configure.srv: Update the path of arm-*.xml files.
1763
1764 2016-10-05 Terry Guo <terry.guo@arm.com>
1765 Yao Qi <yao.qi@linaro.org>
1766
1767 * Makefile.in: Adjust the path of rules.
1768 * configure.srv: Update the path of xml files.
1769 * regformats/arm-with-iwmmxt.dat: Regenerated.
1770 * regformats/arm-with-neon.dat: Likewise.
1771 * regformats/arm-with-vfpv2.dat: Likewise.
1772 * regformats/arm-with-vfpv3.dat Likewise.
1773
1774 2016-09-30 Yao Qi <yao.qi@linaro.org>
1775
1776 PR gdbserver/20627
1777 * target.c (target_stop_and_wait): Don't call
1778 target_continue_no_signal, use resume_stop instead.
1779
1780 2016-09-26 Yao Qi <yao.qi@linaro.org>
1781
1782 * linux-low.c (linux_wait_1): Call debug_exit.
1783
1784 2016-09-23 Pedro Alves <palves@redhat.com>
1785
1786 * Makefile.in (SFILES): Add common/new-op.c.
1787 (OBS): Add common/new-op.o.
1788 (new-op.o): New rule.
1789
1790 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1791
1792 * .gitinore: Ignore more files.
1793
1794 2016-09-21 Yao Qi <yao.qi@linaro.org>
1795
1796 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1797 23.
1798
1799 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1800
1801 * server.c (start_inferior): Call target_mourn_inferior instead of
1802 mourn_inferior; pass ptid_t argument to it.
1803 (resume): Likewise.
1804 (handle_target_event): Likewise.
1805 * target.c (target_mourn_inferior): New function.
1806 * target.h (mourn_inferior): Delete macro.
1807
1808 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1809
1810 * linux-low.c (lwp_is_stepping): New function.
1811
1812 2016-09-06 Carl Love <cel@us.ibm.com>
1813
1814 * server.c (start_inferior): Fixed comment, requested comment change
1815 didn't get updated correctly. Removed reference to ptrace () call as
1816 it is only true on Linux systems.
1817
1818 2016-09-06 Carl Love <cel@us.ibm.com>
1819
1820 * server.c (start_inferior): Do not call
1821 function target_post_create_inferior () if the
1822 inferior process has already exited.
1823
1824 2016-09-05 Pedro Alves <palves@redhat.com>
1825
1826 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1827 (COMPILE.pre, CC_LD): Use CXX directly.
1828 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1829 * acinclude.m4: Don't include build-with-cxx.m4.
1830 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1831 * configure: Regenerate.
1832
1833 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1834
1835 PR gdb/19495
1836 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1837 call writing data to own_buf.
1838
1839 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1840
1841 * target.c (mywait): Call target_wait instead of
1842 the_target->wait.
1843 (target_wait): New function.
1844
1845 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1846
1847 * server.c (start_inferior): New variable 'ptid'. Replace calls
1848 to the_target->resume by target_continue{,_no_signal}, depending
1849 on the case.
1850 * target.c (target_stop_and_wait): Call target_continue_no_signal
1851 instead of the_target->resume.
1852 (target_continue): New function.
1853
1854 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1855
1856 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1857
1858 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1859
1860 PR server/20491
1861 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1862 ps_prochandle.
1863 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1864 * linux-arm-low.c (ps_get_thread_area): Likewise.
1865 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1866 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1867 * linux-mips-low.c (ps_get_thread_area): Likewise.
1868 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1869 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1870 * linux-x86-low.c (ps_get_thread_area): Likewise.
1871 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1872
1873 2016-08-19 Pedro Alves <palves@redhat.com>
1874
1875 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1876
1877 2016-08-19 Pedro Alves <palves@redhat.com>
1878
1879 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1880 comment. Use memcpy instead of casting through unsigned long.
1881
1882 2016-08-19 Pedro Alves <palves@redhat.com>
1883
1884 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1885 allocating around 0x80000000.
1886
1887 2016-08-19 Pedro Alves <palves@redhat.com>
1888
1889 PR gdb/20415
1890 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1891 (x32-avx512-linux-ipa.o): New rules.
1892 * configure.ac (x86_64-*-linux*): New x32 check.
1893 * configure.srv (ipa_x32_linux_regobj): New.
1894 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1895 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1896 descriptions.
1897 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1898 descriptions.
1899 * configure: Regenerate.
1900
1901 2016-08-09 Pedro Alves <palves@redhat.com>
1902
1903 PR gdb/18653
1904 * Makefile.in (OBS): Add signals-state-save-restore.o.
1905 (signals-state-save-restore.o): New rule.
1906 * config.in: Regenerate.
1907 * configure: Regenerate.
1908 * linux-low.c: Include "signals-state-save-restore.h".
1909 (linux_create_inferior): Call
1910 restore_original_signals_state.
1911 * server.c: Include "dispositions-save-restore.h".
1912 (captured_main): Call save_original_signals_state.
1913
1914 2016-08-05 Pedro Alves <palves@redhat.com>
1915
1916 * configure: Regenerate.
1917
1918 2016-08-04 Yao Qi <yao.qi@linaro.org>
1919
1920 * linux-low.c (regsets_fetch_inferior_registers): Check
1921 errno is ESRCH or not.
1922
1923 2016-08-02 Yao Qi <yao.qi@linaro.org>
1924
1925 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1926 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1927 (thread_db_load_search): Update.
1928 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1929 td_ta_set_event and td_ta_event_getmsg.
1930
1931 2016-07-26 Pedro Alves <palves@redhat.com>
1932
1933 PR server/20414
1934 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1935 of unsigned long for 64-bit registers and use uint32_t instead of
1936 unsigned int for 32-bit registers.
1937
1938 2016-07-26 Pedro Alves <palves@redhat.com>
1939
1940 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1941 to 'ptrace'.
1942
1943 2016-07-21 Tom Tromey <tom@tromey.com>
1944
1945 * configure: Rebuild.
1946
1947 2016-07-21 Yao Qi <yao.qi@linaro.org>
1948
1949 * mem-break.c (find_gdb_breakpoint): Cast bp to
1950 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1951
1952 2016-07-21 Yao Qi <yao.qi@linaro.org>
1953
1954 * server.c (handle_v_requests): Support s and S actions
1955 if target_supports_software_single_step return true.
1956
1957 2016-07-21 Yao Qi <yao.qi@linaro.org>
1958
1959 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1960 is resume_step, call maybe_hw_step.
1961 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1962 and unstop them.
1963 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1964 breakpoints or not.
1965 (proceed_one_lwp): If resume request is resume_step, install
1966 reinsert breakpoints and call maybe_hw_step.
1967
1968 2016-07-21 Yao Qi <yao.qi@linaro.org>
1969
1970 * linux-low.c (proceed_one_lwp): Declare.
1971 (linux_resume_one_thread): Remove local variable 'step'.
1972 Lift code enqueue signal. Call proceed_one_lwp instead of
1973 linux_resume_one_lwp.
1974
1975 2016-07-21 Yao Qi <yao.qi@linaro.org>
1976
1977 * linux-low.c (linux_resume_one_thread): Call
1978 enqueue_pending_signal.
1979
1980 2016-07-21 Yao Qi <yao.qi@linaro.org>
1981
1982 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1983 * inferiors.c (do_restore_current_thread_cleanup): New function.
1984 (make_cleanup_restore_current_thread): Likewise.
1985 * linux-low.c (install_software_single_step_breakpoints): Call
1986 make_cleanup_restore_current_thread. Switch current_thread to
1987 thread.
1988
1989 2016-07-21 Yao Qi <yao.qi@linaro.org>
1990
1991 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1992 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1993 (clone_one_breakpoint): Likewise.
1994 (delete_reinsert_breakpoints): Change parameter to thread.
1995 Callers updated.
1996 (has_reinsert_breakpoints): Likewise.
1997 (uninsert_reinsert_breakpoints): Likewise.
1998 (reinsert_reinsert_breakpoints): Likewise.
1999 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2000 (delete_reinsert_breakpoints): Likewise.
2001 (reinsert_reinsert_breakpoints): Likewise.
2002 (uninsert_reinsert_breakpoints): Likewise.
2003 (has_reinsert_breakpoints): Likewise.
2004
2005 2016-07-21 Yao Qi <yao.qi@linaro.org>
2006
2007 * inferiors.c (get_thread_process): Make parameter const.
2008 * inferiors.h (get_thread_process): Update declaration.
2009 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2010 Add new parameters child_thread and parent_thread. Callers
2011 updated.
2012 * mem-break.h (clone_all_breakpoints): Update declaration.
2013
2014 2016-07-21 Yao Qi <yao.qi@linaro.org>
2015
2016 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2017 <command_list, handler>: Remove.
2018 (struct gdb_breakpoint): New.
2019 (struct other_breakpoint): New.
2020 (struct reinsert_breakpoint): New.
2021 (is_gdb_breakpoint): New function.
2022 (any_persistent_commands): Update command_list if
2023 is_gdb_breakpoint returns true.
2024 (set_breakpoint): Create breakpoints according to their types.
2025 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2026 (set_gdb_breakpoint_1): Likewise.
2027 (set_gdb_breakpoint): Likewise.
2028 (clear_breakpoint_conditions): Change parameter type to
2029 'struct gdb_breakpoint *'.
2030 (clear_breakpoint_commands): Likewise.
2031 (clear_breakpoint_conditions_and_commands): Likewise.
2032 (add_condition_to_breakpoint): Likewise.
2033 (add_breakpoint_condition): Likewise.
2034 (add_commands_to_breakpoint): Likewise.
2035 (check_breakpoints): Check other_breakpoint.
2036 (clone_one_breakpoint): Clone breakpopint according to its type.
2037 * mem-break.h (struct gdb_breakpoint): Declare.
2038 (set_gdb_breakpoint): Update declaration.
2039 (clear_breakpoint_conditions_and_commands): Likewise.
2040 (add_breakpoint_condition): Likewise.
2041 (add_breakpoint_commands): Likewise.
2042 * server.c (process_point_options): Change parameter type to
2043 'struct gdb_breakpoint *'.
2044
2045 2016-07-21 Yao Qi <yao.qi@linaro.org>
2046
2047 * mem-break.c (set_breakpoint_at): Rename it to ...
2048 (set_breakpoint_type_at): ... it.
2049 (set_breakpoint_at): Call set_breakpoint_type_at.
2050 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2051 * mem-break.h (set_breakpoint_at): Update comments.
2052
2053 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2054
2055 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2056 to buf parameter.
2057 (nios2_store_gregset): Likewise.
2058
2059 2016-07-01 Pedro Alves <palves@redhat.com>
2060 Antoine Tremblay <antoine.tremblay@ericsson.com>
2061
2062 * linux-low.c: Change interface to take the target lwp_info
2063 pointer directly and return void. Handle detaching from a zombie
2064 thread.
2065 (linux_detach_lwp_callback): New function.
2066 (linux_detach): Detach from the leader thread after detaching from
2067 the clone threads.
2068
2069 2016-06-28 Yao Qi <yao.qi@linaro.org>
2070
2071 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2072 for variable new_offset.
2073 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2074 (aarch64_ftrace_insn_reloc_cb): Likewise.
2075 (aarch64_ftrace_insn_reloc_tb): Likewise.
2076 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2077 PRIx64 instead of PRIx32.
2078
2079 2016-06-28 Yao Qi <yao.qi@linaro.org>
2080
2081 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2082 (the_low_target): Install arm_get_syscall_trapinfo.
2083
2084 2016-06-28 Yao Qi <yao.qi@linaro.org>
2085
2086 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2087 function.
2088 (the_low_target): Install aarch64_get_syscall_trapinfo.
2089
2090 2016-06-28 Yao Qi <yao.qi@linaro.org>
2091
2092 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2093 Callers updated.
2094 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2095 Remove parameter sysno.
2096 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2097 sysret.
2098
2099 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2100
2101 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2102 (s390_emit_ne_goto): Likewise.
2103 (s390_emit_lt_goto): Likewise.
2104 (s390_emit_le_goto): Likewise.
2105 (s390_emit_gt_goto): Likewise.
2106 (s390_emit_ge_goto): Likewise.
2107 (s390x_emit_eq_goto): Likewise.
2108 (s390x_emit_ne_goto): Likewise.
2109 (s390x_emit_lt_goto): Likewise.
2110 (s390x_emit_le_goto): Likewise.
2111 (s390x_emit_gt_goto): Likewise.
2112 (s390x_emit_ge_goto): Likewise.
2113 (s390_emit_ops_impl): Mark variable static.
2114 (s390x_emit_ops): Likewise.
2115
2116 2016-06-17 Yao Qi <yao.qi@linaro.org>
2117
2118 * linux-low.c (handle_extended_wait): Call
2119 uninsert_reinsert_breakpoints for the parent process. Remove
2120 reinsert breakpoints from the child process. Reinsert them to
2121 the parent process when vfork is done.
2122 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2123 (reinsert_reinsert_breakpoints): New function.
2124 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2125 (reinsert_reinsert_breakpoints): Declare.
2126
2127 2016-06-17 Yao Qi <yao.qi@linaro.org>
2128
2129 * linux-low.c (handle_extended_wait): If the parent is doing
2130 step-over, remove the reinsert breakpoints from the forked child.
2131
2132 2016-06-17 Yao Qi <yao.qi@linaro.org>
2133
2134 * linux-low.c (unsuspend_all_lwps): Declare.
2135 (linux_low_filter_event): If thread exited, call finish_step_over.
2136 If step-over is finished, unsuspend other threads.
2137
2138 2016-06-17 Yao Qi <yao.qi@linaro.org>
2139
2140 * linux-low.c (linux_resume_one_lwp_throw): Assert
2141 has_reinsert_breakpoints returns false.
2142 * mem-break.c (delete_disabled_breakpoints): Assert
2143 bp type isn't reinsert_breakpoint.
2144
2145 2016-06-17 Yao Qi <yao.qi@linaro.org>
2146
2147 * linux-low.c (maybe_hw_step): New function.
2148 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2149 (finish_step_over): Switch current_thread to lwp temporarily,
2150 and assert has_reinsert_breakpoints returns true.
2151 (proceed_one_lwp): Call maybe_hw_step.
2152 * mem-break.c (has_reinsert_breakpoints): New function.
2153 * mem-break.h (has_reinsert_breakpoints): Declare.
2154
2155 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2156
2157 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2158
2159 2016-05-17 Yao Qi <yao.qi@linaro.org>
2160
2161 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2162 instead of find_inferior.
2163
2164 2016-05-05 Yao Qi <yao.qi@linaro.org>
2165
2166 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2167 Initialize res to zero.
2168
2169 2016-05-05 Yao Qi <yao.qi@linaro.org>
2170
2171 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2172 to uint32_t.
2173
2174 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2175
2176 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2177 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2178 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2179
2180 2016-04-28 Par Olsson <par.olsson@windriver.com>
2181 Simon Marchi <simon.marchi@ericsson.com>
2182
2183 * tracepoint.c (write_inferior_int8): New function.
2184 (cmd_qtenable_disable): Write enable flag using
2185 write_inferior_int8.
2186
2187 2016-04-25 Yao Qi <yao.qi@linaro.org>
2188
2189 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2190 (need_step_over_p): Return zero if the LWP has pending signals
2191 can be delivered on software single step target.
2192
2193 2016-04-25 Yao Qi <yao.qi@linaro.org>
2194
2195 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2196 return instead of error.
2197
2198 2016-04-22 Yao Qi <yao.qi@linaro.org>
2199
2200 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2201 to 23.
2202
2203 2016-04-22 Yao Qi <yao.qi@linaro.org>
2204
2205 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2206 signal when stepping over breakpoint with software single
2207 step.
2208
2209 2016-04-21 Pedro Alves <palves@redhat.com>
2210
2211 * linux-s390-low.c (s390_collect_ptrace_register)
2212 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2213 add casts.
2214 (s390_check_regset): Use void * instead of gdb_byte *.
2215
2216 2016-04-20 Pedro Alves <palves@redhat.com>
2217
2218 * configure: Renegerate.
2219
2220 2016-04-20 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2223 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2224 number 16.
2225 (arm_store_gregset): Likewise.
2226
2227 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2228
2229 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2230 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2231 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2232 (amd64-avx-mpx-linux.c): New rules.
2233 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2234 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2235 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2236 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2237 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2238 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2239 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2240 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2241 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2242 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2243 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2244 * linux-x86-low.c (x86_linux_read_description): Add case for
2245 X86_XSTATE_AVX_MPX_MASK.
2246 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2247 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2248 init_registers_i386_avx_mpx_linux.
2249 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2250 (initialize_low_tracepoint): Call
2251 init_registers_i386_avx_mpx_linux.
2252 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2253 (initialize_low_tracepoint): Call
2254 init_registers_amd64_avx_mpx_linux.
2255 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2256 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2257 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2258 declarations.
2259
2260 2016-04-18 Pedro Alves <palves@redhat.com>
2261
2262 * configure: Regenerate.
2263
2264 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2265
2266 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2267 (aarch64_emit_sub): Likewise.
2268
2269 2016-04-12 Pedro Alves <palves@redhat.com>
2270
2271 * utils.c (prepare_to_throw_exception): Delete.
2272
2273 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2274
2275 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2276
2277 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2278
2279 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2280
2281 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2282
2283 * linux-aarch64-ipa.c: Add <elf.h> include.
2284 * linux-ppc-ipa.c: Add <elf.h> include.
2285 * linux-s390-ipa.c: Add <elf.h> include.
2286
2287 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2288
2289 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2290 (get_raw_reg_ptr): Likewise.
2291 (get_trace_state_variable_value_ptr): Likewise.
2292 (set_trace_state_variable_value_ptr): Likewise.
2293 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2294 char *.
2295
2296 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2297 Marcin Kościelnicki <koriakin@0x04.net>
2298
2299 PR/17221
2300 * linux-ppc-low.c (emit_insns): New function.
2301 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2302 (ppc_emit_prologue): New function.
2303 (ppc_emit_epilogue): New function.
2304 (ppc_emit_add): New function.
2305 (ppc_emit_sub): New function.
2306 (ppc_emit_mul): New function.
2307 (ppc_emit_lsh): New function.
2308 (ppc_emit_rsh_signed): New function.
2309 (ppc_emit_rsh_unsigned): New function.
2310 (ppc_emit_ext): New function.
2311 (ppc_emit_zero_ext): New function.
2312 (ppc_emit_log_not): New function.
2313 (ppc_emit_bit_and): New function.
2314 (ppc_emit_bit_or): New function.
2315 (ppc_emit_bit_xor): New function.
2316 (ppc_emit_bit_not): New function.
2317 (ppc_emit_equal): New function.
2318 (ppc_emit_less_signed): New function.
2319 (ppc_emit_less_unsigned): New function.
2320 (ppc_emit_ref): New function.
2321 (ppc_emit_const): New function.
2322 (ppc_emit_reg): New function.
2323 (ppc_emit_pop): New function.
2324 (ppc_emit_stack_flush): New function.
2325 (ppc_emit_swap): New function.
2326 (ppc_emit_stack_adjust): New function.
2327 (ppc_emit_call): New function.
2328 (ppc_emit_int_call_1): New function.
2329 (ppc_emit_void_call_2): New function.
2330 (ppc_emit_if_goto): New function.
2331 (ppc_emit_goto): New function.
2332 (ppc_emit_eq_goto): New function.
2333 (ppc_emit_ne_goto): New function.
2334 (ppc_emit_lt_goto): New function.
2335 (ppc_emit_le_goto): New function.
2336 (ppc_emit_gt_goto): New function.
2337 (ppc_emit_ge_goto): New function.
2338 (ppc_write_goto_address): New function.
2339 (ppc_emit_ops_impl): New static variable.
2340 (ppc64v1_emit_prologue): New function.
2341 (ppc64v2_emit_prologue): New function.
2342 (ppc64_emit_epilogue): New function.
2343 (ppc64_emit_add): New function.
2344 (ppc64_emit_sub): New function.
2345 (ppc64_emit_mul): New function.
2346 (ppc64_emit_lsh): New function.
2347 (ppc64_emit_rsh_signed): New function.
2348 (ppc64_emit_rsh_unsigned): New function.
2349 (ppc64_emit_ext): New function.
2350 (ppc64_emit_zero_ext): New function.
2351 (ppc64_emit_log_not): New function.
2352 (ppc64_emit_bit_and): New function.
2353 (ppc64_emit_bit_or): New function.
2354 (ppc64_emit_bit_xor): New function.
2355 (ppc64_emit_bit_not): New function.
2356 (ppc64_emit_equal): New function.
2357 (ppc64_emit_less_signed): New function.
2358 (ppc64_emit_less_unsigned): New function.
2359 (ppc64_emit_ref): New function.
2360 (ppc64_emit_const): New function.
2361 (ppc64v1_emit_reg): New function.
2362 (ppc64v2_emit_reg): New function.
2363 (ppc64_emit_pop): New function.
2364 (ppc64_emit_stack_flush): New function.
2365 (ppc64_emit_swap): New function.
2366 (ppc64v1_emit_call): New function.
2367 (ppc64v2_emit_call): New function.
2368 (ppc64v1_emit_int_call_1): New function.
2369 (ppc64v2_emit_int_call_1): New function.
2370 (ppc64v1_emit_void_call_2): New function.
2371 (ppc64v2_emit_void_call_2): New function.
2372 (ppc64_emit_if_goto): New function.
2373 (ppc64_emit_eq_goto): New function.
2374 (ppc64_emit_ne_goto): New function.
2375 (ppc64_emit_lt_goto): New function.
2376 (ppc64_emit_le_goto): New function.
2377 (ppc64_emit_gt_goto): New function.
2378 (ppc64_emit_ge_goto): New function.
2379 (ppc64v1_emit_ops_impl): New static variable.
2380 (ppc64v2_emit_ops_impl): New static variable.
2381 (ppc_emit_ops): New function.
2382 (linux_low_target): Wire in ppc_emit_ops.
2383
2384 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2385 Marcin Kościelnicki <koriakin@0x04.net>
2386
2387 PR/17221
2388 * Makefile.in: Add powerpc-*-ipa.o
2389 * configure.srv: Add ipa_obj for powerpc*-linux.
2390 * linux-ppc-ipa.c: New file.
2391 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2392 includes.
2393 (PPC_FIELD): New macro.
2394 (PPC_SEXT): New macro.
2395 (PPC_OP6): New macro.
2396 (PPC_BO): New macro.
2397 (PPC_LI): New macro.
2398 (PPC_BD): New macro.
2399 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2400 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2401 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2402 (ppc_get_thread_area): New function.
2403 (is_elfv2_inferior): New function.
2404 (gen_ds_form): New function.
2405 (GEN_STD): New macro.
2406 (GEN_STDU): New macro.
2407 (GEN_LD): New macro.
2408 (GEN_LDU): New macro.
2409 (gen_d_form): New function.
2410 (GEN_ADDI): New macro.
2411 (GEN_ADDIS): New macro.
2412 (GEN_LI): New macro.
2413 (GEN_LIS): New macro.
2414 (GEN_ORI): New macro.
2415 (GEN_ORIS): New macro.
2416 (GEN_LWZ): New macro.
2417 (GEN_STW): New macro.
2418 (GEN_STWU): New macro.
2419 (gen_xfx_form): New function.
2420 (GEN_MFSPR): New macro.
2421 (GEN_MTSPR): New macro.
2422 (GEN_MFCR): New macro.
2423 (GEN_MTCR): New macro.
2424 (GEN_SYNC): New macro.
2425 (GEN_LWSYNC): New macro.
2426 (gen_x_form): New function.
2427 (GEN_OR): New macro.
2428 (GEN_MR): New macro.
2429 (GEN_LWARX): New macro.
2430 (GEN_STWCX): New macro.
2431 (GEN_CMPW): New macro.
2432 (gen_md_form): New function.
2433 (GEN_RLDICL): New macro.
2434 (GEN_RLDICR): New macro.
2435 (gen_i_form): New function.
2436 (GEN_B): New macro.
2437 (GEN_BL): New macro.
2438 (gen_b_form): New function.
2439 (GEN_BNE): New macro.
2440 (GEN_LOAD): New macro.
2441 (GEN_STORE): New macro.
2442 (gen_limm): New function.
2443 (gen_atomic_xchg): New function.
2444 (gen_call): New function.
2445 (ppc_relocate_instruction): New function.
2446 (ppc_install_fast_tracepoint_jump_pad): New function.
2447 (ppc_get_min_fast_tracepoint_insn_len): New function.
2448 (ppc_get_ipa_tdesc_idx): New function.
2449 (the_low_target): Wire in the new functions.
2450 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2451 tdescs.
2452 * linux-ppc-tdesc.h: New file.
2453
2454 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2455
2456 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2457 (alloc_jump_pad_buffer): New function.
2458 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2459 (alloc_jump_pad_buffer): New function.
2460 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2461 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2462 (alloc_jump_pad_buffer): New function.
2463 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2464 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2465 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2466 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2467
2468 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2469
2470 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2471 * linux-amd64-ipa.c: Likewise.
2472 * linux-i386-ipa.c: Likewise.
2473 * linux-s390-ipa.c: Likewise.
2474 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2475 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2476 set_trace_state_variable_value_ptr.
2477 (struct ipa_sym_addresses): Likewise.
2478 (symbol_list): Likewise.
2479 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2480 accessing gdb_collect directly.
2481 (gdb_collect_ptr_type): New typedef.
2482 (get_raw_reg_ptr_type): New typedef.
2483 (get_trace_state_variable_value_ptr_type): New typedef.
2484 (set_trace_state_variable_value_ptr_type): New typedef.
2485 (gdb_collect_ptr): New global.
2486 (get_raw_reg_ptr): New global.
2487 (get_trace_state_variable_value_ptr): New global.
2488 (set_trace_state_variable_value_ptr): New global.
2489 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2490 accessing get_raw_reg directly.
2491 (get_get_tsv_func_addr): Likewise for
2492 get_trace_state_variable_value_ptr.
2493 (get_set_tsv_func_addr): Likewise for
2494 set_trace_state_variable_value_ptr.
2495 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2496
2497 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2498
2499 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2500
2501 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2502
2503 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2504 packets.
2505 (relocate_instruction): Remove own_buf.
2506 * server.c (own_buf): Make global.
2507 (handle_v_requests): Make global.
2508 * server.h (own_buf): New declaration.
2509 (handle_v_requests): New prototype.
2510
2511 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2512
2513 PR 18377
2514 * linux-s390-low.c (add_insns): New function.
2515 (s390_emit_prologue): New function.
2516 (s390_emit_epilogue): New function.
2517 (s390_emit_add): New function.
2518 (s390_emit_sub): New function.
2519 (s390_emit_mul): New function.
2520 (s390_emit_lsh): New function.
2521 (s390_emit_rsh_signed): New function.
2522 (s390_emit_rsh_unsigned): New function.
2523 (s390_emit_ext): New function.
2524 (s390_emit_log_not): New function.
2525 (s390_emit_bit_and): New function.
2526 (s390_emit_bit_or): New function.
2527 (s390_emit_bit_xor): New function.
2528 (s390_emit_bit_not): New function.
2529 (s390_emit_equal): New function.
2530 (s390_emit_less_signed): New function.
2531 (s390_emit_less_unsigned): New function.
2532 (s390_emit_ref): New function.
2533 (s390_emit_if_goto): New function.
2534 (s390_emit_goto): New function.
2535 (s390_write_goto_address): New function.
2536 (s390_emit_litpool): New function.
2537 (s390_emit_const): New function.
2538 (s390_emit_call): New function.
2539 (s390_emit_reg): New function.
2540 (s390_emit_pop): New function.
2541 (s390_emit_stack_flush): New function.
2542 (s390_emit_zero_ext): New function.
2543 (s390_emit_swap): New function.
2544 (s390_emit_stack_adjust): New function.
2545 (s390_emit_set_r2): New function.
2546 (s390_emit_int_call_1): New function.
2547 (s390_emit_void_call_2): New function.
2548 (s390_emit_eq_goto): New function.
2549 (s390_emit_ne_goto): New function.
2550 (s390_emit_lt_goto): New function.
2551 (s390_emit_le_goto): New function.
2552 (s390_emit_gt_goto): New function.
2553 (s390_emit_ge_goto): New function.
2554 (s390x_emit_prologue): New function.
2555 (s390x_emit_epilogue): New function.
2556 (s390x_emit_add): New function.
2557 (s390x_emit_sub): New function.
2558 (s390x_emit_mul): New function.
2559 (s390x_emit_lsh): New function.
2560 (s390x_emit_rsh_signed): New function.
2561 (s390x_emit_rsh_unsigned): New function.
2562 (s390x_emit_ext): New function.
2563 (s390x_emit_log_not): New function.
2564 (s390x_emit_bit_and): New function.
2565 (s390x_emit_bit_or): New function.
2566 (s390x_emit_bit_xor): New function.
2567 (s390x_emit_bit_not): New function.
2568 (s390x_emit_equal): New function.
2569 (s390x_emit_less_signed): New function.
2570 (s390x_emit_less_unsigned): New function.
2571 (s390x_emit_ref): New function.
2572 (s390x_emit_if_goto): New function.
2573 (s390x_emit_const): New function.
2574 (s390x_emit_call): New function.
2575 (s390x_emit_reg): New function.
2576 (s390x_emit_pop): New function.
2577 (s390x_emit_stack_flush): New function.
2578 (s390x_emit_zero_ext): New function.
2579 (s390x_emit_swap): New function.
2580 (s390x_emit_stack_adjust): New function.
2581 (s390x_emit_int_call_1): New function.
2582 (s390x_emit_void_call_2): New function.
2583 (s390x_emit_eq_goto): New function.
2584 (s390x_emit_ne_goto): New function.
2585 (s390x_emit_lt_goto): New function.
2586 (s390x_emit_le_goto): New function.
2587 (s390x_emit_gt_goto): New function.
2588 (s390x_emit_ge_goto): New function.
2589 (s390_emit_ops): New function.
2590 (struct linux_target_ops): Fill in emit_ops hook.
2591
2592 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2593
2594 PR 18377
2595 * Makefile.in: Add s390 IPA files.
2596 * configure.srv: Build IPA for s390.
2597 * linux-s390-ipa.c: New file.
2598 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2599 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2600 (tdesc_s390_linux32): Likewise.
2601 (init_registers_s390_linux32v1): Likewise.
2602 (tdesc_s390_linux32v1): Likewise.
2603 (init_registers_s390_linux32v2): Likewise.
2604 (tdesc_s390_linux32v2): Likewise.
2605 (init_registers_s390_linux64): Likewise.
2606 (tdesc_s390_linux64): Likewise.
2607 (init_registers_s390_linux64v1): Likewise.
2608 (tdesc_s390_linux64v1): Likewise.
2609 (init_registers_s390_linux64v2): Likewise.
2610 (tdesc_s390_linux64v2): Likewise.
2611 (init_registers_s390_te_linux64): Likewise.
2612 (tdesc_s390_te_linux64): Likewise.
2613 (init_registers_s390_vx_linux64): Likewise.
2614 (tdesc_s390_vx_linux64): Likewise.
2615 (init_registers_s390_tevx_linux64): Likewise.
2616 (tdesc_s390_tevx_linux64): Likewise.
2617 (init_registers_s390x_linux64): Likewise.
2618 (tdesc_s390x_linux64): Likewise.
2619 (init_registers_s390x_linux64v1): Likewise.
2620 (tdesc_s390x_linux64v1): Likewise.
2621 (init_registers_s390x_linux64v2): Likewise.
2622 (tdesc_s390x_linux64v2): Likewise.
2623 (init_registers_s390x_te_linux64): Likewise.
2624 (tdesc_s390x_te_linux64): Likewise.
2625 (init_registers_s390x_vx_linux64): Likewise.
2626 (tdesc_s390x_vx_linux64): Likewise.
2627 (init_registers_s390x_tevx_linux64): Likewise.
2628 (tdesc_s390x_tevx_linux64): Likewise.
2629 (have_hwcap_s390_vx): New static variable.
2630 (s390_arch_setup): Fill have_hwcap_s390_vx.
2631 (s390_get_thread_area): New function.
2632 (s390_ft_entry_gpr_esa): New const.
2633 (s390_ft_entry_gpr_zarch): New const.
2634 (s390_ft_entry_misc): New const.
2635 (s390_ft_entry_fr): New const.
2636 (s390_ft_entry_vr): New const.
2637 (s390_ft_main_31): New const.
2638 (s390_ft_main_64): New const.
2639 (s390_ft_exit_fr): New const.
2640 (s390_ft_exit_vr): New const.
2641 (s390_ft_exit_misc): New const.
2642 (s390_ft_exit_gpr_esa): New const.
2643 (s390_ft_exit_gpr_zarch): New const.
2644 (append_insns): New function.
2645 (s390_relocate_instruction): New function.
2646 (s390_install_fast_tracepoint_jump_pad): New function.
2647 (s390_get_min_fast_tracepoint_insn_len): New function.
2648 (s390_get_ipa_tdesc_idx): New function.
2649 (struct linux_target_ops): Wire in the above functions.
2650 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2651 * linux-s390-tdesc.h: New file.
2652
2653 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2654
2655 * linux-s390-low.c (s390_supports_tracepoints): New function.
2656 (struct linux_target_ops): Fill supports_tracepoints hook.
2657
2658 2016-03-18 Yao Qi <yao.qi@linaro.org>
2659
2660 * linux-low.c (lwp_signal_can_be_delivered): New function.
2661 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2662
2663 2016-03-18 Yao Qi <yao.qi@linaro.org>
2664
2665 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2666 0 if signal is enqueued. Remove 'signal' from one debugging
2667 message. Move one debugging message to some lines below.
2668 Remove code setting 'signal' to 0.
2669
2670 2016-03-18 Yao Qi <yao.qi@linaro.org>
2671
2672 * linux-low.c (linux_low_filter_event): Remove redundant
2673 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2674
2675 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2676
2677 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2678 (struct linux_target_ops): Wire in the above.
2679
2680 2016-03-03 Yao Qi <yao.qi@linaro.org>
2681
2682 * linux-low.c: Update comments to start_step_over.
2683
2684 2016-03-03 Yao Qi <yao.qi@linaro.org>
2685
2686 PR server/19736
2687 * linux-low.c (handle_extended_wait): Set child suspended
2688 if event_lwp->bp_reinsert isn't zero.
2689
2690 2016-03-02 Yao Qi <yao.qi@linaro.org>
2691
2692 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2693 enqueue_pending_signal.
2694
2695 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2696
2697 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2698 is actually loaded.
2699
2700 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2701
2702 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2703 (s390_regmap_3264) [!__s390x__]: New global.
2704 (s390_collect_ptrace_register): Skip map entries containing -1.
2705 (s390_supply_ptrace_register): Ditto.
2706 (s390_fill_gprs_high): New function.
2707 (s390_store_gprs_high): New function.
2708 (s390_regsets): Add NT_S390_HIGH_GPRS.
2709 (s390_get_hwcap): Enable on 31-bit.
2710 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2711 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2712 Detect NT_S390_HIGH_GPRS.
2713 (s390_usrregs_info_3264): Enable on 31-bit.
2714 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2715 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2716
2717 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2718
2719 PR gdb/13808
2720 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2721 * configure.srv: Ditto.
2722 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2723 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2724 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2725 (init_registers_amd64_linux): Remove prototype.
2726 (tdesc_amd64_linux): Remove declaration.
2727 (get_ipa_tdesc): New function.
2728 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2729 initialize remaining tdescs.
2730 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2731 (init_registers_i386_linux): Remove prototype.
2732 (tdesc_i386_linux): Remove declaration.
2733 (get_ipa_tdesc): New function.
2734 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2735 initialize remaining tdescs.
2736 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2737 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2738 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2739 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2740 (x86_get_ipa_tdesc_idx): New function.
2741 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2742 * linux-x86-tdesc.h: New file.
2743 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2744 (target_get_ipa_tdesc_idx): New macro.
2745 * tracepoint.c (ipa_tdesc_idx): New macro.
2746 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2747 (symbol_list): Add ipa_tdesc_idx.
2748 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2749 (ipa_tdesc): Remove.
2750 (ipa_tdesc_idx): New variable.
2751 (get_context_regcache): Use get_ipa_tdesc.
2752 (gdb_collect): Ditto.
2753 (gdb_probe): Ditto.
2754 * tracepoint.h (get_ipa_tdesc): New prototype.
2755 (ipa_tdesc): Remove.
2756
2757 2016-02-24 Pedro Alves <palves@redhat.com>
2758
2759 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2760 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2761 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2762 Factor out common code between the USE_SIGTRAP_SIGINFO and
2763 !USE_SIGTRAP_SIGINFO blocks.
2764 (linux_low_filter_event): Call save_stop_reason instead of
2765 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2766 Update comments.
2767 (linux_wait_1): Update comments.
2768
2769 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2770
2771 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2772 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2773 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2774 ppc_insert_point, ppc_remove_point.
2775
2776 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2777
2778 * linux-s390-low.c (s390_supports_z_point_type): New function.
2779 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2780
2781 2016-02-16 Yao Qi <yao.qi@linaro.org>
2782
2783 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2784 PC. Get pc from regcache_read_pc.
2785
2786 2016-02-12 Yao Qi <yao.qi@linaro.org>
2787
2788 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2789 or linux_get_pc_32bit.
2790 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2791
2792 2016-02-12 Yao Qi <yao.qi@linaro.org>
2793
2794 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2795 arm_linux_get_next_pcs_fixup.
2796
2797 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2798
2799 * tracepoint.c (x_tracepoint_action_download): Change
2800 write_inferior_data_ptr to write_inferior_data_pointer.
2801 (cmd_qtstart): Likewise.
2802 (write_inferior_data_ptr): Remove.
2803 (download_agent_expr): Change write_inferior_data_ptr to
2804 write_inferior_data_pointer.
2805 (download_tracepoint_1): Likewise.
2806 (download_tracepoint): Likewise.
2807 (download_trace_state_variables): Likewise.
2808
2809 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2810 Marcin Kościelnicki <koriakin@0x04.net>
2811
2812 * tracepoint.c (struct tracepoint_action_ops): Remove.
2813 (struct tracepoint_action): Remove ops.
2814 (m_tracepoint_action_download, r_tracepoint_action_download)
2815 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2816 size and offset accordingly.
2817 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2818 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2819 (tracepoint_action_send, tracepoint_action_download): New functions.
2820 Helpers for trace action handlers.
2821 (add_tracepoint_action): Remove setup actions ops.
2822 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2823
2824 2016-02-10 Yao Qi <yao.qi@linaro.org>
2825
2826 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2827
2828 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2829
2830 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2831 to AC_OUTPUT.
2832 * configure: Regenerate.
2833
2834 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2835
2836 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2837 void * to gdb_byte *.
2838 * linux-low.c (siginfo_fixup): Likewise.
2839 (linux_xfer_siginfo): Likewise.
2840 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2841 Likewise.
2842 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2843
2844 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2845
2846 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2847 to srv_tgtobj.
2848 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2849 to srv_tgtobj.
2850 * linux-x86-low.c [__x86_64__]: Include
2851 "nat/amd64-linux-siginfo.h".
2852 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2853 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2854 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2855 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2856 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2857 (cpt_si_fd, si_timerid, si_overrun): Move from
2858 nat/amd64-linux-siginfo.c.
2859 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2860
2861 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2862
2863 * server.c (skip_to_semicolon): Remove.
2864 (process_point_options): Use strchrnul instead of
2865 skip_to_semicolon.
2866
2867 2016-01-26 Yao Qi <yao.qi@linaro.org>
2868
2869 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2870 * linux-low.c (install_software_single_step_breakpoints): Don't
2871 call regcache_read_pc.
2872 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2873 argument pc.
2874
2875 2016-01-26 Yao Qi <yao.qi@linaro.org>
2876
2877 * linux-low.c (install_software_single_step_breakpoints): Call
2878 regcache_read_pc instead of get_pc.
2879
2880 2016-01-26 Yao Qi <yao.qi@linaro.org>
2881
2882 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2883 (unblock_async_io): Rename to ...
2884 (block_unblock_async_io): ... it. New function.
2885 (enable_async_io): Don't install SIGIO handler. Unblock it
2886 instead.
2887 (disable_async_io): Don't ignore SIGIO. Block it instead.
2888 (initialize_async_io): Install SIGIO handler. Don't call
2889 unblock_async_io.
2890
2891 2016-01-26 Yao Qi <yao.qi@linaro.org>
2892
2893 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2894 first character is '\003', call *the_target->request_interrupt.
2895
2896 2016-01-25 Yao Qi <yao.qi@linaro.org>
2897
2898 * remote-utils.c (new_thread_notify): Remove.
2899 (dead_thread_notify): Likewise.
2900 * remote-utils.h (new_thread_notify): Remove declaration.
2901 (dead_thread_notify): Likewise.
2902
2903 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2904
2905 * gdb.trace/pending.exp: Fix expected message on continue.
2906
2907 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2908
2909 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2910 it works properly on big-endian machines where sizeof (CORE_ADDR)
2911 != sizeof (void *).
2912
2913 2016-01-21 Pedro Alves <palves@redhat.com>
2914
2915 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2916 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2917 * configure: Regenerate.
2918
2919 2016-01-21 Yao Qi <yao.qi@linaro.org>
2920
2921 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2922 is_thumb and set it according to CPSR saved on the stack.
2923 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2924 arm_sigreturn_next_pc.
2925
2926 2016-01-18 Yao Qi <yao.qi@linaro.org>
2927
2928 * linux-low.c (linux_set_pc_64bit): New function.
2929 (linux_get_pc_64bit): New function.
2930 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2931 Declare.
2932 * linux-sparc-low.c (debug_threads): Remove declaration.
2933 (sparc_get_pc): Remove.
2934 (the_low_target): Use linux_get_pc_64bit instead of
2935 sparc_get_pc.
2936 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2937 (the_low_target): Use linux_get_pc_64bit and
2938 linux_set_pc_64bit.
2939
2940 2016-01-18 Yao Qi <yao.qi@linaro.org>
2941
2942 * linux-arm-low.c (debug_threads): Remove declaration.
2943 (arm_get_pc, arm_set_pc): Remove.
2944 (the_low_target): Use linux_get_pc_32bit and
2945 linux_set_pc_32bit.
2946 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2947 (the_low_target): Use linux_get_pc_32bit and
2948 linux_set_pc_32bit.
2949 * linux-cris-low.c (debug_threads): Remove declaration.
2950 (cris_get_pc, cris_set_pc,): Remove.
2951 (the_low_target): Use linux_get_pc_32bit and
2952 linux_set_pc_32bit.
2953 * linux-crisv32-low.c (debug_threads): Remove declaration.
2954 (cris_get_pc, cris_set_pc): Remove.
2955 (the_low_target): Use linux_get_pc_32bit and
2956 linux_set_pc_32bit.
2957 * linux-low.c: Include inttypes.h.
2958 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2959 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2960 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2961 (the_low_target): Use linux_get_pc_32bit and
2962 linux_set_pc_32bit.
2963 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2964 (the_low_target): Use linux_get_pc_32bit and
2965 linux_set_pc_32bit.
2966 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2967 (the_low_target): Use linux_get_pc_32bit and
2968 linux_set_pc_32bit.
2969 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2970 (the_low_target): Use linux_get_pc_32bit and
2971 linux_set_pc_32bit.
2972 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2973 (the_low_target): Use linux_get_pc_32bit and
2974 linux_set_pc_32bit.
2975
2976 2016-01-18 Gary Benson <gbenson@redhat.com>
2977
2978 * configure.ac (AC_FUNC_FORK): New check.
2979 * config.in: Regenerate.
2980 * configure: Likewise.
2981
2982 2016-01-14 Yao Qi <yao.qi@linaro.org>
2983
2984 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2985 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2986 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2987 arm_get_next_pcs_ctor.
2988
2989 2016-01-12 Josh Stone <jistone@redhat.com>
2990 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2991
2992 * inferiors.h: Include "gdb_vecs.h".
2993 (struct process_info): Add syscalls_to_catch.
2994 * inferiors.c (remove_process): Free syscalls_to_catch.
2995 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2996 syscall_return stops.
2997 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2998 * server.c (handle_general_set): Handle QCatchSyscalls.
2999 (handle_query): Report support for QCatchSyscalls.
3000 * target.h (struct target_ops): Add supports_catch_syscall.
3001 (target_supports_catch_syscall): New macro.
3002 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3003 (struct lwp_info): Add syscall_state.
3004 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3005 Maintain syscall_state and syscalls_to_catch across exec.
3006 (get_syscall_trapinfo): New function, proxy to the_low_target.
3007 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3008 (linux_low_filter_event): Toggle syscall_state entry/return for
3009 syscall traps, and set it ignored for all others.
3010 (gdb_catching_syscalls_p): New function.
3011 (gdb_catch_this_syscall_p): New function.
3012 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3013 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3014 (linux_supports_catch_syscall): New function.
3015 (linux_target_ops): Install it.
3016 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3017 (the_low_target): Install it.
3018
3019 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3020
3021 * acinclude.m4: Include new ../warning.m4 file.
3022 * configure: Regenerated.
3023 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3024
3025 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3026
3027 * ax.c (is_goto_target): Mark static.
3028 * linux-low.c (register_addr): Likewise.
3029 (linux_fetch_registers, linux_store_registers): Likewise.
3030 * mem-break.c (any_persistent_commands): Fix old prototype.
3031 (add_commands_to_breakpoint): Mark static.
3032 * regcache.c (find_register_by_name): Delete unused func.
3033 * remote-utils.c (hex_or_minus_one): Mark static.
3034 * server.c (monitor_show_help): Mark static.
3035 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3036 handle_v_requests): Likewise.
3037
3038 2016-01-12 Pedro Alves <palves@redhat.com>
3039
3040 Remove use of the registered trademark symbol throughout.
3041
3042 2016-01-08 Yao Qi <yao.qi@linaro.org>
3043
3044 * remote-utils.c (getpkt): If c is '\003', call target hook
3045 request_interrupt.
3046
3047 2016-01-06 Yao Qi <yao.qi@linaro.org>
3048
3049 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3050 linux-aarch32-low.c.
3051 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3052 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3053 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3054 (thumb2_breakpoint): Declare.
3055 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3056 linux-aarch32-low.h.
3057 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3058 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3059 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3060
3061 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3062
3063 * gdbreplay.c (gdbreplay_version): Change copyright year in
3064 version message.
3065 * server.c (gdbserver_version): Likewise.
3066
3067 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3068
3069 * server.c (crc32_table): Delete.
3070 (crc32): Use libiberty's xcrc32 function.
3071
3072 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3073
3074 * lynx-low.c (lynx_delete_thread_callback): New function.
3075 (lynx_mourn): Properly delete our process and all of its
3076 threads. Remove call to clear_inferiors.
3077
3078 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3079
3080 * target.c (thread_search_callback): Add check that
3081 the thread_stopped target callback is not NULL before
3082 calling it.
3083
3084 2015-12-21 Yao Qi <yao.qi@linaro.org>
3085
3086 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3087 arm breakpoint.
3088
3089 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3090
3091 * server.c (handle_query): Call target_supports_software_single_step.
3092
3093 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3094
3095 * linux-low.c (single_step): New function.
3096 (linux_resume_one_lwp_throw): Call single_step.
3097 (start_step_over): Likewise.
3098
3099 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3100
3101 * Makefile.in (SFILES): Append arch/arm-linux.c,
3102 arch/arm-get-next-pcs.c.
3103 (arm-linux.o): New rule.
3104 (arm-get-next-pcs.o): New rule.
3105 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3106 arm-linux.o.
3107 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3108 to linux-aarch32-low.c.
3109 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3110 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3111 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3112 (thumb2_breakpoint_len): Likewise.
3113 (arm_is_thumb_mode): Make non-static.
3114 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3115 from linux-aarch32-low.c.
3116 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3117 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3118 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3119 (thumb2_breakpoint_len): Likewise.
3120 (arm_is_thumb_mode): New declaration.
3121 * linux-arm-low.c: Include arch/arm-linux.h
3122 aarch/arm-get-next-pcs.h, sys/syscall.h.
3123 (get_next_pcs_ops): New struct.
3124 (get_next_pcs_addr_bits_remove): New function.
3125 (get_next_pcs_is_thumb): New function.
3126 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3127 (arm_sigreturn_next_pc): Likewise.
3128 (get_next_pcs_syscall_next_pc): Likewise.
3129 (arm_gdbserver_get_next_pcs): Likewise.
3130 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3131 Initialize.
3132 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3133 * server.h: Include gdb_vecs.h.
3134
3135 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3136
3137 * Makefile.in (SFILES): Append common/common-regcache.c.
3138 (OBS): Append common-regcache.o.
3139 (common-regcache.o): New rule.
3140 * regcache.c (init_register_cache): Initialize cache to
3141 REG_UNAVAILABLE.
3142 (regcache_raw_read_unsigned): New function.
3143 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3144 register_status enum.
3145
3146 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3147
3148 * linux-aarch64-low.c (the_low_targets): Rename
3149 breakpoint_reinsert_addr to get_next_pcs.
3150 * linux-arm-low.c (the_low_targets): Likewise.
3151 * linux-bfin-low.c (the_low_targets): Likewise.
3152 * linux-cris-low.c (the_low_targets): Likewise.
3153 * linux-crisv32-low.c (the_low_targets): Likewise.
3154 * linux-low.c (can_software_single_step): Likewise.
3155 (install_software_single_step_breakpoints): New function.
3156 (start_step_over): Use install_software_single_step_breakpoints.
3157 * linux-low.h: New CORE_ADDR vector.
3158 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3159 get_next_pcs.
3160 * linux-mips-low.c (the_low_targets): Likewise.
3161 * linux-nios2-low.c (the_low_targets): Likewise.
3162 * linux-sparc-low.c (the_low_targets): Likewise.
3163
3164 2015-12-17 Pedro Alves <palves@redhat.com>
3165
3166 * linux-low.c (linux_kill_one_lwp): Remove references to
3167 LinuxThreads.
3168 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3169 to 'kill'.
3170 (linux_init_signals): Delete.
3171 (initialize_low): Adjust.
3172 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3173
3174 2015-12-16 Pedro Alves <palves@redhat.com>
3175
3176 * configure.ac (compiler warning flags): When testing a
3177 -Wno-foo option, check whether -Wfoo works instead.
3178 * configure: Regenerate.
3179
3180 2015-12-11 Don Breazeal <donb@codesourcery.com>
3181
3182 * server.c (process_serial_event): Don't exit from gdbserver
3183 in remote mode if there are still active inferiors.
3184
3185 2015-12-11 Yao Qi <yao.qi@linaro.org>
3186
3187 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3188 arm_breakpoint_at if the process is 32-bit.
3189
3190 2015-12-11 Yao Qi <yao.qi@linaro.org>
3191
3192 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3193 arm breakpoint.
3194
3195 2015-12-07 Yao Qi <yao.qi@linaro.org>
3196
3197 * configure.srv: Append arm.o to srv_tgtobj for
3198 aarch64*-*-linux* target.
3199 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3200 from linux-arm-low.c.
3201 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3202 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3203 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3204 (thumb2_breakpoint_len): Likewise.
3205 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3206 (arm_breakpoint_kinds): Likewise.
3207 (arm_breakpoint_kind_from_pc): Likewise.
3208 (arm_sw_breakpoint_from_kind): Likewise.
3209 (arm_breakpoint_kind_from_current_state): Likewise.
3210 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3211 (arm_sw_breakpoint_from_kind): Declare.
3212 (arm_breakpoint_kind_from_current_state): Declare.
3213 (arm_breakpoint_at): Declare.
3214 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3215 arm_sw_breakpoint_from_kind if process is 32-bit.
3216 (aarch64_breakpoint_kind_from_pc): New function.
3217 (aarch64_breakpoint_kind_from_current_state): New function.
3218 (the_low_target): Initialize fields breakpoint_kind_from_pc
3219 and breakpoint_kind_from_current_state.
3220 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3221 linux-aarch32-low.c.
3222 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3223 (arm_breakpoint, arm_breakpoint_len): Likewise.
3224 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3225 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3226 (arm_is_thumb_mode): Likewise.
3227 (arm_breakpoint_at): Likewise.
3228 (arm_breakpoint_kind_from_pc): Likewise.
3229 (arm_sw_breakpoint_from_kind): Likewise.
3230 (arm_breakpoint_kind_from_current_state): Likewise.
3231
3232 Revert:
3233 2015-08-04 Yao Qi <yao.qi@linaro.org>
3234
3235 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3236 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3237 * server.c (extended_protocol): Remove "static".
3238 * server.h (extended_protocol): Declare it.
3239
3240 2015-12-04 Josh Stone <jistone@redhat.com>
3241
3242 * target.h (struct target_ops) <arch_setup>: Rename to ...
3243 (struct target_ops) <post_create_inferior>: ... this.
3244 (target_arch_setup): Rename to ...
3245 (target_post_create_inferior): ... this, calling post_create_inferior.
3246 * server.c (start_inferior): Update target_arch_setup calls to
3247 target_post_create_inferior.
3248 * linux-low.c (linux_low_ptrace_options): Forward declare.
3249 (linux_arch_setup): Update its comment for general use.
3250 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3251 (struct linux_target_ops): Use linux_post_create_inferior.
3252 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3253 to post_create_inferior.
3254 * nto-low.c (struct nto_target_ops): Likewise.
3255 * spu-low.c (struct spu_target_ops): Likewise.
3256 * win32-low.c (struct win32_target_ops): Likewise.
3257
3258 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3259
3260 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3261
3262 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3263
3264 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3265 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3266 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3267 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3268 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3269 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3270 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3271 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3272 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3273 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3274 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3275 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3276
3277 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3278
3279 * linux-low.c (linux_look_up_symbols): Don't call
3280 linux_supports_traceclone.
3281 * linux-low.h (thread_db_init): Remove use_events argument.
3282 * thread-db.c (thread_db_use_event): Remove global variable.
3283 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3284 (struct thread_db) <td_create_bp>: Remove field.
3285 (thread_db_create_event): Remove function.
3286 (thread_db_enable_reporting): Likewise.
3287 (find_one_thread): Don't check for thread_db_use_events.
3288 (attach_thread): Likewise.
3289 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3290 (try_thread_db_load_1): Don't check for thread_db_use_events.
3291 (thread_db_init): Remove use_events argument and thread events
3292 handling.
3293 (remove_thread_event_breakpoints): Remove function.
3294 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3295
3296 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3297
3298 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3299 New function.
3300 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3301 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3302 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3303 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3304 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3305 Initialize.
3306 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3307 New function.
3308 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3309 * linux-low.c (can_hardware_single_step): Use
3310 supports_hardware_single_step.
3311 (can_software_single_step): New function.
3312 (start_step_over): Call can_software_single_step.
3313 (linux_supports_hardware_single_step): New function.
3314 (struct target_ops) <supports_software_single_step>: Initialize.
3315 * linux-low.h (struct linux_target_ops)
3316 <supports_hardware_single_step>: Initialize.
3317 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3318 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3319 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3320 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3321 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3322 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3323 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3324 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3325 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3326 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3327 Initialize.
3328 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3329 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3330 Initialize.
3331 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3332 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3333 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3334 New function.
3335 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3336 * target.h (struct target_ops): <supports_software_single_step>:
3337 New field.
3338 (target_supports_software_single_step): New macro.
3339
3340 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3341
3342 * linux-low.c (linux_wait_1): Fix pc advance condition.
3343 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3344 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3345
3346 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3347
3348 * linux-arm-low.c (arm_is_thumb_mode): New function.
3349 (arm_breakpoint_at): Use arm_is_thumb_mode.
3350 (arm_breakpoint_kind_from_current_state): New function.
3351 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3352 Initialize.
3353 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3354 (linux_breakpoint_kind_from_current_state): New function.
3355 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3356 * linux-low.h (struct linux_target_ops)
3357 <breakpoint_kind_from_current_state>: New field.
3358 * target.h (struct target_ops): Likewise.
3359 (target_breakpoint_kind_from_current_state): New macro.
3360
3361 2015-11-30 Pedro Alves <palves@redhat.com>
3362
3363 * linux-low.c (linux_resume): Wake up the event loop before
3364 returning.
3365
3366 2015-11-30 Pedro Alves <palves@redhat.com>
3367
3368 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3369 check.
3370 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3371 to -1.
3372 * target.c (struct thread_search): New structure.
3373 (thread_search_callback): New function.
3374 (prev_general_thread): New global.
3375 (prepare_to_access_memory, done_accessing_memory): New functions.
3376 * target.h (prepare_to_access_memory, done_accessing_memory):
3377 Replace macros with function declarations.
3378
3379 2015-11-30 Pedro Alves <palves@redhat.com>
3380
3381 PR 14618
3382 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3383 report TARGET_WAITKIND_NO_RESUMED.
3384 * remote-utils.c (prepare_resume_reply): Handle
3385 TARGET_WAITKIND_NO_RESUMED.
3386 * server.c (report_no_resumed): New global.
3387 (handle_query) <qSupported>: Handle "no-resumed+". Report
3388 "no-resumed+" support.
3389 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3390 return error if the client doesn't support no-resumed events.
3391 (push_stop_notification): New function.
3392 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3393 events if the client supports them.
3394
3395 2015-11-30 Pedro Alves <palves@redhat.com>
3396
3397 * linux-low.c (thread_still_has_status_pending_p): Don't check
3398 vCont;t here.
3399 (lwp_resumed): New function.
3400 (status_pending_p_callback): Return early if the LWP is not
3401 supposed to be resumed.
3402
3403 2015-11-30 Pedro Alves <palves@redhat.com>
3404
3405 * linux-low.c (handle_extended_wait): Assert that the LWP's
3406 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3407 thread create events, leave the new child's status pending.
3408 (linux_low_filter_event): If GDB wants to hear about thread exit
3409 events, leave the LWP marked dead and don't delete it.
3410 (linux_wait_for_event_filtered): Don't check for thread exit.
3411 (filter_exit_event): New function.
3412 (linux_wait_1): Use it, when returning an exit event.
3413 (linux_resume_one_lwp_throw): Assert that the LWP's
3414 waitstatus is TARGET_WAITKIND_IGNORE.
3415 * remote-utils.c (prepare_resume_reply): Handle
3416 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3417 * server.c (report_thread_events): New global.
3418 (handle_general_set): Handle QThreadEvents.
3419 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3420 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3421 TARGET_WAITKIND_THREAD_EXITED.
3422 * server.h (report_thread_events): Declare.
3423
3424 2015-11-30 Pedro Alves <palves@redhat.com>
3425
3426 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3427 the thread's last_resume_kind was resume_stop.
3428
3429 2015-11-30 Pedro Alves <palves@redhat.com>
3430
3431 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3432 before returning.
3433
3434 2015-11-30 Pedro Alves <palves@redhat.com>
3435
3436 * server.c (handle_v_requests): Handle vCtrlC.
3437
3438 2015-11-30 Pedro Alves <palves@redhat.com>
3439
3440 * gdbthread.h (find_any_thread_of_pid): Declare.
3441 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3442 functions.
3443 * server.c (handle_query): If current_thread is NULL, look for
3444 another thread of the selected process.
3445
3446 2015-11-26 Daniel Colascione <dancol@dancol.org>
3447 Simon Marchi <simon.marchi@ericsson.com>
3448
3449 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3450 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3451 name in reply.
3452 * target.h (struct target_ops) <thread_name>: New field.
3453 (target_thread_name): New macro.
3454
3455 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3456
3457 * regcache.h (regcache_invalidate_pid): Add declaration.
3458 * regcache.c (regcache_invalidate_pid): New function, extracted
3459 from regcache_invalidate.
3460 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3461 Add trivial documentation comment.
3462 * lynx-low.c: Use regcache_invalidate_pid instead of
3463 regcache_invalidate.
3464
3465 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3466
3467 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3468 and Elf64_auxv_t if the target is Android.
3469
3470 2015-11-22 Doug Evans <xdje42@gmail.com>
3471
3472 * target.h: #include <sys/types.h>.
3473
3474 2015-11-19 Pedro Alves <palves@redhat.com>
3475
3476 * linux-low.c (linux_process_qsupported): Change prototype.
3477 Adjust.
3478 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3479 Change prototype.
3480 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3481 and adjust to loop over all features.
3482 * server.c (handle_query) <qSupported>: Adjust to call
3483 target_process_qsupported once, passing it a vector of unprocessed
3484 features.
3485 * target.h (struct target_ops) <process_qsupported>: Change
3486 prototype.
3487 (target_process_qsupported): Adjust.
3488
3489 2015-11-19 Pedro Alves <palves@redhat.com>
3490
3491 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3492 mode.
3493 * configure: Regenerate.
3494
3495 2015-11-19 Pedro Alves <palves@redhat.com>
3496
3497 * configure: Regenerate.
3498
3499 2015-11-19 Yao Qi <yao.qi@linaro.org>
3500
3501 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3502 type to uint32_t.
3503
3504 2015-11-19 Yao Qi <yao.qi@linaro.org>
3505
3506 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3507 (struct aarch64_operand): Move enum out.
3508
3509 2015-11-19 Yao Qi <yao.qi@linaro.org>
3510
3511 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3512 struct user_fpsimd_state *.
3513 (aarch64_store_fpregset): Likewise.
3514
3515 2015-11-19 Yao Qi <yao.qi@linaro.org>
3516
3517 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3518 struct user_pt_regs *.
3519 (aarch64_store_gregset): Likewise.
3520
3521 2015-11-18 Pedro Alves <palves@redhat.com>
3522
3523 * Makefile.in (all_object_files): Add $IPA_OBJS.
3524
3525 2015-11-17 Pedro Alves <palves@redhat.com>
3526
3527 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3528 GDB_SIGNAL_0 and gdb_signal_to_string.
3529
3530 2015-11-17 Pedro Alves <palves@redhat.com>
3531
3532 * win32-low.c (handle_output_debug_string): Remove parameter.
3533 (win32_kill): Remove our_status local and adjust call to
3534 handle_output_debug_string.
3535 (get_child_debug_event): Adjust call to
3536 handle_output_debug_string.
3537
3538 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3539
3540 * linux-mips-low.c (mips_fill_gregset): Add cast.
3541 (mips_store_gregset): Likewise.
3542 (mips_fill_fpregset): Likewise.
3543 (mips_store_fpregset): Likewise.
3544
3545 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3546
3547 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3548 priv.
3549
3550 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3551
3552 * linux-mips-low.c (mips_linux_new_thread): Change type of
3553 watch_type to enum target_hw_bp_type.
3554
3555 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3556
3557 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3558 Change return type to arm_hwbp_type.
3559
3560 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3561
3562 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3563 (arm_store_gregset): Likewise.
3564 * linux-arm-low.c (arm_get_hwcap): Likewise.
3565 (arm_read_description): Likewise.
3566
3567 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3568
3569 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3570
3571 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3572
3573 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3574 (ppc_fill_vsxregset): Likewise.
3575 (ppc_store_vsxregset): Likewise.
3576 (ppc_fill_vrregset): Likewise.
3577 (ppc_store_vrregset): Likewise.
3578 (ppc_fill_evrregset): Likewise.
3579 (ppc_store_evrregset): Likewise.
3580
3581 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3582
3583 * linux-ppc-low.c (ppc_usrregs_info): Remove
3584 forward-declaration.
3585 (ppc_arch_setup): Move lower in file.
3586
3587 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3588
3589 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3590 (ps_pdwrite): Likewise.
3591
3592 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3593
3594 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3595 to after assert checks.
3596
3597 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3598
3599 * proc-service.c (ps_pdread): Add/adjust casts.
3600 (ps_pdwrite): Add/adjust casts.
3601
3602 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3603
3604 * server.c (handle_search_memory_1): Cast return value of
3605 memmem.
3606
3607 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3608
3609 * server.c (write_qxfer_response): Change type of data to
3610 gdb_byte *.
3611
3612 2015-10-29 Pedro Alves <palves@redhat.com>
3613
3614 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3615
3616 2015-10-29 Pedro Alves <palves@redhat.com>
3617
3618 * tracepoint.c (clear_installed_tracepoints): Add casts.
3619
3620 2015-10-29 Pedro Alves <palves@redhat.com>
3621
3622 * server.c (handle_v_cont, process_serial_event): Add enum
3623 gdb_signal casts to signal parsing code.
3624
3625 2015-10-29 Pedro Alves <palves@redhat.com>
3626
3627 * linux-low.h (NULL_REGSET): Define.
3628 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3629 * linux-arm-low.c (arm_regsets): Likewise.
3630 * linux-crisv32-low.c (cris_regsets): Likewise.
3631 * linux-m68k-low.c (m68k_regsets): Likewise.
3632 * linux-mips-low.c (mips_regsets): Likewise.
3633 * linux-nios2-low.c (nios2_regsets): Likewise.
3634 * linux-ppc-low.c (ppc_regsets): Likewise.
3635 * linux-s390-low.c (s390_regsets): Likewise.
3636 * linux-sh-low.c (sh_regsets): Likewise.
3637 * linux-sparc-low.c (sparc_regsets): Likewise.
3638 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3639 * linux-tile-low.c (tile_regsets): Likewise.
3640 * linux-x86-low.c (x86_regsets): Likewise.
3641 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3642
3643 2015-10-29 Pedro Alves <palves@redhat.com>
3644
3645 * linux-low.h (NULL_REGSET): Define.
3646 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3647 * linux-arm-low.c (arm_regsets): Likewise.
3648 * linux-crisv32-low.c (cris_regsets): Likewise.
3649 * linux-m68k-low.c (m68k_regsets): Likewise.
3650 * linux-mips-low.c (mips_regsets): Likewise.
3651 * linux-nios2-low.c (nios2_regsets): Likewise.
3652 * linux-ppc-low.c (ppc_regsets): Likewise.
3653 * linux-s390-low.c (s390_regsets): Likewise.
3654 * linux-sh-low.c (sh_regsets): Likewise.
3655 * linux-sparc-low.c (sparc_regsets): Likewise.
3656 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3657 * linux-tile-low.c (tile_regsets): Likewise.
3658 * linux-x86-low.c (x86_regsets): Likewise.
3659 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3660
3661 2015-10-26 Doug Evans <dje@google.com>
3662
3663 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3664
3665 2015-10-26 Doug Evans <dje@google.com>
3666
3667 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3668
3669 2015-10-26 Doug Evans <dje@google.com>
3670
3671 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3672 for debug_printf.
3673 (attach_thread, find_new_threads_callback): Ditto.
3674
3675 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3676
3677 * mem-break.h (set_breakpoint_data): Remove.
3678
3679 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3680
3681 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3682 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3683 (initialize_low): Remove set_breakpoint_data call.
3684 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3685 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3686 (initialize_low): Remove set_breakpoint_data call.
3687 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3688 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3689 (initialize_low): Remove set_breakpoint_data call.
3690
3691 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3692
3693 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3694 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3695 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3696 * target.h (target_breakpoint_kind_from_pc): New macro.
3697
3698 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3699
3700 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3701 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3702 the default breakpoint kind.
3703
3704 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3705
3706 * linux-arm-low.c (arm_supports_z_point_type): Add software
3707 breakpoint support.
3708
3709 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3710
3711 * linux-arm-low.c: Refactor breakpoint definitions.
3712 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3713 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3714
3715 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3716
3717 * Makefile.in: Add arm.c/o.
3718 * configure.srv: Likewise.
3719 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3720 (arm_breakpoint_kind_from_pc): New function.
3721 (arm_sw_breakpoint_from_kind): Return proper kind.
3722 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3723
3724 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3725
3726 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3727 removal.
3728 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3729 (struct raw_breakpoint) <size>: Remove.
3730 (struct raw_breakpoint) <kind>: Add.
3731 (bp_size): New function.
3732 (bp_opcode): Likewise.
3733 (find_raw_breakpoint_at): Adjust for kind.
3734 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3735 (remove_memory_breakpoint): Adjust for kind call bp_size.
3736 (set_raw_breakpoint_at): Adjust for kind.
3737 (set_breakpoint): Likewise.
3738 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3739 (delete_raw_breakpoint): Adjust for kind.
3740 (delete_breakpoint): Likewise.
3741 (find_gdb_breakpoint): Likewise.
3742 (set_gdb_breakpoint_1): Likewise.
3743 (set_gdb_breakpoint): Likewise.
3744 (delete_gdb_breakpoint_1): Likewise.
3745 (delete_gdb_breakpoint): Likewise.
3746 (uninsert_raw_breakpoint): Likewise.
3747 (reinsert_raw_breakpoint): Likewise.
3748 (set_breakpoint_data): Remove.
3749 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3750 (check_mem_read): Adjust for kind call bp_size.
3751 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3752 (clone_one_breakpoint): Adjust for kind.
3753 * mem-break.h (set_gdb_breakpoint): Likewise.
3754 (delete_gdb_breakpoint): Likewise.
3755 * server.c (process_serial_event): Likewise.
3756
3757 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3758
3759 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3760 (struct linux_target_ops) <breakpoint>: Remove.
3761 (struct linux_target_ops) <breakpoint_len>: Remove.
3762 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3763 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3764 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3765 (arm_sw_breakpoint_from_kind): New function.
3766 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3767 (struct linux_target_ops) <breakpoint>: Remove.
3768 (struct linux_target_ops) <breakpoint_len>: Remove.
3769 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3770 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3771 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3772 (struct linux_target_ops) <breakpoint>: Remove.
3773 (struct linux_target_ops) <breakpoint_len>: Remove.
3774 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3775 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3776 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3777 (struct linux_target_ops) <breakpoint>: Remove.
3778 (struct linux_target_ops) <breakpoint_len>: Remove.
3779 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3780 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3781 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3782 and sw_breakpoint_from_kind to increment the pc.
3783 (linux_breakpoint_kind_from_pc): New function.
3784 (linux_sw_breakpoint_from_kind): New function.
3785 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3786 (initialize_low): Call breakpoint_kind_from_pc and
3787 sw_breakpoint_from_kind to replace breakpoint_data/len.
3788 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3789 New field.
3790 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3791 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3792 (struct linux_target_ops) <breakpoint>: Remove.
3793 (struct linux_target_ops) <breakpoint_len>: Remove.
3794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3795 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3796 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3797 (struct linux_target_ops) <breakpoint>: Remove.
3798 (struct linux_target_ops) <breakpoint_len>: Remove.
3799 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3800 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3801 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3802 (struct linux_target_ops) <breakpoint>: Remove.
3803 (struct linux_target_ops) <breakpoint_len>: Remove.
3804 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3805 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3806 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3807 (struct linux_target_ops) <breakpoint>: Remove.
3808 (struct linux_target_ops) <breakpoint_len>: Remove.
3809 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3810 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3811 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3812 (struct linux_target_ops) <breakpoint>: Remove.
3813 (struct linux_target_ops) <breakpoint_len>: Remove.
3814 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3815 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3816 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3817 (struct linux_target_ops) <breakpoint>: Remove.
3818 (struct linux_target_ops) <breakpoint_len>: Remove.
3819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3820 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3821 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3822 (struct linux_target_ops) <breakpoint>: Remove.
3823 (struct linux_target_ops) <breakpoint_len>: Remove.
3824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3826 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3827 (struct linux_target_ops) <breakpoint>: Remove.
3828 (struct linux_target_ops) <breakpoint_len>: Remove.
3829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3831 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3832 (struct linux_target_ops) <breakpoint>: Remove.
3833 (struct linux_target_ops) <breakpoint_len>: Remove.
3834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3836 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3837 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3838 (struct linux_target_ops) <breakpoint>: Remove.
3839 (struct linux_target_ops) <breakpoint_len>: Remove.
3840 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3841 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3842 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3843 (struct linux_target_ops) <breakpoint>: Remove.
3844 (struct linux_target_ops) <breakpoint_len>: Remove.
3845 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3846 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3847
3848 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3849
3850 * linux-cris-low.c (cris_get_pc): Remove void arg.
3851
3852 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3853
3854 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3855 variable name.
3856
3857 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3858
3859 * inferiors.c (thread_pid_matches_callback): New function.
3860 (find_thread_process): New function.
3861 (remove_thread): Reset current_thread.
3862 (remove_process): Assert threads have been removed first.
3863
3864 2015-10-15 Yao Qi <yao.qi@linaro.org>
3865
3866 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3867 if it is 3.
3868 (aarch64_remove_point): Likewise.
3869 * regcache.c (regcache_register_size): New function.
3870
3871 2015-10-12 Yao Qi <yao.qi@linaro.org>
3872
3873 * linux-aarch64-low.c: Update all callers as emit_load_store
3874 is renamed to aarch64_emit_load_store.
3875
3876 2015-10-12 Yao Qi <yao.qi@linaro.org>
3877
3878 * linux-aarch64-low.c: Update all callers of function renaming
3879 from emit_insn to aarch64_emit_insn.
3880
3881 2015-10-12 Yao Qi <yao.qi@linaro.org>
3882
3883 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3884 arch/aarch64-insn.h.
3885 (struct aarch64_memory_operand): Likewise.
3886 (ENCODE): Likewise.
3887 (emit_insn): Move to arch/aarch64-insn.c.
3888 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3889 (emit_load_store): Move to arch/aarch64-insn.c.
3890 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3891 (can_encode_int32): Remove.
3892
3893 2015-10-12 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3896 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3897 (aarch64_relocate_instruction): Likewise.
3898 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3899 (struct aarch64_insn_visitor): Likewise.
3900
3901 2015-10-12 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3904 (struct aarch64_insn_visitor): New.
3905 (struct aarch64_insn_relocation_data): New.
3906 (aarch64_ftrace_insn_reloc_b): New function.
3907 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3908 (aarch64_ftrace_insn_reloc_cb): Likewise.
3909 (aarch64_ftrace_insn_reloc_tb): Likewise.
3910 (aarch64_ftrace_insn_reloc_adr): Likewise.
3911 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3912 (aarch64_ftrace_insn_reloc_others): Likewise.
3913 (visitor): New.
3914 (aarch64_relocate_instruction): Use visitor.
3915
3916 2015-10-12 Yao Qi <yao.qi@linaro.org>
3917
3918 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3919 int. Add argument buf.
3920 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3921 aarch64_relocate_instruction.
3922
3923 2015-10-12 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3926 argument insn. Remove local variable insn. Don't call
3927 target_read_uint32.
3928 (aarch64_install_fast_tracepoint_jump_pad): Call
3929 target_read_uint32.
3930
3931 2015-09-30 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3934 (emit_load_store_pair): Likewise.
3935
3936 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3937
3938 * dll.c (match_dll): Add cast(s).
3939 (unloaded_dll): Likewise.
3940 * linux-low.c (second_thread_of_pid_p): Likewise.
3941 (delete_lwp_callback): Likewise.
3942 (count_events_callback): Likewise.
3943 (select_event_lwp_callback): Likewise.
3944 (linux_set_resume_request): Likewise.
3945 * server.c (accumulate_file_name_length): Likewise.
3946 (emit_dll_description): Likewise.
3947 (handle_qxfer_threads_worker): Likewise.
3948 (visit_actioned_threads): Likewise.
3949 * thread-db.c (any_thread_of): Likewise.
3950 * tracepoint.c (same_process_p): Likewise.
3951 (match_blocktype): Likewise.
3952 (build_traceframe_info_xml): Likewise.
3953
3954 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3955
3956 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3957 assignment.
3958 (gdb_unparse_agent_expr): Likewise.
3959 * hostio.c (require_data): Likewise.
3960 (handle_pread): Likewise.
3961 * linux-low.c (disable_regset): Likewise.
3962 (fetch_register): Likewise.
3963 (store_register): Likewise.
3964 (get_dynamic): Likewise.
3965 (linux_qxfer_libraries_svr4): Likewise.
3966 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3967 (set_fast_tracepoint_jump): Likewise.
3968 (uninsert_fast_tracepoint_jumps_at): Likewise.
3969 (reinsert_fast_tracepoint_jumps_at): Likewise.
3970 (validate_inserted_breakpoint): Likewise.
3971 (clone_agent_expr): Likewise.
3972 * regcache.c (init_register_cache): Likewise.
3973 * remote-utils.c (putpkt_binary_1): Likewise.
3974 (decode_M_packet): Likewise.
3975 (decode_X_packet): Likewise.
3976 (look_up_one_symbol): Likewise.
3977 (relocate_instruction): Likewise.
3978 (monitor_output): Likewise.
3979 * server.c (handle_search_memory): Likewise.
3980 (handle_qxfer_exec_file): Likewise.
3981 (handle_qxfer_libraries): Likewise.
3982 (handle_qxfer): Likewise.
3983 (handle_query): Likewise.
3984 (handle_v_cont): Likewise.
3985 (handle_v_run): Likewise.
3986 (captured_main): Likewise.
3987 * target.c (write_inferior_memory): Likewise.
3988 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3989 * tracepoint.c (init_trace_buffer): Likewise.
3990 (add_tracepoint_action): Likewise.
3991 (add_traceframe): Likewise.
3992 (add_traceframe_block): Likewise.
3993 (cmd_qtdpsrc): Likewise.
3994 (cmd_qtdv): Likewise.
3995 (cmd_qtstatus): Likewise.
3996 (response_source): Likewise.
3997 (response_tsv): Likewise.
3998 (cmd_qtnotes): Likewise.
3999 (gdb_collect): Likewise.
4000 (initialize_tracepoint): Likewise.
4001
4002 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4003
4004 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4005 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4006 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4007 <NOP>: New.
4008 (enum aarch64_condition_codes): New enum.
4009 (w0): New static global.
4010 (fp): Likewise.
4011 (lr): Likewise.
4012 (struct aarch64_memory_operand) <type>: New
4013 MEMORY_OPERAND_POSTINDEX type.
4014 (postindex_memory_operand): New helper function.
4015 (emit_ret): New function.
4016 (emit_load_store_pair): New function, factored out of emit_stp
4017 with support for MEMORY_OPERAND_POSTINDEX.
4018 (emit_stp): Rewrite using emit_load_store_pair.
4019 (emit_ldp): New function.
4020 (emit_load_store): Likewise.
4021 (emit_ldr): Mention post-index instruction in comment.
4022 (emit_ldrh): New function.
4023 (emit_ldrb): New function.
4024 (emit_ldrsw): Mention post-index instruction in comment.
4025 (emit_str): Likewise.
4026 (emit_subs): New function.
4027 (emit_cmp): Likewise.
4028 (emit_and): Likewise.
4029 (emit_orr): Likewise.
4030 (emit_orn): Likewise.
4031 (emit_eor): Likewise.
4032 (emit_mvn): Likewise.
4033 (emit_lslv): Likewise.
4034 (emit_lsrv): Likewise.
4035 (emit_asrv): Likewise.
4036 (emit_mul): Likewise.
4037 (emit_sbfm): Likewise.
4038 (emit_sbfx): Likewise.
4039 (emit_ubfm): Likewise.
4040 (emit_ubfx): Likewise.
4041 (emit_csinc): Likewise.
4042 (emit_cset): Likewise.
4043 (emit_nop): Likewise.
4044 (emit_ops_insns): New helper function.
4045 (emit_pop): Likewise.
4046 (emit_push): Likewise.
4047 (aarch64_emit_prologue): New function.
4048 (aarch64_emit_epilogue): Likewise.
4049 (aarch64_emit_add): Likewise.
4050 (aarch64_emit_sub): Likewise.
4051 (aarch64_emit_mul): Likewise.
4052 (aarch64_emit_lsh): Likewise.
4053 (aarch64_emit_rsh_signed): Likewise.
4054 (aarch64_emit_rsh_unsigned): Likewise.
4055 (aarch64_emit_ext): Likewise.
4056 (aarch64_emit_log_not): Likewise.
4057 (aarch64_emit_bit_and): Likewise.
4058 (aarch64_emit_bit_or): Likewise.
4059 (aarch64_emit_bit_xor): Likewise.
4060 (aarch64_emit_bit_not): Likewise.
4061 (aarch64_emit_equal): Likewise.
4062 (aarch64_emit_less_signed): Likewise.
4063 (aarch64_emit_less_unsigned): Likewise.
4064 (aarch64_emit_ref): Likewise.
4065 (aarch64_emit_if_goto): Likewise.
4066 (aarch64_emit_goto): Likewise.
4067 (aarch64_write_goto_address): Likewise.
4068 (aarch64_emit_const): Likewise.
4069 (aarch64_emit_call): Likewise.
4070 (aarch64_emit_reg): Likewise.
4071 (aarch64_emit_pop): Likewise.
4072 (aarch64_emit_stack_flush): Likewise.
4073 (aarch64_emit_zero_ext): Likewise.
4074 (aarch64_emit_swap): Likewise.
4075 (aarch64_emit_stack_adjust): Likewise.
4076 (aarch64_emit_int_call_1): Likewise.
4077 (aarch64_emit_void_call_2): Likewise.
4078 (aarch64_emit_eq_goto): Likewise.
4079 (aarch64_emit_ne_goto): Likewise.
4080 (aarch64_emit_lt_goto): Likewise.
4081 (aarch64_emit_le_goto): Likewise.
4082 (aarch64_emit_gt_goto): Likewise.
4083 (aarch64_emit_ge_got): Likewise.
4084 (aarch64_emit_ops_impl): New static global variable.
4085 (aarch64_emit_ops): New target function, return
4086 &aarch64_emit_ops_impl.
4087 (struct linux_target_ops): Install it.
4088
4089 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4090
4091 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4092 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4093 aarch64-ipa.o.
4094 * linux-aarch64-ipa.c: New file.
4095 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4096 and endian.h.
4097 (aarch64_get_thread_area): New target method.
4098 (extract_signed_bitfield): New helper function.
4099 (aarch64_decode_ldr_literal): New function.
4100 (enum aarch64_opcodes): New enum.
4101 (struct aarch64_register): New struct.
4102 (struct aarch64_operand): New struct.
4103 (x0): New static global.
4104 (x1): Likewise.
4105 (x2): Likewise.
4106 (x3): Likewise.
4107 (x4): Likewise.
4108 (w2): Likewise.
4109 (ip0): Likewise.
4110 (sp): Likewise.
4111 (xzr): Likewise.
4112 (aarch64_register): New helper function.
4113 (register_operand): Likewise.
4114 (immediate_operand): Likewise.
4115 (struct aarch64_memory_operand): New struct.
4116 (offset_memory_operand): New helper function.
4117 (preindex_memory_operand): Likewise.
4118 (enum aarch64_system_control_registers): New enum.
4119 (ENCODE): New macro.
4120 (emit_insn): New helper function.
4121 (emit_b): New function.
4122 (emit_bcond): Likewise.
4123 (emit_cb): Likewise.
4124 (emit_tb): Likewise.
4125 (emit_blr): Likewise.
4126 (emit_stp): Likewise.
4127 (emit_ldp_q_offset): Likewise.
4128 (emit_stp_q_offset): Likewise.
4129 (emit_load_store): Likewise.
4130 (emit_ldr): Likewise.
4131 (emit_ldrsw): Likewise.
4132 (emit_str): Likewise.
4133 (emit_ldaxr): Likewise.
4134 (emit_stxr): Likewise.
4135 (emit_stlr): Likewise.
4136 (emit_data_processing_reg): Likewise.
4137 (emit_data_processing): Likewise.
4138 (emit_add): Likewise.
4139 (emit_sub): Likewise.
4140 (emit_mov): Likewise.
4141 (emit_movk): Likewise.
4142 (emit_mov_addr): Likewise.
4143 (emit_mrs): Likewise.
4144 (emit_msr): Likewise.
4145 (emit_sevl): Likewise.
4146 (emit_wfe): Likewise.
4147 (append_insns): Likewise.
4148 (can_encode_int32_in): New helper function.
4149 (aarch64_relocate_instruction): New function.
4150 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4151 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4152 (struct linux_target_ops): Install aarch64_get_thread_area,
4153 aarch64_install_fast_tracepoint_jump_pad and
4154 aarch64_get_min_fast_tracepoint_insn_len.
4155
4156 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4157
4158 * Makefile.in (aarch64-insn.o): New rule.
4159 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4160
4161 2015-09-21 Yao Qi <yao.qi@linaro.org>
4162
4163 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4164
4165 2015-09-21 Yao Qi <yao.qi@linaro.org>
4166
4167 * tracepoint.c (max_jump_pad_size): Remove.
4168
4169 2015-09-18 Yao Qi <yao.qi@linaro.org>
4170
4171 * linux-aarch64-low.c: Don't include sys/uio.h.
4172 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4173
4174 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4175
4176 * tracepoint.c (eval_result_type): Change prototype.
4177 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4178
4179 2015-09-15 Pedro Alves <palves@redhat.com>
4180
4181 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4182 Check whether to report exec events instead of checking whether
4183 multiprocess is enabled.
4184
4185 2015-09-15 Pedro Alves <palves@redhat.com>
4186
4187 PR remote/18965
4188 * remote-utils.c (prepare_resume_reply): Merge
4189 TARGET_WAITKIND_VFORK_DONE switch case with the
4190 TARGET_WAITKIND_FORKED case.
4191
4192 2015-09-15 Yao Qi <yao.qi@linaro.org>
4193
4194 * server.c (handle_query): Check string comparison using
4195 "else if" instead of "if".
4196
4197 2015-09-15 Yao Qi <yao.qi@linaro.org>
4198
4199 * server.c (vCont_supported): New global variable.
4200 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4201 matches. Append ";vContSupported+" to own_buf.
4202 (handle_v_requests): Append ";s;S" to own_buf if target supports
4203 hardware single step or vCont_supported is false.
4204 (capture_main): Set vCont_supported to zero.
4205
4206 2015-09-15 Yao Qi <yao.qi@linaro.org>
4207
4208 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4209 it to ...
4210 (linux_supports_hardware_single_step): ... New function.
4211 (linux_target_ops): Update.
4212 * lynx-low.c (lynx_target_ops): Set field
4213 supports_hardware_single_step to target_can_do_hardware_single_step.
4214 * nto-low.c (nto_target_ops): Likewise.
4215 * spu-low.c (spu_target_ops): Likewise.
4216 * win32-low.c (win32_target_ops): Likewise.
4217 * target.c (target_can_do_hardware_single_step): New function.
4218 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4219 Remove. <supports_hardware_single_step>: New field.
4220 (target_supports_conditional_breakpoints): Remove.
4221 (target_supports_hardware_single_step): New macro.
4222 (target_can_do_hardware_single_step): Declare.
4223 * server.c (handle_query): Use target_supports_hardware_single_step
4224 instead of target_supports_conditional_breakpoints.
4225
4226 2015-09-15 Yao Qi <yao.qi@linaro.org>
4227
4228 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4229 function.
4230 (struct linux_target_ops the_low_target): Install
4231 aarch64_linux_siginfo_fixup.
4232
4233 2015-09-11 Don Breazeal <donb@codesourcery.com>
4234 Luis Machado <lgustavo@codesourcery.com>
4235
4236 * linux-low.c (linux_mourn): Static declaration.
4237 (linux_arch_setup): Move in front of
4238 handle_extended_wait.
4239 (linux_arch_setup_thread): New function.
4240 (handle_extended_wait): Handle exec events. Call
4241 linux_arch_setup_thread. Make event_lwp argument a
4242 pointer-to-a-pointer.
4243 (check_zombie_leaders): Do not check stopped threads.
4244 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4245 (linux_low_filter_event): Add lwp and thread for exec'ing
4246 non-leader thread if leader thread has been deleted.
4247 Refactor code into linux_arch_setup_thread and call it.
4248 Pass child lwp pointer by reference to handle_extended_wait.
4249 (linux_wait_for_event_filtered): Update comment.
4250 (linux_wait_1): Prevent clobbering exec event status.
4251 (linux_supports_exec_events): New function.
4252 (linux_target_ops) <supports_exec_events>: Initialize new member.
4253 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4254 new member.
4255 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4256 * server.c (report_exec_events): New global variable.
4257 (handle_query): Handle qSupported query for exec-events feature.
4258 (captured_main): Initialize report_exec_events.
4259 * server.h (report_exec_events): Declare new global variable.
4260 * target.h (struct target_ops) <supports_exec_events>: New
4261 member.
4262 (target_supports_exec_events): New macro.
4263 * win32-low.c (win32_target_ops) <supports_exec_events>:
4264 Initialize new member.
4265
4266 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4267
4268 * linux-low.c (linux_low_enable_btrace): Remove.
4269 (linux_target_ops): Replace linux_low_enable_btrace with
4270 linux_enable_btrace.
4271
4272 2015-09-03 Yao Qi <yao.qi@linaro.org>
4273
4274 * linux-aarch64-low.c (aarch64_insert_point): Call
4275 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4276 returns true.
4277
4278 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4279
4280 * linux-low.c (check_stopped_by_breakpoint): Use
4281 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4282
4283 2015-08-27 Pedro Alves <palves@redhat.com>
4284
4285 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4286
4287 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4288
4289 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4290 the XNEW-family equivalent.
4291 (compile_bytecodes): Likewise.
4292 * dll.c (loaded_dll): Likewise.
4293 * event-loop.c (append_callback_event): Likewise.
4294 (create_file_handler): Likewise.
4295 (create_file_event): Likewise.
4296 * hostio.c (handle_open): Likewise.
4297 * inferiors.c (add_thread): Likewise.
4298 (add_process): Likewise.
4299 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4300 * linux-arm-low.c (arm_new_process): Likewise.
4301 (arm_new_thread): Likewise.
4302 * linux-low.c (add_to_pid_list): Likewise.
4303 (linux_add_process): Likewise.
4304 (handle_extended_wait): Likewise.
4305 (add_lwp): Likewise.
4306 (enqueue_one_deferred_signal): Likewise.
4307 (enqueue_pending_signal): Likewise.
4308 (linux_resume_one_lwp_throw): Likewise.
4309 (linux_resume_one_thread): Likewise.
4310 (linux_read_memory): Likewise.
4311 (linux_write_memory): Likewise.
4312 * linux-mips-low.c (mips_linux_new_process): Likewise.
4313 (mips_linux_new_thread): Likewise.
4314 (mips_add_watchpoint): Likewise.
4315 * linux-x86-low.c (initialize_low_arch): Likewise.
4316 * lynx-low.c (lynx_add_process): Likewise.
4317 * mem-break.c (set_raw_breakpoint_at): Likewise.
4318 (set_breakpoint): Likewise.
4319 (add_condition_to_breakpoint): Likewise.
4320 (add_commands_to_breakpoint): Likewise.
4321 (clone_agent_expr): Likewise.
4322 (clone_one_breakpoint): Likewise.
4323 * regcache.c (new_register_cache): Likewise.
4324 * remote-utils.c (look_up_one_symbol): Likewise.
4325 * server.c (queue_stop_reply): Likewise.
4326 (start_inferior): Likewise.
4327 (queue_stop_reply_callback): Likewise.
4328 (handle_target_event): Likewise.
4329 * spu-low.c (fetch_ppc_memory): Likewise.
4330 (store_ppc_memory): Likewise.
4331 * target.c (set_target_ops): Likewise.
4332 * thread-db.c (thread_db_load_search): Likewise.
4333 (try_thread_db_load_1): Likewise.
4334 * tracepoint.c (add_tracepoint): Likewise.
4335 (add_tracepoint_action): Likewise.
4336 (create_trace_state_variable): Likewise.
4337 (cmd_qtdpsrc): Likewise.
4338 (cmd_qtro): Likewise.
4339 (add_while_stepping_state): Likewise.
4340 * win32-low.c (child_add_thread): Likewise.
4341 (get_image_name): Likewise.
4342
4343 2015-08-25 Yao Qi <yao.qi@linaro.org>
4344
4345 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4346
4347 2015-08-25 Yao Qi <yao.qi@linaro.org>
4348
4349 * Makefile.in (aarch64-linux.o): New rule.
4350 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4351 srv_tgtobj.
4352 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4353 (aarch64_init_debug_reg_state): Make it extern.
4354 (aarch64_linux_prepare_to_resume): Remove.
4355
4356 2015-08-25 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4359 lwp_arch_private_info and ptid_of_lwp.
4360
4361 2015-08-25 Yao Qi <yao.qi@linaro.org>
4362
4363 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4364 Find proc_info by find_process_pid. All callers updated.
4365
4366 2015-08-25 Yao Qi <yao.qi@linaro.org>
4367
4368 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4369 Remove.
4370 (debug_reg_change_callback): Remove.
4371 (aarch64_notify_debug_reg_change): Remove.
4372
4373 2015-08-25 Yao Qi <yao.qi@linaro.org>
4374
4375 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4376 Call current_lwp_ptid.
4377
4378 2015-08-25 Yao Qi <yao.qi@linaro.org>
4379
4380 * linux-aarch64-low.c (debug_reg_change_callback): Use
4381 debug_printf.
4382
4383 2015-08-25 Yao Qi <yao.qi@linaro.org>
4384
4385 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4386
4387 2015-08-25 Yao Qi <yao.qi@linaro.org>
4388
4389 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4390
4391 2015-08-25 Yao Qi <yao.qi@linaro.org>
4392
4393 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4394 the code.
4395
4396 2015-08-25 Yao Qi <yao.qi@linaro.org>
4397
4398 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4399 Remove.
4400 (debug_reg_change_callback): Remove argument entry and add argument
4401 lwp. Remove local variable thread. Don't print thread id in the
4402 debugging output. Don't check whether pid of thread equals to pid.
4403 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4404 iterate_over_lwps instead find_inferior.
4405
4406 2015-08-24 Pedro Alves <palves@redhat.com>
4407
4408 * inferiors.c (get_first_process): New function.
4409 * inferiors.h (get_first_process): New declaration.
4410 * remote-utils.c (read_ptid): Default to the first process in the
4411 list, instead of to the current thread's process.
4412
4413 2015-08-24 Pedro Alves <palves@redhat.com>
4414
4415 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4416 * event-loop.c: Likewise.
4417 * remote-utils.c: Likewise.
4418 * tracepoint.c: Likewise.
4419
4420 2015-08-24 Pedro Alves <palves@redhat.com>
4421
4422 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4423 ptid_get_lwp.
4424
4425 2015-08-21 Pedro Alves <palves@redhat.com>
4426
4427 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4428 instead of literal 1.
4429
4430 2015-08-21 Pedro Alves <palves@redhat.com>
4431
4432 * tdesc.c (default_description): Explicitly zero-initialize.
4433
4434 2015-08-21 Pedro Alves <palves@redhat.com>
4435
4436 PR gdb/18749
4437 * inferiors.c (remove_thread): Discard any pending stop reply for
4438 this thread.
4439 * server.c (remove_all_on_match_pid): Rename to ...
4440 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4441 instead of a pid.
4442 (discard_queued_stop_replies): Change parameter to a ptid. Now
4443 extern.
4444 (handle_v_kill, kill_inferior_callback, captured_main)
4445 (process_serial_event): Adjust.
4446 * server.h (discard_queued_stop_replies): Declare.
4447
4448 2015-08-21 Pedro Alves <palves@redhat.com>
4449
4450 * linux-low.c (wait_for_sigstop): Always switch to no thread
4451 selected if the previously current thread dies.
4452 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4453 process instead of the current thread's.
4454 * remote-utils.c (input_interrupt): Don't check if there's no
4455 current thread.
4456 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4457 current thread to the general thread fails, error out.
4458 (handle_qxfer_auxv, handle_qxfer_libraries)
4459 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4460 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4461 (handle_query): Check if there's a thread selected instead of
4462 checking whether there's any thread in the thread list.
4463 (handle_qxfer_threads, handle_qxfer_btrace)
4464 (handle_qxfer_btrace_conf): Don't error out early if there's no
4465 thread in the thread list.
4466 (handle_v_cont, myresume): Don't set the current thread to the
4467 continue thread.
4468 (process_serial_event) <Hg handling>: Also set thread_id if the
4469 previous general thread is still alive.
4470 (process_serial_event) <g/G handling>: If setting the current
4471 thread to the general thread fails, error out.
4472 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4473 thread's lwp instead of the current thread's.
4474 * target.c (set_desired_thread): If the desired thread was not
4475 found, leave the current thread pointing to NULL. Return an int
4476 (boolean) indicating success.
4477 * target.h (set_desired_thread): Change return type to int.
4478
4479 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4480
4481 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4482 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4483 #includes.
4484 (ps_get_thread_area): New function.
4485
4486 2015-08-19 Gary Benson <gbenson@redhat.com>
4487
4488 * hostio.c (handle_pread): Do not attempt to read more data
4489 than hostio_reply_with_data can fit in a packet.
4490
4491 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4492
4493 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4494
4495 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4496
4497 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4498
4499 2015-08-06 Pedro Alves <palves@redhat.com>
4500
4501 * tracepoint.c (expr_eval_result): Now an int.
4502
4503 2015-08-06 Pedro Alves <palves@redhat.com>
4504
4505 * gdbthread.h (struct regcache): Forward declare.
4506 (struct thread_info) <regcache_data>: Now a struct regcache
4507 pointer.
4508 * inferiors.c (inferior_regcache_data)
4509 (set_inferior_regcache_data): Now work with struct regcache
4510 pointers.
4511 * inferiors.h (struct regcache): Forward declare.
4512 (inferior_regcache_data, set_inferior_regcache_data): Now work
4513 with struct regcache pointers.
4514 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4515 (free_register_cache_thread): Remove struct regcache pointer
4516 casts.
4517
4518 2015-08-06 Pedro Alves <palves@redhat.com>
4519
4520 * server.c (captured_main): On error, print the exception message
4521 to stderr, and if run_once is set, throw a quit.
4522
4523 2015-08-06 Pedro Alves <palves@redhat.com>
4524
4525 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4526 the current thread.
4527
4528 2015-08-06 Pedro Alves <palves@redhat.com>
4529
4530 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4531 reading beyond the passed in buffer length.
4532
4533 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4534
4535 * tracepoint.c (symbol_list) <required>: Remove.
4536
4537 2015-08-06 Pedro Alves <palves@redhat.com>
4538
4539 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4540 count if stopping and suspending threads.
4541 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4542 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4543 (linux_detach): Complete an ongoing step-over.
4544 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4545 throughout.
4546 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4547 (linux_wait_1): If passing a signal to the inferior after
4548 finishing a step-over, unsuspend and re-resume all lwps. If we
4549 see a single-step event but the thread should be continuing, don't
4550 pass the trap to gdb.
4551 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4552 internal_error instead of gdb_assert.
4553 (enqueue_pending_signal): New function.
4554 (check_ptrace_stopped_lwp_gone): Add debug output.
4555 (start_step_over): Use internal_error instead of gdb_assert.
4556 (complete_ongoing_step_over): New function.
4557 (linux_resume_one_thread): Don't resume a suspended thread.
4558 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4559 it stepping.
4560
4561 2015-08-06 Pedro Alves <palves@redhat.com>
4562
4563 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4564 (linux_thread_alive): Use lwp_is_marked_dead.
4565 (extended_event_reported): Delete.
4566 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4567 instead of extended_event_reported.
4568 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4569 as well.
4570 (lwp_is_marked_dead): New function.
4571 (lwp_running): Use lwp_is_marked_dead.
4572 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4573 comment.
4574
4575 2015-08-06 Pedro Alves <palves@redhat.com>
4576
4577 * linux-low.c (linux_wait_1): Move fork event output out of the
4578 !report_to_gdb check. Pass event_child->waitstatus to
4579 target_waitstatus_to_string instead of ourstatus.
4580
4581 2015-08-04 Yao Qi <yao.qi@linaro.org>
4582
4583 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4584 if current_thread is 32 bit.
4585
4586 2015-08-04 Yao Qi <yao.qi@linaro.org>
4587
4588 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4589 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4590 * server.c (extended_protocol): Remove "static".
4591 * server.h (extended_protocol): Declare it.
4592
4593 2015-08-04 Yao Qi <yao.qi@linaro.org>
4594
4595 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4596 both aarch64 and aarch32.
4597 (aarch64_set_pc): Likewise.
4598
4599 2015-08-04 Yao Qi <yao.qi@linaro.org>
4600
4601 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4602 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4603 arm-with-neon.xml to srv_xmlfiles.
4604 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4605 (is_64bit_tdesc): New function.
4606 (aarch64_linux_read_description): New function.
4607 (aarch64_arch_setup): Call aarch64_linux_read_description.
4608 (regs_info): Rename to regs_info_aarch64.
4609 (aarch64_regs_info): Return right regs_info.
4610 (initialize_low_arch): Call initialize_low_arch_aarch32.
4611
4612 2015-08-04 Yao Qi <yao.qi@linaro.org>
4613
4614 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4615 * linux-aarch32-low.c: New file.
4616 * linux-aarch32-low.h: New file.
4617 * linux-arm-low.c (arm_fill_gregset): Move it to
4618 linux-aarch32-low.c.
4619 (arm_store_gregset): Likewise.
4620 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4621 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4622 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4623 (regs_info): Rename to regs_info_arm.
4624 (arm_regs_info): Return regs_info_aarch32 if
4625 have_ptrace_getregset is 1 and target description is
4626 arm_with_neon or arm_with_vfpv3.
4627 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4628 Call initialize_low_arch_aarch32 instead.
4629
4630 2015-08-04 Yao Qi <yao.qi@linaro.org>
4631
4632 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4633 * linux-low.c: ... here.
4634 * linux-low.h (have_ptrace_getregset): Declare it.
4635
4636 2015-08-04 Pedro Alves <palves@redhat.com>
4637
4638 * thread-db.c (struct thread_db): Use new typedefs.
4639 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4640 CHK calls.
4641 (disable_thread_event_reporting): Cast result of dlsym to
4642 destination function pointer type.
4643 (thread_db_mourn): Use td_ta_delete_ftype.
4644
4645 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4646
4647 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4648 arch variant.
4649 (CDX_BREAKPOINT): Define for R2.
4650 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4651 (the_low_target): Add comments.
4652
4653 2015-07-30 Yao Qi <yao.qi@linaro.org>
4654
4655 * linux-arm-low.c (arm_hwcap): Remove it.
4656 (arm_read_description): New local variable arm_hwcap. Don't
4657 set arm_hwcap to zero.
4658
4659 2015-07-30 Yao Qi <yao.qi@linaro.org>
4660
4661 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4662 Use regcache->tdesc instead.
4663 (arm_store_wmmxregset): Likewise.
4664 (arm_fill_vfpregset): Likewise.
4665 (arm_store_vfpregset): Likewise.
4666
4667 2015-07-30 Yao Qi <yao.qi@linaro.org>
4668
4669 * linux-arm-low.c: Include arch/arm.h.
4670 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4671 (arm_store_gregset): Likewise.
4672
4673 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4674
4675 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4676 ptrace's 4th parameter.
4677
4678 2015-07-27 Yao Qi <yao.qi@linaro.org>
4679
4680 * configure.srv (case aarch64*-*-linux*): Don't set
4681 srv_linux_usrregs.
4682
4683 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4684
4685 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4686 sys/ptrace.h.
4687 * linux-arm-low.c: Likewise.
4688 * linux-cris-low.c: Likewise.
4689 * linux-crisv32-low.c: Likewise.
4690 * linux-low.c: Likewise.
4691 * linux-m68k-low.c: Likewise.
4692 * linux-mips-low.c: Likewise.
4693 * linux-nios2-low.c: Likewise.
4694 * linux-s390-low.c: Likewise.
4695 * linux-sparc-low.c: Likewise.
4696 * linux-tic6x-low.c: Likewise.
4697 * linux-tile-low.c: Likewise.
4698 * linux-x86-low.c: Likewise.
4699
4700 2015-07-24 Pedro Alves <palves@redhat.com>
4701
4702 * config.in: Regenerate.
4703 * configure: Regenerate.
4704
4705 2015-07-24 Pedro Alves <palves@redhat.com>
4706
4707 * acinclude.m4: Include ../ptrace.m4.
4708 * configure.ac: Call GDB_AC_PTRACE.
4709 * config.in, configure: Regenerate.
4710
4711 2015-07-24 Yao Qi <yao.qi@linaro.org>
4712
4713 * linux-low.c (linux_create_inferior): Remove setting to
4714 proc->priv->new_inferior.
4715 (linux_attach): Likewise.
4716 (linux_low_filter_event): Likewise.
4717 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4718
4719 2015-07-24 Yao Qi <yao.qi@linaro.org>
4720
4721 * linux-low.c (linux_arch_setup): New function.
4722 (linux_low_filter_event): If proc->tdesc is NULL and
4723 proc->attached is true, call the_low_target.arch_setup.
4724 Otherwise, keep status pending, and return.
4725 (linux_resume_one_lwp_throw): Don't call get_pc if
4726 thread->while_stepping isn't NULL. Don't call
4727 get_thread_regcache if proc->tdesc is NULL.
4728 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4729 (linux_target_ops): Install arch_setup.
4730 * server.c (start_inferior): Call the_target->arch_setup.
4731 * target.h (struct target_ops) <arch_setup>: New field.
4732 (target_arch_setup): New marco.
4733 * lynx-low.c (lynx_target_ops): Update.
4734 * nto-low.c (nto_target_ops): Update.
4735 * spu-low.c (spu_target_ops): Update.
4736 * win32-low.c (win32_target_ops): Update.
4737
4738 2015-07-24 Yao Qi <yao.qi@linaro.org>
4739
4740 * linux-low.c (linux_add_process): Don't set
4741 proc->priv->new_inferior.
4742 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4743 (linux_attach): Likewise.
4744
4745 2015-07-24 Yao Qi <yao.qi@linaro.org>
4746
4747 * server.c (start_inferior): Code refactor.
4748
4749 2015-07-24 Yao Qi <yao.qi@linaro.org>
4750
4751 * server.c (process_serial_event): Set general_thread.
4752
4753 2015-07-21 Yao Qi <yao.qi@linaro.org>
4754
4755 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4756 aarch64_linux_get_debug_reg_capacity.
4757
4758 2015-07-17 Yao Qi <yao.qi@linaro.org>
4759
4760 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4761 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4762 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4763 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4764 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4765 (AARCH64_HWP_ALIGNMENT): Likewise.
4766 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4767 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4768 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4769 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4770 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4771 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4772 (struct aarch64_debug_reg_state): Likewise.
4773 (struct arch_lwp_info): Likewise.
4774 (aarch64_align_watchpoint): Likewise.
4775 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4776 (aarch64_watchpoint_length): Likewise.
4777 (aarch64_point_encode_ctrl_reg): Likewise
4778 (aarch64_point_is_aligned): Likewise.
4779 (aarch64_align_watchpoint): Likewise.
4780 (aarch64_linux_set_debug_regs):
4781 (aarch64_dr_state_insert_one_point): Likewise.
4782 (aarch64_dr_state_remove_one_point): Likewise.
4783 (aarch64_handle_breakpoint): Likewise.
4784 (aarch64_handle_aligned_watchpoint): Likewise.
4785 (aarch64_handle_unaligned_watchpoint): Likewise.
4786 (aarch64_handle_watchpoint): Likewise.
4787
4788 2015-07-17 Yao Qi <yao.qi@linaro.org>
4789
4790 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4791 and don't aarch64_get_debug_reg_state. All callers update.
4792 (aarch64_handle_aligned_watchpoint): Likewise.
4793 (aarch64_handle_unaligned_watchpoint): Likewise.
4794 (aarch64_handle_watchpoint): Likewise.
4795 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4796 (aarch64_remove_point): Likewise.
4797
4798 2015-07-17 Yao Qi <yao.qi@linaro.org>
4799
4800 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4801 debug_printf.
4802 (aarch64_handle_unaligned_watchpoint): Likewise.
4803
4804 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4805
4806 Revert the previous 3 commits:
4807 Move gdb_regex* to common/
4808 Move linux_find_memory_regions_full & co.
4809 gdbserver build-id attribute generator
4810
4811 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4812 Jan Kratochvil <jan.kratochvil@redhat.com>
4813
4814 gdbserver build-id attribute generator.
4815 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4816 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4817 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4818 (find_phdr): New.
4819 (get_dynamic): Use find_pdhr to traverse program headers.
4820 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4821 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4822 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4823 (get_hex_build_id): New.
4824 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4825 to reply XML document.
4826
4827 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4828 Jan Kratochvil <jan.kratochvil@redhat.com>
4829
4830 * target.c: Include target/target-utils.h and fcntl.h.
4831 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4832 (target_fileio_read_stralloc): New functions.
4833
4834 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4835
4836 * Makefile.in (OBS): Add gdb_regex.o.
4837 (gdb_regex.o): New.
4838 * config.in: Rebuilt.
4839 * configure: Rebuilt.
4840
4841 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4842 Jan Kratochvil <jan.kratochvil@redhat.com>
4843
4844 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4845 * Makefile.in (OBS): Add target-utils.o.
4846 (linux-maps.o, target-utils.o): New.
4847 * configure.srv (srv_linux_obj): Add linux-maps.o.
4848
4849 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4850
4851 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4852 function, return 1.
4853 (the_low_target): Install it.
4854
4855 2015-07-14 Pedro Alves <palves@redhat.com>
4856
4857 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4858 Instead, ignore ECHILD, and throw an error for other errnos.
4859
4860 2015-07-10 Pedro Alves <palves@redhat.com>
4861
4862 * event-loop.c (struct callback_event) <data>: Change type to
4863 gdb_client_data instance instead of gdb_client_data pointer.
4864 (append_callback_event): Adjust.
4865
4866 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4867
4868 * linux-aarch64-low.c: Add comments for each linux_target_ops
4869 method. Remove comments already covered in target_ops and
4870 linux_target_ops definitions.
4871 (the_low_target): Add comments for each unimplemented method.
4872
4873 2015-07-09 Yao Qi <yao.qi@linaro.org>
4874
4875 * linux-aarch64-low.c (aarch64_regmap): Remove.
4876 (aarch64_usrregs_info): Remove.
4877 (regs_info): Set field usrregs to NULL.
4878
4879 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4880
4881 * linux-low.c: Include "rsp-low.h"
4882 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4883 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4884 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4885 (handle_btrace_enable_pt): New.
4886 (handle_btrace_general_set): Support "pt".
4887 (handle_btrace_conf_general_set): Support "pt:size".
4888
4889 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4890
4891 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4892 Z_PACKET_SW_BP.
4893
4894 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4895
4896 * linux-aarch64-low.c: Remove comment about endianness.
4897 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4898 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4899 memcmp.
4900
4901 2015-06-24 Gary Benson <gbenson@redhat.com>
4902
4903 * linux-i386-ipa.c (stdint.h): Do not include.
4904 * lynx-i386-low.c (stdint.h): Likewise.
4905 * lynx-ppc-low.c (stdint.h): Likewise.
4906 * mem-break.c (stdint.h): Likewise.
4907 * thread-db.c (stdint.h): Likewise.
4908 * tracepoint.c (stdint.h): Likewise.
4909 * win32-low.c (stdint.h): Likewise.
4910
4911 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4912
4913 * server.c (write_qxfer_response): Update call to
4914 remote_escape_output.
4915
4916 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4917 Jan Kratochvil <jan.kratochvil@redhat.com>
4918
4919 Merge multiple hex conversions.
4920 * gdbreplay.c (tohex): Rename to 'fromhex'.
4921 (logchar): Use fromhex.
4922
4923 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4924
4925 * server.c (handle_qxfer_libraries): Set `version' attribute for
4926 <library-list>.
4927
4928 2015-06-10 Gary Benson <gbenson@redhat.com>
4929
4930 * target.h (struct target_ops) <multifs_open>: New field.
4931 <multifs_unlink>: Likewise.
4932 <multifs_readlink>: Likewise.
4933 * linux-low.c (nat/linux-namespaces.h): New include.
4934 (linux_target_ops): Initialize the_target->multifs_open,
4935 the_target->multifs_unlink and the_target->multifs_readlink.
4936 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4937 * hostio.c (hostio_fs_pid): New static variable.
4938 (hostio_handle_new_gdb_connection): New function.
4939 (handle_setfs): Likewise.
4940 (handle_open): Use the_target->multifs_open as appropriate.
4941 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4942 (handle_readlink): Use the_target->multifs_readlink as
4943 appropriate.
4944 (handle_vFile): Handle vFile:setfs packets.
4945 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4946 after target_handle_new_gdb_connection.
4947
4948 2015-06-10 Gary Benson <gbenson@redhat.com>
4949
4950 * configure.ac (AC_CHECK_FUNCS): Add setns.
4951 * config.in: Regenerate.
4952 * configure: Likewise.
4953 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4954 (linux-namespaces.o): New rule.
4955 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4956
4957 2015-06-09 Gary Benson <gbenson@redhat.com>
4958
4959 * hostio.c (handle_open): Process mode argument with
4960 fileio_to_host_mode.
4961
4962 2015-06-01 Yao Qi <yao.qi@linaro.org>
4963
4964 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4965 * linux-x86-low.c: Likewise.
4966
4967 2015-05-28 Don Breazeal <donb@codesourcery.com>
4968
4969 * linux-low.c (handle_extended_wait): Initialize
4970 thread_info.last_resume_kind for new fork children.
4971
4972 2015-05-15 Pedro Alves <palves@redhat.com>
4973
4974 * target.h (target_handle_new_gdb_connection): Rewrite using if
4975 wrapped in do/while.
4976
4977 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4978
4979 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4980 * configure, config.in: Regenerate.
4981 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4982 Declare typedef.
4983
4984 2015-05-12 Don Breazeal <donb@codesourcery.com>
4985
4986 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4987 PTRACE_EVENT_VFORK_DONE.
4988 (linux_low_ptrace_options, extended_event_reported): Add vfork
4989 events.
4990 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4991 and "vforkdone" for RSP 'T' Stop Reply Packet.
4992 * server.h (report_vfork_events): Declare
4993 global variable.
4994
4995 2015-05-12 Don Breazeal <donb@codesourcery.com>
4996
4997 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4998 (the_low_target) <new_fork>: Initialize new member.
4999 * linux-arm-low.c (arm_new_fork): New function.
5000 (the_low_target) <new_fork>: Initialize new member.
5001 * linux-low.c (handle_extended_wait): Call new target function
5002 new_fork.
5003 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5004 * linux-mips-low.c (mips_add_watchpoint): New function
5005 extracted from mips_insert_point.
5006 (the_low_target) <new_fork>: Initialize new member.
5007 (mips_linux_new_fork): New function.
5008 (mips_insert_point): Call mips_add_watchpoint.
5009 * linux-x86-low.c (x86_linux_new_fork): New function.
5010 (the_low_target) <new_fork>: Initialize new member.
5011
5012 2015-05-12 Don Breazeal <donb@codesourcery.com>
5013
5014 * linux-low.c (handle_extended_wait): Implement return value,
5015 rename argument 'event_child' to 'event_lwp', handle
5016 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5017 (linux_low_ptrace_options): New function.
5018 (linux_low_filter_event): Call linux_low_ptrace_options,
5019 use different argument fo linux_enable_event_reporting,
5020 use return value from handle_extended_wait.
5021 (extended_event_reported): New function.
5022 (linux_wait_1): Call extended_event_reported and set
5023 status to report fork events.
5024 (linux_write_memory): Add pid to debug message.
5025 (reset_lwp_ptrace_options_callback): New function.
5026 (linux_handle_new_gdb_connection): New function.
5027 (linux_target_ops): Initialize new structure member.
5028 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5029 * lynx-low.c: Initialize new structure member.
5030 * remote-utils.c (prepare_resume_reply): Implement stop reason
5031 "fork" for "T" stop message.
5032 * server.c (handle_query): Call handle_new_gdb_connection.
5033 * server.h (report_fork_events): Declare global flag.
5034 * target.h (struct target_ops) <handle_new_gdb_connection>:
5035 New member.
5036 (target_handle_new_gdb_connection): New macro.
5037 * win32-low.c: Initialize new structure member.
5038
5039 2015-05-12 Don Breazeal <donb@codesourcery.com>
5040
5041 * mem-break.c (APPEND_TO_LIST): Define macro.
5042 (clone_agent_expr): New function.
5043 (clone_one_breakpoint): New function.
5044 (clone_all_breakpoints): New function.
5045 * mem-break.h: Declare new functions.
5046
5047 2015-05-12 Don Breazeal <donb@codesourcery.com>
5048
5049 * linux-low.c (linux_supports_fork_events): New function.
5050 (linux_supports_vfork_events): New function.
5051 (linux_target_ops): Initialize new structure members.
5052 (initialize_low): Call linux_check_ptrace_features.
5053 * lynx-low.c (lynx_target_ops): Initialize new structure
5054 members.
5055 * server.c (report_fork_events, report_vfork_events):
5056 New global flags.
5057 (handle_query): Add new features to qSupported packet and
5058 response.
5059 (captured_main): Initialize new global variables.
5060 * target.h (struct target_ops) <supports_fork_events>:
5061 New member.
5062 <supports_vfork_events>: New member.
5063 (target_supports_fork_events): New macro.
5064 (target_supports_vfork_events): New macro.
5065 * win32-low.c (win32_target_ops): Initialize new structure
5066 members.
5067
5068 2015-05-12 Gary Benson <gbenson@redhat.com>
5069
5070 * server.c (handle_qxfer_exec_file): Use current process
5071 if annex is empty.
5072
5073 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5074
5075 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5076 Remove HAVE_PTRACE_GETREGS conditionals.
5077 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5078 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5079
5080 2015-05-08 Yao Qi <yao.qi@linaro.org>
5081
5082 * linux-low.c (linux_supports_conditional_breakpoints): New
5083 function.
5084 (linux_target_ops): Install new target method.
5085 * lynx-low.c (lynx_target_ops): Install NULL hook for
5086 supports_conditional_breakpoints.
5087 * nto-low.c (nto_target_ops): Likewise.
5088 * spu-low.c (spu_target_ops): Likewise.
5089 * win32-low.c (win32_target_ops): Likewise.
5090 * server.c (handle_query): Check
5091 target_supports_conditional_breakpoints.
5092 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5093 New field.
5094 (target_supports_conditional_breakpoints): New macro.
5095
5096 2015-05-06 Pedro Alves <palves@redhat.com>
5097
5098 PR server/18081
5099 * server.c (start_inferior): If the process exits, mourn it.
5100
5101 2015-04-21 Gary Benson <gbenson@redhat.com>
5102
5103 * hostio.c (fileio_open_flags_to_host): Factored out to
5104 fileio_to_host_openflags in common/fileio.c. Single use
5105 updated.
5106
5107 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5108
5109 * linux-xtensa-low.c (xtensa_fill_gregset)
5110 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5111 XCHAL_HAVE_LOOP.
5112
5113 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5114
5115 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5116 (regs_info): Replace usrregs pointer with NULL.
5117
5118 2015-04-17 Gary Benson <gbenson@redhat.com>
5119
5120 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5121 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5122 * server.c (handle_qxfer_exec_file): New function.
5123 (qxfer_packets): Add exec-file entry.
5124 (handle_query): Report qXfer:exec-file:read as supported packet.
5125
5126 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5127
5128 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5129
5130 2015-04-09 Gary Benson <gbenson@redhat.com>
5131
5132 * hostio-errno.c (errno_to_fileio_error): Remove function.
5133 Update caller to use remote_fileio_to_fio_error.
5134
5135 2015-04-09 Yao Qi <yao.qi@linaro.org>
5136
5137 * linux-low.c (linux_insert_point): Call
5138 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5139 (linux_remove_point): Call remove_memory_breakpoint if type is
5140 raw_bkpt_type_sw.
5141 * linux-x86-low.c (x86_insert_point): Don't call
5142 insert_memory_breakpoint.
5143 (x86_remove_point): Don't call remove_memory_breakpoint.
5144
5145 2015-04-01 Pedro Alves <palves@redhat.com>
5146 Cleber Rosa <crosa@redhat.com>
5147
5148 * server.c (gdbserver_usage): Reorganize and extend the usage
5149 message.
5150
5151 2015-03-24 Pedro Alves <palves@redhat.com>
5152
5153 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5154 output. Also dump TRAP_TRACE.
5155 (linux_low_filter_event): In debug output, distinguish a
5156 resume_stop SIGSTOP from a delayed SIGSTOP.
5157
5158 2015-03-24 Gary Benson <gbenson@redhat.com>
5159
5160 * linux-x86-low.c (x86_linux_new_thread): Moved to
5161 nat/x86-linux.c.
5162 (x86_linux_prepare_to_resume): Likewise.
5163
5164 2015-03-24 Gary Benson <gbenson@redhat.com>
5165
5166 * Makefile.in (x86-linux-dregs.o): New rule.
5167 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5168 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5169 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5170 (x86_linux_dr_get): Likewise.
5171 (x86_linux_dr_set): Likewise.
5172 (update_debug_registers_callback): Likewise.
5173 (x86_linux_dr_set_addr): Likewise.
5174 (x86_linux_dr_get_addr): Likewise.
5175 (x86_linux_dr_set_control): Likewise.
5176 (x86_linux_dr_get_control): Likewise.
5177 (x86_linux_dr_get_status): Likewise.
5178 (x86_linux_update_debug_registers): Likewise.
5179
5180 2015-03-24 Gary Benson <gbenson@redhat.com>
5181
5182 * linux-x86-low.c (x86_linux_update_debug_registers):
5183 New function, factored out from...
5184 (x86_linux_prepare_to_resume): ...this.
5185
5186 2015-03-24 Gary Benson <gbenson@redhat.com>
5187
5188 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5189 (x86_linux_dr_set): Likewise.
5190 (update_debug_registers_callback): Likewise.
5191 (x86_linux_dr_set_addr): Likewise.
5192 (x86_linux_dr_get_addr): Likewise.
5193 (x86_linux_dr_set_control): Likewise.
5194 (x86_linux_dr_get_control): Likewise.
5195 (x86_linux_dr_get_status): Likewise.
5196 (x86_linux_prepare_to_resume): Likewise.
5197
5198 2015-03-24 Gary Benson <gbenson@redhat.com>
5199
5200 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5201 Use perror_with_name. Pass string through gettext.
5202 (x86_linux_dr_set): Likewise.
5203
5204 2015-03-24 Gary Benson <gbenson@redhat.com>
5205
5206 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5207 (x86_linux_dr_set_addr): ...this.
5208 (x86_dr_low_get_addr): Rename to...
5209 (x86_linux_dr_get_addr): ...this.
5210 (x86_dr_low_set_control): Rename to...
5211 (x86_linux_dr_set_control): ...this.
5212 (x86_dr_low_get_control): Rename to...
5213 (x86_linux_dr_get_control): ...this.
5214 (x86_dr_low_get_status): Rename to...
5215 (x86_linux_dr_get_status): ...this.
5216 (x86_dr_low): Update with new function names.
5217
5218 2015-03-24 Gary Benson <gbenson@redhat.com>
5219
5220 * Makefile.in (x86-linux.o): New rule.
5221 * configure.srv: Add x86-linux.o to relevant targets.
5222 * linux-low.c (lwp_set_arch_private_info): New function.
5223 (lwp_arch_private_info): Likewise.
5224 * linux-x86-low.c: Include nat/x86-linux.h.
5225 (arch_lwp_info): Removed structure.
5226 (update_debug_registers_callback):
5227 Use lwp_set_debug_registers_changed.
5228 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5229 and lwp_set_debug_registers_changed.
5230 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5231
5232 2015-03-24 Gary Benson <gbenson@redhat.com>
5233
5234 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5235 * linux-arm-low.c (arm_new_thread): Likewise.
5236 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5237 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5238 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5239 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5240
5241 2015-03-24 Gary Benson <gbenson@redhat.com>
5242
5243 * linux-low.c (ptid_of_lwp): New function.
5244 (lwp_is_stopped): Likewise.
5245 (lwp_stop_reason): Likewise.
5246 * linux-x86-low.c (update_debug_registers_callback):
5247 Use lwp_is_stopped.
5248 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5249 lwp_stop_reason.
5250
5251 2015-03-24 Gary Benson <gbenson@redhat.com>
5252
5253 * linux-low.h (linux_stop_lwp): Remove declaration.
5254
5255 2015-03-24 Gary Benson <gbenson@redhat.com>
5256
5257 * linux-low.h: Include nat/linux-nat.h.
5258 * linux-low.c (iterate_over_lwps_args): New structure.
5259 (iterate_over_lwps_filter): New function.
5260 (iterate_over_lwps): Likewise.
5261 * linux-x86-low.c (update_debug_registers_callback):
5262 Update signature to what iterate_over_lwps expects.
5263 Remove PID check that iterate_over_lwps now performs.
5264 (x86_dr_low_set_addr): Use iterate_over_lwps.
5265 (x86_dr_low_set_control): Likewise.
5266
5267 2015-03-24 Gary Benson <gbenson@redhat.com>
5268
5269 * linux-x86-low.c (x86_debug_reg_state): New function.
5270 (x86_linux_prepare_to_resume): Use the above.
5271
5272 2015-03-24 Gary Benson <gbenson@redhat.com>
5273
5274 * linux-low.c (current_lwp_ptid): New function.
5275 * linux-x86-low.c: Include nat/linux-nat.h.
5276 (x86_dr_low_get_addr): Use current_lwp_ptid.
5277 (x86_dr_low_get_control): Likewise.
5278 (x86_dr_low_get_status): Likewise.
5279
5280 2015-03-20 Pedro Alves <palves@redhat.com>
5281
5282 * tracepoint.c (cmd_qtstatus): Make "str" const.
5283
5284 2015-03-20 Pedro Alves <palves@redhat.com>
5285
5286 * server.c (handle_general_set): Make "req_str" const.
5287
5288 2015-03-19 Pedro Alves <palves@redhat.com>
5289
5290 * linux-low.c (linux_resume_one_lwp): Rename to ...
5291 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5292 instead call perror_with_name.
5293 (check_ptrace_stopped_lwp_gone): New function.
5294 (linux_resume_one_lwp): Reimplement as wrapper around
5295 linux_resume_one_lwp_throw that swallows errors if the LWP is
5296 gone.
5297
5298 2015-03-19 Pedro Alves <palves@redhat.com>
5299
5300 * linux-low.c (count_events_callback, select_event_lwp_callback):
5301 No longer check whether the thread has resume_stop as last resume
5302 kind.
5303
5304 2015-03-19 Pedro Alves <palves@redhat.com>
5305
5306 * linux-low.c (count_events_callback, select_event_lwp_callback):
5307 Use the lwp's status_pending_p field, not the thread's.
5308
5309 2015-03-19 Pedro Alves <palves@redhat.com>
5310
5311 * linux-low.c (select_event_lwp_callback): Update comments to
5312 no longer mention SIGTRAP.
5313
5314 2015-03-18 Gary Benson <gbenson@redhat.com>
5315
5316 * server.c (handle_query): Do not report vFile:fstat as supported.
5317
5318 2015-03-11 Gary Benson <gbenson@redhat.com>
5319
5320 * hostio.c (sys/types.h): New include.
5321 (sys/stat.h): Likewise.
5322 (common-remote-fileio.h): Likewise.
5323 (handle_fstat): New function.
5324 (handle_vFile): Handle vFile:fstat packets.
5325
5326 2015-03-11 Gary Benson <gbenson@redhat.com>
5327
5328 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5329 struct stat.st_blocks and struct stat.st_blksize.
5330 * configure: Regenerate.
5331 * config.in: Likewise.
5332 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5333 (OBS): Add common-remote-fileio.o.
5334 (common-remote-fileio.o): New rule.
5335
5336 2015-03-09 Pedro Alves <palves@redhat.com>
5337
5338 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5339 'struct sockaddr' pointer in 'accept' call.
5340
5341 2015-03-09 Pedro Alves <palves@redhat.com>
5342
5343 Revert:
5344 2015-03-07 Pedro Alves <palves@redhat.com>
5345 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5346 or <winsock2.h> here. Instead include "gdb_socket.h".
5347 (remote_open): Use union gdb_sockaddr_u.
5348 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5349 or <winsock2.h> here. Instead include "gdb_socket.h".
5350 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5351 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5352 or <sys/un.h>.
5353 (init_named_socket, gdb_agent_helper_thread): Use union
5354 gdb_sockaddr_u.
5355
5356 2015-03-07 Pedro Alves <palves@redhat.com>
5357
5358 * configure.ac (build_warnings): Move
5359 -Wdeclaration-after-statement to the C-specific set.
5360 * configure: Regenerate.
5361
5362 2015-03-07 Pedro Alves <palves@redhat.com>
5363
5364 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5365 or <winsock2.h> here. Instead include "gdb_socket.h".
5366 (remote_open): Use union gdb_sockaddr_u.
5367 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5368 or <winsock2.h> here. Instead include "gdb_socket.h".
5369 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5370 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5371 or <sys/un.h>.
5372 (init_named_socket, gdb_agent_helper_thread): Use union
5373 gdb_sockaddr_u.
5374
5375 2015-03-07 Pedro Alves <palves@redhat.com>
5376
5377 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5378 instead.
5379
5380 2015-03-06 Yao Qi <yao.qi@linaro.org>
5381
5382 * linux-aarch64-low.c (aarch64_insert_point): Use
5383 show_debug_regs as a boolean.
5384 (aarch64_remove_point): Likewise.
5385
5386 2015-03-05 Pedro Alves <palves@redhat.com>
5387
5388 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5389 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5390 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5391 * nto-low.c (nto_target_ops): Likewise.
5392 * spu-low.c (spu_target_ops): Likewise.
5393 * win32-low.c (win32_target_ops): Likewise.
5394
5395 2015-03-04 Pedro Alves <palves@redhat.com>
5396
5397 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5398 Decide whether a breakpoint triggered based on the SIGTRAP's
5399 siginfo.si_code.
5400 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5401 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5402 (linux_low_filter_event): Check for breakpoints before checking
5403 watchpoints.
5404 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5405 siginfo.si_code.
5406 (linux_stopped_by_sw_breakpoint)
5407 (linux_supports_stopped_by_sw_breakpoint)
5408 (linux_stopped_by_hw_breakpoint)
5409 (linux_supports_stopped_by_hw_breakpoint): New functions.
5410 (linux_target_ops): Install new target methods.
5411
5412 2015-03-04 Pedro Alves <palves@redhat.com>
5413
5414 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5415 * server.c (swbreak_feature, hwbreak_feature): New globals.
5416 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5417 (captured_main): Clear swbreak_feature and hwbreak_feature.
5418 * server.h (swbreak_feature, hwbreak_feature): Declare.
5419 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5420 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5421 supports_stopped_by_hw_breakpoint>: New fields.
5422 (target_supports_stopped_by_sw_breakpoint)
5423 (target_stopped_by_sw_breakpoint)
5424 (target_supports_stopped_by_hw_breakpoint)
5425 (target_stopped_by_hw_breakpoint): Declare.
5426
5427 2015-03-04 Pedro Alves <palves@redhat.com>
5428
5429 enum lwp_stop_reason -> enum target_stop_reason
5430 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5431 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5432 (linux_wait_1, stuck_in_jump_pad_callback)
5433 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5434 (linux_stopped_by_watchpoint):
5435 * linux-low.h (enum lwp_stop_reason): Delete.
5436 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5437 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5438
5439 2015-03-04 Yao Qi <yao.qi@linaro.org>
5440
5441 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5442
5443 2015-03-03 Gary Benson <gbenson@redhat.com>
5444
5445 * hostio.c (handle_vFile): Fix prefix lengths.
5446
5447 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5448
5449 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5450 ptr_bits.
5451
5452 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5453
5454 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5455 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5456 (clean): Add "rm -f" for above C files.
5457 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5458 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5459 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5460 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5461 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5462 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5463 (init_registers_s390x_vx_linux64)
5464 (init_registers_s390x_tevx_linux64)
5465 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5466 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5467 declarations.
5468 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5469 (s390_store_vxrs_high): New functions.
5470 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5471 NT_S390_VXRS_HIGH.
5472 (s390_arch_setup): Add logic for selecting one of the new target
5473 descriptions. Activate the new vector regsets if applicable.
5474 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5475 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5476 and init_registers_s390x_tevx_linux64.
5477
5478 2015-03-01 Pedro Alves <palves@redhat.com>
5479
5480 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5481 parameter.
5482
5483 2015-02-27 Pedro Alves <palves@redhat.com>
5484
5485 * linux-x86-low.c (u_debugreg_offset): New function.
5486 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5487
5488 2015-02-27 Pedro Alves <palves@redhat.com>
5489
5490 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5491 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5492 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5493 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5494 (ps_lsetfpregs, ps_getpid)
5495 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5496 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5497 (ps_lsetxregs, ps_plog): Declare.
5498
5499 2015-02-27 Pedro Alves <palves@redhat.com>
5500
5501 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5502 IP_AGENT_EXPORT_FUNC.
5503 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5504 IP_AGENT_EXPORT_FUNC.
5505 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5506 (IP_AGENT_EXPORT): Delete.
5507 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5508 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5509 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5510 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5511 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5512 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5513 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5514 (traceframe_read_count, traceframe_write_count)
5515 (traceframes_created, trace_state_variables, get_raw_reg)
5516 (get_trace_state_variable_value, set_trace_state_variable_value)
5517 (ust_loaded, helper_thread_id, cmd_buf): Use
5518 IPA_SYM_EXPORTED_NAME.
5519 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5520 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5521 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5522 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5523 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5524 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5525 EXTERN_C_PUSH/EXTERN_C_POP.
5526 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5527 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5528 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5529 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5530 (traceframe_write_count, traceframe_read_count)
5531 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5532 (about_to_request_buffer_space, get_trace_state_variable_value)
5533 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5534 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5535 EXTERN_C_PUSH/EXTERN_C_POP.
5536 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5537 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5538 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5539 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5540 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5541 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5542 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5543 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5544 Define.
5545 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5546 (IP_AGENT_EXPORT_VAR_DECL): Define.
5547 (tracing): Declare.
5548 (gdb_agent_get_raw_reg): Declare.
5549
5550 2015-02-27 Tom Tromey <tromey@redhat.com>
5551 Pedro Alves <palves@redhat.com>
5552
5553 Rename symbols whose names are reserved C++ keywords throughout.
5554
5555 2015-02-27 Pedro Alves <palves@redhat.com>
5556
5557 * Makefile.in (COMPILER): New, get it from autoconf.
5558 (CXX): Get from autoconf instead.
5559 (COMPILE.pre): Use COMPILER.
5560 (CC-LD): Rename to ...
5561 (CC_LD): ... this. Use COMPILER.
5562 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5563 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5564 * acinclude.m4: Include build-with-cxx.m4.
5565 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5566 Disable -Werror by default if building in C++ mode.
5567 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5568 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5569 the C++ compiler. Save/restore CXXFLAGS too.
5570 * configure: Regenerate.
5571
5572 2015-02-27 Pedro Alves <palves@redhat.com>
5573
5574 * acinclude.m4: Include libiberty.m4.
5575 * configure.ac: Call libiberty_INIT.
5576 * config.in, configure: Regenerate.
5577
5578 2015-02-26 Pedro Alves <palves@redhat.com>
5579
5580 * linux-low.c (linux_wait_1): When incrementing the PC past a
5581 program breakpoint always use the_low_target.breakpoint_len as
5582 increment, rather than the maximum between that and
5583 the_low_target.decr_pc_after_break.
5584
5585 2015-02-23 Pedro Alves <palves@redhat.com>
5586
5587 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5588 thread was doing a step-over; always adjust the PC if
5589 we stepped over a permanent breakpoint.
5590 (linux_wait_1): If we stepped over breakpoint that was on top of a
5591 permanent breakpoint, manually advance the PC past it.
5592
5593 2015-02-23 Pedro Alves <palves@redhat.com>
5594
5595 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5596 modes.
5597 (x86_fill_gregset, x86_store_gregset): Use it when handling
5598 $orig_eax.
5599
5600 2015-02-20 Pedro Alves <palves@redhat.com>
5601
5602 * thread-db.c: Include "nat/linux-procfs.h".
5603 (thread_db_init): Skip listing new threads if the kernel supports
5604 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5605
5606 2015-02-20 Pedro Alves <palves@redhat.com>
5607
5608 * linux-low.c (status_pending_p_callback): Use ptid_match.
5609
5610 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5611
5612 PR breakpoints/16812
5613 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5614 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5615 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5616
5617 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5618
5619 PR breakpoints/15956
5620 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5621
5622 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5623
5624 * linux-low.c (linux_low_btrace_conf): Print size.
5625 * server.c (handle_btrace_conf_general_set): New.
5626 (hanle_general_set): Call handle_btrace_conf_general_set.
5627 (handle_query): Report Qbtrace-conf:bts:size as supported.
5628
5629 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5630
5631 * linux-low.c (linux_low_enable_btrace): Update parameters.
5632 (linux_low_btrace_conf): New.
5633 (linux_target_ops)<to_btrace_conf>: Initialize.
5634 * server.c (current_btrace_conf): New.
5635 (handle_btrace_enable): Rename to ...
5636 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5637 to target_enable_btrace. Update comment. Update users.
5638 (handle_qxfer_btrace_conf): New.
5639 (qxfer_packets): Add btrace-conf entry.
5640 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5641 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5642 (target_ops)<read_btrace_conf>: New.
5643 (target_enable_btrace): Update parameters.
5644 (target_read_btrace_conf): New.
5645
5646 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5647
5648 * server.c (handle_btrace_general_set): Remove call to
5649 target_supports_btrace.
5650 (supported_btrace_packets): New.
5651 (handle_query): Call supported_btrace_packets.
5652 * target.h: include btrace-common.h.
5653 (btrace_target_info): Removed.
5654 (supports_btrace, target_supports_btrace): Update parameters.
5655
5656 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5657
5658 * Makefile.in (SFILES): Add common/btrace-common.c.
5659 (OBS): Add common/btrace-common.o.
5660 (btrace-common.o): Add build rules.
5661 * linux-low: Include btrace-common.h.
5662 (linux_low_read_btrace): Use struct btrace_data. Call
5663 btrace_data_init and btrace_data_fini.
5664
5665 2015-02-06 Pedro Alves <palves@redhat.com>
5666
5667 * thread-db.c (find_new_threads_callback): Add debug output.
5668
5669 2015-02-04 Pedro Alves <palves@redhat.com>
5670
5671 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5672 (resume_stopped_resumed_lwps): New function.
5673 (linux_wait_for_event_filtered): Use it.
5674
5675 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5676
5677 * Makefile.in (SFILES): Add linux-personality.c.
5678 (linux-personality.o): New rule.
5679 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5680 list of objects to be built.
5681 * linux-low.c: Include nat/linux-personality.h.
5682 (linux_create_inferior): Remove code to disable address space
5683 randomization (moved to ../nat/linux-personality.c). Create
5684 cleanup to disable address space randomization.
5685
5686 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5687
5688 * Makefile.in (posix-strerror.o): New rule.
5689 (mingw-strerror.o): Likewise.
5690 * configure: Regenerated.
5691 * configure.ac: Source file ../common/common.host. Initialize new
5692 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5693
5694 2015-01-14 Yao Qi <yao@codesourcery.com>
5695
5696 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5697 (ppc-linux.o): New rule.
5698 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5699 * configure.ac: AC_CHECK_FUNCS(getauxval).
5700 * config.in: Re-generated.
5701 * configure: Re-generated.
5702 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5703 ppc64_64bit_inferior_p
5704
5705 2015-01-14 Yao Qi <yao@codesourcery.com>
5706
5707 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5708 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5709 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5710 (PT_ORIG_R3, PT_TRAP): Likewise.
5711 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5712 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5713 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5714
5715 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5716
5717 * i387-fp.c (i387_cache_to_xsave): In look over
5718 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5719 zmmh_low_space field by use of zmmh_high_space.
5720
5721 2015-01-09 Pedro Alves <palves@redhat.com>
5722
5723 * linux-low.c (step_over_bkpt): Move higher up in the file.
5724 (handle_extended_wait): Don't store the stop_pc here.
5725 (get_stop_pc): Adjust comments and rename to ...
5726 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5727 stopped for a software breakpoint or hardware breakpoint.
5728 (thread_still_has_status_pending_p): New function.
5729 (status_pending_p_callback): Use
5730 thread_still_has_status_pending_p. If the event is no longer
5731 interesting, resume the LWP.
5732 (handle_tracepoints): Add assert.
5733 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5734 (wstatus_maybe_breakpoint): New function.
5735 (cancel_breakpoint): Delete function.
5736 (check_stopped_by_watchpoint): New function, factored out from
5737 linux_low_filter_event.
5738 (lp_status_maybe_breakpoint): Delete function.
5739 (linux_low_filter_event): Remove filter_ptid argument.
5740 Leave thread group exits pending here. Store the LWP's stop PC.
5741 Always leave events pending.
5742 (linux_wait_for_event_filtered): Pull all events out of the
5743 kernel, and leave them all pending.
5744 (count_events_callback, select_event_lwp_callback): Consider all
5745 events.
5746 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5747 (select_event_lwp): Only give preference to the stepping LWP in
5748 all-stop mode. Adjust comments.
5749 (ignore_event): New function.
5750 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5751 references to cancel_breakpoints. Adjust to renames. Also give
5752 equal priority to all LWPs that have had events in non-stop mode.
5753 If reporting a software breakpoint event, unadjust the LWP's PC.
5754 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5755 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5756 Adjust.
5757 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5758 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5759 (linux_stopped_by_watchpoint): Adjust.
5760 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5761 * linux-low.h (enum lwp_stop_reason): New.
5762 (struct lwp_info) <stop_pc>: Adjust comment.
5763 <stopped_by_watchpoint>: Delete field.
5764 <stop_reason>: New field.
5765 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5766 * mem-break.c (software_breakpoint_inserted_here)
5767 (hardware_breakpoint_inserted_here): New function.
5768 * mem-break.h (software_breakpoint_inserted_here)
5769 (hardware_breakpoint_inserted_here): Declare.
5770 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5771 (cancel_breakpoints): Delete.
5772 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5773 (upload_fast_traceframes): Remove references to
5774 cancel_breakpoints.
5775
5776 2015-01-09 Pedro Alves <palves@redhat.com>
5777
5778 * thread-db.c (find_new_threads_callback): Ignore thread if the
5779 kernel thread ID is -1.
5780
5781 2015-01-09 Pedro Alves <palves@redhat.com>
5782
5783 * linux-low.c (linux_attach_fail_reason_string): Move to
5784 nat/linux-ptrace.c, and rename.
5785 (linux_attach_lwp): Update comment.
5786 (attach_proc_task_lwp_callback): New function.
5787 (linux_attach): Adjust to rename and use
5788 linux_proc_attach_tgid_threads.
5789 (linux_attach_fail_reason_string): Delete declaration.
5790
5791 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5792
5793 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5794 * server.c (gdbserver_version): Likewise.
5795
5796 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5797
5798 * remote-utils.c: Include ctype.h.
5799 (input_interrupt): Explicitly handle the case when the char
5800 received is the NUL byte. Improve the printing of non-ASCII
5801 characters.
5802
5803 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5804
5805 * linux-low.c (linux_low_filter_event): Update call to
5806 linux_enable_event_reporting following the addition of
5807 a new parameter to that function.
5808
5809 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5810
5811 PR server/17457
5812 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5813 (AARCH64_FPCR_REGNO): Likewise.
5814 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5815 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5816 (aarch64_store_fpregset): Likewise.
5817
5818 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5819
5820 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5821 Remove FIXME comment about assumption about N.
5822
5823 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5824
5825 * configure.ac: If large-file support is disabled in GDBserver,
5826 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5827 * configure: Regenerate.
5828
5829 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5830
5831 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5832 warning upon ENODATA from ptrace.
5833 * linux-s390-low.c (s390_store_tdb): New.
5834 (s390_regsets): Add regset for NT_S390_TDB.
5835
5836 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5837
5838 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5839 without a fill_function.
5840 * linux-s390-low.c (s390_fill_last_break): Remove.
5841 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5842 (s390_arch_setup): Use regset's size instead of fill_function for
5843 loop end condition.
5844
5845 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5846
5847 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5848 the regset's store function when ptrace returned an error.
5849 * regcache.c (get_thread_regcache): Invalidate register cache
5850 before fetching inferior's registers.
5851
5852 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5853
5854 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5855 while-loop as for-loop.
5856 (regsets_store_inferior_registers): Likewise.
5857
5858 2014-11-28 Yao Qi <yao@codesourcery.com>
5859
5860 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5861 * config.in, configure: Re-generate.
5862 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5863 is defined.
5864
5865 2014-11-21 Yao Qi <yao@codesourcery.com>
5866
5867 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5868 (AC_CHECK_HEADERS): Remove malloc.h.
5869 * configure: Re-generated.
5870 * config.in: Re-generated.
5871 * server.h: Don't include alloca.h and malloc.h.
5872 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5873 Don't include malloc.h.
5874
5875 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5876
5877 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5878 corresponding ERRNO check in same block.
5879
5880 2014-11-12 Pedro Alves <palves@redhat.com>
5881
5882 * server.c (cont_thread): Update comment.
5883 (start_inferior, attach_inferior): No longer clear cont_thread.
5884 (handle_v_cont): No longer set cont_thread.
5885 (captured_main): Clear cont_thread each time a GDB connects.
5886
5887 2014-11-12 Pedro Alves <palves@redhat.com>
5888
5889 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5890 thread, and don't resume all threads if the Hc thread has exited.
5891
5892 2014-11-12 Pedro Alves <palves@redhat.com>
5893
5894 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5895 the process group instead of to a specific LWP.
5896
5897 2014-10-15 Pedro Alves <palves@redhat.com>
5898
5899 PR server/17487
5900 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5901 parameter.
5902 (arm_set_thread_context): Delete.
5903 (the_low_target): Adjust.
5904 * win32-i386-low.c (debug_registers_changed)
5905 (debug_registers_used): Delete.
5906 (update_debug_registers_callback): New function.
5907 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5908 needing to update their debug registers.
5909 (win32_get_current_dr): New function.
5910 (x86_dr_low_get_addr, x86_dr_low_get_control)
5911 (x86_dr_low_get_status): Fetch the debug register from the thread
5912 record's context.
5913 (i386_initial_stuff): Adjust.
5914 (i386_get_thread_context): Remove current_event parameter. Don't
5915 clear debug_registers_changed nor copy DR values to
5916 debug_reg_state.
5917 (i386_set_thread_context): Delete.
5918 (i386_prepare_to_resume): New function.
5919 (i386_thread_added): Mark the thread as needing to update irs
5920 debug registers.
5921 (the_low_target): Remove i386_set_thread_context and install
5922 i386_prepare_to_resume.
5923 * win32-low.c (win32_get_thread_context): Adjust.
5924 (win32_set_thread_context): Use SetThreadContext
5925 directly.
5926 (win32_prepare_to_resume): New function.
5927 (win32_require_context): New function, factored out from ...
5928 (thread_rec): ... this.
5929 (continue_one_thread): Call win32_prepare_to_resume on each thread
5930 we're about to continue.
5931 (win32_resume): Call win32_prepare_to_resume on the event thread.
5932 * win32-low.h (struct win32_thread_info)
5933 <debug_registers_changed>: New field.
5934 (struct win32_target_ops): Change prototype of set_thread_context,
5935 delete set_thread_context and add prepare_to_resume.
5936 (win32_require_context): New declaration.
5937
5938 2014-10-08 Gary Benson <gbenson@redhat.com>
5939
5940 * server.h: Do not include common-exceptions.h.
5941
5942 2014-10-08 Gary Benson <gbenson@redhat.com>
5943
5944 * server.h: Do not include cleanups.h.
5945
5946 2014-09-30 James Hogan <james.hogan@imgtec.com>
5947
5948 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5949 mips64-dsp-linux.c.
5950
5951 2014-09-23 Yao Qi <yao@codesourcery.com>
5952
5953 * linux-low.c (lp_status_maybe_breakpoint): New function.
5954 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5955 (count_events_callback): Likewise.
5956 (select_event_lwp_callback): Likewise.
5957 (cancel_breakpoints_callback): Likewise.
5958
5959 2014-09-19 Don Breazeal <donb@codesourcery.com>
5960
5961 * linux-low.c (handle_extended_wait): Call
5962 linux_ptrace_get_extended_event.
5963 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5964 linux_is_extended_waitstatus.
5965
5966 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5967
5968 * Makefile.in (CPPFLAGS): Define.
5969 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5970 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5971
5972 2014-09-16 Gary Benson <gbenson@redhat.com>
5973
5974 * inferiors.h (current_inferior): Renamed as...
5975 (current_thread): New variable. All uses updated.
5976 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5977 (maybe_move_out_of_jump_pad): Likewise.
5978 (cancel_breakpoint): Likewise.
5979 (linux_low_filter_event): Likewise.
5980 (wait_for_sigstop): Likewise.
5981 (linux_resume_one_lwp): Likewise.
5982 (need_step_over_p): Likewise.
5983 (start_step_over): Likewise.
5984 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5985 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5986 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5987 and save_inferior as saved_thread.
5988 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5989 saved_thread.
5990 (regcache_invalidate_thread): Likewise.
5991 * remote-utils.c (prepare_resume_reply): Likewise.
5992 * thread-db.c (thread_db_get_tls_address): Likewise.
5993 (disable_thread_event_reporting): Likewise.
5994 (remove_thread_event_breakpoints): Likewise.
5995 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5996 as saved_thread.
5997 * target.h (set_desired_inferior): Renamed as...
5998 (set_desired_thread): New declaration. All uses updated.
5999 * server.c (myresume): Updated comment to reference thread instead
6000 of inferior.
6001 (handle_serial_event): Likewise.
6002 (handle_target_event): Likewise.
6003
6004 2014-09-12 Tom Tromey <tromey@redhat.com>
6005 Gary Benson <gbenson@redhat.com>
6006
6007 * regcache.h: Include common-regcache.h.
6008 (regcache_read_pc): Don't declare.
6009 * regcache.c (get_thread_regcache_for_ptid): New function.
6010
6011 2014-09-11 Tom Tromey <tromey@redhat.com>
6012 Gary Benson <gbenson@redhat.com>
6013
6014 * symbol.c: New file.
6015 * Makefile.in (SFILES): Add symbol.c.
6016 (OBS): Add symbol.o.
6017
6018 2014-09-11 Gary Benson <gbenson@redhat.com>
6019
6020 * target.c (target_stop_ptid, target_continue_ptid): New
6021 functions.
6022
6023 2014-09-11 Tom Tromey <tromey@redhat.com>
6024 Gary Benson <gbenson@redhat.com>
6025
6026 * target.h: Include target/target.h.
6027 * target.c (target_read_memory, target_read_uint32)
6028 (target_write_memory): New functions.
6029
6030 2014-09-11 Gary Benson <gbenson@redhat.com>
6031
6032 * server.h (debug_hw_points): Don't declare.
6033 * server.c (debug_hw_points): Don't define. Replace all uses
6034 with show_debug_regs.
6035 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6036 all uses with show_debug_regs.
6037
6038 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6039
6040 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6041 endianness into account.
6042 (ppc_supply_ptrace_register): Likewise.
6043
6044 2014-09-03 James Hogan <james.hogan@imgtec.com>
6045
6046 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6047 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6048
6049 2014-09-03 Gary Benson <gbenson@redhat.com>
6050
6051 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6052 ALL_DEBUG_ADDRESS_REGISTERS.
6053
6054 2014-09-02 Gary Benson <gbenson@redhat.com>
6055
6056 * i386-low.h: Renamed as...
6057 * x86-low.h: New file. All type, function and variable name
6058 prefixes changed from "i386_" to "x86_". All references updated.
6059 * i386-low.c: Renamed as...
6060 * x86-low.c: New file. All type, function and variable name
6061 prefixes changed from "i386_" to "x86_". All references updated.
6062
6063 2014-09-02 Gary Benson <gbenson@redhat.com>
6064
6065 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6066 (x86_linux_new_thread): Likewise.
6067
6068 2014-08-29 Gary Benson <gbenson@redhat.com>
6069
6070 * server.h (setjmp.h): Do not include.
6071 (toplevel): Do not declare.
6072 (common-exceptions.h): Include.
6073 (cleanups.h): Likewise.
6074 * server.c (toplevel): Do not define.
6075 (exit_code): New static global.
6076 (detach_or_kill_for_exit_cleanup): New function.
6077 (main): New function. Original main renamed to...
6078 (captured_main): New function.
6079 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6080
6081 2014-08-29 Gary Benson <gbenson@redhat.com>
6082
6083 * Makefile.in (SFILES): Add common/common-exceptions.c.
6084 (OBS): Add common-exceptions.o.
6085 (common-exceptions.o): New rule.
6086 * utils.c (prepare_to_throw_exception): New function.
6087
6088 2014-08-29 Gary Benson <gbenson@redhat.com>
6089
6090 * config.in: Regenerate.
6091 * configure: Likewise.
6092
6093 2014-08-29 Gary Benson <gbenson@redhat.com>
6094
6095 * Makefile.in (SFILES): Add common/cleanups.c.
6096 (OBS): cleanups.o.
6097 (cleanups.o): New rule.
6098
6099 2014-08-29 Gary Benson <gbenson@redhat.com>
6100
6101 * utils.c (internal_vwarning): New function.
6102
6103 2014-08-28 Gary Benson <gbenson@redhat.com>
6104
6105 * utils.h (fatal): Remove declaration.
6106 * utils.c (fatal): Remove function.
6107
6108 2014-08-28 Gary Benson <gbenson@redhat.com>
6109
6110 * tracepoint.c (gdb_agent_init): Replace fatal with
6111 perror_with_name.
6112 (initialize_tracepoint): Likewise.
6113
6114 2014-08-28 Gary Benson <gbenson@redhat.com>
6115
6116 * remote-utils.c (remote_prepare): Replace fatal with error.
6117
6118 2014-08-28 Gary Benson <gbenson@redhat.com>
6119
6120 * linux-low.c (linux_async): Replace fatal with warning.
6121 Tidy up and return.
6122 (linux_start_non_stop): Return -1 if linux_async failed.
6123
6124 2014-08-28 Gary Benson <gbenson@redhat.com>
6125
6126 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6127 gdb_assert.
6128 (i386_dr_low_get_addr): Remove vague comment.
6129 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6130 gdb_assert.
6131
6132 2014-08-28 Gary Benson <gbenson@redhat.com>
6133
6134 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6135 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6136 internal_error.
6137 (linux_resume_one_lwp): Likewise.
6138 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6139 gdb_assert.
6140 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6141 with internal_error.
6142 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6143 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6144 (find_register_by_name): Replace fatal with internal_error.
6145 (find_regno): Likewise.
6146 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6147 * thread-db.c (thread_db_create_event): Likewise.
6148 (thread_db_load_search): Likewise.
6149 (try_thread_db_load_1): Likewise.
6150 * tracepoint.c (get_jump_space_head): Replace fatal with
6151 internal_error.
6152 (claim_trampoline_space): Likewise.
6153 (have_fast_tracepoint_trampoline_buffer): Likewise.
6154 (cmd_qtstart): Likewise.
6155 (stop_tracing): Likewise.
6156 (fast_tracepoint_collecting): Likewise.
6157 (target_malloc): Likewise.
6158 (download_tracepoint): Likewise.
6159 (download_trace_state_variables): Replace check with gdb_assert.
6160 (upload_fast_traceframes): Replace fatal with internal_error.
6161
6162 2014-08-19 Tom Tromey <tromey@redhat.com>
6163 Gary Benson <gbenson@redhat.com>
6164
6165 * Makefile.in (SFILES): Add common/common-debug.c.
6166 (OBS): Add common-debug.o.
6167 (common-debug.o): New rule.
6168 * debug.h (debug_printf): Don't declare.
6169 * debug.c (debug_printf): Renamed and rewritten as...
6170 (debug_vprintf): New function.
6171
6172 2014-08-19 Gary Benson <gbenson@redhat.com>
6173
6174 * utils.h: Do not include print-utils.h.
6175
6176 2014-08-19 Tom Tromey <tromey@redhat.com>
6177 Gary Benson <gbenson@redhat.com>
6178
6179 * server.h: Add static assertion.
6180 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6181
6182 2014-08-19 Tom Tromey <tromey@redhat.com>
6183 Gary Benson <gbenson@redhat.com>
6184
6185 * Makefile.in (SFILES): Add common/errors.c.
6186 (OBS): Add errors.o.
6187 (IPA_OBS): Add errors-ipa.o.
6188 (errors.o): New rule.
6189 (errors-ipa.o): Likewise.
6190 * utils.h (perror_with_name, error, warning): Don't declare.
6191 * utils.c (warning): Renamed and rewritten as...
6192 (vwarning): New function.
6193 (error): Renamed and rewritten as...
6194 (verror): New function.
6195 (internal_error): Renamed and rewritten as...
6196 (internal_verror): New function.
6197
6198 2014-08-07 Gary Benson <gbenson@redhat.com>
6199
6200 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6201 * configure: Regenerate.
6202 * config.in: Likewise.
6203 * server.h: Do not include errno.h.
6204 * event-loop.c: Likewise.
6205 * hostio-errno.c: Likewise.
6206 * linux-low.c: Likewise.
6207 * remote-utils.c: Likewise.
6208 * spu-low.c: Likewise.
6209 * utils.c: Likewise.
6210 * gdbreplay.c: Unconditionally include errno.h.
6211
6212 2014-08-07 Gary Benson <gbenson@redhat.com>
6213
6214 * server.h: Do not include string.h.
6215 * event-loop.c: Likewise.
6216 * linux-low.c: Likewise.
6217 * regcache.c: Likewise.
6218 * remote-utils.c: Likewise.
6219 * spu-low.c: Likewise.
6220 * utils.c: Likewise.
6221
6222 2014-08-07 Gary Benson <gbenson@redhat.com>
6223
6224 * server.h: Do not include gdb_assert.h.
6225
6226 2014-08-07 Gary Benson <gbenson@redhat.com>
6227
6228 * server.h: Do not include common-utils.h.
6229
6230 2014-08-07 Gary Benson <gbenson@redhat.com>
6231
6232 * server.h: Do not include ptid.h.
6233 * notif.h: Likewise.
6234
6235 2014-08-07 Gary Benson <gbenson@redhat.com>
6236
6237 * server.h: Do not include gdb_locale.h.
6238
6239 2014-08-07 Gary Benson <gbenson@redhat.com>
6240
6241 * server.h: Do not include gdb/signals.h.
6242 * win32-low.c: Likewise.
6243
6244 2014-08-07 Gary Benson <gbenson@redhat.com>
6245
6246 * server.h: Do not include pathmax.h.
6247
6248 2014-08-07 Gary Benson <gbenson@redhat.com>
6249
6250 * server.h: Do not include libiberty.h.
6251 * linux-bfin-low.c: Likewise.
6252
6253 2014-08-07 Gary Benson <gbenson@redhat.com>
6254
6255 * server.h: Do not include ansidecl.h.
6256
6257 2014-08-07 Gary Benson <gbenson@redhat.com>
6258
6259 * linux-x86-low.c: Do not include stddef.h.
6260 * lynx-ppc-low.c: Likewise.
6261 * tracepoint.c: Likewise.
6262
6263 2014-08-07 Gary Benson <gbenson@redhat.com>
6264
6265 * server.h: Do not include stdarg.h.
6266 * nto-low.c: Likewise.
6267
6268 2014-08-07 Gary Benson <gbenson@redhat.com>
6269
6270 * server.h: Do not include stdlib.h.
6271 * inferiors.c: Likewise.
6272 * linux-low.c: Likewise.
6273 * regcache.c: Likewise.
6274 * spu-low.c: Likewise.
6275 * tracepoint.c: Likewise.
6276 * utils.c: Likewise.
6277
6278 2014-08-07 Gary Benson <gbenson@redhat.com>
6279
6280 * server.h: Do not include stdio.h.
6281 * linux-low.c: Likewise.
6282 * remote-utils.c: Likewise.
6283 * spu-low.c: Likewise.
6284 * utils.c: Likewise.
6285 * wincecompat.c: Likewise.
6286
6287 2014-08-06 Gary Benson <gbenson@redhat.com>
6288
6289 * regcache.c (init_register_cache): Move conditionals inside if.
6290
6291 2014-08-06 Gary Benson <gbenson@redhat.com>
6292
6293 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6294
6295 2014-07-31 Gary Benson <gbenson@redhat.com>
6296
6297 * ax.h: Do not include server.h.
6298 * gdbthread.h: Likewise.
6299 * lynx-low.h: Likewise.
6300 * notif.h: Likewise.
6301
6302 2014-07-30 Gary Benson <gbenson@redhat.com>
6303
6304 * server.h: Include common-defs.h.
6305 Do not include config.h or build-gnulib-gdbserver/config.h.
6306
6307 2014-07-30 Gary Benson <gbenson@redhat.com>
6308
6309 * hostio-errno.c: Move server.h to top of includes list.
6310 * inferiors.c: Likewise.
6311 * linux-x86-low.c: Likewise.
6312 * notif.c: Include server.h.
6313
6314 2014-07-24 Tom Tromey <tromey@redhat.com>
6315 Gary Benson <gbenson@redhat.com>
6316
6317 * server.h (CORE_ADDR): Now unsigned.
6318
6319 2014-07-16 Pedro Alves <palves@redhat.com>
6320
6321 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6322
6323 2014-07-15 Pedro Alves <palves@redhat.com>
6324
6325 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6326 copy.
6327
6328 2014-07-11 Pedro Alves <palves@redhat.com>
6329
6330 * linux-low.c (kill_wait_lwp): New function, based on
6331 kill_one_lwp_callback, but use my_waitpid directly.
6332 (kill_one_lwp_callback, linux_kill): Use it.
6333
6334 2014-06-23 Pedro Alves <palves@redhat.com>
6335
6336 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6337 before setting DR0..DR3.
6338
6339 2014-06-20 Gary Benson <gbenson@redhat.com>
6340
6341 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6342 * configure: Regenerated.
6343 * config.in: Likewise.
6344
6345 2014-06-20 Gary Benson <gbenson@redhat.com>
6346
6347 * Makefile.in (SFILES): Update locations for files moved
6348 from common to nat.
6349 (object file files): Reordered.
6350
6351 2014-06-20 Gary Benson <gbenson@redhat.com>
6352
6353 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6354 (i386_dr_low_set_addr): Likewise.
6355 (i386_dr_low_get_addr): Likewise.
6356 (i386_dr_low_can_set_control): Likewise.
6357 (i386_dr_low_set_control): Likewise.
6358 (i386_dr_low_get_control): Likewise.
6359 (i386_dr_low_get_status): Likewise.
6360 (i386_get_debug_register_length): Likewise.
6361 * linux-x86-low.c (i386_dr_low_set_addr):
6362 Changed signature. Made static.
6363 (i386_dr_low_get_addr): Likewise.
6364 (i386_dr_low_set_control): Likewise.
6365 (i386_dr_low_get_control): Likewise.
6366 (i386_dr_low_get_status): Likewise.
6367 (i386_dr_low): New global variable.
6368 * win32-i386-low.c (i386_dr_low_set_addr):
6369 Changed signature. Made static.
6370 (i386_dr_low_get_addr): Likewise.
6371 (i386_dr_low_set_control): Likewise.
6372 (i386_dr_low_get_control): Likewise.
6373 (i386_dr_low_get_status): Likewise.
6374 (i386_dr_low): New global variable.
6375
6376 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6377
6378 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6379 * Makefile.in (AR, AR_FLAGS): Define.
6380 * configure: Regenerate.
6381
6382 2014-06-19 Gary Benson <gbenson@redhat.com>
6383
6384 * Makefile.in (i386-dregs.o): New rule.
6385 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6386 * i386-low.c (target.h): Remove include.
6387 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6388 (DR_CONTROL_SHIFT): Likewise.
6389 (DR_CONTROL_SIZE): Likewise.
6390 (DR_RW_EXECUTE): Likewise.
6391 (DR_RW_WRITE): Likewise.
6392 (DR_RW_READ): Likewise.
6393 (DR_RW_IORW): Likewise.
6394 (DR_LEN_1): Likewise.
6395 (DR_LEN_2): Likewise.
6396 (DR_LEN_4): Likewise.
6397 (DR_LEN_8): Likewise.
6398 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6399 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6400 (DR_ENABLE_SIZE): Likewise.
6401 (DR_LOCAL_SLOWDOWN): Likewise.
6402 (DR_GLOBAL_SLOWDOWN): Likewise.
6403 (DR_CONTROL_RESERVED): Likewise.
6404 (I386_DR_CONTROL_MASK): Likewise.
6405 (I386_DR_VACANT): Likewise.
6406 (I386_DR_LOCAL_ENABLE): Likewise.
6407 (I386_DR_GLOBAL_ENABLE): Likewise.
6408 (I386_DR_DISABLE): Likewise.
6409 (I386_DR_SET_RW_LEN): Likewise.
6410 (I386_DR_GET_RW_LEN): Likewise.
6411 (I386_DR_WATCH_HIT): Likewise.
6412 (i386_wp_op_t): Likewise.
6413 (i386_show_dr): Likewise.
6414 (i386_length_and_rw_bits): Likewise.
6415 (i386_insert_aligned_watchpoint): Likewise.
6416 (i386_remove_aligned_watchpoint): Likewise.
6417 (i386_handle_nonaligned_watchpoint): Likewise.
6418 i386_update_inferior_debug_regs(): Likewise.
6419 (i386_dr_insert_watchpoint): Likewise.
6420 (i386_dr_remove_watchpoint): Likewise.
6421 (i386_dr_region_ok_for_watchpoint): Likewise.
6422 (i386_dr_stopped_data_address): Likewise.
6423 (i386_dr_stopped_by_watchpoint): Likewise.
6424
6425 2014-06-19 Gary Benson <gbenson@redhat.com>
6426
6427 * i386-low.c (i386_dr_show): Renamed to
6428 i386_show_dr and made static. All uses updated.
6429 (i386_dr_length_and_rw_bits): Renamed to
6430 i386_length_and_rw_bits and made static.
6431 All uses updated.
6432 (i386_dr_insert_aligned_watchpoint): Renamed to
6433 i386_insert_aligned_watchpoint and made static.
6434 All uses updated.
6435 (i386_dr_remove_aligned_watchpoint): Renamed to
6436 i386_remove_aligned_watchpoint and made static.
6437 All uses updated.
6438 (i386_dr_update_inferior_debug_regs): Renamed to
6439 i386_update_inferior_debug_regs and made static.
6440 All uses updated.
6441
6442 2014-06-18 Gary Benson <gbenson@redhat.com>
6443
6444 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6445 (i386_dr_low_can_set_control): Likewise.
6446 (i386_get_debug_register_length): Likewise.
6447 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6448 (i386_dr_low_can_set_control): Likewise.
6449 (i386_get_debug_register_length): Likewise.
6450
6451 2014-06-17 Gary Benson <gbenson@redhat.com>
6452
6453 * i386-low.h (i386-dregs.h): New include.
6454 (DR_FIRSTADDR): Now in i386-dregs.h.
6455 (DR_LASTADDR): Likewise.
6456 (DR_NADDR): Likewise.
6457 (DR_STATUS): Likewise.
6458 (DR_CONTROL): Likewise.
6459 (i386_debug_reg_state): Likewise.
6460 (i386_dr_insert_watchpoint): Likewise.
6461 (i386_dr_remove_watchpoint): Likewise.
6462 (i386_dr_region_ok_for_watchpoint): Likewise.
6463 (i386_dr_stopped_data_address): Likewise.
6464 (i386_dr_stopped_by_watchpoint): Likewise.
6465 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6466
6467 2014-06-18 Gary Benson <gbenson@redhat.com>
6468
6469 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6470 i386_dr_insert_watchpoint.
6471 (i386_low_remove_watchpoint): Renamed to
6472 i386_dr_remove_watchpoint.
6473 (i386_low_region_ok_for_watchpoint): Renamed to
6474 i386_dr_region_ok_for_watchpoint.
6475 (i386_low_stopped_data_address): Renamed to
6476 i386_dr_stopped_data_address.
6477 (i386_low_stopped_by_watchpoint): Renamed to
6478 i386_dr_stopped_by_watchpoint.
6479 * i386-low.c (i386_show_dr): Renamed to
6480 i386_dr_show and made nonstatic. All uses updated.
6481 (i386_length_and_rw_bits): Renamed to
6482 i386_dr_length_and_rw_bits and made nonstatic.
6483 All uses updated.
6484 (i386_insert_aligned_watchpoint): Renamed to
6485 i386_dr_insert_aligned_watchpoint and made nonstatic.
6486 All uses updated.
6487 (i386_remove_aligned_watchpoint): Renamed to
6488 i386_dr_remove_aligned_watchpoint and made nonstatic.
6489 All uses updated.
6490 (i386_update_inferior_debug_regs): Renamed to
6491 i386_dr_update_inferior_debug_regs and made nonstatic.
6492 All uses updated.
6493 (i386_low_insert_watchpoint): Renamed to
6494 i386_dr_insert_watchpoint. All uses updated.
6495 (i386_low_remove_watchpoint): Renamed to
6496 i386_dr_remove_watchpoint. All uses updated.
6497 (i386_low_region_ok_for_watchpoint): Renamed to
6498 i386_dr_region_ok_for_watchpoint. All uses updated.
6499 (i386_low_stopped_data_address): Renamed to
6500 i386_dr_stopped_data_address. All uses updated.
6501 (i386_low_stopped_by_watchpoint): Renamed to
6502 i386_dr_stopped_by_watchpoint. All uses updated.
6503
6504 2014-06-18 Gary Benson <gbenson@redhat.com>
6505
6506 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6507 (i386_dr_low_can_set_control): Likewise.
6508 (i386_insert_aligned_watchpoint): New check.
6509
6510 2014-06-18 Gary Benson <gbenson@redhat.com>
6511
6512 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6513 Renamed to state.
6514
6515 2014-06-18 Gary Benson <gbenson@redhat.com>
6516
6517 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6518 instead of fatal and error.
6519 (i386_handle_nonaligned_watchpoint): Likewise.
6520
6521 2014-06-18 Gary Benson <gbenson@redhat.com>
6522
6523 * i386-low.c (i386_get_debug_register_length): New macro.
6524 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6525 (i386_show_dr): Use debug_printf instead of fprintf. Use
6526 phex to format values.
6527
6528 2014-06-18 Gary Benson <gbenson@redhat.com>
6529
6530 * i386-low.h: Comment changes.
6531 * i386-low.c: Likewise.
6532
6533 2014-06-18 Gary Benson <gbenson@redhat.com>
6534
6535 * i386-low.c: Whitespace changes.
6536
6537 2014-06-12 Tom Tromey <tromey@redhat.com>
6538
6539 * utils.c (freeargv): Remove.
6540
6541 2014-06-12 Tom Tromey <tromey@redhat.com>
6542
6543 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6544 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6545 (parse_debug_format_options): Likewise.
6546 (gdbserver_usage): Likewise.
6547 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6548 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6549 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6550 against libiberty.
6551 ($(LIBGNU)): Depend on libiberty.
6552 (all-lib): Recurse into all subdirs.
6553 (install-only): Invoke "install" target in subdirs.
6554 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6555 targets.
6556 * configure: Rebuild.
6557 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6558 for vasprintf, vsnprintf, or gettimeofday.
6559 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6560 srv_tgtobj.
6561
6562 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6563
6564 * development.sh: Delete.
6565 * Makefile.in (config.status): Adjust dependency on development.sh.
6566 * configure.ac: Adjust development.sh source call.
6567 * configure: Regenerate.
6568
6569 2014-06-02 Pedro Alves <palves@redhat.com>
6570
6571 * ax.c (gdb_free_agent_expr): New function.
6572 * ax.h (gdb_free_agent_expr): New declaration.
6573 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6574 list.
6575 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6576 static.
6577 (clear_breakpoint_conditions_and_commands): New function.
6578 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6579 (clear_breakpoint_conditions_and_commands): New declaration.
6580
6581 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6582
6583 * linux-aarch64-low.c (asm/ptrace.h): Include.
6584
6585 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6586
6587 Fix TLS access for -static -pthread.
6588 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6589 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6590 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6591
6592 2014-05-20 Pedro Alves <palves@redhat.com>
6593
6594 * linux-aarch64-low.c (aarch64_insert_point)
6595 (aarch64_remove_point): No longer check whether the type is
6596 supported here. Adjust to new interface.
6597 (the_low_target): Install aarch64_supports_z_point_type as
6598 supports_z_point_type method.
6599 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6600 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6601 instead of a Z packet char. Adjust.
6602 (arm_supports_z_point_type): New function.
6603 (arm_insert_point, arm_remove_point): Adjust to new interface.
6604 (the_low_target): Install arm_supports_z_point_type.
6605 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6606 (cris_insert_point, cris_remove_point): Adjust to new interface.
6607 Don't check whether the type is supported here.
6608 (the_low_target): Install cris_supports_z_point_type.
6609 * linux-low.c (linux_supports_z_point_type): New function.
6610 (linux_insert_point, linux_remove_point): Adjust to new interface.
6611 * linux-low.h (struct linux_target_ops) <insert_point,
6612 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6613 raw_breakpoint pointer parameter.
6614 <supports_z_point_type>: New method.
6615 * linux-mips-low.c (mips_supports_z_point_type): New function.
6616 (mips_insert_point, mips_remove_point): Adjust to new interface.
6617 Use mips_supports_z_point_type.
6618 (the_low_target): Install mips_supports_z_point_type.
6619 * linux-ppc-low.c (the_low_target): Install NULL as
6620 supports_z_point_type method.
6621 * linux-s390-low.c (the_low_target): Install NULL as
6622 supports_z_point_type method.
6623 * linux-sparc-low.c (the_low_target): Install NULL as
6624 supports_z_point_type method.
6625 * linux-x86-low.c (x86_supports_z_point_type): New function.
6626 (x86_insert_point): Adjust to new insert_point interface. Use
6627 insert_memory_breakpoint. Adjust to new
6628 i386_low_insert_watchpoint interface.
6629 (x86_remove_point): Adjust to remove_point interface. Use
6630 remove_memory_breakpoint. Adjust to new
6631 i386_low_remove_watchpoint interface.
6632 (the_low_target): Install x86_supports_z_point_type.
6633 * lynx-low.c (lynx_target_ops): Install NULL as
6634 supports_z_point_type callback.
6635 * nto-low.c (nto_supports_z_point_type): New.
6636 (nto_insert_point, nto_remove_point): Adjust to new interface.
6637 (nto_target_ops): Install nto_supports_z_point_type.
6638 * mem-break.c: Adjust intro comment.
6639 (struct raw_breakpoint) <raw_type, size>: New fields.
6640 <inserted>: Update comment.
6641 <shlib_disabled>: Delete field.
6642 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6643 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6644 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6645 (raw_bkpt_type_to_target_hw_bp_type): New function.
6646 (find_enabled_raw_code_breakpoint_at): New function.
6647 (find_raw_breakpoint_at): New type and size parameters. Use them.
6648 (insert_memory_breakpoint): New function, based off
6649 set_raw_breakpoint_at.
6650 (remove_memory_breakpoint): New function.
6651 (set_raw_breakpoint_at): Reimplement.
6652 (set_breakpoint): New, based on set_breakpoint_at.
6653 (set_breakpoint_at): Reimplement.
6654 (delete_raw_breakpoint): Go through the_target->remove_point
6655 instead of assuming memory breakpoints.
6656 (find_gdb_breakpoint_at): Delete.
6657 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6658 (find_gdb_breakpoint): New function.
6659 (set_gdb_breakpoint_at): Delete.
6660 (z_type_supported): New function.
6661 (set_gdb_breakpoint_1): New function, loosely based off
6662 set_gdb_breakpoint_at.
6663 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6664 (delete_gdb_breakpoint_at): Delete.
6665 (delete_gdb_breakpoint_1): New function, loosely based off
6666 delete_gdb_breakpoint_at.
6667 (delete_gdb_breakpoint): New function.
6668 (clear_gdb_breakpoint_conditions): Rename to ...
6669 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6670 breakpoint.
6671 (add_condition_to_breakpoint): Make static.
6672 (add_breakpoint_condition): Take a struct breakpoint pointer
6673 instead of an address. Adjust.
6674 (gdb_condition_true_at_breakpoint): Rename to ...
6675 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6676 z_type parameter.
6677 (gdb_condition_true_at_breakpoint): Reimplement.
6678 (add_breakpoint_commands): Take a struct breakpoint pointer
6679 instead of an address. Adjust.
6680 (gdb_no_commands_at_breakpoint): Rename to ...
6681 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6682 parameter. Return true if no breakpoint was found. Change debug
6683 output.
6684 (gdb_no_commands_at_breakpoint): Reimplement.
6685 (run_breakpoint_commands): Rename to ...
6686 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6687 and change return type to boolean.
6688 (run_breakpoint_commands): New function.
6689 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6690 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6691 breakpoint. Go through the_target->remove_point instead of
6692 assuming memory breakpoint.
6693 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6694 software and hardware breakpoints.
6695 (reinsert_raw_breakpoint): Go through the_target->insert_point
6696 instead of assuming memory breakpoint.
6697 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6698 software and hardware breakpoints.
6699 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6700 Check both software and hardware breakpoints.
6701 (validate_inserted_breakpoint): Assert the breakpoint is a
6702 software breakpoint. Set the inserted flag to -1 instead of
6703 setting shlib_disabled.
6704 (delete_disabled_breakpoints): Adjust.
6705 (validate_breakpoints): Only validate software breakpoints.
6706 Adjust to inserted flag change.
6707 (check_mem_read, check_mem_write): Skip breakpoint types other
6708 than software breakpoints. Adjust to inserted flag change.
6709 * mem-break.h (enum raw_bkpt_type): New enum.
6710 (raw_breakpoint, struct process_info): Forward declare.
6711 (Z_packet_to_target_hw_bp_type): Delete declaration.
6712 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6713 (set_gdb_breakpoint, delete_gdb_breakpoint)
6714 (clear_breakpoint_conditions): New declarations.
6715 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6716 (breakpoint_inserted_here): Update comment.
6717 (add_breakpoint_condition, add_breakpoint_commands): Replace
6718 address parameter with a breakpoint pointer parameter.
6719 (gdb_breakpoint_here): Update comment.
6720 (delete_gdb_breakpoint_at): Delete.
6721 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6722 * server.c (process_point_options): Take a struct breakpoint
6723 pointer instead of an address. Adjust.
6724 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6725 delete_gdb_breakpoint.
6726 * spu-low.c (spu_target_ops): Install NULL as
6727 supports_z_point_type method.
6728 * target.h: Include mem-break.h.
6729 (struct target_ops) <prepare_to_access_memory>: Update comment.
6730 <supports_z_point_type>: New field.
6731 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6732 instead of a char. Also take a raw breakpoint pointer.
6733 * win32-arm-low.c (the_low_target): Install NULL as
6734 supports_z_point_type.
6735 * win32-i386-low.c (i386_supports_z_point_type): New function.
6736 (i386_insert_point, i386_remove_point): Adjust to new interface.
6737 (the_low_target): Install i386_supports_z_point_type.
6738 * win32-low.c (win32_supports_z_point_type): New function.
6739 (win32_insert_point, win32_remove_point): Adjust to new interface.
6740 (win32_target_ops): Install win32_supports_z_point_type.
6741 * win32-low.h (struct win32_target_ops):
6742 <supports_z_point_type>: New method.
6743 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6744 instead of a char. Also take a raw breakpoint pointer.
6745
6746 2014-05-20 Pedro Alves <palves@redhat.com>
6747
6748 * mem-break.h: Include break-common.h.
6749 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6750 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6751 (Z_packet_to_target_hw_bp_type): New declaration.
6752 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6753 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6754 (Z_PACKET_ACCESS_WP): Delete macros.
6755 (Z_packet_to_hw_type): Delete function.
6756 * i386-low.h: Don't include break-common.h here.
6757 (Z_packet_to_hw_type): Delete declaration.
6758 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6759 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6760 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6761 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6762 * linux-aarch64-low.c: Don't include break-common.h here.
6763 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6764 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6765 (Z_packet_to_target_hw_bp_type): Delete function.
6766 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6767 function.
6768 (mips_insert_point, mips_remove_point): Use
6769 Z_packet_to_target_hw_bp_type.
6770
6771 2014-05-20 Pedro Alves <palves@redhat.com>
6772
6773 * linux-aarch64-low.c: Include break-common.h.
6774 (enum target_point_type): Delete.
6775 (Z_packet_to_point_type): Rename to ...
6776 (Z_packet_to_target_hw_bp_type): ... this, and return a
6777 target_hw_bp_type instead.
6778 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6779 instead of an enum target_point_type.
6780 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6781 breakpoint type.
6782 (aarch64_dr_state_insert_one_point)
6783 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6784 (aarch64_handle_aligned_watchpoint)
6785 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6786 Take an enum target_hw_bp_type instead of an enum
6787 target_point_type.
6788 (aarch64_supports_z_point_type): New function.
6789 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6790 use Z_packet_to_target_hw_bp_type.
6791
6792 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6793
6794 * configure.ac: Only use -Werror by default when DEVELOPMENT
6795 is true.
6796 * configure: Regenerate.
6797
6798 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6799
6800 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6801 * linux-x86-low.c (X86_64_USER_REGS): New.
6802 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6803
6804 2014-04-28 Yao Qi <yao@codesourcery.com>
6805
6806 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6807 name.
6808
6809 2014-04-25 Pedro Alves <palves@redhat.com>
6810
6811 PR server/16255
6812 * linux-low.c (linux_attach_fail_reason_string): New function.
6813 (linux_attach_lwp): Delete.
6814 (linux_attach_lwp_1): Rename to ...
6815 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6816 argument. Remove "initial" parameter. Return int instead of
6817 void. Don't error or warn here.
6818 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6819 failure to attach to the tgid. Call warning when failing to
6820 attach to an lwp.
6821 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6822 argument. Remove "initial" parameter. Return int instead of
6823 void. Don't error or warn here.
6824 (linux_attach_fail_reason_string): New declaration.
6825 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6826 interface change. Use linux_attach_fail_reason_string.
6827
6828 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6829 Walfred Tedeschi <walfred.tedeschi@intel.com>
6830
6831 * Makefile.in: Added rules to handle new files
6832 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6833 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6834 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6835 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6836 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6837 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6838 x32-avx512-linux.o.
6839 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6840 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6841 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6842 i386/x32-avx512.xml.
6843 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6844 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6845 i386/x32-avx512-linux.xml.
6846 * i387-fp.c (num_avx512_k_registers): New constant for number
6847 of K registers.
6848 (num_avx512_zmmh_low_registers): New constant for number of
6849 lower ZMM registers (0-15).
6850 (num_avx512_zmmh_high_registers): New constant for number of
6851 higher ZMM registers (16-31).
6852 (num_avx512_ymmh_registers): New contant for number of higher
6853 YMM registers (ymm16-31 added by avx521 on x86_64).
6854 (num_avx512_xmm_registers): New constant for number of higher
6855 XMM registers (xmm16-31 added by AVX512 on x86_64).
6856 (struct i387_xsave): Add space for AVX512 registers.
6857 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6858 Add code to handle AVX512 registers.
6859 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6860 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6861 prototypei from generated file.
6862 (tdesc_amd64_avx512_linux): Likewise.
6863 (init_registers_x32_avx512_linux): Likewise.
6864 (tdesc_x32_avx512_linux): Likewise.
6865 (init_registers_i386_avx512_linux): Likewise.
6866 (tdesc_i386_avx512_linux): Likewise.
6867 (x86_64_regmap): Add AVX512 registers.
6868 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6869 mask.
6870 (initialize_low_arch): Add code to initialize AVX512 registers.
6871
6872 2014-04-23 Pedro Alves <palves@redhat.com>
6873
6874 * mem-break.c (find_gdb_breakpoint_at): Make static.
6875 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6876
6877 2014-04-23 Pedro Alves <palves@redhat.com>
6878
6879 * i386-low.c: Don't include break-common.h here.
6880 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6881 prototype to take target_hw_bp_type as argument instead of a Z
6882 packet char.
6883 * i386-low.h: Include break-common.h here.
6884 (Z_packet_to_hw_type): Declare.
6885 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6886 prototypes.
6887 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6888 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6889 (x86_remove_point): Convert the packet number to a
6890 target_hw_bp_type before calling i386_low_remove_watchpoint.
6891 * win32-i386-low.c (i386_insert_point): Convert the packet number
6892 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6893 (i386_remove_point): Convert the packet number to a
6894 target_hw_bp_type before calling i386_low_remove_watchpoint.
6895
6896 2014-04-23 Pedro Alves <palves@redhat.com>
6897
6898 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6899
6900 2014-04-10 Pedro Alves <palves@redhat.com>
6901
6902 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6903 Check if the condition or command is NULL before checking if the
6904 breakpoint is known. On success, return true.
6905 * mem-break.h (add_breakpoint_condition): Document return.
6906 (add_breakpoint_commands): Add describing comment.
6907 * server.c (skip_to_semicolon): New function.
6908 (process_point_options): Use it.
6909
6910 2014-04-09 Pedro Alves <palves@redhat.com>
6911
6912 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6913 to lwpid_of.
6914
6915 2014-02-27 Pedro Alves <palves@redhat.com>
6916
6917 PR 12702
6918 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6919 macros.
6920 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6921 output.
6922 (last_thread_of_process_p): Take a PID argument instead of a
6923 thread pointer.
6924 (linux_wait_for_lwp): Delete.
6925 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6926 functions.
6927 (linux_low_filter_event): New function, party factored out from
6928 linux_wait_for_event.
6929 (linux_wait_for_event): Rename to ...
6930 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6931 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6932 sigsuspend. Check for zombie leaders.
6933 (linux_wait_for_event): Reimplement as wrapper around
6934 linux_wait_for_event_filtered.
6935 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6936 a normal or signal exit is seen, it's the whole process exiting.
6937 (wait_for_sigstop): No longer a for_each_inferior callback.
6938 Rewrite on top of linux_wait_for_event_filtered.
6939 (stop_all_lwps): Call wait_for_sigstop directly.
6940 * server.c (resume, handle_target_event): Handle
6941 TARGET_WAITKIND_NO_RESUMED.
6942
6943 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6944
6945 * win32-low.c (psapi_get_dll_name,
6946 * win32_CreateToolhelp32Snapshot): Delete.
6947 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6948 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6949 Delete.
6950 (handle_load_dll): Add function description.
6951 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6952
6953 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6954
6955 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6956 Add comment.
6957 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6958 base address when calling win32_add_one_solib.
6959 (handle_load_dll): Delete local variable load_addr.
6960 Remove 0x1000 offset applied to DLL base address when calling
6961 win32_add_one_solib.
6962 (handle_unload_dll): Add comment.
6963
6964 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6965
6966 * win32-low.c (win32_add_all_dlls): Renames
6967 win32_ensure_ntdll_loaded. Rewrite function documentation.
6968 Adjust implementation to always load all DLLs.
6969 Add 0x1000 offset to DLL base address when calling
6970 win32_add_one_solib.
6971 (child_initialization_done): New static global.
6972 (do_initial_child_stuff): Set child_initialization_done to
6973 zero during child initialization, and 1 after. Replace call
6974 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6975 Add comment.
6976 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6977 (handle_unload_dll): Add function documentation.
6978 (get_child_debug_event): Ignore load and unload DLL events
6979 during child initialization.
6980
6981 2014-02-20 Doug Evans <dje@google.com>
6982
6983 Remove global all_lwps.
6984 * inferiors.h (ptid_of): Move here from linux-low.h.
6985 (pid_of, lwpid_of): Ditto.
6986 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6987 parameter is a struct thread_info * now.
6988 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6989 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6990 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6991 directly.
6992 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6993 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6994 * linux-arm-low.c (update_registers_callback): Update, "entry"
6995 parameter is a struct thread_info * now.
6996 Fetch lwpid from current_inferior directly.
6997 (arm_insert_point): Pass &all_threads to find_inferior instead of
6998 &all_lwps.
6999 (arm_remove_point): Ditto.
7000 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7001 (arm_prepare_to_resume): Fetch pid from thread.
7002 (arm_read_description): Fetch lwpid from current_inferior directly.
7003 * linux-low.c (all_lwps): Delete.
7004 (delete_lwp): Delete call to remove_inferior.
7005 (handle_extended_wait): Fetch lwpid from thread.
7006 (add_lwp): Don't set lwp->entry.id. Remove call to
7007 add_inferior_to_list.
7008 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7009 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7010 (kill_one_lwp_callback): Ditto.
7011 (linux_kill): Don't dereference NULL pointer.
7012 Fetch ptid,lwpid from thread.
7013 (get_detach_signal): Fetch ptid from thread.
7014 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7015 Simplify call to regcache_invalidate_thread.
7016 (delete_lwp_callback): Update, "entry" parameter is a
7017 struct thread_info * now. Fetch pid from thread.
7018 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7019 (status_pending_p_callback): Update, "entry" parameter is a
7020 struct thread_info * now. Fetch ptid from thread.
7021 (find_lwp_pid): Update, "entry" parameter is a
7022 struct thread_info * now.
7023 (linux_wait_for_lwp): Fetch pid from thread.
7024 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7025 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7026 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7027 (dequeue_one_deferred_signal): Ditto.
7028 (cancel_breakpoint): Fetch ptid from current_inferior.
7029 (linux_wait_for_event): Pass &all_threads to find_inferior,
7030 not &all_lwps. Fetch ptid, lwpid from thread.
7031 (count_events_callback): Update, "entry" parameter is a
7032 struct thread_info * now.
7033 (select_singlestep_lwp_callback): Ditto.
7034 (select_event_lwp_callback): Ditto.
7035 (cancel_breakpoints_callback): Ditto.
7036 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7037 not &all_lwps.
7038 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7039 (unsuspend_one_lwp): Update, "entry" parameter is a
7040 struct thread_info * now.
7041 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7042 not &all_lwps.
7043 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7044 Fetch lwpid from thread, not lwp.
7045 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7046 Pass &all_threads to find_inferior, not &all_lwps.
7047 (send_sigstop): Fetch lwpid from thread, not lwp.
7048 (send_sigstop_callback): Update, "entry" parameter is a
7049 struct thread_info * now.
7050 (suspend_and_send_sigstop_callback): Ditto.
7051 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7052 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7053 struct thread_info * now.
7054 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7055 from thread, lwp.
7056 (lwp_running): Update, "entry" parameter is a
7057 struct thread_info * now.
7058 (stop_all_lwps): Fetch ptid from thread.
7059 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7060 (linux_resume_one_lwp): Fetch lwpid from thread.
7061 (linux_set_resume_request): Update, "entry" parameter is a
7062 struct thread_info * now. Fetch pid, lwpid from thread.
7063 (resume_status_pending_p): Update, "entry" parameter is a
7064 struct thread_info * now.
7065 (need_step_over_p): Ditto. Fetch lwpid from thread.
7066 (start_step_over): Fetch lwpid from thread.
7067 (linux_resume_one_thread): Update, "entry" parameter is a
7068 struct thread_info * now. Fetch lwpid from thread.
7069 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7070 (proceed_one_lwp): Update, "entry" parameter is a
7071 struct thread_info * now. Fetch lwpid from thread.
7072 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7073 struct thread_info * now.
7074 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7075 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7076 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7077 directly.
7078 (regsets_store_inferior_registers): Ditto.
7079 (fetch_register, store_register): Ditto.
7080 (linux_read_memory, linux_write_memory): Ditto.
7081 (linux_request_interrupt): Ditto.
7082 (linux_read_auxv): Ditto.
7083 (linux_xfer_siginfo): Ditto.
7084 (linux_qxfer_spu): Ditto.
7085 (linux_qxfer_libraries_svr4): Ditto.
7086 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7087 moved to inferiors.h.
7088 (get_lwp): Delete.
7089 (get_thread_lwp): Update.
7090 (struct lwp_info): Delete member "entry". Simplify comment for
7091 member "thread".
7092 (all_lwps): Delete.
7093 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7094 current_inferior directly.
7095 (update_watch_registers_callback): Update, "entry" parameter is a
7096 struct thread_info * now. Fetch pid from thread.
7097 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7098 (mips_insert_point): Fetch lwpid from current_inferior.
7099 Pass &all_threads to find_inferior, not &all_lwps.
7100 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7101 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7102 directly.
7103 (mips_stopped_data_address): Ditto.
7104 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7105 directly.
7106 * linux-tile-low.c (tile_arch_setup): Ditto.
7107 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7108 (update_debug_registers_callback): Update, "entry" parameter is a
7109 struct thread_info * now. Fetch pid from thread.
7110 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7111 Pass &all_threads to find_inferior, not &all_lwps.
7112 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7113 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7114 Pass &all_threads to find_inferior, not &all_lwps.
7115 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7116 (i386_dr_low_get_status): Ditto.
7117 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7118 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7119 (x86_linux_read_description): Ditto.
7120 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7121
7122 2014-02-20 Doug Evans <dje@google.com>
7123
7124 * inferiors.c (get_first_inferior): Fix buglet.
7125
7126 2014-02-19 Doug Evans <dje@google.com>
7127
7128 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7129 * inferiors.c (add_thread): Change result type to struct thread_info *.
7130 All callers updated.
7131 (add_lwp): Call add_thread here instead of in callers.
7132 All callers updated.
7133 * linux-low.h (get_lwp_thread): Rewrite.
7134 (struct lwp_info): New member "thread".
7135
7136 2014-02-19 Doug Evans <dje@google.com>
7137
7138 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7139 All callers updated.
7140
7141 2014-02-19 Doug Evans <dje@google.com>
7142
7143 * inferiors.c (add_thread): Fix whitespace.
7144
7145 2014-02-19 Doug Evans <dje@google.com>
7146
7147 * dll.c (clear_dlls): Replace accessing list implemention details
7148 with API function.
7149 * gdbthread.h (get_first_thread): Declare.
7150 * inferiors.c (for_each_inferior_with_data): New function.
7151 (get_first_thread): New function.
7152 (find_thread_ptid): Simplify.
7153 (get_first_inferior): New function.
7154 (clear_list): Delete.
7155 (one_inferior_p): New function.
7156 (clear_inferior_list): New function.
7157 (clear_inferiors): Update.
7158 * inferiors.h (for_each_inferior_with_data): Declare.
7159 (clear_inferior_list): Declare.
7160 (one_inferior_p): Declare.
7161 (get_first_inferior): Declare.
7162 * linux-low.c (linux_wait_for_event): Replace accessing list
7163 implemention details with API function.
7164 * server.c (target_running): Ditto.
7165 (accumulate_file_name_length): New function.
7166 (emit_dll_description): New function.
7167 (handle_qxfer_libraries): Replace accessing list implemention
7168 details with API function.
7169 (handle_qxfer_threads_worker): New function.
7170 (handle_qxfer_threads_proper): Replace accessing list implemention
7171 details with API function.
7172 (handle_query): Ditto.
7173 (visit_actioned_threads_callback_ftype): New typedef.
7174 (visit_actioned_threads_data): New struct.
7175 (visit_actioned_threads): Rewrite to be find_inferior callback.
7176 (resume): Call find_inferior.
7177 (handle_status): Replace accessing list implemention
7178 details with API function.
7179 (process_serial_event): Replace accessing list implemention details
7180 with API function.
7181 * target.c (set_desired_inferior): Replace accessing list implemention
7182 details with API function.
7183 * tracepoint.c (same_process_p): New function.
7184 (gdb_agent_about_to_close): Replace accessing list implemention
7185 details with API function.
7186 * win32-low.c (child_delete_thread): Replace accessing list
7187 implemention details with API function.
7188 (match_dll_by_basename): New function.
7189 (dll_is_loaded_by_basename): New function.
7190 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7191 details call to dll_is_loaded_by_basename.
7192
7193 2014-02-19 Doug Evans <dje@google.com>
7194
7195 * dll.h (struct dll_info): Add comment.
7196 * gdbthread.h (struct thread_info): Add comment.
7197 (current_ptid): Simplify.
7198 * inferiors.c (add_process): Update.
7199 (remove_process): Update.
7200 * inferiors.h (struct process_info): Rename member "head" to "entry".
7201 * linux-low.c (delete_lwp): Update.
7202 (add_lwp): Update.
7203 (last_thread_of_process_p): Update.
7204 (kill_one_lwp_callback, linux_kill): Update.
7205 (status_pending_p_callback): Update.
7206 (wait_for_sigstop): Update. Simplify read of ptid.
7207 (start_step_over): Update.
7208 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7209 (get_lwp_thread): Update.
7210 (struct lwp_info): Rename member "head" to "entry".
7211 * regcache.h (inferior_list_entry): Delete.
7212 * server.c (kill_inferior_callback): Update.
7213 (detach_or_kill_inferior_callback): Update.
7214 (print_started_pid): Update.
7215 (print_attached_pid): Update.
7216 (process_serial_event): Simplify read of ptid.
7217 * thread-db.c (thread_db_create_event): Update.
7218 (thread_db_get_tls_address): Update.
7219 * win32-low.c (current_inferior_ptid): Simplify.
7220
7221 2014-02-19 Tom Tromey <tromey@redhat.com>
7222
7223 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7224 argument.
7225 (target_supports_btrace): Update.
7226
7227 2014-02-14 Yao Qi <yao@codesourcery.com>
7228
7229 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7230 (rsp-low-ipa.o): New target.
7231
7232 2014-02-12 Tom Tromey <tromey@redhat.com>
7233
7234 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7235 convert_ascii_to_int.
7236 * regcache.c (registers_to_string): Likewise.
7237 * remote-utils.c (decode_M_packet): Likewise.
7238 * server.c (process_serial_event): Likewise.
7239
7240 2014-02-12 Tom Tromey <tromey@redhat.com>
7241
7242 * server.c (handle_query, handle_v_run): Use hex2bin, not
7243 unhexify.
7244 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7245
7246 2014-02-12 Tom Tromey <tromey@redhat.com>
7247
7248 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7249 convert_int_to_ascii.
7250 * regcache.c (registers_to_string, collect_register_as_string):
7251 Likewise.
7252 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7253 Likewise.
7254 * server.c (process_serial_event): Likewise.
7255 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7256 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7257
7258 2014-02-12 Tom Tromey <tromey@redhat.com>
7259
7260 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7261 bin2hex, not hexify.
7262 * tracepoint.c (cmd_qtstatus): Likewise.
7263
7264 2014-02-12 Tom Tromey <tromey@redhat.com>
7265
7266 * remote-utils.c (monitor_output): Pass explicit length to
7267 hexify.
7268
7269 2014-02-12 Tom Tromey <tromey@redhat.com>
7270
7271 * tracepoint.c: Include rsp-low.h.
7272 * server.c: Include rsp-low.h.
7273 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7274 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7275 declare.
7276 * remote-utils.c: Include rsp-low.h.
7277 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7278 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7279 (convert_int_to_ascii, convert_ascii_to_int): Move to
7280 common/rsp-low.c.
7281 * regcache.c: Include rsp-low.h.
7282 * ax.c: Include rsp-low.h.
7283 * Makefile.in (SFILES): Add common/rsp-low.c.
7284 (OBS): Add rsp-low.o.
7285 (rsp-low.o): New target.
7286
7287 2014-02-12 Tom Tromey <tromey@redhat.com>
7288
7289 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7290 Include print-utils.h.
7291 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7292 (plongest, thirty_two, phex_nz): Remove.
7293 * Makefile.in (SFILES): Add common/print-utils.c.
7294 (OBS): Add print-utils.o.
7295 (print-utils-ipa.o): New target.
7296 (print-utils.o): New target.
7297 (IPA_OBJS): Add print-utils-ipa.o.
7298
7299 2014-02-06 Tom Tromey <tromey@redhat.com>
7300
7301 * Makefile.in (SFILES): Fix indentation.
7302
7303 2014-02-05 Doug Evans <dje@google.com>
7304
7305 * linux-low.c (linux_wait_for_event): Improve comment.
7306 (linux_wait_1): Keep current_inferior in sync with event_child.
7307
7308 2014-01-22 Doug Evans <dje@google.com>
7309
7310 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7311
7312 2014-01-22 Doug Evans <dje@google.com>
7313
7314 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7315 * configure: Regenerate.
7316 * config.in: Regenerate.
7317 * Makefile.in (SFILES): Add debug.c.
7318 (OBS): Add debug.o.
7319 * debug.c: New file.
7320 * debug.h: New file.
7321 * linux-aarch64-low.c (*): Update all debugging printfs to use
7322 debug_printf instead of fprintf.
7323 * linux-arm-low.c (*): Ditto.
7324 * linux-cris-low.c (*): Ditto.
7325 * linux-crisv32-low.c (*): Ditto.
7326 * linux-m32r-low.c (*): Ditto.
7327 * linux-sparc-low.c (*): Ditto.
7328 * linux-x86.c (*): Ditto.
7329 * linux-low.c (*): Ditto.
7330 (linux_wait_1): Add calls to debug_enter, debug_exit.
7331 (linux_wait): Remove redundant debugging printf.
7332 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7333 (linux_resume, unstop_all_lwps): Ditto.
7334 * mem-break.c (*): Update all debugging printfs to use
7335 debug_printf instead of fprintf.
7336 * remote-utils.c (*): Ditto.
7337 * thread-db.c (*): Ditto.
7338 * server.c #include <ctype.h>, "gdb_vecs.h".
7339 (debug_threads): Moved to debug.c.
7340 (*): Update all debugging printfs to use debug_printf instead of
7341 fprintf.
7342 (start_inferior): Replace call to fflush with call to debug_flush.
7343 (monitor_show_help): Mention set debug-format.
7344 (parse_debug_format_options): New function.
7345 (handle_monitor_command): Handle "monitor set debug-format".
7346 (gdbserver_usage): Mention --debug-format.
7347 (main): Parse --debug-format.
7348 * server.h (debug_threads): Declaration moved to debug.h.
7349 #include "debug.h".
7350 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7351 trace_debug_1 that uses debug_printf.
7352 (tracepoint_look_up_symbols): Update all debugging printfs to use
7353 debug_printf instead of fprintf.
7354
7355 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7356
7357 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7358 sys/ptrace.h.
7359
7360 2014-01-17 Pedro Alves <palves@redhat.com>
7361
7362 PR build/16445
7363 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7364 defined after including gdb_proc_service.h.
7365
7366 2014-01-16 Doug Evans <dje@google.com>
7367
7368 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7369 (match_dll): Use it.
7370
7371 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7372
7373 * target.h (target_ops) <read_btrace>: Change parameters and
7374 return type to allow error reporting.
7375 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7376 trace reading errors on.
7377 * linux-low.c (linux_low_read_btrace): Pass trace reading
7378 errors on.
7379 (linux_low_disable_btrace): New.
7380
7381 2014-01-15 Doug Evans <dje@google.com>
7382
7383 * inferiors.c (thread_id_to_gdb_id): Delete.
7384 * inferiors.h (thread_id_to_gdb_id): Delete.
7385
7386 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7387
7388 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7389 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7390 versions.
7391
7392 2014-01-08 Pedro Alves <palves@redhat.com>
7393
7394 * server.c (handle_status): Don't discard previous queued stop
7395 replies or thread's pending status here.
7396 (main) <disconnection>: Do it here instead.
7397
7398 2014-01-08 Pedro Alves <palves@redhat.com>
7399
7400 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7401 * server.c (visit_actioned_threads, handle_pending_status): New
7402 function.
7403 (handle_v_cont): Factor out parts to ...
7404 (resume): ... this new function. If in all-stop, and a thread
7405 being resumed has a pending status, report it without actually
7406 resuming.
7407 (myresume): Adjust to use the new 'resume' function.
7408 (clear_pending_status_callback, set_pending_status_callback)
7409 (find_status_pending_thread_callback): New functions.
7410 (handle_status): Handle the case of multiple threads having
7411 interesting statuses to report. Report threads' real last signal
7412 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7413 with an interesting thread to report the status for, instead of
7414 always reporting the status of the first thread.
7415
7416 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7417
7418 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7419 * gdbreplay.c (gdbreplay_version): Likewise.
7420
7421 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7422
7423 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7424 iov.iov_len with the real length in use.
7425
7426 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7427
7428 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7429 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7430 for all targets that use win32-low.c.
7431 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7432 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7433
7434 2013-12-13 Pedro Alves <palves@redhat.com>
7435
7436 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7437 if equal to TARGET_WAITKIND_LOADED.
7438 * win32-low.c (cached_status): New static global.
7439 (win32_wait): Add declaration.
7440 (do_initial_child_stuff): Flush all initial pending debug events
7441 up to the initial breakpoint.
7442 (win32_wait): If CACHED_STATUS was set, return that instead
7443 of doing a real wait. Remove the code resuming the execution
7444 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7445 during the initial phase. Also remove the code changing
7446 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7447 TARGET_WAITKIND_STOPPED.
7448
7449 2013-12-11 Yao Qi <yao@codesourcery.com>
7450
7451 * notif.c (handle_notif_ack): Return 0 if no notification
7452 matches.
7453
7454 2013-11-20 Doug Evans <dje@google.com>
7455
7456 * linux-low.c (linux_set_resume_request): Fix comment.
7457
7458 2013-11-20 Doug Evans <dje@google.com>
7459
7460 * linux-low.c (resume_status_pending_p): Tweak comment.
7461
7462 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7463
7464 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7465 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7466 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7467 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7468 (srv_amd64_regobj): Add amd64-mpx.o.
7469 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7470 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7471 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7472 * i387-fp.c (num_pl_bnd_register) Added constant.
7473 (num_pl_bnd_cfg_registers) Added constant.
7474 (struct i387_xsave) Added reserved area and MPX fields.
7475 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7476 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7477 function.
7478 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7479 (init_registers_amd64_mpx_linux): Declare new function.
7480 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7481 (x86_64_regmap): Add MPX registers.
7482 (x86_linux_read_description): Add MPX case.
7483 (initialize_low_arch): Initialize MPX targets.
7484
7485 2013-11-18 Tom Tromey <tromey@redhat.com>
7486
7487 * configure: Rebuild.
7488 * configure.ac: Don't check for stdlib.h.
7489 * gdbreplay.c: Unconditionally include stdlib.h.
7490
7491 2013-11-18 Tom Tromey <tromey@redhat.com>
7492
7493 * config.in: Rebuild.
7494 * configure: Rebuild.
7495 * configure.ac: Don't use AC_HEADER_DIRENT.
7496
7497 2013-11-18 Tom Tromey <tromey@redhat.com>
7498
7499 * server.h: Don't check HAVE_STRING_H.
7500 * gdbreplay.c: Don't check HAVE_STRING_H.
7501 * configure: Rebuild.
7502
7503 2013-11-18 Tom Tromey <tromey@redhat.com>
7504
7505 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7506 LIBGNU.
7507
7508 2013-11-08 Tom Tromey <tromey@redhat.com>
7509
7510 * configure, config.in: Rebuild.
7511 * configure.ac: Remove unused configury.
7512
7513 2013-11-08 Tom Tromey <tromey@redhat.com>
7514
7515 * acinclude.m4: Include common.m4, codeset.m4.
7516 * configure, config.in: Rebuild.
7517 * configure.ac: Use GDB_AC_COMMON.
7518
7519 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7520
7521 * linux-s390-low.c (HWCAP_S390_TE): New define.
7522 (s390_arch_setup): Consider the TE field in the HWCAP for
7523 determining 'have_regset_tdb'.
7524
7525 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7526
7527 PR gdb/16014
7528 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7529 call to sizeof.
7530
7531 2013-10-02 Pedro Alves <palves@redhat.com>
7532
7533 * server.c (process_serial_event): Don't output "GDBserver
7534 exiting" if GDB is connected through stdio.
7535 * target.c (mywait): Likewise, be silent if GDB is connected
7536 through stdio.
7537
7538 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7539
7540 * lynx-low.c (lynx_add_threads_after_attach): New function.
7541 (lynx_attach): Remove call to add_thread. Add call to
7542 lynx_add_threads_after_attach instead.
7543
7544 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7545
7546 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7547 * config.in, configure: Regenerated.
7548
7549 2013-09-18 Yao Qi <yao@codesourcery.com>
7550
7551 PR server/15959
7552 * server.c (start_inferior): Clear 'resume_info'.
7553
7554 2013-09-16 Jiong Wang <jiwang@tilera.com>
7555
7556 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7557 for each register.
7558
7559 2013-09-16 Jiong Wang <jiwang@tilera.com>
7560
7561 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7562 linux-tile-low.o to srv_tgtobj.
7563
7564 2013-09-16 Will Newton <will.newton@linaro.org>
7565
7566 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7567 out regs.
7568
7569 2013-09-06 Pedro Alves <palves@redhat.com>
7570
7571 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7572 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7573 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7574 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7575 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7576 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7577
7578 2013-09-06 Pedro Alves <palves@redhat.com>
7579
7580 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7581 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7582
7583 2013-09-06 Pedro Alves <palves@redhat.com>
7584
7585 * linux-amd64-ipa.c: Include tracepoint.h.
7586 * linux-i386-ipa.c: Include tracepoint.h.
7587
7588 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7589
7590 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7591 (ps_get_thread_area): New function.
7592
7593 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7594
7595 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7596 (initialize_low_arch): Call init_registers_crisv32 rather than
7597 init_register_crisv32.
7598
7599 2013-09-05 Pedro Alves <palves@redhat.com>
7600
7601 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7602 to ...
7603 * hostio.h: ... this new file.
7604 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7605 win32-low.c: Include hostio.h.
7606
7607 2013-09-05 Pedro Alves <palves@redhat.com>
7608
7609 * server.h (gdb_client_data, handler_func, callback_handler_func)
7610 (delete_file_handler, add_file_handler, append_callback_event)
7611 (delete_callback_event, start_event_loop, initialize_event_loop):
7612 Move to event-loop.h and include it.
7613 * event-loop.h: New file.
7614
7615 2013-09-05 Pedro Alves <palves@redhat.com>
7616
7617 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7618 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7619 (loaded_dll, unloaded_dll): Move to ...
7620 * dll.h: ... this new file.
7621 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7622
7623 2013-09-05 Pedro Alves <palves@redhat.com>
7624
7625 * server.h (current_process, get_thread_process, all_processes)
7626 (add_inferior_to_list, for_each_inferior, current_inferior)
7627 (remove_inferior, add_process, remove_process, find_process_pid)
7628 (have_started_inferiors_p, have_attached_inferiors_p)
7629 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7630 (clear_inferiors, find_inferior, find_inferior_id)
7631 (inferior_target_data, set_inferior_target_data)
7632 (inferior_regcache_data, set_inferior_regcache_data): Move to
7633 inferiors.h, and include it.
7634 * inferiors.h: New file.
7635
7636 2013-09-05 Pedro Alves <palves@redhat.com>
7637
7638 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7639 Move ...
7640 * ax.h: ... here.
7641
7642 2013-09-05 Pedro Alves <palves@redhat.com>
7643
7644 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7645 tracepoint.h.
7646 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7647 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7648 (handle_tracepoint_general_set, handle_tracepoint_query)
7649 (tracepoint_finished_step, tracepoint_was_hit)
7650 (release_while_stepping_state_list, current_traceframe)
7651 (in_readonly_region, traceframe_read_mem)
7652 (fetch_traceframe_registers, traceframe_read_sdata)
7653 (traceframe_read_info, struct fast_tpoint_collect_status)
7654 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7655 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7656 (supply_fast_tracepoint_registers)
7657 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7658 (ipa_tdesc, claim_trampoline_space)
7659 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7660 (agent_mem_read, agent_get_trace_state_variable_value)
7661 (agent_set_trace_state_variable_value, agent_tsv_read)
7662 (agent_mem_read_string, get_raw_reg_func_addr)
7663 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7664 * tracepoint.h: ... this new file.
7665
7666 2013-09-05 Pedro Alves <palves@redhat.com>
7667
7668 * server.h (perror_with_name, error, fatal, warning, paddress)
7669 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7670 include it.
7671 * utils.h: New file.
7672
7673 2013-09-05 Pedro Alves <palves@redhat.com>
7674
7675 * server.h (remote_debug, noack_mode, transport_is_reliable)
7676 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7677 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7678 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7679 (write_enn, initialize_async_io, enable_async_io)
7680 (disable_async_io, check_remote_input_interrupt_request)
7681 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7682 (dead_thread_notify, prepare_resume_reply)
7683 (decode_address_to_semicolon, decode_address, decode_m_packet)
7684 (decode_M_packet, decode_X_packet, decode_xfer_write)
7685 (decode_search_memory_packet, unhexify, hexify)
7686 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7687 (look_up_one_symbol, relocate_instruction)
7688 (monitor_output): Move to remote-utils.h, and include it.
7689 * remote-utils.h: New file.
7690
7691 2013-09-05 Pedro Alves <palves@redhat.com>
7692
7693 * server.h (_): Delete.
7694
7695 2013-09-02 Pedro Alves <palves@redhat.com>
7696
7697 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7698 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7699 allocated.
7700 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7701
7702 2013-09-02 Pierre Muller <muller@sourceware.org>
7703
7704 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7705 or WriteProcessMemory complete successfully and handle
7706 ERROR_PARTIAL_COPY error.
7707
7708 2013-09-02 Pedro Alves <palves@redhat.com>
7709
7710 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7711 error instead of EIO.
7712
7713 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7714
7715 PR server/15604
7716 * linux-low.c: Include filestuff.h.
7717 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7718 * lynx-low.c: Include filestuff.h.
7719 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7720 * server.c: Include filestuff.h.
7721 (main): Call notice_open_fds.
7722 * spu-low.c: Include filestuff.h.
7723 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7724
7725 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7726
7727 * Makefile.in: Explain why ../target and ../nat are not
7728 listed as include file search paths.
7729 (linux-waitpid.o): New object file rule.
7730 * configure.srv (srv_native_linux_obj): New variable.
7731 Replace all occurrences of linux native object files with
7732 $srv_native_linux_obj.
7733 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7734 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7735 (linux_enable_event_reporting): Remove declaration.
7736 (my_waitpid): Moved to common/linux-waitpid.c.
7737 (linux_wait_for_event): Pass ptid when calling
7738 linux_enable_event_reporting.
7739 (linux_supports_tracefork_flag): Remove.
7740 (linux_enable_event_reporting): Likewise.
7741 (linux_tracefork_grandchild): Remove.
7742 (STACK_SIZE): Moved to common/linux-ptrace.c.
7743 (linux_tracefork_child): Remove.
7744 (linux_test_for_tracefork): Remove.
7745 (linux_look_up_symbols): Call linux_supports_traceclone.
7746 (initialize_low): Remove call to linux_test_for_tracefork.
7747 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7748 common/linux-ptrace.h.
7749 (PTRACE_TYPE_ARG4): Likewise.
7750 Include linux-ptrace.h.
7751
7752 2013-08-21 Pedro Alves <palves@redhat.com>
7753
7754 * config.in: Renegerate.
7755
7756 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7757
7758 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7759 (SFILES): Remove $(srcdir)/common/target-common.c and
7760 add $(srcdir)/target/waitstatus.c.
7761 (OBS): Remove target-common.o and add waitstatus.o.
7762 (server_h): Remove $(srcdir)/../common/target-common.h and
7763 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7764 and $(srcdir)/../target/waitstatus.h.
7765 (target-common.o): Remove.
7766 (waitstatus.o): New target object file.
7767 * target.h: Do not include target-common.h and
7768 include target/resume.h, target/wait.h and
7769 target/waitstatus.h.
7770
7771 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7772
7773 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7774 to PTRACE_TYPE_ARG3.
7775 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7776 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7777 PTRACE_TYPE_ARG4.
7778 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7779 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7780
7781 2013-07-27 Jie Zhang <jie@codesourcery.com>
7782 Daniel Jacobowitz <dan@codesourcery.com>
7783 Yao Qi <yao@codesourcery.com>
7784
7785 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7786 (mips-linux-watch.o): New rule.
7787 (mips_linux_watch_h): New variable.
7788 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7789 srv_tgtobj.
7790 * linux-mips-low.c: Include mips-linux-watch.h.
7791 (struct arch_process_info, struct arch_lwp_info): New.
7792 (update_watch_registers_callback): New function.
7793 (mips_linux_new_process, mips_linux_new_thread) New functions.
7794 (mips_linux_prepare_to_resume, mips_insert_point): New
7795 functions.
7796 (mips_remove_point, mips_stopped_by_watchpoint): New
7797 functions.
7798 (rsp_bp_type_to_target_hw_bp_type): New function.
7799 (mips_stopped_data_address): New function.
7800 (the_low_target): Add watchpoint support functions.
7801
7802 2013-07-27 Yao Qi <yao@codesourcery.com>
7803
7804 * i386-low.c: Include break-common.h.
7805 (enum target_hw_bp_type): Remove.
7806
7807 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7808
7809 * Makefile.in (SFILES): /common/target-common.c.
7810 (OBS): Add target-common.o.
7811 (server_h): Add $(srcdir)/../common/target-common.h.
7812 (target-common.o): New target.
7813 * server.c (queue_stop_reply_callback): Free
7814 status string after use.
7815 * target.c (target_waitstatus_to_string): Remove.
7816 * target.h: Include target-common.h.
7817 (resume_kind): Likewise.
7818 (target_waitkind): Likewise.
7819 (target_waitstatus): Likewise.
7820 (TARGET_WNOHANG): Likewise.
7821
7822 2013-07-04 Yao Qi <yao@codesourcery.com>
7823
7824 * Makefile.in (host_alias): Use @host_noncanonical@.
7825 (target_alias): Use @target_noncanonical@.
7826 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7827 ACX_NONCANONICAL_HOST.
7828 * configure: Regenerated.
7829
7830 Revert:
7831 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7832
7833 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7834 * configure: Rebuild.
7835 * Makefile.in (version_host, version_target): Get from configure.
7836 (version.c): Use $(version_host) and $(version_target).
7837
7838 2013-07-03 Pedro Alves <palves@redhat.com>
7839
7840 * Makefile.in (config.status): Depend on development.sh.
7841 * acinclude.m4: Include libmcheck.m4.
7842 * configure: Regenerate.
7843
7844 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7845
7846 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7847 attribute inside the parentheses.
7848 (winapi_DebugSetProcessKillOnExit): Ditto.
7849 (winapi_DebugBreakProcess): Ditto.
7850 (winapi_GenerateConsoleCtrlEvent): Ditto.
7851
7852 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7853
7854 * notif.h (notif_event): Add a dummy member to avoid compiler
7855 errors.
7856
7857 2013-07-01 Pedro Alves <palves@redhat.com>
7858
7859 * hostio.c (HOSTIO_PATH_MAX): Define.
7860 (require_filename, handle_open, handle_unlink, handle_readlink):
7861 Use it.
7862
7863 2013-07-01 Pedro Alves <palves@redhat.com>
7864
7865 * server.h: Include "pathmax.h".
7866 * linux-low.c: Don't include sys/param.h.
7867 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7868 MAXPATHLEN.
7869 * win32-low.c: Don't include sys/param.h.
7870 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7871
7872 2013-07-01 Pedro Alves <palves@redhat.com>
7873
7874 * event-loop.c: Don't check HAVE_UNISTD_H before including
7875 <unistd.h>.
7876 * gdbreplay.c: Likewise.
7877 * remote-utils.c: Likewise.
7878 * server.c: Likewise.
7879 * configure.ac: Don't check for unistd.h.
7880 * configure: Regenerate.
7881
7882 2013-06-28 Tom Tromey <tromey@redhat.com>
7883
7884 * Makefile.in (version.c): Use version.in, not
7885 common/version.in.
7886
7887 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7888
7889 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7890 * configure: Rebuild.
7891 * Makefile.in (version_host, version_target): Get from configure.
7892 (version.c): Use $(version_host) and $(version_target).
7893
7894 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7895
7896 Fix trace-status to output user name without trailing colon.
7897 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7898
7899 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7900
7901 Fix trace-status to output proper start-time and stop-time.
7902 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7903 output start time and stop time in hex as gdb expects.
7904
7905 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7906
7907 * tracepoint.c (build_traceframe_info_xml): Output trace state
7908 variables present in the trace buffer.
7909
7910 2013-06-24 Tom Tromey <tromey@redhat.com>
7911
7912 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7913 create-version.sh.
7914 (version.o): Remove.
7915 * gdbreplay.c: Include version.h.
7916 (version, host_name): Don't declare.
7917 * server.h: Include version.h.
7918 (version, host_name): Don't declare.
7919
7920 2013-06-12 Pedro Alves <palves@redhat.com>
7921
7922 * linux-x86-low.c (linux_is_elf64): Delete global.
7923 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7924 with local linux_pid_exe_is_elf_64_file use.
7925
7926 2013-06-11 Pedro Alves <palves@redhat.com>
7927
7928 * linux-low.c (regset_disabled, disable_regset): New functions.
7929 (regsets_fetch_inferior_registers)
7930 (regsets_store_inferior_registers): Use them.
7931 (initialize_regsets_info); Don't allocate the disabled_regsets
7932 array here.
7933 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7934 comment.
7935
7936 2013-06-11 Pedro Alves <palves@redhat.com>
7937
7938 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7939 xmalloc.
7940
7941 2013-06-11 Pedro Alves <palves@redhat.com>
7942
7943 * linux-x86-low.c (initialize_low_arch): Call
7944 init_registers_x32_avx_linux.
7945
7946 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7947
7948 Fix compatibility with Android Bionic.
7949 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7950 it is not empty.
7951
7952 2013-06-07 Pedro Alves <palves@redhat.com>
7953
7954 PR server/14823
7955 * Makefile.in (OBS): Add tdesc.o.
7956 (IPA_OBJS): Add tdesc-ipa.o.
7957 (tdesc-ipa.o): New rule.
7958 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7959 interface.
7960 * linux-low.c (new_inferior): Delete.
7961 (disabled_regsets, num_regsets): Delete.
7962 (linux_add_process): Adjust to set the new per-process
7963 new_inferior flag.
7964 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7965 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7966 was a stop. When calling arch_setup, switch the current inferior
7967 to the thread that got an event.
7968 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7969 (regsets_fetch_inferior_registers)
7970 (regsets_store_inferior_registers): New regsets_info parameter.
7971 Adjust to use it.
7972 (linux_register_in_regsets): New regs_info parameter. Adjust to
7973 use it.
7974 (register_addr, fetch_register, store_register): New usrregs_info
7975 parameter. Adjust to use it.
7976 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7977 parameter regs_info. Adjust to use it.
7978 (linux_fetch_registers): Get the current inferior's regs_info, and
7979 adjust to use it.
7980 (linux_store_registers): Ditto.
7981 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7982 (initialize_low): Don't initialize the target_regsets here. Call
7983 initialize_low_arch.
7984 * linux-low.h (target_regsets): Delete declaration.
7985 (struct regsets_info): New.
7986 (struct usrregs_info): New.
7987 (struct regs_info): New.
7988 (struct process_info_private) <new_inferior>: New field.
7989 (struct linux_target_ops): Delete the num_regs, regmap, and
7990 regset_bitmap fields. New field regs_info.
7991 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7992 * i387-fp.c (num_xmm_registers): Delete.
7993 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7994 calls to new interface.
7995 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7996 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7997 Infer the number of xmm registers from the regcache's target
7998 description.
7999 * i387-fp.h (num_xmm_registers): Delete.
8000 * inferiors.c (add_thread): Don't install the thread's regcache
8001 here.
8002 * proc-service.c (gregset_info): Fetch the current inferior's
8003 regs_info. Adjust to use it.
8004 * regcache.c: Include tdesc.h.
8005 (register_bytes, reg_defs, num_registers)
8006 (gdbserver_expedite_regs): Delete.
8007 (get_thread_regcache): If the thread doesn't have a regcache yet,
8008 create one, instead of aborting gdbserver.
8009 (regcache_invalidate_one): Rename to ...
8010 (regcache_invalidate_thread): ... this.
8011 (regcache_invalidate_one): New.
8012 (regcache_invalidate): Only invalidate registers of the current
8013 process.
8014 (init_register_cache): Add target_desc parameter, and use it.
8015 (new_register_cache): Ditto. Assert the target description has a
8016 non zero registers_size.
8017 (regcache_cpy): Add assertions. Adjust.
8018 (realloc_register_cache, set_register_cache): Delete.
8019 (registers_to_string, registers_from_string): Adjust.
8020 (find_register_by_name, find_regno, find_register_by_number)
8021 (register_cache_size): Add target_desc parameter, and use it.
8022 (free_register_cache_thread, free_register_cache_thread_one)
8023 (regcache_release, register_cache_size): New.
8024 (register_size): Add target_desc parameter, and use it.
8025 (register_data, supply_register, supply_register_zeroed)
8026 (supply_regblock, supply_register_by_name, collect_register)
8027 (collect_register_as_string, collect_register_by_name): Adjust.
8028 * regcache.h (struct target_desc): Forward declare.
8029 (struct regcache) <tdesc>: New field.
8030 (init_register_cache, new_register_cache): Add target_desc
8031 parameter.
8032 (regcache_invalidate_thread): Declare.
8033 (regcache_invalidate_one): Delete declaration.
8034 (regcache_release): Declare.
8035 (find_register_by_number, register_cache_size, register_size)
8036 (find_regno): Add target_desc parameter.
8037 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8038 declarations.
8039 * remote-utils.c: Include tdesc.h.
8040 (outreg, prepare_resume_reply): Adjust.
8041 * server.c: Include tdesc.h.
8042 (gdbserver_xmltarget): Delete declaration.
8043 (get_features_xml, process_serial_event): Adjust.
8044 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8045 declare.
8046 (struct process_info) <tdesc>: New field.
8047 (ipa_tdesc): Declare.
8048 * tdesc.c: New file.
8049 * tdesc.h: New file.
8050 * tracepoint.c: Include tdesc.h.
8051 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8052 (get_context_regcache): Adjust to pass ipa_tdesc down.
8053 (do_action_at_tracepoint): Adjust to get the register cache size
8054 from the context regcache's description.
8055 (traceframe_walk_blocks): Adjust to get the register cache size
8056 from the current trace frame's description.
8057 (traceframe_get_pc): Adjust to get current trace frame's
8058 description and pass it down.
8059 (gdb_collect): Adjust to get the register cache size from the
8060 IPA's description.
8061 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8062 (gdbserver_xmltarget): Delete.
8063 (initialize_low_tracepoint): Set the ipa's target description.
8064 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8065 (initialize_low_tracepoint): Set the ipa's target description.
8066 * linux-x86-low.c: Include tdesc.h.
8067 [__x86_64__] (is_64bit_tdesc): New.
8068 (ps_get_thread_area, x86_get_thread_area): Use it.
8069 (i386_cannot_store_register): Rename to ...
8070 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8071 (i386_cannot_fetch_register): Rename to ...
8072 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8073 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8074 to new interface.
8075 (target_regsets): Rename to ...
8076 (x86_regsets): ... this.
8077 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8078 interface.
8079 (x86_siginfo_fixup): Use is_64bit_tdesc.
8080 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8081 (tdesc_x32_avx_linux, tdesc_x32_linux)
8082 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8083 Declare.
8084 (x86_linux_update_xmltarget): Delete.
8085 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8086 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8087 (AMD64_LINUX_USER64_CS): New.
8088 (x86_linux_read_description): New, based on
8089 x86_linux_update_xmltarget.
8090 (same_process_callback): New.
8091 (x86_arch_setup_process_callback): New.
8092 (x86_linux_update_xmltarget): New.
8093 (x86_regsets_info): New.
8094 (amd64_linux_regs_info): New.
8095 (i386_linux_usrregs_info): New.
8096 (i386_linux_regs_info): New.
8097 (x86_linux_regs_info): New.
8098 (x86_arch_setup): Reimplement.
8099 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8100 (x86_emit_ops): Ditto.
8101 (the_low_target): Adjust. Install x86_linux_regs_info,
8102 x86_cannot_fetch_register, and x86_cannot_store_register.
8103 (initialize_low_arch): New.
8104 * linux-ia64-low.c (tdesc_ia64): Declare.
8105 (ia64_fetch_register): Adjust.
8106 (ia64_usrregs_info, regs_info): New globals.
8107 (ia64_regs_info): New function.
8108 (the_low_target): Adjust.
8109 (initialize_low_arch): New function.
8110 * linux-sparc-low.c (tdesc_sparc64): Declare.
8111 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8112 Adjust.
8113 (sparc_arch_setup): New function.
8114 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8115 (the_low_target): Adjust.
8116 (initialize_low_arch): New function.
8117 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8118 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8119 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8120 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8121 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8122 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8123 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8124 (tdesc_powerpc_isa205_vsx64l): Declare.
8125 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8126 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8127 (ppc_set_pc, ppc_get_hwcap): Adjust.
8128 (ppc_usrregs_info): Forward declare.
8129 (!__powerpc64__) ppc_regmap_adjusted: New global.
8130 (ppc_arch_setup): Adjust to the current process'es target
8131 description.
8132 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8133 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8134 (ppc_store_evrregset): Adjust.
8135 (target_regsets): Rename to ...
8136 (ppc_regsets): ... this, and make static.
8137 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8138 (ppc_regs_info): New function.
8139 (the_low_target): Adjust.
8140 (initialize_low_arch): New function.
8141 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8142 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8143 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8144 (tdesc_s390x_linux64v2): Declare.
8145 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8146 (s390_fill_gregset, s390_store_last_break): Adjust.
8147 (target_regsets): Rename to ...
8148 (s390_regsets): ... this, and make static.
8149 (s390_get_pc, s390_set_pc): Adjust.
8150 (s390_get_hwcap): New target_desc parameter, and use it.
8151 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8152 (s390_arch_setup): Adjust to set the current process'es target
8153 description. Don't adjust the regmap.
8154 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8155 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8156 (regs_info_3264): New globals.
8157 (s390_regs_info): New function.
8158 (the_low_target): Adjust.
8159 (initialize_low_arch): New function.
8160 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8161 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8162 [__mips64] (init_registers_mips_linux)
8163 (init_registers_mips_dsp_linux): Delete defines.
8164 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8165 (have_dsp): New global.
8166 (mips_read_description): New, based on mips_arch_setup.
8167 (mips_arch_setup): Reimplement.
8168 (get_usrregs_info): New function.
8169 (mips_cannot_fetch_register, mips_cannot_store_register)
8170 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8171 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8172 (target_regsets): Rename to ...
8173 (mips_regsets): ... this, and make static.
8174 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8175 (dsp_regs_info, regs_info): New globals.
8176 (mips_regs_info): New function.
8177 (the_low_target): Adjust.
8178 (initialize_low_arch): New function.
8179 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8180 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8181 Declare.
8182 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8183 (arm_read_description): New, with bits factored from
8184 arm_arch_setup.
8185 (arm_arch_setup): Reimplement.
8186 (target_regsets): Rename to ...
8187 (arm_regsets): ... this, and make static.
8188 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8189 (arm_regs_info): New function.
8190 (the_low_target): Adjust.
8191 (initialize_low_arch): New function.
8192 * linux-m68k-low.c (tdesc_m68k): Declare.
8193 (target_regsets): Rename to ...
8194 (m68k_regsets): ... this, and make static.
8195 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8196 (m68k_regs_info): New function.
8197 (m68k_arch_setup): New function.
8198 (the_low_target): Adjust.
8199 (initialize_low_arch): New function.
8200 * linux-sh-low.c (tdesc_sharch): Declare.
8201 (target_regsets): Rename to ...
8202 (sh_regsets): ... this, and make static.
8203 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8204 (sh_regs_info, sh_arch_setup): New functions.
8205 (the_low_target): Adjust.
8206 (initialize_low_arch): New function.
8207 * linux-bfin-low.c (tdesc_bfin): Declare.
8208 (bfin_arch_setup): New function.
8209 (bfin_usrregs_info, regs_info): New globals.
8210 (bfin_regs_info): New function.
8211 (the_low_target): Adjust.
8212 (initialize_low_arch): New function.
8213 * linux-cris-low.c (tdesc_cris): Declare.
8214 (cris_arch_setup): New function.
8215 (cris_usrregs_info, regs_info): New globals.
8216 (cris_regs_info): New function.
8217 (the_low_target): Adjust.
8218 (initialize_low_arch): New function.
8219 * linux-cris-low.c (tdesc_crisv32): Declare.
8220 (cris_arch_setup): New function.
8221 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8222 (cris_regs_info): New function.
8223 (the_low_target): Adjust.
8224 (initialize_low_arch): New function.
8225 * linux-m32r-low.c (tdesc_m32r): Declare.
8226 (m32r_arch_setup): New function.
8227 (m32r_usrregs_info, regs_info): New globals.
8228 (m32r_regs_info): Adjust.
8229 (initialize_low_arch): New function.
8230 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8231 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8232 (tic6x_usrregs_info): Forward declare.
8233 (tic6x_read_description): New function, based on ...
8234 (tic6x_arch_setup): ... this. Reimplement.
8235 (target_regsets): Rename to ...
8236 (tic6x_regsets): ... this, and make static.
8237 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8238 (tic6x_regs_info): New function.
8239 (the_low_target): Adjust.
8240 (initialize_low_arch): New function.
8241 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8242 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8243 (target_regsets): Rename to ...
8244 (xtensa_regsets): ... this, and make static.
8245 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8246 globals.
8247 (xtensa_arch_setup, xtensa_regs_info): New functions.
8248 (the_low_target): Adjust.
8249 (initialize_low_arch): New function.
8250 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8251 (nios2_arch_setup): Set the current process'es tdesc.
8252 (target_regsets): Rename to ...
8253 (nios2_regsets): ... this.
8254 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8255 (nios2_regs_info): New function.
8256 (the_low_target): Adjust.
8257 (initialize_low_arch): New function.
8258 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8259 (aarch64_arch_setup): Set the current process'es tdesc.
8260 (target_regsets): Rename to ...
8261 (aarch64_regsets): ... this.
8262 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8263 (aarch64_regs_info): New function.
8264 (the_low_target): Adjust.
8265 (initialize_low_arch): New function.
8266 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8267 globals.
8268 (target_regsets): Rename to ...
8269 (tile_regsets): ... this.
8270 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8271 (tile_regs_info): New function.
8272 (tile_arch_setup): Set the current process'es tdesc.
8273 (the_low_target): Adjust.
8274 (initialize_low_arch): New function.
8275 * spu-low.c (tdesc_spu): Declare.
8276 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8277 * win32-arm-low.c (tdesc_arm): Declare.
8278 (arm_arch_setup): New function.
8279 (the_low_target): Install arm_arch_setup instead of
8280 init_registers_arm.
8281 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8282 (init_windows_x86): Rename to ...
8283 (i386_arch_setup): ... this. Set `win32_tdesc'.
8284 (the_low_target): Adjust.
8285 * win32-low.c (win32_tdesc): New global.
8286 (child_add_thread): Don't create the thread cache here.
8287 (do_initial_child_stuff): Set the new process'es tdesc.
8288 * win32-low.h (struct target_desc): Forward declare.
8289 (win32_tdesc): Declare.
8290 * lynx-i386-low.c (tdesc_i386): Declare global.
8291 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8292 * lynx-low.c (lynx_tdesc): New global.
8293 (lynx_add_process): Set the new process'es tdesc.
8294 * lynx-low.h (struct target_desc): Forward declare.
8295 (lynx_tdesc): Declare global.
8296 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8297 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8298 * nto-low.c (nto_tdesc): New global.
8299 (do_attach): Set the new process'es tdesc.
8300 * nto-low.h (struct target_desc): Forward declare.
8301 (nto_tdesc): Declare.
8302 * nto-x86-low.c (tdesc_i386): Declare.
8303 (nto_x86_arch_setup): Set `nto_tdesc'.
8304
8305 2013-06-04 Gary Benson <gbenson@redhat.com>
8306
8307 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8308 to qSupported response when appropriate.
8309 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8310 with nonzero-length annex.
8311 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8312 arguments supplied in annex.
8313
8314 2013-05-31 Doug Evans <dje@google.com>
8315
8316 PR server/15594
8317 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8318 64 bits in 64-cross-32 environment.
8319
8320 2013-05-28 Pedro Alves <palves@redhat.com>
8321
8322 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8323 (aarch64-without-fpu.c): Delete rule.
8324 * configure.srv (aarch64*-*-linux*): Remove references to
8325 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8326 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8327 declaration.
8328
8329 2013-05-24 Pedro Alves <palves@redhat.com>
8330
8331 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8332 instead of strchr/decode_address. Error if the range isn't split
8333 with a ','. Don't assume there's be a ':' in the action.
8334
8335 2013-05-23 Yao Qi <yao@codesourcery.com>
8336 Pedro Alves <palves@redhat.com>
8337
8338 * linux-low.c (lwp_in_step_range): New function.
8339 (linux_wait_1): If the thread was range stepping and stopped
8340 outside the stepping range, report the stop to GDB. Otherwise,
8341 continue stepping. Add range stepping debug output.
8342 (linux_set_resume_request): Copy the step range from the resume
8343 request to the lwp.
8344 (linux_supports_range_stepping): New.
8345 (linux_target_ops) <supports_range_stepping>: Set to
8346 linux_supports_range_stepping.
8347 * linux-low.h (struct linux_target_ops)
8348 <supports_range_stepping>: New field.
8349 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8350 * linux-x86-low.c (x86_supports_range_stepping): New.
8351 (the_low_target) <supports_range_stepping>: Set to
8352 x86_supports_range_stepping.
8353 * server.c (handle_v_cont): Handle 'r' action.
8354 (handle_v_requests): Append ";r" if the target supports range
8355 stepping.
8356 * target.h (struct thread_resume) <step_range_start,
8357 step_range_end>: New fields.
8358 (struct target_ops) <supports_range_stepping>:
8359 New field.
8360 (target_supports_range_stepping): New macro.
8361
8362 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8363
8364 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8365 confusion in comment.
8366
8367 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8368
8369 * lynx-low.c (struct process_info_private): New type.
8370 (lynx_add_process): New function.
8371 (lynx_create_inferior, lynx_attach): Replace calls to
8372 add_process by calls to lynx_add_process.
8373 (lynx_resume): If PTID is null, then try using
8374 current_process()->private->last_wait_event_ptid.
8375 Add comments.
8376 (lynx_clear_inferiors): Delete. The contents of that function
8377 has been inlined in lynx_mourn;
8378 (lynx_wait_1): Save the ptid in the process's private data.
8379 (lynx_mourn): Free the process' private data. Replace call
8380 to lynx_clear_inferiors by call to clear_inferiors.
8381
8382 2013-05-17 Yao Qi <yao@codesourcery.com>
8383
8384 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8385 the right place.
8386
8387 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8388
8389 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8390 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8391 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8392 PT_TEXT_END_ADDR guards. Update comments.
8393 (linux_target_op) <read_offsets>: Conditionally define to
8394 linux_read_offsets if the target is UCLIBC and if it defines
8395 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8396
8397 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8398 Andrew Jenner <andrew@codesourcery.com>
8399
8400 * Makefile.in (SFILES): Add linux-nios2-low.c.
8401 (clean): Add action to delete nios2-linux.c.
8402 (nios2-linux.c): New rule.
8403 * configure.srv: Add nios2*-*-linux*.
8404 * linux-nios2-low.c: New.
8405
8406 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8407
8408 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8409
8410 2013-04-25 Hui Zhu <hui@codesourcery.com>
8411
8412 PR gdb/15186
8413 * ax.c (ax_printf): Add fflush.
8414
8415 2013-04-22 Tom Tromey <tromey@redhat.com>
8416
8417 * Makefile.in (SFILES): Add filestuff.c.
8418 (OBS): Add filestuff.o.
8419 (filestuff.o): New target.
8420 * config.in, configure: Rebuild.
8421 * configure.ac: Check for fdwalk, pipe2.
8422
8423 2013-04-17 Pedro Alves <palves@redhat.com>
8424
8425 * configure.ac (USE_THREAD_DB): Delete variable.
8426 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8427 Don't AC_SUBST USE_THREAD_DB.
8428 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8429 * config.in, configure: Regenerate.
8430
8431 2013-04-16 Pedro Alves <palves@redhat.com>
8432
8433 * linux-low.h (struct lwp_info) <thread_known>: Move under
8434 the USE_THREAD_DB #ifdef.
8435
8436 2013-04-16 Pedro Alves <palves@redhat.com>
8437
8438 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8439 (linux-low.o): Delete rule.
8440 * linux-low.h: Always include "gdb_thread_db.h" instead of
8441 conditionally including thread_db.h.
8442 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8443 HAVE_THREAD_DB_H.
8444
8445 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8446
8447 * Makefile.in (install-only): Fix make install regression.
8448
8449 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8450
8451 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8452 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8453 installation.
8454 * gdbserver.1: Remove.
8455
8456 2013-03-22 Pedro Alves <palves@redhat.com>
8457
8458 * linux-low.c (handle_extended_wait): Don't call
8459 linux_enable_event_reporting.
8460
8461 2013-03-15 Tony Theodore <tonyt@logyst.com>
8462
8463 PR build/9098:
8464 * Makefile.in (SHELL): Use @SHELL@.
8465
8466 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8467
8468 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8469 compiler warning.
8470
8471 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8472
8473 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8474 Remove extraneous NULL element.
8475
8476 2013-03-13 Yao Qi <yao@codesourcery.com>
8477
8478 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8479 'V' block in trace frame.
8480
8481 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8482
8483 * target.h (struct target_ops): Add btrace ops.
8484 (target_supports_btrace): New macro.
8485 (target_enable_btrace): New macro.
8486 (target_disable_btrace): New macro.
8487 (target_read_btrace): New macro.
8488 * gdbthread.h (struct thread_info): Add btrace field.
8489 * server.c: Include btrace-common.h.
8490 (handle_btrace_general_set): New function.
8491 (handle_btrace_enable): New function.
8492 (handle_btrace_disable): New function.
8493 (handle_general_set): Call handle_btrace_general_set.
8494 (handle_qxfer_btrace): New function.
8495 (struct qxfer qxfer_packets[]): Add btrace entry.
8496 * inferiors.c (remove_thread): Disable btrace.
8497 * linux-low: Include linux-btrace.h.
8498 (linux_low_enable_btrace): New function.
8499 (linux_low_read_btrace): New function.
8500 (linux_target_ops): Add btrace ops.
8501 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8502 Add srv_linux_btrace=yes.
8503 (x86_64-*-linux*): Add linux-btrace.o.
8504 Add srv_linux_btrace=yes.
8505 * configure.ac: Define HAVE_LINUX_BTRACE.
8506 * config.in: Regenerated.
8507 * configure: Regenerated.
8508
8509 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8510
8511 * server.c (handle_qxfer): Preserve error message if -3 is
8512 returned.
8513 (qxfer): Document the -3 return value.
8514
8515 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8516
8517 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8518 (linux_btrace_h): New variable.
8519 (linux-btrace.o): New rule.
8520
8521 2013-03-08 Stan Shebs <stan@codesourcery.com>
8522 Hafiz Abid Qadeer <abidh@codesourcery.com>
8523
8524 * tracepoint.c (trace_buffer_size): New global.
8525 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8526 (init_trace_buffer): Change to one-argument function. Allocate
8527 trace buffer memory.
8528 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8529 handle QTBuffer:size packet.
8530 (cmd_bigqtbuffer_size): New function.
8531 (initialize_tracepoint): Call init_trace_buffer with
8532 DEFAULT_TRACE_BUFFER_SIZE.
8533 * server.c (handle_query): Add QTBuffer:size in the
8534 supported packets.
8535
8536 2013-03-07 Yao Qi <yao@codesourcery.com>
8537
8538 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8539 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8540 of -1.
8541 (cmd_qtsp): Adjust condition. Do post increment.
8542 Set cur_action and cur_step_action back to 0.
8543
8544 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8545
8546 PR server/15236
8547 * linux-low.c (linux_write_memory): Return early success if LEN is
8548 zero.
8549
8550 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8551
8552 * configure.srv: Add x86_64-*-cygwin* as target.
8553
8554 2013-02-28 Tom Tromey <tromey@redhat.com>
8555
8556 * configure.ac: Invoke AC_SYS_LARGEFILE.
8557 * configure, config.in: Rebuild.
8558
8559 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8560
8561 * win32-low.c: Throughout, fix format strings and casts of
8562 printf-like functions to avoid type related warnings on all
8563 platforms.
8564 (get_child_debug_event): Print dwDebugEventCode as hex since
8565 that's how it's usually documented.
8566
8567 2013-02-28 Yao Qi <yao@codesourcery.com>
8568
8569 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8570 pulongest.
8571
8572 2013-02-27 Jiong Wang <jiwang@tilera.com>
8573
8574 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8575 (reg-tilegx32.c): New rule.
8576 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8577 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8578 different register info initializer according to elf class.
8579 (init_registers_tilgx32): New function. The tilegx32 register info
8580 initializer.
8581 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8582 (tile_store_gregset): Likewise.
8583
8584 2013-02-27 Yao Qi <yao@codesourcery.com>
8585
8586 * server.c (process_point_options): Print debug message when
8587 debug_threads is true.
8588
8589 2013-02-26 Yao Qi <yao@codesourcery.com>
8590
8591 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8592
8593 2013-02-19 Pedro Alves <palves@redhat.com>
8594 Kai Tietz <ktietz@redhat.com>
8595
8596 PR gdb/15161
8597
8598 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8599 instead of strtoul to extract address from packet.
8600 (process_serial_event) <'z'>: Likewise.
8601
8602 2013-02-18 Yao Qi <yao@codesourcery.com>
8603
8604 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8605
8606 2013-02-14 Pedro Alves <palves@redhat.com>
8607
8608 Plug memory leak.
8609
8610 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8611 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8612
8613 2013-02-14 Pedro Alves <palves@redhat.com>
8614
8615 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8616
8617 2013-02-14 Pedro Alves <palves@redhat.com>
8618
8619 * tracepoint.c (save_string): Delete.
8620 (add_tracepoint_action): Use savestring instead of save_string.
8621
8622 2013-02-12 Pedro Alves <palves@redhat.com>
8623
8624 * linux-xtensa-low.c: Ditto.
8625 * xtensa-xtregs.c: Ditto.
8626
8627 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8628
8629 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8630 thread_db.
8631
8632 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8633
8634 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8635 aarch64_num_wp_regs and aarch64_num_bp_regs to
8636 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8637
8638 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8639
8640 * linux-aarch64-low.c (ps_get_thread_area): Replace
8641 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8642
8643 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8644 Marcus Shawcroft <marcus.shawcroft@arm.com>
8645 Nigel Stephens <nigel.stephens@arm.com>
8646 Yufeng Zhang <yufeng.zhang@arm.com>
8647
8648 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8649 (aarch64.c, aarch64-without-fpu.c): New targets.
8650 * configure.srv (aarch64*-*-linux*): New.
8651 * linux-aarch64-low.c: New file.
8652
8653 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8654
8655 * linux-low.c (handle_extended_wait, linux_create_inferior)
8656 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8657 (dequeue_one_deferred_signal, linux_resume_one_thread)
8658 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8659 (linux_tracefork_grandchild, linux_test_for_tracefork)
8660 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8661 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8662 where the argument is 0.
8663
8664 2013-01-25 Yao Qi <yao@codesourcery.com>
8665
8666 * event-loop.c: Include "queue.h".
8667 (gdb_event_p): New typedef.
8668 (struct gdb_event) <next_event>: Remove.
8669 (event_queue): Change to QUEUE(gdb_event_p).
8670 (async_queue_event): Remove.
8671 (gdb_event_xfree): New.
8672 (initialize_event_loop): New.
8673 (process_event): Use API from QUEUE.
8674 (wait_for_event): Likewise.
8675 * server.c (main): Call initialize_event_loop.
8676 * server.h (initialize_event_loop): Declare.
8677
8678 2013-01-18 Yao Qi <yao@codesourcery.com>
8679
8680 * ax.h (struct eval_agent_expr_context): New.
8681 (gdb_eval_agent_expr): Update declaration.
8682 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8683 TFRAME. Add new argument CTX.
8684 * server.h (struct eval_agent_expr_context): Declare.
8685 (agent_mem_read, agent_tsv_read): Update declaration.
8686 (agent_mem_read_string): Likewise.
8687 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8688 (add_traceframe_block): Add new argument TPOINT.
8689 Increase TPOINT->traceframe_usage.
8690 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8691 eval_tracepoint_agent_expr.
8692 (condition_true_at_tracepoint): Likewise.
8693 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8694 (agent_mem_read_string, agent_tsv_read): Likewise.
8695
8696 2013-01-16 Yao Qi <yao@codesourcery.com>
8697
8698 * linux-low.c (linux_resume_one_lwp): Don't check
8699 'lwp->bp_reinsert != 0'.
8700
8701 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8702 Pedro Alves <palves@redhat.com>
8703
8704 * lynx-low.c (ptrace_request_to_str): Define a temporary
8705 macro and use it to simplify this function's implementation.
8706
8707 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8708
8709 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8710 sets errno.
8711
8712 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8713
8714 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8715
8716 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8717
8718 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8719
8720 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8721
8722 * lynx-low.c (lynx_resume): Use the resume_info parameter
8723 to determine the ptid for the lynx_ptrace call, unless
8724 it is equal to minus_one_ptid, in which case we use the
8725 ptid of the current_inferior.
8726 (lynx_wait_1): After having received a thread create/exit
8727 event, resume the inferior's execution using the signaling
8728 thread's ptid, rather than the old ptid.
8729
8730 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8731
8732 * lynx-low.c (lynx_resume): Delete variable ret.
8733
8734 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8735
8736 * gdbreplay.c (gdbreplay_version): Update copyright year.
8737 * server.c (gdbserver_version): Likewise.
8738
8739 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8740
8741 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8742 new thread.
8743
8744 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8745
8746 * lynx-low.c (ptrace_request_to_str): Add handling for
8747 PTRACE_GETTRACESIG.
8748
8749 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8750
8751 * lynx-low.c (lynx_attach): Delete variable new_process.
8752
8753 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8754
8755 * lynx-low.c (lynx_create_inferior): Delete variable
8756 new_process.
8757
8758 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8759
8760 * lynx-low.c (ptrace_request_to_str): Do not handle
8761 PTRACE_GETTHREADLIST if this macro does not exist.
8762
8763 2012-12-15 Yao Qi <yao@codesourcery.com>
8764
8765 * Makefile.in (OBS): Add notif.o.
8766 * notif.c, notif.h: New.
8767 * server.c: Include "notif.h".
8768 (struct vstop_notif) <next>: Remove.
8769 <base>: New field.
8770 (queue_stop_reply): Update.
8771 (push_event, send_next_stop_reply): Remove.
8772 (discard_queued_stop_replies): Update.
8773 (notif_stop): New variable.
8774 (handle_v_stopped): Remove.
8775 (handle_v_requests): Don't call handle_v_stopped. Call
8776 handle_ack_notif instead.
8777 (queue_stop_reply_callback): Call notif_event_enque instead
8778 of queue_stop_reply.
8779 (handle_status): Don't call send_next_stop_reply, call
8780 notif_write_event instead.
8781 (kill_inferior_callback): Likewise.
8782 (detach_or_kill_inferior_callback): Likewise.
8783 (main): Call initialize_notif.
8784 (process_serial_event): Call QUEUE_is_empty.
8785 (handle_target_event): Call notif_push instead of push event.
8786 * server.h (push_event): Remove declaration.
8787
8788 2012-12-10 Tom Tromey <tromey@redhat.com>
8789
8790 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8791 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8792 macros.
8793 (.c.o): Rewrite.
8794 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8795 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8796 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8797 (amd64-linux-ipa.o, ax.o): Rewrite.
8798 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8799 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8800 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8801 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8802 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8803 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8804 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8805 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8806 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8807 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8808 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8809 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8810 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8811 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8812 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8813 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8814 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8815 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8816 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8817 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8818 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8819 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8820 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8821 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8822 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8823 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8824 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8825 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8826 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8827 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8828 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8829 (reg-tilegx.o): Remove.
8830 (all_object_files): New macro.
8831 Include .deps files.
8832 * aclocal.m4, configure: Rebuild.
8833 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8834 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8835 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8836
8837 2012-12-05 Tom Tromey <tromey@redhat.com>
8838
8839 PR gdb/14917:
8840 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8841
8842 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8843
8844 * configure.ac: Check for linux/perf_event.h.
8845 * config.in: Regenerated.
8846 * configure: Regenerated.
8847
8848 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8849
8850 * hostio.c (handle_readlink): Decrease buffer size
8851 parameter passed to readlink by one byte.
8852
8853 2012-11-26 Yao Qi <yao@codesourcery.com>
8854
8855 * configure.ac (build_warnings): Append '-Wempty-body'.
8856 * configure: Regenerated.
8857 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8858 body.
8859
8860 2012-11-15 Pierre Muller <muller@sourceware.org>
8861
8862 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8863 * config.in: Regenerate.
8864 * configure: Regenerate.
8865 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8866 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8867 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8868 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8869 header.
8870 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8871 instead of <sys/wait.h> header.
8872 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8873
8874 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8875
8876 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8877 (various make rules): Remove -DGDBSERVER
8878
8879 2012-11-09 Yao Qi <yao@codesourcery.com>
8880
8881 * spu-low.c (current_ptid): Move it to ..
8882 * gdbthread.h: ... here. New.
8883 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8884 * server.c (myresume, process_serial_event): Likewise.
8885 * thread-db.c (thread_db_find_new_threads): Likewise.
8886 * tracepoint.c (run_inferior_command): Likewise.
8887
8888 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8889
8890 * server.c (handle_search_memory_1): Include access length in
8891 warning message.
8892
8893 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8894
8895 * linux-crisv32-low.c: Fix compile errors.
8896
8897 2012-09-04 Yao Qi <yao@codesourcery.com>
8898
8899 * tracepoint.c (cmd_qtsv): Adjust debug message.
8900 Don't check CUR_TPOINT.
8901
8902 2012-08-28 Yao Qi <yao@codesourcery.com>
8903
8904 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8905 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8906 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8907 Remove declarations of xmalloc, xreallloc, xstrdup and
8908 freeargv.
8909 * Makefile.in (libiberty_h): New.
8910 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8911 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8912
8913 2012-08-23 Yao Qi <yao@codesourcery.com>
8914
8915 * server.h: Remove declaration of 'xsnprintf'.
8916
8917 2012-08-22 Keith Seitz <keiths@redhat.com>
8918
8919 * server.h: Include build-gnulib-gbserver/config.h.
8920 * gdbreplay.c: Likewise.
8921
8922 2012-08-08 Doug Evans <dje@google.com>
8923
8924 * Makefile.in (SFILES): Add gdb_vecs.c.
8925 (OBS): Add gdb_vecs.o.
8926 (gdb_vecs_h, host_defs_h): New variables.
8927 (thread-db.o): Add $(gdb_vecs_h) dependency.
8928 (gdb_vecs.o): New rule.
8929 * thread-db.c: #include "gdb_vecs.h".
8930 (thread_db_load_search): Use a vector to iterate over path elements.
8931 Handle text appearing after "$pdir".
8932
8933 * configure.ac: Add check for strstr.
8934 * config.in: Regenerate.
8935 * configure: Regenerate.
8936
8937 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8938
8939 * hostio.c (handle_pread): If pread fails, fall back to attempting
8940 lseek/read.
8941 (handle_pwrite): Likewise for pwrite.
8942
8943 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8944
8945 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8946 between unsupported TYPE and unimplementable ADDR/LEN combination.
8947 (arm_insert_point): Act on new return value.
8948
8949 2012-07-31 Pedro Alves <palves@redhat.com>
8950
8951 * server.c (process_point_options): Only skip tokens if we find
8952 one that is unrecognized. Don't treat 'X' specially while
8953 skipping unrecognized tokens.
8954
8955 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8956
8957 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8958 to 4-byte-align HW breakpoint addresses for Thumb.
8959
8960 2012-07-27 Yao Qi <yao@codesourcery.com>
8961
8962 PR remote/14161.
8963
8964 * server.h: Declare gdb_agent_about_to_close.
8965 * target.c (kill_inferior): Include "agent.h".
8966 New. Send command 'kill'.
8967 * target.h (kill_inferior): Removed macro.
8968 * tracepoint.c (gdb_agent_about_to_close): New.
8969 (gdb_agent_helper_thread): Handle command 'close'.
8970 Wait endlessly until the inferior stops.
8971 Install gdb_agent_remove_socket to atexit hook.
8972 (agent_socket_name): New static variable.
8973 (gdb_agent_socket_init): Replace local variable 'name' with
8974 'agent_socket_name'.
8975 (gdb_agent_remove_socket): New.
8976
8977 2012-07-27 Yao Qi <yao@codesourcery.com>
8978
8979 * server.c (process_point_options): Stop at 'X' when parsing.
8980
8981 2012-07-19 Michael Eager <eager@eagercon.com>
8982
8983 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8984 to hw_execute.
8985 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8986 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8987 hardware breakpoint.
8988
8989 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8990
8991 * gdbserver/linux-low.c (initialize_low): Call
8992 linux_ptrace_init_warnings.
8993
8994 2012-07-02 Doug Evans <dje@google.com>
8995
8996 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8997 pointer to int.
8998
8999 2012-07-02 Stan Shebs <stan@codesourcery.com>
9000
9001 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9002 (ax.o): Add it to build rule.
9003 (ax-ipa.o): Ditto.
9004 (OBS): Add format.o.
9005 (IPA_OBS): Add format.o.
9006 * server.c (handle_query): Claim support for breakpoint commands.
9007 (process_point_options): Add command case.
9008 (process_serial_event): Leave running if there are printfs in
9009 effect.
9010 * mem-break.h (any_persistent_commands): Declare.
9011 (add_breakpoint_commands): Declare.
9012 (gdb_no_commands_at_breakpoint): Declare.
9013 (run_breakpoint_commands): Declare.
9014 * mem-break.c (struct point_command_list): New struct.
9015 (struct breakpoint): New field command_list.
9016 (any_persistent_commands): New function.
9017 (add_commands_to_breakpoint): New function.
9018 (add_breakpoint_commands): New function.
9019 (gdb_no_commands_at_breakpoint): New function.
9020 (run_breakpoint_commands): New function.
9021 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9022 locally.
9023 * ax.c: Include format.h.
9024 (ax_printf): New function.
9025 (gdb_eval_agent_expr): Add printf opcode.
9026
9027 2012-06-13 Yao Qi <yao@codesourcery.com>
9028
9029 * server.c (start_inferior): Remove duplicated writes to fields
9030 'last_resume_kind' and 'last_status' of 'current_inferior'.
9031
9032 2012-06-12 Yao Qi <yao@codesourcery.com>
9033 Pedro Alves <palves@redhat.com>
9034
9035 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9036 comment.
9037 * server.c (handle_v_cont): Extend comment.
9038
9039 2012-06-11 Yao Qi <yao@codesourcery.com>
9040
9041 * linux-low.c (linux_attach): Add 'static'.
9042
9043 2012-06-06 Yao Qi <yao@codesourcery.com>
9044
9045 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9046
9047 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9048
9049 Fix gcc -flto compilation warning.
9050 * server.c (main): Make variable multi_mode and attach volatile.
9051
9052 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9053
9054 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9055 if the platform doesn't know about it.
9056
9057 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9058
9059 * Makefile.in (SFILES): Add linux-tile-low.c.
9060 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9061 * configure.srv: Handle tilegx-*-linux*.
9062 * linux-tile-low.c: New file.
9063
9064 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9065
9066 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9067
9068 2012-05-24 Pedro Alves <palves@redhat.com>
9069
9070 PR gdb/7205
9071
9072 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9073
9074 2012-05-24 Pedro Alves <palves@redhat.com>
9075
9076 PR gdb/7205
9077
9078 Replace target_signal with gdb_signal throughout.
9079
9080 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9081
9082 * linux-low.c (linux_store_registers): Avoid the copying sequence
9083 when no data has been retrieved by ptrace.
9084
9085 2012-05-22 Will Deacon <will.deacon@arm.com>
9086
9087 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9088 Include asm/ptrace.h.
9089 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9090 already defined.
9091
9092 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9093
9094 * linux-low.c (linux_store_registers): Don't re-retrieve data
9095 with ptrace that has already been obtained from /proc. Always
9096 copy any data retrieved with ptrace to the buffer supplied.
9097
9098 2012-05-11 Yao Qi <yao@codesourcery.com>
9099 Pedro Alves <palves@redhat.com>
9100
9101 * linux-low.c (enum stopping_threads_kind): New.
9102 (stopping_threads): Change type to `enum stopping_threads_kind'.
9103 (handle_extended_wait): If stopping and suspending threads, leave
9104 the new_lwp suspended too.
9105 (linux_wait_for_event): Adjust.
9106 (stop_all_lwps): Set `stopping_threads' to
9107 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9108 whether we're suspending threads or just stopping them. Assert no
9109 recursion happens.
9110
9111 2012-04-29 Yao Qi <yao@codesourcery.com>
9112
9113 * server.h: Move some code to ...
9114 * gdbthread.h: ... here. New.
9115 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9116 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9117 (nto-low.o, win32-low.o): Likewise.
9118 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9119 * regcache.c, remote-utils.c, server.c: Likewise.
9120 * target.c, tracepoint.c, win32-low.c: Likewise.
9121
9122 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9123
9124 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9125 (PTRACE_ARG4_TYPE): Likewise.
9126 (PTRACE_XFER_TYPE): Likewise.
9127 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9128 ptrace to PTRACE_ARG3_TYPE.
9129 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9130 (PTRACE_ARG4_TYPE): Likewise.
9131 (PTRACE_XFER_TYPE): Likewise.
9132 (linux_detach_one_lwp): Cast fourth argument of
9133 ptrace to long then PTRACE_ARG4_TYPE.
9134 (regsets_fetch_inferior_registers): Cast third argument of
9135 ptrace to long then PTRACE_ARG3_TYPE.
9136 (regsets_store_inferior_registers): Likewise.
9137
9138 2012-04-20 Pedro Alves <palves@redhat.com>
9139
9140 * configure: Regenerate.
9141
9142 2012-04-19 Pedro Alves <palves@redhat.com>
9143
9144 * Makefile.in (GNULIB_BUILDDIR): New.
9145 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9146 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9147 (all, install-only, uninstall, clean-info, all-lib, clean): No
9148 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9149 (maintainer-clean realclean distclean): Use subdir_do.
9150 (subdir_do): New.
9151 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9152 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9153 * acinclude.m4: Include acx_configure_dir.m4.
9154 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9155 calls. Call AC_PROG_RANLIB. Configure gnulib using
9156 ACX_CONFIGURE_DIR.
9157 (GNULIB): New.
9158 (GNULIB_STDINT_H): Adjust.
9159 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9160 * gdbreplay.c: Include build-gnulib/config.h.
9161 * server.h: Likewise.
9162 * aclocal.m4: Regenerate.
9163 * config.in: Regenerate.
9164 * configure: Regenerate.
9165
9166 2012-04-19 Pedro Alves <palves@redhat.com>
9167
9168 * Makefile.in (LIBGNU, INCGNU): Adjust.
9169 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9170 (all, install-only, uninstall, clean-info, all-lib, clean)
9171 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9172 * configure.ac: Adjust AC_OUTPUT output.
9173 * aclocal.m4: Regenerate.
9174 * configure: Regenerate.
9175
9176 2012-04-19 Pedro Alves <palves@redhat.com>
9177
9178 * Makefile.in (generated_files): New.
9179 (server_h): Remove the explicit dependency on config.h, and depend
9180 on $generated_files.
9181
9182 2012-04-19 Pedro Alves <palves@redhat.com>
9183
9184 * Makefile.in (INCGNU): Add -Ignulib.
9185
9186 2012-04-19 Pedro Alves <palves@redhat.com>
9187
9188 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9189 (INCGNU): ... this, and spell out -I here.
9190 (GNULIB_LIB): Rename to ...
9191 (LIBGNU): ... this.
9192 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9193
9194 2012-04-19 Pedro Alves <palves@redhat.com>
9195
9196 * config.in: Regenerate.
9197
9198 2012-04-19 Pedro Alves <palves@redhat.com>
9199
9200 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9201 * server.h (memmem): Remove declaration.
9202 * config.in: Regenerate.
9203 * configure: Regenerate.
9204
9205 2012-04-19 Yao Qi <yao@codesourcery.com>
9206
9207 * Makefile.in (SFILES): Add common/vec.c.
9208 (OBS): Add vec.o.
9209 (vec.o): New rule.
9210
9211 2012-04-19 Yao Qi <yao@codesourcery.com>
9212
9213 * remote-utils.c (prepare_resume_reply): Replace with macro
9214 target_core_of_thread.
9215 * server.c (handle_qxfer_threads_proper): Likewise.
9216 * target.h (traget_core_of_thread): New macro.
9217
9218 2012-04-18 Pedro Alves <palves@redhat.com>
9219
9220 * aclocal.m4: Regenerate.
9221 * configure: Regenerate.
9222
9223 2012-04-16 Yao Qi <yao@codesourcery.com>
9224
9225 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9226 duplicated on address.
9227
9228 2012-04-16 Yao Qi <yao@codesourcery.com>
9229
9230 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9231 (struct tracepoint_action_ops) <send>: New field.
9232 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9233 (agent_expr_send, x_tracepoint_action_send): New.
9234 (l_tracepoint_action_send): New.
9235 (cmd_qtdp): Download and install tracepoint
9236 according to `use_agent'.
9237 (run_inferior_command): Add one more parameter `len'.
9238 Update callers.
9239 (tracepoint_send_agent): New.
9240 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9241
9242 2012-04-16 Yao Qi <yao@codesourcery.com>
9243
9244 * tracepoint.c (download_tracepoints): Moved to ...
9245 (cmd_qtstart): ... here.
9246
9247 2012-04-14 Yao Qi <yao@codesourcery.com>
9248
9249 * tracepoint.c: Include inttypes.h.
9250 (struct collect_memory_action): Use sized types.
9251 (struct tracepoint): Likewise.
9252 (cmd_qtdp, stop_tracing): Update print specifiers.
9253 (cmd_qtp, response_tracepoint): Likewise.
9254 (collect_data_at_tracepoint): Likewise.
9255 (collect_data_at_step): Likewise.
9256
9257 2012-04-14 Yao Qi <yao@codesourcery.com>
9258
9259 Import gnulib module inttypes.
9260 * aclocal.m4, config.in, configure: Regenerated.
9261
9262 2012-04-14 Yao Qi <yao@codesourcery.com>
9263
9264 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9265 Makefile and config.status at last.
9266
9267 2012-04-13 Yao Qi <yao@codesourcery.com>
9268
9269 * tracepoint.c: Include stdint.h unconditionally.
9270
9271 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9272
9273 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9274 on BFD_HAVE_SYS_PROCFS_TYPE.
9275 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9276 * configure: Regenerate.
9277 * config.in: Likewise.
9278
9279 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9280
9281 * Makefile.in (clean): Also remove x32.c x32-linux.c
9282 x32-avx.c x32-avx-linux.c.
9283 (x32.o): New target.
9284 (x32.c): Likewise.
9285 (x32-linux.o): Likewise.
9286 (x32-linux.c): Likewise.
9287 (x32-avx.o): Likewise.
9288 (x32-avx.c): Likewise.
9289 (x32-avx-linux.o): Likewise.
9290 (x32-avx-linux.c): Likewise.
9291
9292 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9293 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9294 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9295 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9296 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9297 i386/x32-avx-linux.xml.
9298
9299 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9300 (init_registers_x32_avx_linux): Likwise.
9301 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9302 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9303
9304 2012-04-13 Pedro Alves <palves@redhat.com>
9305
9306 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9307 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9308 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9309 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9310 the sub-make.
9311
9312 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9313
9314 * linux-x86-low.c (compat_x32_clock_t): New.
9315 (compat_x32_siginfo_t): Likewise.
9316 (compat_x32_siginfo_from_siginfo): Likewise.
9317 (siginfo_from_compat_x32_siginfo): Likewise.
9318 (linux_is_elf64): Likewise.
9319 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9320 and siginfo_from_compat_x32_siginfo for x32.
9321 (x86_arch_setup): Set linux_is_elf64.
9322
9323 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9324
9325 PR gdb/13969
9326 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9327 e_machine field.
9328 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9329 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9330 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9331 compatible with process.
9332
9333 2012-04-12 Yao Qi <yao@codesourcery.com>
9334
9335 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9336 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9337 (install-only, install-info, clean): Handle sub dir gnulib.
9338 (all-lib, am--refresh): New targets.
9339 (memmem.o): Remove target.
9340 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9341 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9342 (AC_REPLACE_FUNCS): Remove memmem.
9343 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9344 (AC_OUTPUT): Generate Makefile in gnulib/.
9345 * aclocal.m4, config.in, configure: Regenerated.
9346
9347 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9348
9349 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9350
9351 2012-04-05 Pedro Alves <palves@redhat.com>
9352
9353 -Werror=strict-aliasing
9354
9355 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9356 pointer.
9357
9358 2012-04-04 Pedro Alves <palves@redhat.com>
9359
9360 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9361 (sparc_store_gregset_from_stack, sparc_store_gregset)
9362 (sparc_breakpoint_at): Fix formatting.
9363
9364 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9365
9366 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9367 are available.
9368 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9369 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9370 * config.in: Regenerate.
9371 * configure: Likewise.
9372
9373 2012-03-29 Pedro Alves <palves@redhat.com>
9374
9375 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9376 Correct ptrace arguments.
9377
9378 2012-03-28 Pedro Alves <palves@redhat.com>
9379
9380 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9381 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9382 (IA64_FR1_REGNUM): New defines.
9383 (ia64_fetch_register): New.
9384 (the_low_target): Install it.
9385 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9386 field.
9387 * linux-low.c (linux_fetch_registers): Try the
9388 the_low_target.fetch_register hook first.
9389
9390 * linux-arm-low.c (the_low_target): Adjust.
9391 * linux-bfin-low.c (the_low_target): Adjust.
9392 * linux-cris-low.c (the_low_target): Adjust.
9393 * linux-crisv32-low.c (the_low_target): Adjust.
9394 * linux-m32r-low.c (the_low_target): Adjust.
9395 * linux-m68k-low.c (the_low_target): Adjust.
9396 * linux-mips-low.c (the_low_target): Adjust.
9397 * linux-ppc-low.c (the_low_target): Adjust.
9398 * linux-s390-low.c (the_low_target): Adjust.
9399 * linux-sh-low.c (the_low_target): Adjust.
9400 * linux-sparc-low.c (the_low_target): Adjust.
9401 * linux-tic6x-low.c (the_low_target): Adjust.
9402 * linux-x86-low.c (the_low_target): Adjust.
9403 * linux-xtensa-low.c (the_low_target): Adjust.
9404
9405 2012-03-26 Pedro Alves <palves@redhat.com>
9406
9407 * server.c (handle_qxfer_libraries): Don't bail early if
9408 the_target->qxfer_libraries_svr4 is not NULL.
9409
9410 2012-03-26 Pedro Alves <palves@redhat.com>
9411
9412 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9413
9414 2012-03-23 Pedro Alves <palves@redhat.com>
9415
9416 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9417 "library-list-svr4" element's start tag when the the DSO list is
9418 empty.
9419
9420 2012-03-23 Pedro Alves <palves@redhat.com>
9421
9422 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9423 a variable whose type size is the same as the inferior's pointer
9424 size.
9425
9426 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9427
9428 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9429 struct siginfo.
9430 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9431 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9432 * linux-low.h: Include <signal.h>.
9433 (struct siginfo): Remove forward declaration.
9434 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9435 struct siginfo.
9436
9437 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9438
9439 * .gitignore: Ignore more files.
9440
9441 2012-03-19 Pedro Alves <palves@redhat.com>
9442 Jan Kratochvil <jan.kratochvil@redhat.com>
9443
9444 * server.c (cont_thread, general_thread): Add describing comments.
9445 (start_inferior): Clear `cont_thread'.
9446 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9447 of a process.
9448
9449 2012-03-15 Yao Qi <yao@codesourcery.com>
9450
9451 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9452 handling to ...
9453 (cmd_qtdp): ... here.
9454
9455 2012-03-15 Yao Qi <yao@codesourcery.com>
9456
9457 * tracepoint.c (struct tracepoint_action_ops): New.
9458 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9459 (m_tracepoint_action_download): New.
9460 (r_tracepoint_action_download): New.
9461 (x_tracepoint_action_download): New.
9462 (l_tracepoint_action_download): New.
9463 (add_tracepoint_action): Install `action->ops' according type.
9464 (download_tracepoint_1): Move code `download' function pointer
9465 of various tracepoint_action_ops.
9466
9467 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9468
9469 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9470 linux_ptrace_attach_warnings.
9471
9472 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9473
9474 * Makefile.in (linux-ptrace.o): New.
9475 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9476 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9477 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9478 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9479 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9480 of these targets.
9481 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9482
9483 2012-03-08 Yao Qi <yao@codesourcery.com>
9484 Pedro Alves <palves@redhat.com>
9485
9486 Fix PR server/13392.
9487 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9488 offset of JMP insn.
9489 * tracepoint.c (remove_tracepoint): New.
9490 (cmd_qtdp): Call remove_tracepoint when failed to install.
9491
9492 2012-03-07 Pedro Alves <palves@redhat.com>
9493
9494 * linux-low.c (get_detach_signal): New.
9495 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9496 Pass on pending signals to PTRACE_DETACH. Check the result of the
9497 ptrace call.
9498 * server.c (program_signals, program_signals_p): New.
9499 (handle_general_set): Handle QProgramSignals.
9500 * server.h (program_signals, program_signals_p): Declare.
9501
9502 2012-03-05 Pedro Alves <palves@redhat.com>
9503 Jan Kratochvil <jan.kratochvil@redhat.com>
9504
9505 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9506 New comment why.
9507
9508 2012-03-03 Yao Qi <yao@codesourcery.com>
9509
9510 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9511 agent_look_up_symbols.
9512
9513 2012-03-03 Yao Qi <yao@codesourcery.com>
9514
9515 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9516 (linux-x86-low.o): Likewise.
9517 * server.h: Remove in_process_agent_loaded.
9518 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9519 common/agent.c.
9520 Update callers.
9521
9522 2012-03-03 Yao Qi <yao@codesourcery.com>
9523
9524 * tracepoint.c (gdb_agent_capability): New global.
9525 (in_process_agent_loaded_ust): Renamed to
9526 `in_process_agent_supports_ust'.
9527 Update callers.
9528 (in_process_agent_supports_ust): Call agent_capability_check.
9529 (clear_installed_tracepoints): Assert that agent supports
9530 agent.
9531
9532 2012-03-03 Yao Qi <yao@codesourcery.com>
9533
9534 * linux-low.c (linux_supports_agent): New.
9535 (linux_target_ops): Initialize field `supports_agent' with
9536 linux_supports_agent.
9537 * target.h (struct target_ops) <supports_agent>: New.
9538 (target_supports_agent): New macro.
9539 * server.c (handle_general_set): Handle packet 'QAgent'.
9540 (handle_query): Send `QAgent+'.
9541 * Makefile.in (server.o): Depends on agent.h.
9542
9543 2012-03-03 Yao Qi <yao@codesourcery.com>
9544
9545 * Makefile.in (OBS): Add agent.o.
9546 Add new rule for agent.o.
9547 Track dependence of tracepoint.c on agent.h.
9548 * tracepoint.c (run_inferior_command_1):
9549 (run_inferior_command): Call agent_run_command.
9550 (gdb_ust_connect_sync_socket): Deleted. Move it to
9551 common/agent.c.
9552 (resume_thread, stop_thread): Likewise.
9553 (gdb_ust_socket_init): Renamed to ...
9554 (gdb_agent_socket_init): ... New.
9555 (gdb_ust_thread): Renamed to ...
9556 (gdb_agent_helper_thread): ... New.
9557 (gdb_ust_init): Move some code to ...
9558 (gdb_agent_init): ... here. New.
9559 [HAVE_UST]: Call gdb_ust_init.
9560 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9561 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9562 * config.in, configure: Regenerated.
9563
9564 2012-03-02 Pedro Alves <palves@redhat.com>
9565
9566 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9567 * linux-low.c (struct simple_pid_list): New.
9568 (stopped_pids): New a struct simple_pid_list pointer.
9569 (add_to_pid_list, pull_pid_from_list): New.
9570 (handle_extended_wait): Don't assume the first signal new children
9571 report is SIGSTOP. Adjust call to pull_pid_from_list.
9572 (linux_wait_for_lwp): Adjust.
9573
9574 2012-03-02 Yao Qi <yao@codesourcery.com>
9575
9576 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9577 debug log.
9578
9579 2012-03-02 Yao Qi <yao@codesourcery.com>
9580
9581 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9582 `stop_pc' and `tpoint'. Update caller.
9583
9584 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9585
9586 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9587 * linux-low.c (use_linux_regsets): New macro.
9588 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9589 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9590 (linux_register_in_regsets): New function.
9591 (usr_fetch_inferior_registers): Skip registers covered by
9592 regsets.
9593 (usr_store_inferior_registers): Likewise.
9594 (usr_fetch_inferior_registers): New macro.
9595 (usr_store_inferior_registers): Likewise.
9596 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9597 (linux_store_registers): Likewise.
9598 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9599 prototype.
9600 (init_registers_mips64_dsp_linux): Likewise.
9601 (init_registers_mips_linux): New macro.
9602 (init_registers_mips_dsp_linux): Likewise.
9603 (mips_dsp_num_regs): Likewise.
9604 (DSP_BASE, DSP_CONTROL): New fallback macros.
9605 (mips_base_regs): New macro.
9606 (mips_regmap): Use it. Fix the size.
9607 (mips_dsp_regmap): New variable.
9608 (mips_dsp_regset_bitmap): Likewise.
9609 (mips_arch_setup): New function.
9610 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9611 than mips_regmap.
9612 (mips_cannot_store_register): Likewise.
9613 (the_low_target): Update .arch_setup, .num_regs and .regmap
9614 initializers. Add .regset_bitmap initializer.
9615 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9616 initializer.
9617 * linux-bfin-low.c (the_low_target): Likewise.
9618 * linux-cris-low.c (the_low_target): Likewise.
9619 * linux-crisv32-low.c (the_low_target): Likewise.
9620 * linux-ia64-low.c (the_low_target): Likewise.
9621 * linux-m32r-low.c (the_low_target): Likewise.
9622 * linux-m68k-low.c (the_low_target): Likewise.
9623 * linux-ppc-low.c (the_low_target): Likewise.
9624 * linux-s390-low.c (the_low_target): Likewise.
9625 * linux-sh-low.c (the_low_target): Likewise.
9626 * linux-sparc-low.c (the_low_target): Likewise.
9627 * linux-tic6x-low.c (the_low_target): Likewise.
9628 * linux-x86-low.c (the_low_target): Likewise.
9629 * linux-xtensa-low.c (the_low_target): Likewise.
9630 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9631 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9632 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9633 srv_xmlfiles.
9634 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9635 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9636
9637 2012-02-29 Yao Qi <yao@codesourcery.com>
9638 Pedro Alves <palves@redhat.com>
9639
9640 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9641 `step_over_finished' is true.
9642
9643 2012-02-27 Pedro Alves <palves@redhat.com>
9644
9645 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9646 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9647
9648 2012-02-27 Pedro Alves <palves@redhat.com>
9649
9650 PR server/9684
9651 * linux-low.c (pid_is_stopped): New.
9652 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9653
9654 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9655
9656 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9657 of conditions.
9658
9659 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9660
9661 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9662
9663 2012-02-24 Luis Machado <lgustavo@codesourcery>
9664
9665 * server.c (handle_query): Advertise support for target-side
9666 breakpoint condition evaluation.
9667 (process_point_options): New function.
9668 (process_serial_event): When inserting a breakpoint, check for
9669 a target-side condition that should be evaluated.
9670
9671 * mem-break.c: Include regcache.h and ax.h.
9672 (point_cond_list_t): New data structure.
9673 (breakpoint) <cond_list>: New field.
9674 (find_gdb_breakpoint_at): Make non-static.
9675 (delete_gdb_breakpoint_at): Clear any target-side
9676 conditions.
9677 (clear_gdb_breakpoint_conditions): New function.
9678 (add_condition_to_breakpoint): Likewise.
9679 (add_breakpoint_condition): Likewise.
9680 (gdb_condition_true_at_breakpoint): Likewise.
9681 (gdb_breakpoint_here): Return result directly instead
9682 of going through a local variable.
9683
9684 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9685 (clear_gdb_breakpoint_conditions): Likewise.
9686 (add_breakpoint_condition): Likewise.
9687 (gdb_condition_true_at_breakpoint): Likewise.
9688
9689 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9690 (need_step_over_p): Take target-side breakpoint condition into
9691 consideration.
9692
9693 2012-02-24 Luis Machado <lgustavo@codesourcery>
9694
9695 * server.h: Include tracepoint.h.
9696 (agent_mem_read, agent_get_trace_state_variable_value,
9697 agent_set_trace_state_variable_value,
9698 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9699 get_set_tsv_func_addr): New prototypes.
9700
9701 * ax.h: New include file.
9702 * ax.c: New source file.
9703
9704 * tracepoint.c: Include ax.h.
9705 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9706 agent_expr, eval_result_type): Move to ax.h.
9707 (parse_agent_expr): Rename to ...
9708 (gdb_parse_agent_expr): ... this, make it non-static and move
9709 to ax.h.
9710 (unparse_agent_expr) Rename to ...
9711 (gdb_unparse_agent_expr): ... this, make it non-static and move
9712 to ax.h.
9713 (eval_agent_expr): Rename to ...
9714 (eval_tracepoint_agent_expr): ... this.
9715 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9716 forward declarations.
9717 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9718 (agent_get_trace_state_variable_value): New function.
9719 (agent_set_trace_state_variable_value): New function.
9720 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9721 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9722 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9723 (condition_true_at_tracepoint): Likewise.
9724 (parse_agent_expr): Rename to ...
9725 (gdb_parse_agent_expr): ... this and move to ax.c.
9726 (unparse_agent_expr): Rename to ...
9727 (gdb_unparse_agent_expr): ... this and move to ax.c.
9728 (gdb_agent_op_name): Move to ax.c.
9729 (eval_agent_expr): Rename to ...
9730 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9731 and move to ax.c.
9732 (eval_tracepoint_agent_expr): New function.
9733 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9734 non-static.
9735 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9736 ax.c.
9737 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9738 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9739 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9740 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9741 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9742 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9743 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9744 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9745 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9746 (compile_bytecodes): Remove forward declaration.
9747 (is_goto_target): Move to ax.c.
9748 (compile_bytecodes): Move to ax.c and call
9749 agent_get_trace_state_variable_value (...) and
9750 agent_set_trace_state_variable_value (...).
9751
9752 * Makefile.in: Update ax.c and IPA dependencies.
9753
9754 2012-02-24 Pedro Alves <palves@redhat.com>
9755
9756 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9757 (cmd_bigqtbuffer_circular): ... this. Only handle
9758 'QTBuffer:circular:'.
9759 (handle_tracepoint_general_set): Adjust.
9760
9761 2012-02-16 Yao Qi <yao@codesourcery.com>
9762
9763 * inferiors.c: Move code to ...
9764 * dll.c: .... here. New.
9765 * server.h: Declare clear_dlls.
9766 * Makefile.in (SFILES): Add dll.c.
9767 (OBS): Add dll.o
9768 (dll.o): New rule.
9769
9770 2012-02-11 Yao Qi <yao@codesourcery.com>
9771
9772 * server.c: (handle_monitor_command): Add a new parameter
9773 `own_buf'.
9774 (handle_query): Update caller.
9775
9776 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9777
9778 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9779 * configure, config.in: Regenerate.
9780 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9781 is not defined.
9782
9783 2012-02-02 Pedro Alves <palves@redhat.com>
9784
9785 Try SIGKILL first, then PTRACE_KILL.
9786 * linux-low.c (linux_kill_one_lwp): New.
9787 (linux_kill_one_lwp): Rename to ...
9788 (kill_one_lwp_callback): ... this. Use the new
9789 linux_kill_one_lwp.
9790
9791 2012-02-02 Pedro Alves <palves@redhat.com>
9792
9793 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9794 inferior.
9795
9796 2012-01-27 Pedro Alves <palves@redhat.com>
9797
9798 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9799 (elf_64_file_p): Make static.
9800 (linux_pid_exe_is_elf_64_file): New.
9801 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9802 Delete declarations.
9803 (linux_pid_exe_is_elf_64_file): Declare.
9804 * linux-x86-low.c (x86_arch_setup): Use
9805 linux_pid_exe_is_elf_64_file.
9806
9807 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9808
9809 * linux-low.c (linux_wait_for_event_1): Rename to ...
9810 (linux_wait_for_event): ... here and merge it with former
9811 linux_wait_for_event - new variable wait_ptid, use it.
9812 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9813
9814 2012-01-23 Pedro Alves <palves@redhat.com>
9815
9816 * server.c (main): Avoid yet another case of infinite loop while
9817 detaching/killing after a longjmp.
9818
9819 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9820
9821 Code cleanup.
9822 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9823
9824 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9825
9826 * hostio.c (handle_readlink): New function.
9827 (handle_vFile): Call it to handle "vFile:readlink" packets.
9828
9829 2012-01-20 Pedro Alves <palves@redhat.com>
9830 Ulrich Weigand <ulrich.weigand@linaro.org>
9831
9832 * server.c (handle_v_requests): Only support vAttach and vRun to
9833 start multiple processes when in extended protocol mode.
9834
9835 2012-01-17 Pedro Alves <palves@redhat.com>
9836
9837 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9838 memalign plus mprotect to allocate the scratch buffer.
9839
9840 2012-01-13 Pedro Alves <palves@redhat.com>
9841
9842 * server.c (attach_inferior): Clear `cont_thread'.
9843
9844 2012-01-13 Pedro Alves <palves@redhat.com>
9845
9846 * server.c (main): Avoid infinite loop while detaching/killing
9847 after a longjmp.
9848
9849 2012-01-09 Doug Evans <dje@google.com>
9850
9851 * server.c (start_inferior): Set last_ptid in --wrapper case.
9852
9853 2012-01-06 Yao Qi <yao@codesourcery.com>
9854
9855 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9856 defined.
9857 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9858
9859 2012-01-04 Yao Qi <yao@codesourcery.com>
9860
9861 * tracepoint.c (cmd_qtdp): Print debug message
9862 for static tracepoint.
9863
9864 2012-01-04 Yao Qi <yao@codesourcery.com>
9865
9866 * tracepoint.c (trace_vdebug): Differentiate debug message
9867 between gdbserver and IPA.
9868
9869 2012-01-03 Yao Qi <yao@codesourcery.com>
9870
9871 * tracepoint.c (tracepoint_was_hit): Don't collect for
9872 static tracepoint.
9873
9874 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9875
9876 * terminal.h: Reformat copyright header.
9877
9878 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9879
9880 * server.c (gdbserver_version): Update copyright year.
9881 * gdbreplay.c (gdbreplay_version): Likewise.
9882
9883 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9884
9885 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9886
9887 Revert:
9888 2011-12-18 Hui Zhu <teawater@gmail.com>
9889 * linux-low.c (linux_create_inferior): Save return value to ret.
9890
9891 2011-12-18 Hui Zhu <teawater@gmail.com>
9892
9893 * linux-low.c (linux_create_inferior): Save return value to ret.
9894
9895 2011-12-16 Doug Evans <dje@google.com>
9896
9897 * linux-low.c (linux_create_inferior): If stdio connection,
9898 redirect stdin from /dev/null, stdout to stderr.
9899 * remote-utils.c (remote_is_stdio): New static global.
9900 (remote_connection_is_stdio): New function.
9901 (remote_prepare): Handle stdio connection.
9902 (remote_open): Ditto.
9903 (remote_close): Don't close stdin for stdio connections.
9904 (read_prim,write_prim): New functions. Replace all calls to
9905 read/write to these.
9906 * server.c (main): Watch for "-" argument. Move call to
9907 remote_prepare before start_inferior.
9908 * server.h (STDIO_CONNECTION_NAME): New macro.
9909 (remote_connection_is_stdio): Declare.
9910
9911 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9912 in debugging output.
9913
9914 2011-12-15 Yao Qi <yao@codesourcery.com>
9915
9916 * tracepoint.c: Include sys/syscall.h.
9917 (gdb_ust_thread): Remove preprocessor conditional.
9918
9919 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9920
9921 * linux-low.c (linux_detach_one_lwp): Call
9922 the_low_target.prepare_to_resume before detaching.
9923
9924 2011-12-14 Yao Qi <yao@codesourcery.com>
9925
9926 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9927 of write.
9928
9929 2011-12-14 Yao Qi <yao@codesourcery.com>
9930
9931 * i386-low.c (i386_low_stopped_data_address): Initialize local
9932 variable `control'.
9933
9934 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9935
9936 PR remote/13492
9937
9938 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9939 DR_CONTROL unless necessary. Extend comments.
9940 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9941 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9942
9943 2011-12-13 Yao Qi <yao@codesourcery.com>
9944
9945 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9946 macros.
9947 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9948
9949 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9950
9951 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9952 Print new debug message for such case.
9953
9954 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9955
9956 Fix overlapping memcpy.
9957 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9958 the read_inferior_memory transfer.
9959 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9960 write_inferior_memory transfer.
9961 (set_fast_tracepoint_jump): New variable buf. Use it for the
9962 read_inferior_memory and write_inferior_memory transfers.
9963 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9964 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9965 Use it for the write_inferior_memory transfer.
9966 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9967 buffers.
9968
9969 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9970
9971 * linux-low.c (fetch_register, store_register): Make code
9972 consistent, fix formatting.
9973
9974 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9975
9976 * linux-low.c (usr_store_inferior_registers): Factor out code
9977 to handle individual registers into...
9978 (store_register): ... this new function.
9979
9980 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9981
9982 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9983 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9984 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9985 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9986 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9987 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9988 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9989 (srv_xmlfiles): Add new XML files.
9990
9991 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9992 and <sys/uio.h>.
9993 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9994 (init_registers_s390_linux32v1): Add prototype.
9995 (init_registers_s390_linux32v2): Likewise.
9996 (init_registers_s390_linux64v1): Likewise.
9997 (init_registers_s390_linux64v2): Likewise.
9998 (init_registers_s390x_linux64v1): Likewise.
9999 (init_registers_s390x_linux64v2): Likewise.
10000 (s390_num_regs): Increment to 52.
10001 (s390_regmap): Add orig_r2 register.
10002 (s390_num_regs_3264): Increment to 68.
10003 (s390_regmap_3264): Add orig_r2 register.
10004 (s390_collect_ptrace_register): Handle orig_r2 register.
10005 (s390_supply_ptrace_register): Likewise.
10006 (s390_fill_last_break): New function.
10007 (s390_store_last_break): Likewise.
10008 (s390_fill_system_call): New function.
10009 (s390_store_system_call): Likewise.
10010 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10011 register sets.
10012 (s390_check_regset): New function.
10013 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10014 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10015 Update target_regsets for available register sets.
10016
10017 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10018 Jan Kratochvil <jan.kratochvil@redhat.com>
10019
10020 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10021 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10022 New.
10023 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10024 * linux-low.h (struct process_info_private): New member r_debug.
10025 * server.c (handle_qxfer_libraries): Call
10026 the_target->qxfer_libraries_svr4.
10027 (handle_qxfer_libraries_svr4): New function.
10028 (qxfer_packets): New entry "libraries-svr4".
10029 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10030 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10031 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10032 PACKET_qXfer_libraries_svr4.
10033
10034 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10035
10036 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10037 PSW address/mask between 8-byte and 16-byte formats.
10038 (s390_supply_ptrace_register): Likewise.
10039 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10040 basic addressing mode bit.
10041
10042 2011-11-24 Stan Shebs <stan@codesourcery.com>
10043
10044 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10045
10046 2011-11-17 Stan Shebs <stan@codesourcery.com>
10047
10048 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10049 (tracing_start_time): New global.
10050 (tracing_stop_time): New global.
10051 (tracing_user_name): New global.
10052 (tracing_notes): New global.
10053 (tracing_stop_note): New global.
10054 (cmd_qtstart): Set traceframe_usage, start_time.
10055 (stop_tracing): Set stop_time.
10056 (cmd_qtstatus): Report additional status.
10057 (cmd_qtp): New function.
10058 (handle_tracepoint_query): Call it.
10059 (cmd_qtnotes): New function.
10060 (handle_tracepoint_general_set): Call it.
10061 (get_timestamp): Rename from tsv_get_timestamp.
10062
10063 2011-11-14 Stan Shebs <stan@codesourcery.com>
10064 Kwok Cheung Yeung <kcy@codesourcery.com>
10065
10066 * linux-x86-low.c (small_jump_insn): New.
10067 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10068 trampoline and error message, build a trampoline and issue a small
10069 jump instruction to it.
10070 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10071 trampoline and error message.
10072 (x86_get_min_fast_tracepoint_insn_len): New.
10073 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10074 * linux-low.h (struct linux_target_ops): Add arguments to
10075 install_fast_tracepoint_jump_pad operation, add new operation.
10076 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10077 arguments.
10078 (linux_get_min_fast_tracepoint_insn_len): New function.
10079 (linux_target_op): Add new operation.
10080 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10081 (gdb_trampoline_buffer_end): Ditto.
10082 (gdb_trampoline_buffer_error): Ditto.
10083 (struct ipa_sym_addresses): Add fields for new IPA variables.
10084 (symbol_list): Add entries for new IPA variables.
10085 (struct tracepoint): Add fields to hold the address range of the
10086 trampoline used by the tracepoint.
10087 (trampoline_buffer_head): New static variable.
10088 (trampoline_buffer_tail): Ditto.
10089 (claim_trampoline_space): New function.
10090 (have_fast_tracepoint_trampoline_buffer): New function.
10091 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10092 structure.
10093 (install_fast_tracepoint): Ditto, also add error buffer argument.
10094 (cmd_qtminftpilen): New function.
10095 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10096 (fast_tracepoint_from_trampoline_address): New function.
10097 (fast_tracepoint_collecting): Handle trampoline as part of jump
10098 pad space.
10099 (set_trampoline_buffer_space): New function.
10100 (initialize_tracepoint): Initialize new IPA variables.
10101 * target.h (struct target_ops): Add arguments to
10102 install_fast_tracepoint_jump_pad operation, add new
10103 get_min_fast_tracepoint_insn_len operation.
10104 (target_get_min_fast_tracepoint_insn_len): New.
10105 (install_fast_tracepoint_jump_pad): Add arguments.
10106 * server.h (IPA_BUFSIZ): Define.
10107 * linux-i386-ipa.c: Include extra header files.
10108 (initialize_fast_tracepoint_trampoline_buffer): New function.
10109 (initialize_low_tracepoint): Call it.
10110 * server.h (set_trampoline_buffer_space): Declare.
10111 (claim_trampoline_space): Ditto.
10112 (have_fast_tracepoint_trampoline_buffer): Ditto.
10113
10114 2011-11-14 Yao Qi <yao@codesourcery.com>
10115
10116 * server.c (handle_query): Handle InstallInTrace for qSupported.
10117 * tracepoint.c (add_tracepoint): Sort list.
10118 (install_tracepoint, download_tracepoint): New.
10119 (cmd_qtdp): Call them to install and download tracepoints.
10120 (sort_tracepoints): Removed.
10121 (cmd_qtstart): Update.
10122
10123 2011-11-14 Yao Qi <yao@codesourcery.com>
10124
10125 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10126 * mem-break.h: Declare.
10127 * tracepoint.c (cmd_qtstart): Move some code to ...
10128 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10129 New.
10130 (download_tracepoints): Move some code to ...
10131 (download_tracepoint_1): ... here. New.
10132
10133 2011-11-08 Yao Qi <yao@codesourcery.com>
10134
10135 * remote-utils.c (relocate_instruction): A comment fix.
10136
10137 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10138
10139 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10140 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10141 dr_status_mirror and dr_control_mirror from debug_reg_state.
10142 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10143 (i386_initial_stuff): Remove use of deleted globals.
10144 (i386_get_thread_context, i386_set_thread_context,
10145 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10146 from debug_reg_state.
10147
10148 2011-11-05 Yao Qi <yao@codesourcery.com>
10149
10150 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10151 address as TPOINT's.
10152
10153 2011-11-02 Stan Shebs <stan@codesourcery.com>
10154
10155 * tracepoint.c (agent_mem_read_string): New function.
10156 (eval_agent_expr): Call it for tracenz.
10157 * server.c (handle_query): Report support for tracenz.
10158
10159 2011-11-02 Yao Qi <yao@codesourcery.com>
10160
10161 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10162
10163 2011-11-02 Yao Qi <yao@codesourcery.com>
10164
10165 * target.h: Fix a typo in comment.
10166
10167 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10168
10169 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10170 clobber the breakpoints' shadows with fast tracepoint jumps.
10171 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10172 * target.c (write_inferior_memory): Also pass MYADDR down to
10173 check_mem_write.
10174
10175 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10176
10177 * configure.ac: Check support for personality routine.
10178 * configure: Regenerate.
10179 * config.in: Likewise.
10180 * linux-low.c: Include <sys/personality.h>.
10181 Define ADDR_NO_RANDOMIZE if necessary.
10182 (linux_create_inferior): Disable address space randomization when
10183 forking inferior, if requested.
10184 (linux_supports_disable_randomization): New function.
10185 (linux_target_ops): Install it.
10186 * server.h (disable_randomization): Declare.
10187 * server.c (disable_randomization): New global variable.
10188 (handle_general_set): Handle QDisableRandomization.
10189 (handle_query): Likewise for qSupported.
10190 (main): Support --disable-randomization and --no-disable-randomization
10191 command line arguments.
10192 * target.h (struct target_ops): Add supports_disable_randomization.
10193 (target_supports_disable_randomization): New macro.
10194
10195 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10196
10197 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10198 ifdef check.
10199 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10200 [!PT_GETDSBT] (target_loadmap): New definition.
10201 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10202 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10203 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10204 and PT_GETDSBT to LINUX_LOADMAP.
10205 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10206 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10207
10208 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10209
10210 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10211 (arm_linux_hwbp_cap): New static variable.
10212 (arm_linux_get_hwbp_cap): Replace by ...
10213 (arm_linux_init_hwbp_cap): ... this new function.
10214 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10215 (arm_linux_get_hw_watchpoint_count): Likewise.
10216 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10217 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10218 (arm_prepare_to_resume): Use perror_with_name instead of error.
10219
10220 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10221
10222 * linux-arm-low.c: Include <signal.h>.
10223 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10224 (struct arm_linux_hwbp_cap): New data type.
10225 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10226 (struct arm_linux_hw_breakpoint): New data type.
10227 (MAX_BPTS, MAX_WPTS): Define.
10228 (struct arch_process_info, struct arch_lwp_info): New data types.
10229 (arm_linux_get_hwbp_cap): New function.
10230 (arm_linux_get_hw_breakpoint_count): Likewise.
10231 (arm_linux_get_hw_watchpoint_count): Likewise.
10232 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10233 (arm_hwbp_control_initialize): Likewise.
10234 (arm_hwbp_control_is_enabled): Likewise.
10235 (arm_hwbp_control_is_initialized): Likewise.
10236 (arm_hwbp_control_disable): Likewise.
10237 (arm_linux_hw_breakpoint_equal): Likewise.
10238 (arm_linux_hw_point_initialize): Likewise.
10239 (struct update_registers_data): New data structure.
10240 (update_registers_callback: New function.
10241 (arm_insert_point): Likewise.
10242 (arm_remove_point): Likewise.
10243 (arm_stopped_by_watchpoint): Likewise.
10244 (arm_stopped_data_address): Likewise.
10245 (arm_new_process): Likewise.
10246 (arm_new_thread): Likewise.
10247 (arm_prepare_to_resume): Likewise.
10248 (the_low_target): Register arm_insert_point, arm_remove_point,
10249 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10250 arm_new_thread, and arm_prepare_to_resume.
10251
10252 2011-09-15 Stan Shebs <stan@codesourcery.com>
10253
10254 * server.h (struct emit_ops): Add compare-goto fields.
10255 * tracepoint.c (gdb_agent_op_sizes): New table.
10256 (emit_eq_goto): New function.
10257 (emit_ne_goto): New function.
10258 (emit_lt_goto): New function.
10259 (emit_le_goto): New function.
10260 (emit_gt_goto): New function.
10261 (emit_ge_goto): New function.
10262 (is_goto_target): New function.
10263 (compile_bytecodes): Recognize special cases of compare-goto
10264 combinations and call specialized emitters for them.
10265 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10266 (amd64_emit_ne_goto): New function.
10267 (amd64_emit_lt_goto): New function.
10268 (amd64_emit_le_goto): New function.
10269 (amd64_emit_gt_goto): New function.
10270 (amd64_emit_ge_goto): New function.
10271 (amd64_emit_ops): Add the new functions.
10272 (i386_emit_eq_goto): New function.
10273 (i386_emit_ne_goto): New function.
10274 (i386_emit_lt_goto): New function.
10275 (i386_emit_le_goto): New function.
10276 (i386_emit_gt_goto): New function.
10277 (i386_emit_ge_goto): New function.
10278 (i386_emit_ops): Add the new functions.
10279
10280 2011-09-08 Stan Shebs <stan@codesourcery.com>
10281
10282 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10283 (i386_emit_epilogue): Restore %ebx.
10284
10285 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10286
10287 * server.c (step_thread): Remove definition.
10288 (process_serial_event): Don't handle Hs.
10289 * server.h (step_thread): Remove declaration.
10290 * target.c (set_desired_inferior): Remove use of step_thread.
10291
10292 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10293
10294 * linux-low.c: Include linux-procfs.h.
10295 (linux_attach_lwp_1): Update comments.
10296 (linux_attach): Scan for existing threads when attaching to a
10297 process that is the tgid.
10298 * Makefile.in: Update dependencies.
10299
10300 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10301
10302 * configure.srv: Add linux-procfs.o dependencies.
10303
10304 2011-08-14 Yao Qi <yao@codesourcery.com>
10305
10306 * target.h (struct target_ops): Fix indent.
10307 * win32-low.c (win32_target_ops): Fix comment.
10308
10309 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10310 Yao Qi <yao@codesourcery.com>
10311
10312 * Makefile.in (clean): Remove tic6x-*.c files.
10313 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10314 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10315 (tic6x-c64xp-linux.c): Likewise.
10316 * configure.srv: Add support for tic6x-*-uclinux.
10317 * linux-tic6x-low.c: New.
10318 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10319
10320 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10321 Yao Qi <yao@codesourcery.com>
10322
10323 * target.h (struct target_ops): Add read_loadmap.
10324 * linux-low.c (struct target_loadseg): New type.
10325 (struct target_loadmap): New type.
10326 (linux_read_loadmap): New function.
10327 (linux_target_ops): Add linux_read_loadmap.
10328 * server.c (handle_query): Support qXfer:fdpic:read packet.
10329 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10330 to NULL.
10331
10332 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10333
10334 * win32-low.c: Include <stdint.h>.
10335
10336 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10337
10338 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10339 to the inferior here.
10340 (i386_remove_aligned_watchpoint): Ditto.
10341 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10342 fit part of the watchpoint in the debug registers.
10343 (i386_update_inferior_debug_regs): New.
10344 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10345 registers, and only update the inferior on success.
10346 (i386_low_remove_watchpoint): Ditto.
10347
10348 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10349
10350 * linux-low.c (compare_ints, unique, list_threads, show_process,
10351 linux_core_of_thread): Delete.
10352 (linux_target_ops): Change linux_core_of_thread to
10353 linux_common_core_of_thread.
10354 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10355 * utils.c (malloc_failure): Change type of argument.
10356 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10357 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10358 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10359 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10360 (IPA_OBJS): Add common-utils-ipa.o.
10361 (ptid_h, linux_osdata_h): New macros.
10362 (server_h): Add common/common-utils.h, common/xml-utils.h,
10363 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10364 common/ptid.h.
10365 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10366 ptid.o, buffer.o): New rules.
10367 (linux-low.o): Add common/linux-osdata.h as a dependency.
10368 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10369 * configure.ac: Add AC_HEADER_DIRENT check.
10370 * config.in: Regenerate.
10371 * configure: Regenerate.
10372 * remote-utils.c (xml_escape_text): Delete.
10373 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10374 buffer_xml_printf): Move to common/buffer.c.
10375 * server.c (main): Remove call to initialize_inferiors.
10376 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10377 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10378 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10379 internal_error, gdb_assert, gdb_assert_fail): Delete.
10380 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10381 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10382 common/buffer.h.
10383 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10384 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10385 initialize_inferiors): Delete.
10386
10387 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10388
10389 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10390 symbol error.
10391
10392 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10393
10394 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10395 assertion.
10396 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10397
10398 2011-05-26 Yao Qi <yao@codesourcery.com>
10399
10400 * Makefile.in (thread-db.o): Track dependence to
10401 common/gdb_thread_db.h.
10402 * thread-db.c: include gdb_thread_db.h from right place.
10403
10404 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10405
10406 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10407 __FILE__ and __LINE__ to internal_error.
10408
10409 2011-05-13 Doug Evans <dje@google.com>
10410
10411 * thread-db.c (try_thread_db_load_from_sdir): New function.
10412 (try_thread_db_load_from_dir): New function.
10413 (thread_db_load_search): Handle $sdir, ignore $pdir.
10414 Remove trying of system directories if search of
10415 libthread-db-search-path fails, that is now done via $sdir.
10416
10417 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10418
10419 * server.c (handle_query): Add EnableDisableTracepoints to the list
10420 of supported features.
10421 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10422 tracepoints.
10423 (cmd_qtenable_disable): New.
10424 (cmd_qtstart): Install tracepoints even if disabled.
10425 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10426 receiving a QTEnable or QTDisable packet.
10427 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10428 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10429 tracepoints.
10430 (gdb_probe): Skip data collection if static tracepoint is disabled.
10431
10432 2011-05-10 Doug Evans <dje@google.com>
10433
10434 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10435
10436 2011-05-04 Doug Evans <dje@google.com>
10437
10438 * linux-low.c (linux_join): Skip process lookup.
10439 * spu-low.c (spu_join): Ditto.
10440 * server.c (join_inferiors_callback): Delete.
10441 (process_serial_event): For 'D' packet (detach) call join_inferior
10442 directly.
10443
10444 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10445
10446 * README: Don't mention xscale*-*-linux*.
10447 * configure.srv (xscale*-*-linux*): Don't handle target.
10448
10449 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10450
10451 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10452 casting pointers.
10453 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10454 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10455 (i386_emit_void_call_2): Likewise.
10456
10457 2011-04-26 Yao Qi <yao@codesourcery.com>
10458
10459 * linux-low.c: Move common macros to linux-ptrace.h.
10460 Include linux-ptrace.h.
10461 * Makefile.in (linux_ptrace_h): New.
10462 (linux-low.o): Depends on linux-ptrace.h.
10463
10464 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10465
10466 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10467 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10468 (remote_prepare): New function with most of the TCP code from ...
10469 (remote_open): ... here. Detect PORT here unconditionally. Move also
10470 setting transport_is_reliable.
10471 * server.c (run_once): New variable.
10472 (gdbserver_usage): Document it.
10473 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10474 the first run if RUN_ONCE.
10475 * server.h (run_once, remote_prepare): New declarations.
10476
10477 2011-04-19 Tom Tromey <tromey@redhat.com>
10478
10479 * win32-low.c (handle_load_dll): Remove duplicate "the".
10480
10481 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10482
10483 Remove support for old Cygwin 1.5 versions.
10484 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10485 function to avoid warning.
10486 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10487 warning.
10488
10489 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10490
10491 * gdbserver/server.h (Macro _): Define it if not available.
10492
10493 2011-03-14 Michael Snyder <msnyder@vmware.com>
10494
10495 * hostio.c (handle_close): Remove unnecessary null test.
10496
10497 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10498
10499 * Makefile.in (maintainer-clean realclean distclean): Remove
10500 "make ... subdir_do" command.
10501
10502 2011-03-10 Michael Snyder <msnyder@vmware.com>
10503
10504 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10505
10506 * server.c (handle_v_run): Free alloced buffer on early return.
10507
10508 2011-03-09 Yao Qi <yao@codesourcery.com>
10509
10510 Revert:
10511 2011-03-04 Yao Qi <yao@codesourcery.com>
10512
10513 * Makefile.in: Remove GNU make feature --directory.
10514
10515 2011-03-05 Yao Qi <yao@codesourcery.com>
10516
10517 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10518 (subdir_do): New make target. Copied from gdb/Makefile.
10519 (maintainer-clean, realclean, distclean, clean): Call corresponding
10520 make targets in common/Makefile.
10521
10522 2011-02-11 Yao Qi <yao@codesourcery.com>
10523
10524 * configure.ac: Call AC_PROG_RANLIB.
10525 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10526 * configure: Regenerate.
10527
10528 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10529
10530 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10531
10532 2011-03-06 Yao Qi <yao@codesourcery.com>
10533
10534 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10535
10536 2011-03-05 Yao Qi <yao@codesourcery.com>
10537
10538 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10539 (subdir_do): New make target. Copied from gdb/Makefile.
10540 (maintainer-clean, realclean, distclean, clean): Call corresponding
10541 make targets in common/Makefile.
10542
10543 2011-03-04 Yao Qi <yao@codesourcery.com>
10544
10545 * Makefile.in: Remove GNU make feature --directory.
10546
10547 2011-03-04 Michael Snyder <msnyder@vmware.com>
10548
10549 * server.c (queue_stop_reply): Call xmalloc not malloc.
10550
10551 2011-03-02 Michael Snyder <msnyder@vmware.com>
10552
10553 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10554
10555 2011-02-28 Michael Snyder <msnyder@vmware.com>
10556
10557 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10558 (cmd_qtframe): Ditto.
10559 (cmd_qtbuffer): Ditto.
10560 (cmd_bigqtbuffer): Ditto.
10561
10562 * utils.c (decimal2str): Initialize 'width' to nine, then
10563 don't mess with it.
10564
10565 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10566
10567 * hostio.c (require_data): Free *data, not data.
10568
10569 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10570
10571 * hostio.c (require_data): Use free, not xfree.
10572
10573 2011-02-27 Michael Snyder <msnyder@vmware.com>
10574
10575 * server.c (handle_query): Discard unused value.
10576
10577 * hostio.c (require_data): Free malloc memory before returning
10578 error.
10579
10580 2011-02-26 Michael Snyder <msnyder@vmware.com>
10581
10582 * linux-low.c (list_threads): Call closedir for dirent.
10583
10584 2011-02-27 Michael Snyder <msnyder@vmware.com>
10585
10586 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10587 a case statement falls through.
10588
10589 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10590
10591 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10592 in comparison.
10593
10594 2011-02-26 Michael Snyder <msnyder@vmware.com>
10595
10596 * utils.c (decimal2str): Eliminate dead code and dead param.
10597 (pulongest): Drop dead param from call to decimal2str.
10598 (plongest): Ditto.
10599
10600 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10601
10602 Revert the following patch (not approved yet):
10603 2011-02-21 Hui Zhu <teawater@gmail.com>
10604 * tracepoint.c (tp_printf): New function.
10605 (eval_agent_expr): Handle gdb_agent_op_printf.
10606
10607 2011-02-21 Hui Zhu <teawater@gmail.com>
10608
10609 * tracepoint.c (tp_printf): New function.
10610 (eval_agent_expr): Handle gdb_agent_op_printf.
10611
10612 2011-02-18 Tom Tromey <tromey@redhat.com>
10613
10614 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10615 (tracepoint.o): Likewise.
10616 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10617 (gdb_agent_op_names): Likewise.
10618
10619 2011-02-18 Tom Tromey <tromey@redhat.com>
10620
10621 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10622 gdb_agent_op_rot>: New constants.
10623 (gdb_agent_op_names): Add pick and roll.
10624 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10625 cases.
10626
10627 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10628
10629 * aclocal.m4: Regenerated with aclocal-1.11.1.
10630
10631 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10632
10633 * server.c (handle_qxfer_traceframe_info): New.
10634 (qxfer_packets): Register "traceframe-info".
10635 (handle_query): Report support for qXfer:traceframe-info:read+.
10636 * tracepoint.c (match_blocktype): New.
10637 (traceframe_find_block_type): Rename to ...
10638 (traceframe_walk_blocks): ... this. Add callback filter argument,
10639 and use it.
10640 (traceframe_find_block_type): New, reimplemented on top of
10641 traceframe_walk_blocks.
10642 (build_traceframe_info_xml): New.
10643 (traceframe_read_info): New.
10644 * server.h (traceframe_read_info): Declare.
10645
10646 2011-02-11 Yao Qi <yao@codesourcery.com>
10647
10648 * configure.ac: Call AC_PROG_RANLIB.
10649 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10650 * configure: Regenerate.
10651
10652 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10653
10654 * server.c (gdb_read_memory): Change return semantics to allow
10655 partial transfers.
10656 (handle_search_memory_1): Adjust.
10657 (process_serial_event) <'m' packet>: Handle partial transfers.
10658 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10659
10660 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10661
10662 * regcache.c (init_register_cache): Initialize
10663 regcache->register_status.
10664 (free_register_cache): Release regcache->register_status.
10665 (regcache_cpy): Copy register_status.
10666 (registers_to_string): Print 'x's for unavailable registers.
10667 (supply_register): Mark the register's status valid or
10668 unavailable, depending on whether a buffer was passed in or not.
10669 (supply_register_zeroed): New.
10670 (supply_regblock): Mark the registers' status valid or
10671 unavailable, depending on whether a buffer was passed in or not.
10672 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10673 (struct regcache): New `register_status' field.
10674 (supply_register_zeroed): Declare.
10675 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10676 supply_register_zeroed, rather than passing a NULL buffer to
10677 supply_register.
10678 * tracepoint.c (fetch_traceframe_registers): Update comment.
10679
10680 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10681
10682 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10683 buffer explicit.
10684
10685 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10686
10687 * server.h (decode_xfer_write): Change prototype.
10688 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10689 and don't extract the annex here.
10690 * server.c (decode_xfer_read): Remove `annex' parameter,
10691 and don't extract the annex here.
10692 (decode_xfer): New.
10693 (struct qxfer): New.
10694 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10695 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10696 (handle_qxfer_statictrace): New functions, abstracted out from
10697 handle_query, and made to use the struct qxfer interface.
10698 (handle_threads_qxfer_proper): Rename to ...
10699 (handle_qxfer_threads_proper): ... this.
10700 (handle_threads_qxfer): Rename to ...
10701 (handle_qxfer_threads): ... this. Adjust.
10702 (qxfer_packets): New array.
10703 (handle_qxfer): New function.
10704 (handle_query): Use handle_qxfer.
10705
10706 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10707
10708 * gdbreplay.c: Shorten lines of >= 80 columns.
10709 * linux-low.c: Ditto.
10710 * linux-ppc-low.c: Ditto.
10711 * linux-s390-low.c: Ditto.
10712 * linux-sparc-low.c: Ditto.
10713 * linux-x86-low.c: Ditto.
10714 * linux-xtensa-low.c: Ditto.
10715 * mem-break.c: Ditto.
10716 * nto-low.c: Ditto.
10717 * regcache.h: Ditto.
10718 * remote-utils.c: Ditto.
10719 * server.c: Ditto.
10720 * server.h: Ditto.
10721 * thread-db.c: Ditto.
10722 * tracepoint.c: Ditto.
10723 * utils.c: Ditto.
10724 * win32-low.h: Ditto.
10725
10726 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10727
10728 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10729 update.
10730
10731 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10732
10733 * server.c (gdbserver_version): Update copyright year in version
10734 output.
10735 * gdbreplay.c (gdbreplay_version): Ditto.
10736
10737 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10738
10739 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10740 * linux-bfin-low.c: New file.
10741 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10742 PT_DATA_ADDR for BFIN targets.
10743 * Makefile.in (SFILES): Add linux-bfin-low.c.
10744 (clean): Remove reg-bfin.c.
10745 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10746 * README: Mention supported Blackfin targets.
10747
10748 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10749
10750 * .gitignore: New file.
10751
10752 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10753
10754 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10755
10756 2010-10-22 Jie Zhang <jie@codesourcery.com>
10757
10758 * Makefile.in: Add FLAGS_TO_PASS variable.
10759 (install): Remove dependency of install-only and recursively
10760 invoke make for install-only.
10761
10762 2010-10-04 Doug Evans <dje@google.com>
10763
10764 * Makefile.in (uninstall): Use $(DESTDIR).
10765
10766 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10767
10768 PR gdb/11842
10769
10770 * linux-x86-low.c (compat_siginfo_from_siginfo)
10771 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10772 si_code is < 0. Check for si_code == SI_TIMER before checking for
10773 si_code < 0.
10774
10775 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10776
10777 * lynx-i386-low.c: New file.
10778 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10779
10780 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10781
10782 * lynx-low.c (ptrace_request_to_str): Remove handling for
10783 request values that have been removed in LynxOS 5.x.
10784
10785 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10786
10787 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10788 <ptrace.h>
10789
10790 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10791
10792 * configure.ac: Add --enable-inprocess-agent option.
10793 * configure: Rebuilt.
10794
10795 2010-09-06 Yao Qi <yao@codesourcery.com>
10796
10797 * linux-low.c (linux_kill): Remove unused variable.
10798 (linux_stabilize_threads): Likewise.
10799 * server.c (start_inferior): Likewise.
10800 (queue_stop_reply_callback): Likewise.
10801 * tracepoint.c (do_action_at_tracepoint): Likewise.
10802
10803 2010-09-06 Yao Qi <yao@codesourcery.com>
10804
10805 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10806 on return.
10807
10808 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10809
10810 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10811
10812 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10813
10814 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10815 "$(IPA_DEPFILES)".
10816
10817 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10818
10819 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10820 gdbserver/lynx-ppc-low.c: New files.
10821 * Makefile.in (lynx_low_h): New variable.
10822 (lynx-low.o, lynx-ppc-low.o): New rules.
10823 * configure.ac: On LynxOS, link with -lnetinet.
10824 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10825 * configure: regenerate.
10826
10827 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10828
10829 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10830 * configure.ac: Add check for vasprintf and vsnprintf.
10831 * configure, config.in: Regenerate.
10832 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10833
10834 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10835
10836 * gdbreplay.c: Move include of alloca.h up, next to include of
10837 malloc.h.
10838 * server.h: Add include of malloc.h.
10839 * mem-break.c: Remove include of malloc.h.
10840 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10841
10842 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10843
10844 * Makefile.in (memmem.o): Build with -Wno-error.
10845
10846 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10847
10848 * utils.c (xsnprintf): Make non-static.
10849 * server.h: Add xsnprintf declaration.
10850 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10851 replace calls to snprintf by calls to xsnprintf throughout.
10852
10853 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10854
10855 * configure.ac: Add configure check for alloca.
10856 * configure, config.in: Regenerate.
10857 * server.h: Include alloca.h if it exists.
10858 * gdbreplay.c: Include alloca.h if it exists.
10859
10860 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10861
10862 * linux-low.c (__SIGRTMIN): Define if not already defined.
10863 (linux_create_inferior): Check for __ANDROID__ rather than
10864 __SIGRTMIN.
10865 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10866 are already deferred.
10867 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10868 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10869 stopped and already has a pending signal to report.
10870 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10871 a pending signal to report or is moving out of a jump pad.
10872 (linux_init_signals): Check for __ANDROID__ rather than
10873 __SIGRTMIN.
10874
10875 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10876
10877 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10878 debug_threads check. Avoid a linear search when not doing debug
10879 output.
10880
10881 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10882
10883 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10884 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10885 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10886 (process_event): Change local fd's type to gdb_fildes_t.
10887 (create_file_handler): Adjust prototype.
10888 (delete_file_handler): Adjust prototype.
10889 (handle_file_event): Adjust prototype. Use pfildes.
10890 (create_file_event): Adjsut prototype.
10891 * remote-utils.c (remote_desc, listen_desc): Change type to
10892 gdb_fildes_t.
10893 * server.h: New gdb_fildes_t typedef.
10894 [USE_WIN32API]: Include winsock2.h.
10895 (delete_file_handler, add_file_handler): Adjust prototypes.
10896 (pfildes): Declare.
10897 * utils.c (pfildes): New.
10898
10899 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10900
10901 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10902 * configure: Regenerate.
10903
10904 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10905
10906 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10907 (linux_done_accessing_memory): ... this.
10908 (linux_target_ops): Adjust.
10909 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10910 * nto-low.c (nto_target_ops): Adjust comment.
10911 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10912 * spu-low.c (spu_target_ops): Adjust comment.
10913 * target.h (target_ops): Rename unprepare_to_access_memory field
10914 to done_accessing_memory.
10915 (unprepare_to_access_memory): Rename to ...
10916 (done_accessing_memory): ... this.
10917
10918 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10919
10920 * linux-low.c (linux_prepare_to_access_memory): New.
10921 (linux_unprepare_to_access_memory): New.
10922 (linux_target_ops): Install them.
10923 * server.c (read_memory): Rename to ...
10924 (gdb_read_memory): ... this. Use
10925 prepare_to_access_memory/prepare_to_access_memory.
10926 (write_memory): Rename to ...
10927 (gdb_write_memory): ... this. Use
10928 prepare_to_access_memory/prepare_to_access_memory.
10929 (handle_search_memory_1): Adjust.
10930 (process_serial_event): Adjust.
10931 * target.h (struct target_ops): New fields
10932 prepare_to_access_memory and unprepare_to_access_memory.
10933 (prepare_to_access_memory, unprepare_to_access_memory): New.
10934 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10935 prepare_to_access_memory/prepare_to_access_memory.
10936 * nto-low.c (nto_target_ops): Adjust.
10937 * spu-low.c (spu_target_ops): Adjust.
10938 * win32-low.c (win32_target_ops): Adjust.
10939
10940 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10941
10942 * Makefile.in (WARN_CFLAGS): Get it from configure.
10943 (WERROR_CFLAGS): New.
10944 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10945 * configure.ac: Introduce --enable-werror, which adds -Werror to
10946 the compiler command line. Enabled by default. Disable with
10947 --disable-werror. Add -Wdeclaration-after-statement
10948 Wpointer-arith and -Wformat-nonliteral to warning flags.
10949 * configure: Regenerate.
10950
10951 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10952
10953 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10954
10955 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10956
10957 * gdbreplay.c (remote_error): New.
10958 (gdbchar): New.
10959 (expect): Use gdbchar. Check for error reading from GDB.
10960 Clarify sync error output.
10961 (play): Check for errors writing to GDB.
10962 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10963 * remote-utils.c (getpkt): Check for errors writing to the remote
10964 descriptor.
10965
10966 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10967
10968 * linux-low.c (linux_wait_1): Move non-debugging code out of
10969 `debug_threads' control.
10970
10971 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10972
10973 * linux-low.c (linux_wait_1): Don't set last_status here.
10974 * server.c (push_event, queue_stop_reply_callback): Assert we're
10975 not pushing a TARGET_WAITKIND_IGNORE event.
10976 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10977 (myresume, handle_target_event): Set the thread's last_resume_kind
10978 and last_status from the target returned status.
10979
10980 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10981
10982 PR threads/10729
10983
10984 * linux-x86-low.c (update_debug_registers_callback): New.
10985 (i386_dr_low_set_addr): Use it.
10986 (i386_dr_low_get_addr): New.
10987 (i386_dr_low_set_control): Use update_debug_registers_callback.
10988 (i386_dr_low_get_control): New.
10989 (i386_dr_low_get_status): Adjust.
10990 * linux-low.c (linux_stop_lwp): New.
10991 * linux-low.h (linux_stop_lwp): Declare.
10992
10993 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10994 argument instead of a i386_debug_reg_state.
10995 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10996 a i386_debug_reg_state.
10997 (i386_insert_aligned_watchpoint): Adjust.
10998 (i386_remove_aligned_watchpoint): Adjust.
10999 (i386_low_stopped_data_address): Read the debug registers from the
11000 inferior instead of from the mirrors.
11001 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11002 (i386_dr_low_get_addr): Declare.
11003 (i386_dr_low_get_control): Declare.
11004 (i386_dr_low_get_status): Change prototype.
11005
11006 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11007 (i386_dr_low_get_addr): New.
11008 (i386_dr_low_get_control): New.
11009 (i386_dr_low_get_status): Adjust prototype. Return
11010 dr_status_mirror.
11011 (i386_initial_stuff): Clear dr_status_mirror and
11012 dr_control_mirror.
11013 (i386_get_thread_context): Adjust.
11014 (i386_set_thread_context): Adjust.
11015 (i386_thread_added): Adjust.
11016
11017 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11018
11019 * linux-low.h (linux_thread_area): Delete declaration.
11020
11021 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11022
11023 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11024 after its termination.
11025
11026 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11027
11028 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11029 (gdb_wants_all_stopped): Delete.
11030 (linux_wait_1): Don't call them.
11031 * server.c (handle_v_cont): Tag all threads as want-stopped.
11032 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11033 stopped as "client-wants-stopped".
11034
11035 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11036
11037 * Makefile.in (signals_h): New.
11038 (server_h): Depend on it.
11039 (server.o): Don't depend on $(signals_def).
11040 (signals.o): Depend on $(signals_def).
11041
11042 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11043
11044 * Makefile.in (signals_def): New.
11045 (server_h): Append include/gdb/signals.h and signals_def.
11046 (server.o): Append signals_def.
11047
11048 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11049
11050 * server.c (handle_target_event): Use target_signal_to_host for
11051 resume_info.sig initialization.
11052 * target.h (struct thread_resume) <sig>: New comment.
11053
11054 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11055
11056 * server.c (handle_query): strcpy() the returned string from paddress()
11057 instead of sprintf().
11058 * utils.c (paddress): Return phex_nz().
11059
11060 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11061
11062 * server.c (handle_v_cont): Call mourn_inferior if process
11063 just exited.
11064 (myresume): Likewise.
11065
11066 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11067
11068 Static tracepoints, and integration with UST.
11069
11070 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11071 * mem-break.c (uninsert_all_breakpoints)
11072 (reinsert_all_breakpoints): New.
11073 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11074 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11075 (gdb_agent_ust_loaded, helper_thread_id)
11076 (gdb_agent_helper_thread_id): New macros.
11077 (struct ipa_sym_addresses): Add addr_ust_loaded,
11078 addr_helper_thread_id, addr_cmd_buf.
11079 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11080 (in_process_agent_loaded_ust): New.
11081 (write_e_ust_not_loaded): New.
11082 (maybe_write_ipa_ust_not_loaded): New.
11083 (struct collect_static_trace_data_action): New.
11084 (enum tracepoint_type) <static_tracepoint>: New.
11085 (struct tracepoint) <handle>: Mention static tracepoints.
11086 (struct static_tracepoint_ctx): New.
11087 (CMD_BUF_SIZE): New.
11088 (add_tracepoint_action): Handle static tracepoint actions.
11089 (unprobe_marker_at): New.
11090 (clear_installed_tracepoints): Handle static tracepoints.
11091 (cmd_qtdp): Handle static tracepoints.
11092 (probe_marker_at): New.
11093 (cmd_qtstart): Handle static tracepoints.
11094 (response_tracepoint): Handle static tracepoints.
11095 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11096 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11097 (get_context_regcache): Handle static tracepoints.
11098 (do_action_at_tracepoint): Handle static tracepoint actions.
11099 (traceframe_find_block_type): Handle static trace data blocks.
11100 (traceframe_read_sdata): New.
11101 (download_tracepoints): Download static tracepoint actions.
11102 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11103 (GDB_PROBE_NAME): New.
11104 (ust_ops): New.
11105 (GET_UST_SYM): New.
11106 (USTF): New.
11107 (dlsym_ust): New.
11108 (ust_marker_to_static_tracepoint): New.
11109 (gdb_probe): New.
11110 (collect_ust_data_at_tracepoint): New.
11111 (gdb_ust_probe): New.
11112 (UNIX_PATH_MAX, SOCK_DIR): New.
11113 (gdb_ust_connect_sync_socket): New.
11114 (resume_thread, stop_thread): New.
11115 (run_inferior_command): New.
11116 (init_named_socket): New.
11117 (gdb_ust_socket_init): New.
11118 (cstr_to_hexstr): New.
11119 (next_st): New.
11120 (first_marker, next_marker): New.
11121 (response_ust_marker): New.
11122 (cmd_qtfstm, cmd_qtsstm): New.
11123 (unprobe_marker_at, probe_marker_at): New.
11124 (cmd_qtstmat, gdb_ust_thread): New.
11125 (gdb_ust_init): New.
11126 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11127 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11128 (ST_REGENTRY): New.
11129 (x86_64_st_collect_regmap): New.
11130 (X86_64_NUM_ST_COLLECT_GREGS): New.
11131 (AMD64_RIP_REGNUM): New.
11132 (supply_static_tracepoint_registers): New.
11133 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11134 (ST_REGENTRY): New.
11135 (i386_st_collect_regmap): New.
11136 (i386_NUM_ST_COLLECT_GREGS): New.
11137 (supply_static_tracepoint_registers): New.
11138 * server.c (handle_query): Handle qXfer:statictrace:read.
11139 <qSupported>: Report support for StaticTracepoints, and
11140 qXfer:statictrace:read features.
11141 * server.h (traceframe_read_sdata)
11142 (supply_static_tracepoint_registers): Declare.
11143 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11144 (unpack_varlen_hex): Include in IPA build.
11145 * Makefile.in (ustlibs, ustinc): New.
11146 (IPA_OBJS): Add remote-utils-ipa.o.
11147 ($(IPA_LIB)): Link -ldl and -lpthread.
11148 (UST_CFLAGS): New.
11149 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11150 * config.in, configure: Regenerate.
11151
11152 2010-06-20 Ian Lance Taylor <iant@google.com>
11153 Pedro Alves <pedro@codesourcery.com>
11154
11155 * linux-x86-low.c (always_true): Delete.
11156 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11157 trying to fool the compiler with always_true.
11158
11159 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11160
11161 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11162 conditions in gdbserver.
11163
11164 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11165
11166 * spu-low.c (spu_read_memory): Wrap around local store limit.
11167 (spu_write_memory): Likewise.
11168
11169 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11170
11171 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11172 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11173 LONGEST uses.
11174 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11175 uses.
11176 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11177 uses with LONGEST uses.
11178
11179 2010-06-14 Stan Shebs <stan@codesourcery.com>
11180 Pedro Alves <pedro@codesourcery.com>
11181
11182 Bytecode compiler.
11183
11184 * linux-x86-low.c: Include limits.h.
11185 (add_insns): New.
11186 (always_true): New.
11187 (EMIT_ASM): New.
11188 (EMIT_ASM32): New.
11189 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11190 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11191 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11192 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11193 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11194 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11195 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11196 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11197 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11198 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11199 (amd64_emit_void_call_2): New.
11200 (amd64_emit_ops): New.
11201 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11202 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11203 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11204 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11205 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11206 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11207 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11208 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11209 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11210 (i386_emit_stack_adjust, i386_emit_int_call_1)
11211 (i386_emit_void_call_2): New.
11212 (i386_emit_ops): New.
11213 (x86_emit_ops): New.
11214 (the_low_target): Install x86_emit_ops.
11215 * server.h (struct emit_ops): New.
11216 (get_raw_reg_func_addr): Declare.
11217 (current_insn_ptr, emit_error): Declare.
11218 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11219 (set_trace_state_variable_value): New defines.
11220 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11221 addr_get_trace_state_variable_value and
11222 addr_set_trace_state_variable_value.
11223 (symbol_list): New fields for get_raw_reg,
11224 get_trace_state_variable_value and set_trace_state_variable_value.
11225 (condfn): New typedef.
11226 (struct tracepoint): New field `compiled_cond'.
11227 (do_action_at_tracepoint): Clear compiled_cond.
11228 (get_trace_state_variable_value, set_trace_state_variable_value):
11229 Export in the IPA.
11230 (condition_true_at_tracepoint): If there's a compiled condition,
11231 run that.
11232 (current_insn_ptr, emit_error): New globals.
11233 (struct bytecode_address): New.
11234 (get_raw_reg_func_addr): New.
11235 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11236 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11237 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11238 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11239 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11240 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11241 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11242 (compile_tracepoint_condition, compile_bytecodes): New.
11243 * target.h (emit_ops): Forward declare.
11244 (struct target_ops): New field emit_ops.
11245 (target_emit_ops): New.
11246 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11247 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11248 * linux-low.c (linux_emit_ops): New.
11249 (linux_target_ops): Install it.
11250 * linux-low.h (struct linux_target_ops): New field emit_ops.
11251
11252 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11253
11254 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11255 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11256
11257 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11258 Stan Shebs <stan@codesourcery.com>
11259
11260 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11261 (all): Depend on $(extra_libraries).
11262 (install-only): Install the IPA.
11263 (IPA_OBJS, IPA_LIB): New.
11264 (clean): Remove the IPA lib.
11265 (IPAGENT_CFLAGS): New.
11266 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11267 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11268 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11269 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11270 * configure.ac: Check for atomic builtins support in the compiler.
11271 (IPA_DEPFILES, extra_libraries): Define.
11272 * configure.srv (ipa_obj): Add description.
11273 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11274 (i[34567]86-*-linux*): Set ipa_obj.
11275 (x86_64-*-linux*): Set ipa_obj.
11276 * linux-low.c (stabilizing_threads): New.
11277 (supports_fast_tracepoints): New.
11278 (linux_detach): Stabilize threads before detaching.
11279 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11280 the lwp is either not stabilizing, or is moving out of a jump pad.
11281 (linux_fast_tracepoint_collecting): New.
11282 (maybe_move_out_of_jump_pad): New.
11283 (enqueue_one_deferred_signal): New.
11284 (dequeue_one_deferred_signal): New.
11285 (linux_wait_for_event_1): If moving out of a jump pad, defer
11286 pending signals to later.
11287 (linux_stabilize_threads): New.
11288 (linux_wait_1): Check if threads need moving out of jump pads, and
11289 do it if so.
11290 (stuck_in_jump_pad_callback): New.
11291 (move_out_of_jump_pad_callback): New.
11292 (lwp_running): New.
11293 (linux_resume_one_lwp): Handle moving out of jump pads.
11294 (linux_set_resume_request): Dequeue deferred signals.
11295 (need_step_over_p): Also step over fast tracepoint jumps.
11296 (start_step_over): Also uninsert fast tracepoint jumps.
11297 (finish_step_over): Also reinsert fast tracepoint jumps.
11298 (linux_install_fast_tracepoint_jump): New.
11299 (linux_target_ops): Install linux_stabilize_threads and
11300 linux_install_fast_tracepoint_jump_pad.
11301 * linux-low.h (linux_target_ops) <get_thread_area,
11302 install_fast_tracepoint_jump_pad>: New fields.
11303 (struct lwp_info) <collecting_fast_tracepoint,
11304 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11305 (linux_get_thread_area): Declare.
11306 * linux-x86-low.c (jump_insn): New.
11307 (x86_get_thread_area): New.
11308 (append_insns): New.
11309 (push_opcode): New.
11310 (amd64_install_fast_tracepoint_jump_pad): New.
11311 (i386_install_fast_tracepoint_jump_pad): New.
11312 (x86_install_fast_tracepoint_jump_pad): New.
11313 (the_low_target): Install x86_get_thread_area and
11314 x86_install_fast_tracepoint_jump_pad.
11315 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11316 (struct fast_tracepoint_jump): New.
11317 (fast_tracepoint_jump_insn): New.
11318 (fast_tracepoint_jump_shadow): New.
11319 (find_fast_tracepoint_jump_at): New.
11320 (fast_tracepoint_jump_here): New.
11321 (delete_fast_tracepoint_jump): New.
11322 (set_fast_tracepoint_jump): New.
11323 (uninsert_fast_tracepoint_jumps_at): New.
11324 (reinsert_fast_tracepoint_jumps_at): New.
11325 (set_breakpoint_at): Use write_inferior_memory.
11326 (uninsert_raw_breakpoint): Use write_inferior_memory.
11327 (check_mem_read): Mask out fast tracepoint jumps.
11328 (check_mem_write): Mask out fast tracepoint jumps.
11329 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11330 (set_fast_tracepoint_jump): Declare.
11331 (delete_fast_tracepoint_jump)
11332 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11333 (reinsert_fast_tracepoint_jumps_at): Declare.
11334 * regcache.c: Don't compile many functions when building the
11335 in-process agent library.
11336 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11337 the register buffer in the heap.
11338 (free_register_cache): If the register buffer isn't owned by the
11339 regcache, don't free it.
11340 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11341 pre-existing register caches.
11342 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11343 type.
11344 (convert_ascii_to_int): : Constify `from' parameter type.
11345 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11346 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11347 the needed buffer in-place.
11348 (relocate_instruction): New.
11349 * server.c (handle_query) <qSymbols>: If the target supports
11350 tracepoints, give it a chance of looking up symbols. Report
11351 support for fast tracepoints.
11352 (handle_status): Stabilize threads.
11353 (process_serial_event): Adjust.
11354 * server.h (struct fast_tracepoint_jump): Forward declare.
11355 (struct process_info) <fast_tracepoint_jumps>: New field.
11356 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11357 (decode_X_packet, decode_M_packet): Adjust.
11358 (relocate_instruction): Declare.
11359 (in_process_agent_loaded): Declare.
11360 (tracepoint_look_up_symbols): Declare.
11361 (struct fast_tpoint_collect_status): Declare.
11362 (fast_tracepoint_collecting): Declare.
11363 (force_unlock_trace_buffer): Declare.
11364 (handle_tracepoint_bkpts): Declare.
11365 (initialize_low_tracepoint)
11366 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11367 * target.h (struct target_ops) <stabilize_threads,
11368 install_fast_tracepoint_jump_pad>: New fields.
11369 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11370 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11371 [HAVE_STDINT_H]: Include stdint.h.
11372 (trace_debug_1): Rename to ...
11373 (trace_vdebug): ... this.
11374 (trace_debug): Rename to ...
11375 (trace_debug_1): ... this. Add `level' parameter.
11376 (trace_debug): New.
11377 (ATTR_USED, ATTR_NOINLINE): New.
11378 (IP_AGENT_EXPORT): New.
11379 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11380 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11381 (about_to_request_buffer_space, trace_buffer_is_full)
11382 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11383 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11384 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11385 (traceframe_write_count, traceframes_created)
11386 (trace_state_variables)
11387 New renaming defines.
11388 (struct ipa_sym_addresses): New.
11389 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11390 (symbol_list): New.
11391 (ipa_sym_addrs): New.
11392 (all_tracepoint_symbols_looked_up): New.
11393 (in_process_agent_loaded): New.
11394 (write_e_ipa_not_loaded): New.
11395 (maybe_write_ipa_not_loaded): New.
11396 (tracepoint_look_up_symbols): New.
11397 (debug_threads) [IN_PROCESS_AGENT]: New.
11398 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11399 (UNKNOWN_SIDE_EFFECTS): New.
11400 (stop_tracing): New.
11401 (flush_trace_buffer): New.
11402 (stop_tracing_bkpt): New.
11403 (flush_trace_buffer_bkpt): New.
11404 (read_inferior_integer): New.
11405 (read_inferior_uinteger): New.
11406 (read_inferior_data_pointer): New.
11407 (write_inferior_data_pointer): New.
11408 (write_inferior_integer): New.
11409 (write_inferior_uinteger): New.
11410 (struct collect_static_trace_data_action): Delete.
11411 (enum tracepoint_type): New.
11412 (struct tracepoint) <type>: New field `type'.
11413 <actions_str, step_actions, step_actions_str>: Only include in
11414 GDBserver.
11415 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11416 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11417 (tracepoints): Use IP_AGENT_EXPORT.
11418 (last_tracepoint): Don't include in the IPA.
11419 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11420 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11421 (alloced_trace_state_variables): New.
11422 (trace_state_variables): Use IP_AGENT_EXPORT.
11423 (traceframe_t): Delete unused variable.
11424 (circular_trace_buffer): Don't include in the IPA.
11425 (trace_buffer_start): Delete.
11426 (struct trace_buffer_control): New.
11427 (trace_buffer_free): Delete.
11428 (struct ipa_trace_buffer_control): New.
11429 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11430 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11431 New.
11432 (trace_buffer_ctrl): New.
11433 (TRACE_BUFFER_CTRL_CURR): New.
11434 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11435 Reimplement as macros.
11436 (trace_buffer_wrap): Delete.
11437 (traceframe_write_count, traceframe_read_count)
11438 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11439 (struct tracepoint_hit_ctx) <type>: New field.
11440 (struct fast_tracepoint_ctx): New.
11441 (memory_barrier): New.
11442 (cmpxchg): New.
11443 (record_tracepoint_error): Update atomically in the IPA.
11444 (clear_inferior_trace_buffer): New.
11445 (about_to_request_buffer_space): New.
11446 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11447 updating the same buffer.
11448 (add_tracepoint): Default the tracepoint's type to trap
11449 tracepoint, and orig_size to -1.
11450 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11451 internal variables.
11452 (create_trace_state_variable): New parameter `gdb'. Handle it.
11453 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11454 (cmd_qtdp): Handle fast tracepoints.
11455 (cmd_qtdv): Adjust.
11456 (max_jump_pad_size): New.
11457 (gdb_jump_pad_head): New.
11458 (get_jump_space_head): New.
11459 (claim_jump_space): New.
11460 (sort_tracepoints): New.
11461 (MAX_JUMP_SIZE): New.
11462 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11463 IPA.
11464 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11465 support. Upload fast traceframes, and delete internal IPA
11466 breakpoints.
11467 (stop_tracing_handler): New.
11468 (flush_trace_buffer_handler): New.
11469 (cmd_qtstop): Upload fast tracepoints.
11470 (response_tracepoint): Handle fast tracepoints.
11471 (tracepoint_finished_step): Upload fast traceframes. Set the
11472 tracepoint hit context's tracepoint type.
11473 (handle_tracepoint_bkpts): New.
11474 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11475 type. Add comment about fast tracepoints.
11476 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11477 non-existing action_str field.
11478 (get_context_regcache): Handle fast tracepoints.
11479 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11480 to the regcache.
11481 (fast_tracepoint_from_jump_pad_address): New.
11482 (fast_tracepoint_from_ipa_tpoint_address): New.
11483 (collecting_t): New.
11484 (force_unlock_trace_buffer): New.
11485 (fast_tracepoint_collecting): New.
11486 (collecting): New.
11487 (gdb_collect): New.
11488 (write_inferior_data_ptr): New.
11489 (target_tp_heap): New.
11490 (target_malloc): New.
11491 (download_agent_expr): New.
11492 (UALIGN): New.
11493 (download_tracepoints): New.
11494 (download_trace_state_variables): New.
11495 (upload_fast_traceframes): New.
11496 (IPA_FIRST_TRACEFRAME): New.
11497 (IPA_NEXT_TRACEFRAME_1): New.
11498 (IPA_NEXT_TRACEFRAME): New.
11499 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11500 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11501 (gdb_jump_pad_buffer_end): New.
11502 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11503 (initialize_tracepoint): Adjust.
11504 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11505 buffer. Initialize the low module.
11506 * utils.c (PREFIX, TOOLNAME): New.
11507 (malloc_failure): Use PREFIX.
11508 (error): In the IPA, an error causes an exit.
11509 (fatal, warning): Use PREFIX.
11510 (internal_error): Use TOOLNAME.
11511 (NUMCELLS): Increase to 10.
11512 * configure, config.in: Regenerate.
11513
11514 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11515
11516 * server.c (handle_query) <qSupported>: Do two passes over the
11517 qSupported string to avoid nesting strtok.
11518
11519 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11520
11521 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11522 (CDEPS): New.
11523 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11524 -Wl,--dynamic-list.
11525 * configure: Regenerate.
11526 * proc-service.list: New.
11527
11528 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11529
11530 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11531 New comment.
11532
11533 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11534
11535 * gdbreplay.c (remote_open): Check error return from socket() call by
11536 its equality to -1 not by it being negative.
11537 * remote-utils.c (remote_open): Likewise.
11538
11539 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11540
11541 * config.h: Regenerate.
11542
11543 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11544
11545 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11546 doesn't provide PTRACE_GET_THREAD_AREA.
11547
11548 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11549
11550 * linux-m68k-low.c: Include <asm/ptrace.h>
11551 (ps_get_thread_area): Implement.
11552
11553 2010-05-03 Doug Evans <dje@google.com>
11554
11555 * event-loop.c (struct callback_event): New struct.
11556 (callback_list): New global.
11557 (append_callback_event, delete_callback_event): New functions.
11558 (process_callback): New function.
11559 (start_event_loop): Call it.
11560 * remote-utils.c (NOT_SCHEDULED): Define.
11561 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11562 moved out of readchar.
11563 (readchar): Rewrite. Call reschedule before returning.
11564 (reset_readchar): New function.
11565 (remote_close): Call it.
11566 (process_remaining, reschedule): New functions.
11567 * server.h (callback_handler_func): New typedef.
11568 (append_callback_event, delete_callback_event): Declare.
11569
11570 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11571
11572 * proc-service.c (ps_pglobal_lookup): Use
11573 thread_db_look_up_one_symbol.
11574 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11575 parameter. Use it instead of all_symbols_looked_up.
11576 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11577 field.
11578 (all_symbols_looked_up): Don't declare.
11579 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11580 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11581 field.
11582 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11583 Set all_symbols_looked_up here.
11584 (thread_db_look_up_one_symbol): New.
11585 (thread_db_get_tls_address): Adjust.
11586 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11587 thread_db object on the heap, and tentatively set it in the
11588 process structure.
11589 (thread_db_init): Don't set all_symbols_looked_up here.
11590 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11591
11592 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11593
11594 * linux-low.c (linux_kill, linux_detach): Adjust.
11595 (status_pending_p_callback): Remove redundant statement. Check
11596 for !TARGET_WAITIKIND_IGNORE, instead of
11597 TARGET_WAITKIND_STOPPED.
11598 (handle_tracepoints): Make sure LWP is locked. Adjust.
11599 (linux_wait_for_event_1): Adjust.
11600 (linux_cancel_breakpoints): New.
11601 (unsuspend_one_lwp): New.
11602 (unsuspend_all_lwps): New.
11603 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11604 (send_sigstop_callback): Change return type to int, add new
11605 `except' parameter and handle it.
11606 (suspend_and_send_sigstop_callback): New.
11607 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11608 pass them down. If SUSPEND, also increment the lwp's suspend
11609 count.
11610 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11611 (need_step_over_p): Don't consider suspended LWPs.
11612 (start_step_over): Adjust.
11613 (proceed_one_lwp): Change return type to int, add new `except'
11614 parameter and handle it.
11615 (unsuspend_and_proceed_one_lwp): New.
11616 (proceed_all_lwps): Use find_inferior instead of
11617 for_each_inferior.
11618 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11619 also decrement the suspend count of LWPs. Pass `except' down,
11620 instead of hacking its suspend count.
11621 (linux_pause_all): Add `freeze' parameter. Adjust.
11622 (linux_unpause_all): New.
11623 (linux_target_ops): Install linux_unpause_all.
11624 * server.c (handle_status): Adjust.
11625 * target.h (struct target_ops): New fields `unpause_all' and
11626 `cancel_breakpoints'. Add new parameter to `pause_all'.
11627 (pause_all): Add new `freeze' parameter.
11628 (unpause_all): New.
11629 (cancel_breakpoints): New.
11630 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11631 cancel breakpoints.
11632 (cmd_qtstart): Pause threads.
11633 (stop_tracing): Pause threads, and cancel breakpoints.
11634 * win32-low.c (win32_target_ops): Adjust.
11635
11636 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11637
11638 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11639 the inferior right away from here...
11640 (linux_wait_1): ... to here, and adjust to check the thread's
11641 last_resume_kind instead of the lwp's step or stop_expected flags.
11642
11643 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11644
11645 * README: Use consistent `GDB' and `GDBserver' spellings.
11646
11647 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11648
11649 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11650 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11651 (linux_detach_one_lwp): Assume the lwp is stopped.
11652 (any_thread_of): Delete.
11653 (linux_detach): Stop all lwps here. Don't blindly delete all
11654 breakpoints.
11655 (delete_lwp_callback): New.
11656 (linux_mourn): Delete all lwps of the process that is gone.
11657 (linux_wait_1): Don't delete the last lwp of the process here.
11658 * mem-break.h (mark_breakpoints_out): Declare.
11659 * mem-break.c (mark_breakpoints_out): New.
11660 (free_all_breakpoints): Use it.
11661 * server.c (handle_target_event): If the process is gone, mark
11662 breakpoints out.
11663 * thread-db.c (struct thread_db) <create_bp>: New field.
11664 (thread_db_enable_reporting): Fix prototype. Store a thread event
11665 breakpoint reference in the thread_db struct.
11666 (thread_db_load_search): Clear the thread_db object.
11667 (try_thread_db_load_1): Ditto.
11668 (switch_to_process): New.
11669 (disable_thread_event_reporting): Use it.
11670 (remove_thread_event_breakpoints): New.
11671 (thread_db_detach, thread_db_mourn): Use it.
11672
11673 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11674
11675 * linux-low.c (linux_enable_event_reporting): New.
11676 (linux_wait_for_event_1, handle_extended_wait): Use it.
11677
11678 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11679
11680 * linux-low.c (linux_kill_one_lwp, linux_kill)
11681 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11682 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11683 SIGSTOP even if the LWP is stopped.
11684 (send_sigstop_callback): New.
11685 (stop_all_lwps): Use send_sigstop_callback instead.
11686 (linux_resume_one_thread): Adjust.
11687 (proceed_one_lwp): Still proceed an LWP that the client has
11688 requested to stop, if we haven't reported it as stopped yet. Make
11689 sure that LWPs the client want stopped, have a pending SIGSTOP.
11690
11691 2010-04-26 Doug Evans <dje@google.com>
11692
11693 * server.c (handle_general_set): Make static.
11694
11695 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11696 Print received char after testing for error/eof instead of before.
11697 (input_interrupt): Tweak comment.
11698
11699 2010-04-23 Doug Evans <dje@google.com>
11700
11701 * server.c (start_inferior): Print inferior argv if --debug.
11702
11703 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11704
11705 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11706 * nto-x86-low.c: Include server.h
11707
11708 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11709
11710 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11711 be consistent with other sources of this directory.
11712 (init_registers_amd64): Correct name of source file of this function
11713 in the comment.
11714
11715 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11716
11717 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11718 64-bit executables.
11719
11720 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11721
11722 * win32-i386-low.c: Add 64-bit support.
11723 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11724 (init_registers_amd64): Declare.
11725 (mappings): Add 64-bit version of array.
11726 (init_windows_x86): New function.
11727 (the_low_target): Change init_arch field to init_windows_x86.
11728
11729 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11730
11731 * win32-low.c: Adapt to support also 64-bit architecture.
11732 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11733 (get_image_name): Use SIZE_T type for local variable `done'.
11734 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11735 (toolhelp_get_dll_name): Idem.
11736 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11737 Use uintptr_t typecast to avoid warning.
11738 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11739 (handle_exception): Use phex_nz to avoid warning.
11740 (win32_wait): Remove unused local variable `process'.
11741
11742 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11743
11744 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11745 `amd64-avx.o'.
11746
11747 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11748
11749 * configure.ac: Use `ws2_32' library for srv_mingw.
11750 * configure: Regenerate.
11751 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11752 * remote-utils.c: Likewise.
11753
11754 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11755
11756 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11757 if __x86_64__ is defined.
11758
11759 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11760
11761 * configure: Regenerate.
11762
11763 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11764
11765 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11766 * target.h (target_ops): New get_tib_address field.
11767 * win32-low.h (win32_thread_info): Add thread_local_base field.
11768 * win32-low.c (child_add_thread): Add tlb argument.
11769 Set thread_local_base field to TLB.
11770 (get_child_debug_event): Adapt to child_add_thread change.
11771 (win32_get_tib_address): New function.
11772 (win32_target_ops): Set get_tib_address field to
11773 win32_get_tib_address.
11774 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11775
11776 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11777
11778 * linux-low.c (linux_mourn): Also remove the process.
11779 * server.c (handle_target_event): Don't remove the process here.
11780 * nto-low.c (nto_mourn): New.
11781 (nto_target_ops): Install it.
11782 * spu-low.c (spu_mourn): New.
11783 (spu_target_ops): Install it.
11784 * win32-low.c (win32_mourn): New.
11785 (win32_target_ops): Install it.
11786
11787 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11788
11789 * server.h (buffer_xml_printf): Remove redundant `;'.
11790
11791 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11792
11793 * regcache.c (set_register_cache): Invalidate regcaches before
11794 changing the register cache layout.
11795 (regcache_invalidate_one): Allow a NULL regcache.
11796 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11797 regcaches before changing the register cache layout or the target
11798 regsets.
11799
11800 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11801
11802 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11803 variable warning on Linux/x86-64.
11804
11805 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11806
11807 GDBserver disconnected tracing support.
11808
11809 * linux-low.c (linux_remove_process): Delete.
11810 (add_lwp): Don't set last_resume_kind here.
11811 (linux_kill): Use `mourn'.
11812 (linux_detach): Use `thread_db_detach', and `mourn'.
11813 (linux_mourn): New.
11814 (linux_attach_lwp_1): Adjust comment.
11815 (linux_attach): last_resume_kind moved the thread_info; adjust.
11816 (status_pending_p_callback): Adjust.
11817 (linux_wait_for_event_1): Adjust.
11818 (count_events_callback, select_singlestep_lwp_callback)
11819 (select_event_lwp_callback, cancel_breakpoints_callback)
11820 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11821 (proceed_one_lwp): Adjust.
11822 (linux_async): Add debug output.
11823 (linux_thread_stopped): New.
11824 (linux_pause_all): New.
11825 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11826 linux_pause_all.
11827 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11828 (thread_db_free): Delete declaration.
11829 (thread_db_detach, thread_db_mourn): Declare.
11830 * thread-db.c (thread_db_init): Use thread_db_mourn.
11831 (thread_db_free): Delete, split in two.
11832 (disable_thread_event_reporting): New.
11833 (thread_db_detach): New.
11834 (thread_db_mourn): New.
11835
11836 * server.h (struct thread_info) <last_resume_kind>: New field.
11837 <attached>: Add comment.
11838 <gdb_detached>: New field.
11839 (handler_func): Change return type to int.
11840 (handle_serial_event, handle_target_event): Ditto.
11841 (gdb_connected): Declare.
11842 (tracing): Delete.
11843 (disconnected_tracing): Declare.
11844 (stop_tracing): Declare.
11845
11846 * server.c (handle_query) <qSupported>: Report support for
11847 disconnected tracing.
11848 (queue_stop_reply_callback): Account for running threads.
11849 (gdb_wants_thread_stopped): New.
11850 (gdb_wants_all_threads_stopped): New.
11851 (gdb_reattached_process): New.
11852 (handle_status): Clear the `gdb_detached' flag of all processes.
11853 In all-stop, stop all threads.
11854 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11855 (process_serial_event): If the remote connection breaks, or if an
11856 exit was forced with "monitor exit", force an event loop exit.
11857 Handle disconnected tracing on detach.
11858 (handle_serial_event): Adjust.
11859 (handle_target_event): If GDB isn't connected, forward events back
11860 to the inferior, unless the last process exited, in which case,
11861 exit gdbserver. Adjust interface.
11862
11863 * remote-utils.c (remote_open): Don't block in accept. Instead
11864 register an event loop source on the listen socket file
11865 descriptor. Refactor bits into ...
11866 (listen_desc): ... this new global.
11867 (gdb_connected): ... this new function.
11868 (enable_async_notification): ... this new function.
11869 (handle_accept_event): ... this new function.
11870 (remote_close): Clear remote_desc.
11871
11872 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11873
11874 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11875 New fields.
11876 (mourn_inferior): Define.
11877 (target_process_qsupported): Avoid the dangling else problem.
11878 (thread_stopped): Define.
11879 (pause_all): Define.
11880 (target_waitstatus_to_string): Declare.
11881 * target.c (target_waitstatus_to_string): New.
11882
11883 * tracepoint.c (tracing): Make extern.
11884 (disconnected_tracing): New.
11885 (stop_tracing): Make extern. Handle tracing stops due to GDB
11886 disconnecting.
11887 (cmd_qtdisconnected): New.
11888 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11889 (handle_tracepoint_general_set): Handle QTDisconnected.
11890
11891 * event-loop.c (event_handler_func): Change return type to int.
11892 (process_event): Bail out if the event handler wants the event
11893 loop to stop.
11894 (handle_file_event): Ditto.
11895 (start_event_loop): Bail out if the event handler wants the event
11896 loop to stop.
11897
11898 * nto-low.c (nto_target_ops): Adjust.
11899 * spu-low.c (spu_wait): Don't remove the process here.
11900 (spu_target_ops): Adjust.
11901 * win32-low.c (win32_wait): Don't remove the process here.
11902 (win32_target_ops): Adjust.
11903
11904 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11905
11906 * regcache.c (realloc_register_cache): Invalidate inferior's
11907 regcache before recreating it.
11908
11909 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11910
11911 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11912
11913 2010-04-09 Stan Shebs <stan@codesourcery.com>
11914 Pedro Alves <pedro@codesourcery.com>
11915
11916 * server.h (LONGEST): New.
11917 (struct thread_info) <while_stepping>: New field.
11918 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11919 Declare.
11920 (initialize_tracepoint, handle_tracepoint_general_set)
11921 (handle_tracepoint_query, tracepoint_finished_step)
11922 (tracepoint_was_hit, release_while_stepping_state_list):
11923 (current_traceframe): Declare.
11924 * server.c (handle_general_set): Handle tracepoint packets.
11925 (read_memory): New.
11926 (write_memory): New.
11927 (handle_search_memory_1): Use read_memory.
11928 (handle_query): Report support for conditional tracepoints, trace
11929 state variables, and tracepoint sources. Handle tracepoint
11930 queries.
11931 (main): Initialize the tracepoints module.
11932 (process_serial_event): Handle traceframe reads/writes.
11933
11934 * linux-low.c (handle_tracepoints): New.
11935 (linux_wait_1): Call it.
11936 (linux_resume_one_lwp): Handle while-stepping.
11937 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11938 (linux_target_ops): Install them.
11939 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11940 New field.
11941 * linux-x86-low.c (x86_supports_tracepoints): New.
11942 (the_low_target). Install it.
11943
11944 * mem-break.h (delete_breakpoint): Declare.
11945 * mem-break.c (delete_breakpoint): Make external.
11946
11947 * target.h (struct target_ops): Add `supports_tracepoints',
11948 `read_pc', and `write_pc' fields.
11949 (target_supports_tracepoints): Define.
11950 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11951 (phex_nz): New.
11952
11953 * regcache.h (struct regcache) <registers_owned>: New field.
11954 (init_register_cache, regcache_cpy): Declare.
11955 (regcache_read_pc, regcache_write_pc): Declare.
11956 (register_cache_size): Declare.
11957 (supply_regblock): Declare.
11958 * regcache.c (init_register_cache): New.
11959 (new_register_cache): Use it.
11960 (regcache_cpy): New.
11961 (register_cache_size): New.
11962 (supply_regblock): New.
11963 (regcache_read_pc, regcache_write_pc): New.
11964
11965 * tracepoint.c: New.
11966
11967 * Makefile.in (OBS): Add tracepoint.o.
11968 (tracepoint.o): New rule.
11969
11970 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11971
11972 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11973 (i386-mmx.o): New.
11974 (i386-mmx.c): Likewise.
11975 (i386-mmx-linux.o): Likewise.
11976 (i386-mmx-linux.c): Likewise.
11977
11978 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11979 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11980 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11981 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11982
11983 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11984 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11985 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11986
11987 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11988
11989 * Makefile.in (clean): Updated.
11990 (i386-avx.o): New.
11991 (i386-avx.c): Likewise.
11992 (i386-avx-linux.o): Likewise.
11993 (i386-avx-linux.c): Likewise.
11994 (amd64-avx.o): Likewise.
11995 (amd64-avx.c): Likewise.
11996 (amd64-avx-linux.o): Likewise.
11997 (amd64-avx-linux.c): Likewise.
11998
11999 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12000 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12001 (srv_amd64_regobj): Add amd64-avx.o.
12002 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12003 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12004 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12005 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12006 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12007 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12008 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12009
12010 * i387-fp.c: Include "i386-xstate.h".
12011 (i387_xsave): New.
12012 (i387_cache_to_xsave): Likewise.
12013 (i387_xsave_to_cache): Likewise.
12014 (x86_xcr0): Likewise.
12015
12016 * i387-fp.h (i387_cache_to_xsave): Likewise.
12017 (i387_xsave_to_cache): Likewise.
12018 (x86_xcr0): Likewise.
12019
12020 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12021 * linux-crisv32-low.c (target_regsets): Likewise.
12022 * linux-m68k-low.c (target_regsets): Likewise.
12023 * linux-mips-low.c (target_regsets): Likewise.
12024 * linux-ppc-low.c (target_regsets): Likewise.
12025 * linux-s390-low.c (target_regsets): Likewise.
12026 * linux-sh-low.c (target_regsets): Likewise.
12027 * linux-sparc-low.c (target_regsets): Likewise.
12028 * linux-xtensa-low.c (target_regsets): Likewise.
12029
12030 * linux-low.c: Include <sys/uio.h>.
12031 (regsets_fetch_inferior_registers): Support nt_type.
12032 (regsets_store_inferior_registers): Likewise.
12033 (linux_process_qsupported): New.
12034 (linux_target_ops): Add linux_process_qsupported.
12035
12036 * linux-low.h (regset_info): Add nt_type.
12037 (linux_target_ops): Add process_qsupported.
12038
12039 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12040 and <sys/uio.h>.
12041 (init_registers_i386_avx_linux): New.
12042 (init_registers_amd64_avx_linux): Likewise.
12043 (xmltarget_i386_linux_no_xml): Likewise.
12044 (xmltarget_amd64_linux_no_xml): Likewise.
12045 (PTRACE_GETREGSET): Likewise.
12046 (PTRACE_SETREGSET): Likewise.
12047 (x86_fill_xstateregset): Likewise.
12048 (x86_store_xstateregset): Likewise.
12049 (use_xml): Likewise.
12050 (x86_linux_update_xmltarget): Likewise.
12051 (x86_linux_process_qsupported): Likewise.
12052 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12053 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12054 init_registers_i386_linux here. Call
12055 x86_linux_update_xmltarget.
12056 (the_low_target): Add x86_linux_process_qsupported.
12057
12058 * server.c (handle_query): Call target_process_qsupported.
12059
12060 * target.h (target_ops): Add process_qsupported.
12061 (target_process_qsupported): New.
12062
12063 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12064
12065 * inferiors.c (add_thread): Set last_status kind to
12066 TARGET_WAITKIND_IGNORE.
12067 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12068 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12069 (linux_wait_1): Move `thread' local definition to block that uses
12070 it. Don't NULL initialize `event_child'.
12071 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12072 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12073 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12074
12075 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12076
12077 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12078 an extended waitstatus, or by a watchpoint.
12079 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12080 thread was stepping or has been stopped by a watchpoint.
12081
12082 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12083
12084 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12085 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12086 of another, then delete the previous, and validate all
12087 breakpoints.
12088 (validate_inserted_breakpoint): New.
12089 (delete_disabled_breakpoints): New.
12090 (validate_breakpoints): New.
12091 (check_mem_read): Validate breakpoints before trusting their
12092 shadow. Delete disabled breakpoints.
12093 (check_mem_write): Validate breakpoints before trusting they
12094 should be inserted. Delete disabled breakpoints.
12095 * mem-break.h (validate_breakpoints):
12096 * server.c (handle_query): Validate breakpoints when we see a
12097 qSymbol query.
12098
12099 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12100
12101 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12102 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12103 if we could tell there's a GDB breakpoint at stop_pc.
12104 (need_step_over_p): Don't do a step over if we find a GDB
12105 breakpoint at the resume PC.
12106
12107 * mem-break.c (struct raw_breakpoint): New.
12108 (enum bkpt_type): New type `gdb_breakpoint'.
12109 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12110 fields. New field `raw'.
12111 (find_raw_breakpoint_at): New.
12112 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12113 breakpoint instead.
12114 (set_breakpoint_at): Adjust.
12115 (delete_raw_breakpoint): New.
12116 (release_breakpoint): New.
12117 (delete_breakpoint): Rename to...
12118 (delete_breakpoint_1): ... this. Add proc parameter. Use
12119 release_breakpoint. Return ENOENT.
12120 (delete_breakpoint): Reimplement.
12121 (find_breakpoint_at): Delete.
12122 (find_gdb_breakpoint_at): New.
12123 (delete_breakpoint_at): Delete.
12124 (set_gdb_breakpoint_at): New.
12125 (delete_gdb_breakpoint_at): New.
12126 (gdb_breakpoint_here): New.
12127 (set_reinsert_breakpoint): Use release_breakpoint.
12128 (uninsert_breakpoint): Rename to ...
12129 (uninsert_raw_breakpoint): ... this.
12130 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12131 (reinsert_raw_breakpoint): Change parameter type to
12132 raw_breakpoint.
12133 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12134 instead.
12135 (check_breakpoints): Adjust. Use release_breakpoint.
12136 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12137 (breakpoint_inserted_here): Ditto.
12138 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12139 Don't trust the breakpoint's shadow if it is not inserted.
12140 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12141 (delete_all_breakpoints): Adjust.
12142 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12143 use delete_breakpoint_1.
12144
12145 * mem-break.h (breakpoints_supported): Delete declaration.
12146 (set_gdb_breakpoint_at): Declare.
12147 (gdb_breakpoint_here): Declare.
12148 (delete_breakpoint_at): Delete.
12149 (delete_gdb_breakpoint_at): Declare.
12150
12151 * server.h (struct raw_breakpoint): Forward declare.
12152 (struct process_info): New field `raw_breakpoints'.
12153
12154 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12155 breakpoints.
12156
12157 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12158
12159 * linux-low.c (status_pending_p_callback): Fix comment.
12160 (linux_wait_for_event_1): Move most of the internal breakpoint
12161 handling from here...
12162 (linux_wait_1): ... to here.
12163 (count_events_callback): New.
12164 (select_singlestep_lwp_callback): New.
12165 (select_event_lwp_callback): New.
12166 (cancel_breakpoints_callback): New.
12167 (select_event_lwp): New.
12168 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12169 priority to all LWPs that have had events that should be reported
12170 to the client. Cancel breakpoints when about to reporting the
12171 event to the client, not while stopping lwps. No longer cancel
12172 finished single-steps here.
12173 (cancel_finished_single_step): Delete.
12174 (cancel_finished_single_steps): Delete.
12175
12176 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12177
12178 * mem-break.c (enum bkpt_type): New.
12179 (struct breakpoint): New field `type'.
12180 (set_breakpoint_at): Change return type to struct breakpoint
12181 pointer. Set type to `other_breakpoint' by default.
12182 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12183 in the breakpoint list.
12184 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12185 (reinsert_breakpoint): Rename to ...
12186 (reinsert_raw_breakpoint): ... this.
12187 (reinsert_breakpoints_at): Adjust.
12188 * mem-break.h (struct breakpoint): Declare.
12189 (set_breakpoint_at): Change return type to struct breakpoint
12190 pointer.
12191
12192 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12193
12194 * server.c (handle_query): Assign, not compare.
12195
12196 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12197
12198 Teach linux gdbserver to step-over-breakpoints.
12199
12200 * linux-low.c (can_hardware_single_step): New.
12201 (supports_breakpoints): New.
12202 (handle_extended_wait): If stopping threads, read the stop pc of
12203 the new cloned LWP.
12204 (get_pc): New.
12205 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12206 low target doesn't support retrieving the PC.
12207 (add_lwp): Set last_resume_kind to resume_continue.
12208 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12209 (linux_attach): Don't clear stop_expected. Set the lwp's
12210 last_resume_kind to resume_stop.
12211 (linux_detach_one_lwp): Don't check for removed breakpoints.
12212 (check_removed_breakpoint): Delete.
12213 (status_pending_p): Rename to ...
12214 (status_pending_p_callback): ... this. Don't check for removed
12215 breakpoints. Don't consider threads that are stopped from GDB's
12216 perspective.
12217 (linux_wait_for_lwp): Always read the stop_pc here.
12218 (cancel_breakpoint): New.
12219 (step_over_bkpt): New global.
12220 (linux_wait_for_event_1): Implement stepping over breakpoints.
12221 (gdb_wants_lwp_stopped): New.
12222 (gdb_wants_all_stopped): New.
12223 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12224 single-step traps here. Store the thread's last reported target
12225 wait status.
12226 (send_sigstop): Don't clear stop_expected. Always set it,
12227 instead.
12228 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12229 (cancel_finished_single_step): New.
12230 (cancel_finished_single_steps): New.
12231 (wait_for_sigstop): Don't cancel finished single-step traps here.
12232 (linux_resume_one_lwp): Don't check for removed breakpoints.
12233 Don't set `step' on non-hardware step archs.
12234 (linux_set_resume_request): Ignore resume_stop requests if already
12235 stopping or stopped. Set the lwp's last_resume_kind.
12236 (resume_status_pending_p): Don't check for removed breakpoints.
12237 (need_step_over_p): New.
12238 (start_step_over): New.
12239 (finish_step_over): New.
12240 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12241 requests. Clear the thread's last reported target waitstatus.
12242 Don't use the `suspended' flag. Don't consider pending breakpoints.
12243 (linux_resume): Start a step-over if necessary.
12244 (proceed_one_lwp): New.
12245 (proceed_all_lwps): New.
12246 (unstop_all_lwps): New.
12247 * linux-low.h (struct lwp_info): Rewrite comment for the
12248 `suspended' flag. Add the `stop_pc' field. Delete the
12249 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12250 Add `'last_resume_kind' and `need_step_over' fields.
12251 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12252 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12253 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12254 (set_raw_breakpoint_at): New.
12255 (set_breakpoint_at): Rewrite to use it.
12256 (reinsert_breakpoint_handler): Delete.
12257 (set_reinsert_breakpoint): New.
12258 (reinsert_breakpoint_by_bp): Delete.
12259 (delete_reinsert_breakpoints): New.
12260 (uninsert_breakpoint): Rewrite.
12261 (uninsert_breakpoints_at): New.
12262 (reinsert_breakpoint): Rewrite.
12263 (reinsert_breakpoints_at): New.
12264 (check_breakpoints): Rewrite.
12265 (breakpoint_here): New.
12266 (breakpoint_inserted_here): New.
12267 (check_mem_read): Adjust.
12268 * mem-break.h (breakpoints_supported, breakpoint_here)
12269 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12270 (reinsert_breakpoint_by_bp): Delete declaration.
12271 (delete_reinsert_breakpoints): Declare.
12272 (reinsert_breakpoint): Delete declaration.
12273 (reinsert_breakpoints_at): Declare.
12274 (uninsert_breakpoint): Delete declaration.
12275 (uninsert_breakpoints_at): Declare.
12276 (check_breakpoints): Adjust prototype.
12277 * server.h: Adjust include order.
12278 (struct thread_info): Declare here. Add a `last_status' field.
12279
12280 2010-03-23 Michael Snyder <msnyder@vmware.com>
12281
12282 * server.c (crc32): New function.
12283 (handle_query): Add handling for 'qCRC:' request.
12284
12285 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12286
12287 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12288 lwp had been stopped by a watchpoint.
12289
12290 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12291
12292 * server.h (internal_error): Declare.
12293 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12294 * utils.c (internal_error): New function.
12295
12296 2010-03-15 Andreas Schwab <schwab@redhat.com>
12297
12298 * configure.srv: Fix typo setting srv_regobj.
12299
12300 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12301
12302 * linux-low.c (fetch_register): Avoid passing a non string literal
12303 format to `error'.
12304 (usr_store_inferior_registers): Ditto.
12305
12306 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12307
12308 * linux-low.c (linux_write_memory): Bail out early if peeking
12309 memory failed.
12310
12311 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12312
12313 * linux-low.h (struct lwp_info): New fields
12314 `stopped_by_watchpoint' and `stopped_data_address'.
12315 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12316 here, and cache them in the lwp object.
12317 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12318 directly.
12319 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12320 field.
12321 (linux_stopped_by_watchpoint): Rewrite.
12322 (linux_stopped_data_address): Rewrite.
12323
12324 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12325
12326 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12327 switching the current inferior, not before.
12328
12329 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12330
12331 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12332 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12333 i386-linux.c and amd64-linux.c.
12334 (reg-i386.o): Removed.
12335 (reg-i386.c): Likewise.
12336 (reg-i386-linux.o): Likewise.
12337 (reg-i386-linux.c): Likewise.
12338 (reg-x86-64.o): Likewise.
12339 (reg-x86-64.c): Likewise.
12340 (reg-x86-64-linux.o): Likewise.
12341 (reg-x86-64-linux.c): Likewise.
12342 (i386.o): New.
12343 (i386.c): Likewise.
12344 (i386-linux.o): Likewise.
12345 (i386-linux.c): Likewise.
12346 (amd64.o): Likewise.
12347 (amd64.c): Likewise.
12348 (amd64-linux.o): Likewise.
12349 (amd64-linux.c): Likewise.
12350
12351 * configure.srv (srv_i386_regobj): New.
12352 (srv_i386_linux_regobj): Likewise.
12353 (srv_amd64_regobj): Likewise.
12354 (srv_amd64_linux_regobj): Likewise.
12355 (srv_i386_32bit_xmlfiles): Likewise.
12356 (srv_i386_64bit_xmlfiles): Likewise.
12357 (srv_i386_xmlfiles): Likewise.
12358 (srv_amd64_xmlfiles): Likewise.
12359 (srv_i386_linux_xmlfiles): Likewise.
12360 (srv_amd64_linux_xmlfiles): Likewise.
12361 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12362 srv_xmlfiles to $srv_i386_xmlfiles.
12363 (i[34567]86-*-mingw32ce*): Likewise.
12364 (i[34567]86-*-mingw*): Likewise.
12365 (i[34567]86-*-nto*): Likewise.
12366 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12367 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12368 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12369 (x86_64-*-linux*): Likewise.
12370
12371 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12372 (init_registers_amd64_linux): New.
12373 (x86_arch_setup): Replace init_registers_x86_64_linux with
12374 init_registers_amd64_linux.
12375
12376 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12377
12378 * configure.ac: Check for libdl. If it is not available link against
12379 static libthread_db.
12380 * configure: Regenerate.
12381
12382 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12383
12384 PR9605
12385
12386 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12387 handing a read watchpoint.
12388 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12389
12390 2010-02-12 Doug Evans <dje@google.com>
12391
12392 * linux-low.c (linux_supports_tracefork_flag): Document.
12393 (linux_look_up_symbols): Add comment.
12394
12395 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12396
12397 * regcache.c (supply_register): Clear regcache if buf is NULL.
12398
12399 2010-02-02 Nicolas Roche <roche@sourceware.org>
12400 Joel Brobecker <brobecker@adacore.com>
12401
12402 * inferiors.c (find_inferior): Add function documentation.
12403 (unloaded_dll): Handle the case where the unloaded dll has not
12404 been previously registered in the dll list.
12405
12406 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12407
12408 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12409 (thumb2_breakpoint): New.
12410 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12411
12412 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12413
12414 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12415 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12416 breakpoints.
12417
12418 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12419
12420 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12421
12422 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12423
12424 * linux-s390-low.c (s390_collect_ptrace_register)
12425 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12426
12427 2010-01-21 Doug Evans <dje@google.com>
12428
12429 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12430 (PTRACE_ARG4_TYPE): New macro.
12431 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12432 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12433 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12434 (usr_store_inferior_registers): Ditto.
12435 (linux_read_memory, linux_write_memory): Ditto.
12436 (linux_test_for_tracefork): Ditto.
12437
12438 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12439 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12440
12441 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12442
12443 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12444 target.
12445
12446 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12447
12448 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12449 prototype to take a regcache. Adjust.
12450
12451 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12452
12453 * regcache.h (struct thread_info): Forward declare.
12454 (struct regcache): New.
12455 (new_register_cache): Adjust prototype.
12456 (get_thread_regcache): Declare.
12457 (free_register_cache): Adjust prototype.
12458 (registers_to_string, registers_from_string): Ditto.
12459 (supply_register, supply_register_by_name, collect_register)
12460 (collect_register_as_string, collect_register_by_name): Ditto.
12461 * regcache.c (struct inferior_regcache_data): Delete.
12462 (get_regcache): Rename to ...
12463 (get_thread_regcache): ... this. Adjust. Switch inferior before
12464 fetching registers.
12465 (regcache_invalidate_one): Adjust.
12466 (regcache_invalidate): Fix prototype.
12467 (new_register_cache): Return the new register cache.
12468 (free_register_cache): Change prototype.
12469 (realloc_register_cache): Adjust.
12470 (registers_to_string): Change prototype to take a regcache. Adjust.
12471 (registers_from_string): Ditto.
12472 (register_data): Ditto.
12473 (supply_register): Ditto.
12474 (supply_register_by_name): Ditto.
12475 (collect_register): Ditto.
12476 (collect_register_as_string): Ditto.
12477 (collect_register_by_name): Ditto.
12478 * server.c (process_serial_event): Adjust.
12479 * linux-low.h (regset_fill_func, regset_store_func): Change
12480 prototype.
12481 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12482 Change prototype.
12483 * linux-low.c (get_stop_pc): Adjust.
12484 (check_removed_breakpoint): Adjust.
12485 (linux_wait_for_event): Adjust.
12486 (linux_resume_one_lwp): Adjust.
12487 (fetch_register): Add regcache parameter. Adjust.
12488 (usr_store_inferior_registers): Ditto.
12489 (regsets_fetch_inferior_registers): Ditto.
12490 (regsets_store_inferior_registers): Ditto.
12491 (linux_fetch_registers, linux_store_registers): Ditto.
12492 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12493 regcache. Adjust.
12494 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12495 Ditto.
12496 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12497 prototype to take a regcache.
12498 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12499 * remote-utils.c (convert_ascii_to_int, outreg)
12500 (prepare_resume_reply): Change prototype to take a regcache.
12501 Adjust.
12502 * target.h (struct target_ops) <fetch_registers, store_registers>:
12503 Change prototype to take a regcache.
12504 (fetch_inferior_registers, store_inferior_registers): Change
12505 prototype to take a regcache. Adjust.
12506 * proc-service.c (ps_lgetregs): Adjust.
12507 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12508 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12509 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12510 take a regcache. Adjust.
12511 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12512 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12513 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12514 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12515 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12516 (cris_cannot_fetch_register):
12517 (cris_breakpoint_at): Change prototype to take a regcache.
12518 Adjust.
12519 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12520 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12521 to take a regcache. Adjust.
12522 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12523 Adjust.
12524 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12525 take a regcache. Adjust.
12526 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12527 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12528 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12529 * linux-mips-low.c (mips_get_pc):
12530 (mips_set_pc): Change prototype to take a regcache. Adjust.
12531 (mips_reinsert_addr): Adjust.
12532 (mips_collect_register): Change prototype to take a regcache.
12533 Adjust.
12534 (mips_supply_register):
12535 (mips_collect_register_32bit, mips_supply_register_32bit)
12536 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12537 (mips_store_fpregset): Ditto.
12538 * linux-ppc-low.c (ppc_supply_ptrace_register)
12539 (ppc_supply_ptrace_register): Ditto.
12540 (parse_spufs_run): Adjust.
12541 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12542 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12543 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12544 take a regcache. Adjust.
12545 * linux-s390-low.c (s390_collect_ptrace_register)
12546 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12547 (s390_set_pc): Change prototype to take a regcache. Adjust.
12548 (s390_arch_setup): Adjust.
12549 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12550 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12551 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12552 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12553 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12554 regcache. Adjust.
12555 (sparc_breakpoint_at): Adjust.
12556 * linux-xtensa-low.c (xtensa_fill_gregset):
12557 (xtensa_store_gregset):
12558 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12559 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12560 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12561 prototype to take a regcache. Adjust.
12562 * win32-arm-low.c (arm_fetch_inferior_register)
12563 (arm_store_inferior_register): Change prototype to take a
12564 regcache. Adjust.
12565 * win32-i386-low.c (i386_fetch_inferior_register)
12566 (i386_store_inferior_register): Change prototype to take a
12567 regcache. Adjust.
12568 * win32-low.c (child_fetch_inferior_registers)
12569 (child_store_inferior_registers): Change prototype to take a
12570 regcache. Adjust.
12571 (win32_wait): Adjust.
12572 (win32_fetch_inferior_registers): Change prototype to take a
12573 regcache. Adjust.
12574 (win32_store_inferior_registers): Adjust.
12575 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12576 store_inferior_register>: Change prototype to take a regcache.
12577
12578 2010-01-20 Doug Evans <dje@google.com>
12579
12580 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12581 #ifdef.
12582 (linux_wait_for_event1, linux_init_signals): Ditto.
12583 (W_STOPCODE): Provide definition if missing.
12584
12585 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12586
12587 * linux-low.c (linux_core_of_thread): New.
12588 (compare_ints, show_process, list_threads): New.
12589 (linux_qxfer_osdata): Report threads and cores.
12590 (linux_target_op): Register linux_core_of_thread.
12591 * remote-utils.c (prepare_resume_reply): Report the core.
12592 (buffer_xml_printf): Support %d specifier.
12593 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12594 New.
12595 (handle_query): Handle qXfer:threads. Announce availability
12596 thereof.
12597 * target.h (struct target_ops): New field core_of_thread.
12598
12599 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12600
12601 * Makefile.in (clean): Remove new generated files.
12602 (reg-s390.o, reg-s390.c): Remove rules.
12603 (reg-s390x.o, reg-s390x.c): Likewise.
12604 (s390-linux32.o, s390-linux32.c): Add rules.
12605 (s390-linux64.o, s390-linux64.c): Likewise.
12606 (s390x-linux64.o, s390x-linux64.c): Likewise.
12607 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12608 * linux-s390-low.c: Include <elf.h>.
12609 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12610 (init_registers_s390): Remove prototype.
12611 (init_registers_s390x): Likewise.
12612 (init_registers_s390_linux32): Add prototype.
12613 (init_registers_s390_linux64): Likewise.
12614 (init_registers_s390x_linux64): Likewise.
12615 (s390_num_regs_3264): New define.
12616 (s390_regmap_3264): New global variable.
12617 (s390_cannot_fetch_register): Remove obsolete check.
12618 (s390_cannot_store_register): Likewise.
12619 (s390_collect_ptrace_register): Handle upper/lower register halves.
12620 (s390_supply_ptrace_register): Likewise.
12621 (s390_fill_gregset): Update to register number changes.
12622 (s390_get_hwcap): New routine.
12623 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12624 Install appropriate regmap and register set.
12625
12626 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12627
12628 * server.c (gdbserver_version): Update copyright year to 2010.
12629 * gdbreplay.c (gdbreplay_version): Likewise.
12630
12631 2009-12-28 Doug Evans <dje@google.com>
12632
12633 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12634 elf/external.h. Include <elf.h> instead but only if necessary.
12635
12636 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12637
12638 * linux-low.c (linux_remove_process): Remove `detaching'
12639 parameter. Don't release/detach from thread_db here.
12640 (linux_kill): Release/detach from thread_db here, ...
12641 (linux_detach): ... and here, before actually detaching.
12642 (linux_wait_1): ... and here, when a process exits.
12643 * thread-db.c (any_thread_of): New.
12644 (thread_db_free): Switch the current inferior to a thread of the
12645 passed in process.
12646
12647 2009-12-21 Doug Evans <dje@google.com>
12648
12649 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12650
12651 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12652 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12653 warning ifndef __NR_tkill. Move setting of errno there too.
12654 Delete unnecessary resetting of errno after syscall.
12655 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12656
12657 * configure.ac: Check for dladdr.
12658 * config.in: Regenerate.
12659 * configure: Regenerate.
12660 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12661 (try_thread_db_load): Update.
12662
12663 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12664
12665 2009-12-18 Doug Evans <dje@google.com>
12666
12667 * event-loop.c: Include unistd.h if it exists.
12668
12669 * linux-low.c (my_waitpid): Move definition away from being in
12670 between linux_tracefork_child/linux_test_for_tracefork.
12671
12672 * gdb_proc_service.h (psaddr_t): Fix type.
12673 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12674 signature to match glibc.
12675
12676 2009-12-16 Doug Evans <dje@google.com>
12677
12678 * linux-low.c (linux_read_memory): Fix argument to read.
12679
12680 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12681
12682 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12683 events, don't leave current_inferior pointing at null.
12684
12685 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12686
12687 * win32-low.c (LOG): Delete.
12688 (OUTMSG): Output to stderr.
12689 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12690 on compile time LOG macro.
12691 (win32_wait): Fix debug output.
12692
12693 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12694
12695 * win32-low.c (win32_add_one_solib): If the dll name is
12696 "ntdll.dll", prepend the system directory to the dll path.
12697
12698 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12699
12700 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12701
12702 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12703 Vladimir Prus <vladimir@codesourcery.com>
12704
12705 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12706 * configure.ac: Check for __mcoldfire__ and set
12707 gdb_cv_m68k_is_coldfire.
12708 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12709 reg-cf.o and reg-m68k.o.
12710 * configure: Regenerated.
12711
12712 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12713
12714 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12715 Pass it to thread_db_free.
12716 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12717 proper `detaching' argument to linux_remove_process.
12718 * linux-low.h (thread_db_free): Add `detaching' parameter.
12719 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12720 to thread_db_free.
12721 (thread_db_free): Add `detaching' parameter. Only
12722 call td_ta_clear_event if detaching from process.
12723
12724 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12725
12726 * thread-db.c (thread_db_free): Fix typo.
12727
12728 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12729
12730 PR gdb/10838
12731 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12732
12733 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12734
12735 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12736 with an i686 compiler.
12737 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12738 needed.
12739 * configure: Rebuilt.
12740
12741 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12742
12743 PR gdb/10783
12744
12745 * server.c (handle_search_memory_1): Correct read_addr initialization
12746 in loop for searching subsequent chunks.
12747
12748 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12749
12750 * configure.ac: New --with-libthread-db option.
12751 * thread-db.c: Allow direct dependence on libthread_db.
12752 (thread_db_free): Adjust.
12753 * config.in: Regenerate.
12754 * configure: Likewise.
12755
12756 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12757
12758 PR gdb/10757
12759 * thread-db.c (attach_thread): New function.
12760 (maybe_attach_thread): Return success/failure.
12761 (find_new_threads_callback): Adjust.
12762 (thread_db_find_new_threads): Loop until no new threads.
12763
12764 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12765
12766 * proc-service.c (ps_lgetregs): Formatting.
12767
12768 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12769
12770 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12771 * configure.ac: Adjust.
12772 * linux-low.h (struct process_info_private): Move members to struct
12773 thread_db.
12774 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12775 * linux-low.c (linux_remove_process): Adjust.
12776 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12777 * server.c (handle_query): Move code ...
12778 (handle_monitor_command): ... here. New function.
12779 * target.h (struct target_ops): New member.
12780 * thread-db.c (struct thread_db): New.
12781 (libthread_db_search_path): New variable.
12782 (thread_db_create_event, thread_db_enable_reporting)
12783 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12784 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12785 (try_thread_db_load_1, dladdr_to_soname): New functions.
12786 (try_thread_db_load, thread_db_load_search): New functions.
12787 (thread_db_init): Search for libthread_db.
12788 (thread_db_free): New function.
12789 (thread_db_handle_monitor_command): Likewise.
12790 * config.in: Regenerate.
12791 * configure: Regenerate.
12792
12793 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12794
12795 * spu-low.c (spu_kill): Wait for inferior to terminate.
12796 Call clear_inferiors.
12797 (spu_detach): Call clear_inferiors.
12798
12799 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12800
12801 * aclocal.m4: Regenerate.
12802 * config.in: Likewise.
12803 * configure: Likewise.
12804
12805 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12806
12807 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12808 (parse_spufs_run): New function.
12809 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12810 (ppc_breakpoint_at): Handle SPU breakpoints.
12811
12812 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12813
12814 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12815 (SPUFS_MAGIC): Define.
12816 (spu_enumerate_spu_ids): New function.
12817 (linux_qxfer_spu): New function.
12818 (linux_target_ops): Install linux_qxfer_spu.
12819
12820 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12821
12822 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12823 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12824 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12825 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12826 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12827 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12828 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12829 (init_registers_powerpc_cell32l): Add prototype.
12830 (init_registers_powerpc_cell64l): Likewise.
12831 (ppc_arch_setup): Detect Cell/B.E. architecture.
12832
12833 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12834
12835 * Makefile.in (datarootdir): New variable.
12836
12837 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12838
12839 * linux-low.c (linux_write_memory): Update debugging output.
12840 * Makefile.in (clean): Add new descriptions.
12841 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12842 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12843 * configure.srv: Add new files for arm*-*-linux*.
12844 * linux-arm-low.c: Add new declarations.
12845 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12846 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12847 (HWCAP_VFPv3D16): New.
12848 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12849 instead of __IWMMXT__.
12850 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12851 (arm_arch_setup): New.
12852 (target_regsets): Remove #ifdef. Add VFP regset.
12853 (the_low_target): Use arm_arch_setup.
12854
12855 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12856
12857 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12858 the main thread again.
12859
12860 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12861
12862 Adding Neutrino gdbserver.
12863 * configure: Regenerated.
12864 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12865 * configure.srv (i[34567]86-*-nto*): New target.
12866 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12867 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12868 (nto_comctrl) [__QNX__]: New function.
12869 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12870
12871 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12872
12873 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12874 srv_tgtobj.
12875
12876 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12877 Pedro Alves <pedro@codesourcery.com>
12878
12879 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12880 don't support CONTEXT_EXTENDED_REGISTERS.
12881 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12882 (the_low_target): Install them.
12883 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12884 failing with ERROR_PIPE_NOT_CONNECTED.
12885
12886 2009-06-30 Doug Evans <dje@google.com>
12887 Pierre Muller <muller@ics.u-strasbg.fr>
12888
12889 Add h/w watchpoint support to x86-linux, win32-i386.
12890 * Makefile.in (SFILES): Add i386-low.c
12891 (i386_low_h): Define.
12892 (i386-low.o): Add dependencies.
12893 (linux-x86-low.o): Add i386-low.h dependency.
12894 (win32-i386-low.o): Ditto.
12895 * i386-low.c: New file.
12896 * i386-low.h: New file.
12897 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12898 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12899 * linux-low.c (linux_add_process): Initialize arch_private.
12900 (linux_remove_process): Free arch_private.
12901 (add_lwp): Initialize arch_private.
12902 (delete_lwp): Free arch_private.
12903 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12904 provided.
12905 * linux-low.h (process_info_private): New member arch_private.
12906 (lwp_info): New member arch_private.
12907 (linux_target_ops): New members new_process, new_thread,
12908 prepare_to_resume.
12909 (ptid_of): New macro.
12910 * linux-x86-low.c: Include stddef.h, i386-low.h.
12911 (arch_process_info): New struct.
12912 (arch_lwp_info): New struct.
12913 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12914 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12915 (i386_dr_low_get_status): New function.
12916 (x86_insert_point, x86_remove_point): New functions.
12917 (x86_stopped_by_watchpoint): New function.
12918 (x86_stopped_data_address): New function.
12919 (x86_linux_new_process, x86_linux_new_thread): New functions.
12920 (x86_linux_prepare_to_resume): New function.
12921 (the_low_target): Add entries for insert_point, remove_point,
12922 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12923 prepare_to_resume.
12924 * server.c (debug_hw_points): New global.
12925 (monitor_show_help): Document set debug-hw-points.
12926 (handle_query): Process "set debug-hw-points".
12927 * server.h (debug_hw_points): Declare.
12928 (paddress): Declare.
12929 * utils.c (NUMCELLS, CELLSIZE): New macros.
12930 (get_sell, xsnprintf, paddress): New functions.
12931 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12932 remove_point, stopped_by_watchpoint, stopped_data_address.
12933 * win32-i386-low.c: Include i386-low.h.
12934 (debug_reg_state): Replaces dr.
12935 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12936 (i386_dr_low_get_status): New function.
12937 (i386_insert_point, i386_remove_point): New functions.
12938 (i386_stopped_by_watchpoint): New function.
12939 (i386_stopped_data_address): New function.
12940 (i386_initial_stuff): Update.
12941 (get_thread_context,set_thread_context,i386_thread_added): Update.
12942 (the_low_target): Add entries for insert_point,
12943 remove_point, stopped_by_watchpoint, stopped_data_address.
12944 * win32-low.c (win32_insert_watchpoint): New function.
12945 (win32_remove_watchpoint): New function.
12946 (win32_stopped_by_watchpoint): New function.
12947 (win32_stopped_data_address): New function.
12948 (win32_target_ops): Add entries for insert_watchpoint,
12949 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12950 * win32-low.h (win32_target_ops): New members insert_point,
12951 remove_point, stopped_by_watchpoint, stopped_data_address.
12952
12953 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12954
12955 * server.c (process_serial_event): Re-return unsupported, not
12956 error, if the type isn't recognized. Re-allow supporting only
12957 insert or remove packets. Also call require_running for
12958 breakpoints. Add missing break statement to default case. Tidy.
12959 * target.h (struct target_ops): Rename insert_watchpoint to
12960 insert_point, and remove_watchpoint to remove_point.
12961
12962 * linux-low.h (struct linux_target_ops): Likewise.
12963 * linux-low.c (linux_insert_watchpoint): Rename to ...
12964 (linux_insert_point): ... this. Adjust.
12965 (linux_remove_watchpoint): Rename to ...
12966 (linux_remove_point): ... this. Adjust.
12967 (linux_target_ops): Adjust.
12968 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12969 (cris_insert_point): ... this.
12970 (cris_remove_watchpoint): Rename to ...
12971 (cris_remove_point): ... this.
12972 (the_low_target): Adjust.
12973
12974 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12975
12976 * server.c (handle_v_kill): Pass signal_pid to
12977 kill_inferior if multi_process is zero.
12978
12979 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12980
12981 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12982 * target.h (target_ops): Comment for *_watchpoint to make it clear
12983 the functions can get types '0' and '1'.
12984
12985 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12986
12987 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12988 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12989 * regcache.c (get_regcache): Likewise.
12990 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12991 * win32-low.c (child_fetch_inferior_registers): Remove check for
12992 regno 0.
12993
12994 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12995 Pedro Alves <pedro@codesourcery.com>
12996
12997 * target.h (struct target_ops) <supports_multi_process>: New
12998 callback.
12999 (target_supports_multi_process): New.
13000 * server.c (handle_query): Even if GDB reports support, only
13001 enable multi-process if the target also supports it. Report
13002 multi-process support only if the target backend supports it.
13003 * linux-low.c (linux_supports_multi_process): New function.
13004 (linux_target_ops): Install it as target_supports_multi_process
13005 callback.
13006
13007 2009-05-24 Doug Evans <dje@google.com>
13008
13009 Global renaming of find_thread_pid to find_thread_ptid.
13010 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13011 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13012 All callers updated.
13013
13014 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13015 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13016 directly.
13017
13018 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13019 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13020 (linux_resume_one_lwp): Ditto.
13021
13022 2009-05-23 Doug Evans <dje@google.com>
13023
13024 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13025 from struct inferior_list_entry * to struct lwp_info *.
13026 All callers updated.
13027
13028 2009-05-13 Doug Evans <dje@google.com>
13029
13030 * linux-x86-low.c: Don't include assert.h.
13031 (x86_siginfo_fixup): Use fatal, not assert.
13032 (x86_arch_setup): Fix comment.
13033
13034 2009-05-12 Doug Evans <dje@google.com>
13035
13036 Biarch support for i386/amd64 gdbserver.
13037 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13038 Add linux-x86-low.c.
13039 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13040 (linux-x86-low.o): Add.
13041 * linux-x86-64-low.c: Delete.
13042 * linux-i386-low.c: Delete.
13043 * linux-x86-low.c: New file.
13044 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13045 linux-x86-low.o.
13046 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13047 linux-x86-low.o.
13048 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13049 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13050 (linux_child_pid_to_exec_file): New function.
13051 (elf_64_header_p, elf_64_file_p): New functions.
13052 (siginfo_fixup): New function.
13053 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13054 give target a chance to convert layout.
13055 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13056 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13057
13058 2009-05-07 Doug Evans <dje@google.com>
13059
13060 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13061 (regsets_store_inferior_registers): Ditto.
13062
13063 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13064
13065 PR server/10048
13066
13067 * linux-low.c (must_set_ptrace_flags): Delete.
13068 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13069 of the global.
13070 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13071 `lwp->must_set_ptrace_flags' instead.
13072 (linux_wait_for_event_1): Set ptrace options here.
13073 (linux_wait_1): ... not here.
13074
13075 2009-04-30 Doug Evans <dje@google.com>
13076
13077 * inferiors.c (started_inferior_callback): New function.
13078 (attached_inferior_callback): New function.
13079 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13080 * server.c (print_started_pid, print_attached_pid): New functions.
13081 (detach_or_kill_for_exit): New function.
13082 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13083 * server.h (have_started_inferiors_p): Declare.
13084 (have_attached_inferiors_p): Declare.
13085
13086 * inferiors.c (remove_process): Fix memory leak, free process.
13087 * linux-low.c (linux_remove_process): New function.
13088 (linux_kill): Call it instead of remove_process.
13089 (linux_detach, linux_wait_1): Ditto.
13090
13091 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13092
13093 * configure.srv: Add x86 Windows CE target.
13094
13095 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13096
13097 * inferiors.c (get_thread_process): Make global.
13098 * server.h (get_thread_process): Add prototype.
13099 * thread-db.c (find_one_thread): Use get_thread_process
13100 instead of current_process.
13101 (thread_db_get_tls_address): Do not crash if called when
13102 thread layer is not yet initialized.
13103
13104 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13105
13106 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13107 * spu-low.c (current_tid): Rename to ...
13108 (current_ptid): ... this.
13109 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13110 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13111 ptid_get_lwp (current_ptid) instead of current_tid.
13112 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13113 instead of current_tid. Use find_process_pid to verify pid
13114 argument is valid. Pass proper argument to remove_process.
13115 (spu_thread_alive): Compare current_ptid instead of current_tid.
13116 (spu_resume): Likewise.
13117
13118 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13119
13120 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13121 variable.
13122
13123 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13124
13125 Implement the multiprocess extensions, and add linux multiprocess
13126 support.
13127
13128 * server.h (ULONGEST): Declare.
13129 (struct ptid, ptid_t): New.
13130 (minus_one_ptid, null_ptid): Declare.
13131 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13132 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13133 (struct inferior_list_entry): Change `id' type from unsigned from
13134 to ptid_t.
13135 (struct sym_cache, struct breakpoint, struct
13136 process_info_private): Forward declare.
13137 (struct process_info): Declare.
13138 (current_process): Declare.
13139 (all_processes): Declare.
13140 (initialize_inferiors): Declare.
13141 (add_thread): Adjust to use ptid_t.
13142 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13143 (add_process, remove_process, find_thread_pid): Declare.
13144 (find_inferior_id): Adjust to use ptid_t.
13145 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13146 (multi_process): Declare.
13147 (push_event): Adjust to use ptid_t.
13148 (read_ptid, write_ptid): Declare.
13149 (prepare_resume_reply): Adjust to use ptid_t.
13150 (clear_symbol_cache): Declare.
13151 * inferiors.c (all_processes): New.
13152 (null_ptid, minus_one_ptid): New.
13153 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13154 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13155 (add_thread): Change unsigned long to ptid. Remove gdb_id
13156 parameter. Adjust.
13157 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13158 (gdb_id_to_thread): Rename to ...
13159 (find_thread_pid): ... this. Change unsigned long to ptid.
13160 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13161 (loaded_dll, pull_pid_from_list): Adjust.
13162 (add_process, remove_process, find_process_pid)
13163 (get_thread_process, current_process, initialize_inferiors): New.
13164 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13165 (struct target_waitstatus) <related_pid>: Ditto.
13166 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13167 return type to int.
13168 (struct target_ops) <join>: Add `pid' argument.
13169 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13170 (struct target_ops) <wait>: Add `ptid' field. Change return type
13171 to ptid.
13172 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13173 (mywait): Add `ptid' argument. Change return type to ptid_t.
13174 (target_pid_to_str): Declare.
13175 * target.c (set_desired_inferior): Adjust to use ptids.
13176 (mywait): Add new `ptid' argument. Adjust.
13177 (target_pid_to_str): New.
13178 * mem-break.h (free_all_breakpoints): Declare.
13179 * mem-break.c (breakpoints): Delelete.
13180 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13181 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13182 to use per-process breakpoint list.
13183 (free_all_breakpoints): New.
13184 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13185 (symbol_cache, all_symbols_looked_up): Delete.
13186 (hexchars): New.
13187 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13188 read_ptid): New.
13189 (prepare_resume_reply): Change ptid argument's type from unsigned
13190 long to ptid_t. Adjust. Implement W;process and X;process.
13191 (free_sym_cache, clear_symbol_cache): New.
13192 (look_up_one_symbol): Adjust to per-process symbol cache. *
13193 * server.c (cont_thread, general_thread, step_thread): Change type
13194 to ptid_t.
13195 (attached): Delete.
13196 (multi_process): New.
13197 (last_ptid): Change type to ptid_t.
13198 (struct vstop_notif) <ptid>: Change type to ptid_t.
13199 (queue_stop_reply, push_event): Change `ptid' argument's type to
13200 ptid_t.
13201 (discard_queued_stop_replies): Add `pid' argument.
13202 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13203 changes. Don't reference the `attached' global.
13204 (attach_inferior): Adjust to mywait interface changes.
13205 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13206 features. Handle and report "multiprocess+". Handle
13207 "qAttached:PID".
13208 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13209 changes.
13210 (handle_v_kill): New.
13211 (handle_v_stopped): Adjust to use target_pid_to_str.
13212 (handle_v_requests): Allow multiple attaches and runs when
13213 multiprocess extensions are in effect. Handle "vKill".
13214 (myresume): Adjust to use ptids.
13215 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13216 (handle_status): Adjust to discard_queued_stop_replies interface
13217 change.
13218 (first_thread_of, kill_inferior_callback)
13219 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13220 (main): Call initialize_inferiors. Adjust to use ptids, killing
13221 and detaching from all inferiors. Handle multiprocess packet
13222 variants.
13223 * linux-low.h: Include gdb_proc_service.h.
13224 (struct process_info_private): New.
13225 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13226 <lwpid_of>: Use ptid_get_lwp.
13227 (get_lwp_thread): Adjust.
13228 (struct lwp_info): Add `dead' member.
13229 (find_lwp_pid): Declare.
13230 * linux-low.c (thread_db_active): Delete.
13231 (new_inferior): Adjust comment.
13232 (inferior_pid): Delete.
13233 (linux_add_process): New.
13234 (handle_extended_wait): Adjust.
13235 (add_lwp): Change unsigned long to ptid.
13236 (linux_create_inferior): Add process to processes table. Adjust
13237 to use ptids. Don't set new_inferior here.
13238 (linux_attach_lwp): Rename to ...
13239 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13240 it. Adjust to use ptids.
13241 (linux_attach_lwp): New.
13242 (linux_attach): Add process to processes table. Don't set
13243 new_inferior here.
13244 (struct counter): New.
13245 (second_thread_of_pid_p, last_thread_of_process_p): New.
13246 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13247 multiple processes.
13248 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13249 processes. Remove process from process table.
13250 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13251 to multiple processes.
13252 (any_thread_of): New.
13253 (linux_detach): Add `pid' argument, and handle it. Remove process
13254 from processes table.
13255 (linux_join): Add `pid' argument. Handle it.
13256 (linux_thread_alive): Change unsighed long argument to ptid_t.
13257 Consider dead lwps as not being alive.
13258 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13259 threads we're not interested in.
13260 (same_lwp, find_lwp_pid): New.
13261 (linux_wait_for_lwp): Change `pid' argument's type from int to
13262 ptid_t. Adjust.
13263 (linux_wait_for_event): Rename to ...
13264 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13265 from int to ptid_t. Adjust.
13266 (linux_wait_for_event): New.
13267 (linux_wait_1): Add `ptid' argument. Change return type to
13268 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13269 that exit from the process table.
13270 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13271 Adjust.
13272 (mark_lwp_dead): New.
13273 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13274 stopping all threads, mark its main lwp as dead.
13275 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13276 ptids.
13277 (fetch_register, usr_store_inferior_registers)
13278 (regsets_fetch_inferior_registers)
13279 (regsets_store_inferior_registers, linux_read_memory)
13280 (linux_write_memory): Inline `inferior_pid'.
13281 (linux_look_up_symbols): Adjust to use per-process
13282 `thread_db_active'.
13283 (linux_request_interrupt): Adjust to use ptids.
13284 (linux_read_auxv): Inline `inferior_pid'.
13285 (initialize_low): Don't reference thread_db_active.
13286 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13287 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13288 (ps_getpid): Return the pid of the current inferior.
13289 * thread-db.c (proc_handle, thread_agent): Delete.
13290 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13291 per-process data.
13292 (find_one_thread): Change argument type to ptid_t. Adjust to
13293 per-process data.
13294 (maybe_attach_thread): Adjust to per-process data and ptids.
13295 (thread_db_find_new_threads): Ditto.
13296 (thread_db_init): Ditto.
13297 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13298 processes table. Adjust to use ptids.
13299 (spu_kill, spu_detach): Adjust interface. Remove process from
13300 processes table.
13301 (spu_join, spu_thread_alive): Adjust interface.
13302 (spu_wait): Adjust interface. Remove process from processes
13303 table. Adjust to use ptids.
13304 * win32-low.c (current_inferior_tid): Delete.
13305 (current_inferior_ptid): New.
13306 (debug_event_ptid): New.
13307 (thread_rec): Take a ptid. Adjust.
13308 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13309 (child_delete_thread): Ditto.
13310 (do_initial_child_stuff): Add `attached' argument. Add process to
13311 processes table.
13312 (child_fetch_inferior_registers, child_store_inferior_registers):
13313 Adjust.
13314 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13315 (win32_attach): Pass 1 to do_initial_child_stuff.
13316 (win32_kill): Adjust interface. Remove process from processes
13317 table.
13318 (win32_detach): Ditto.
13319 (win32_join): Adjust interface.
13320 (win32_thread_alive): Take a ptid.
13321 (win32_resume): Adjust to use ptids.
13322 (get_child_debug_event): Ditto.
13323 (win32_wait): Adjust interface. Remove exiting process from
13324 processes table.
13325
13326 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13327
13328 Non-stop mode support.
13329
13330 * server.h (non_stop): Declare.
13331 (gdb_client_data, handler_func): Declare.
13332 (delete_file_handler, add_file_handler, start_event_loop):
13333 Declare.
13334 (handle_serial_event, handle_target_event, push_event)
13335 (putpkt_notif): Declare.
13336 * target.h (enum resume_kind): New.
13337 (struct thread_resume): Replace `step' field by `kind' field.
13338 (TARGET_WNOHANG): Define.
13339 (struct target_ops) <wait>: Add `options' argument.
13340 <supports_non_stop, async, start_non_stop>: New fields.
13341 (target_supports_non_stop, target_async): New.
13342 (start_non_stop): Declare.
13343 (mywait): Add `options' argument.
13344 * target.c (mywait): Add `options' argument. Print child exit
13345 notifications here.
13346 (start_non_stop): New.
13347 * server.c (non_stop, own_buf, mem_buf): New globals.
13348 (struct vstop_notif): New.
13349 (notif_queue): New global.
13350 (queue_stop_reply, push_event, discard_queued_stop_replies)
13351 (send_next_stop_reply): New.
13352 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13353 interface changes.
13354 (attach_inferior): In non-stop mode, don't wait for the target
13355 here.
13356 (handle_general_set): Handle QNonStop.
13357 (handle_query): When handling qC, return the current general
13358 thread, instead of the first thread of the list.
13359 (handle_query): If the backend supports non-stop mode, include
13360 QNonStop+ in the qSupported query response.
13361 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13362 and non-stop mode.
13363 (handle_v_attach, handle_v_run): Handle non-stop mode.
13364 (handle_v_stopped): New.
13365 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13366 (myresume): Adjust to use resume_kind. Handle non-stop.
13367 (queue_stop_reply_callback): New.
13368 (handle_status): Handle non-stop mode.
13369 (main): Clear non_stop flag on reconnection. Use the event-loop.
13370 Refactor serial protocol handling from here ...
13371 (process_serial_event): ... to this new function. When GDB
13372 selects any thread, select one here. In non-stop mode, wait until
13373 GDB acks all pending events before exiting.
13374 (handle_serial_event, handle_target_event): New.
13375 * remote-utils.c (remote_open): Install remote_desc in the event
13376 loop.
13377 (remote_close): Remove remote_desc from the event loop.
13378 (putpkt_binary): Rename to...
13379 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13380 (putpkt_binary): New as wrapper around putpkt_binary_1.
13381 (putpkt_notif): New.
13382 (prepare_resume_reply): In non-stop mode, don't change the
13383 general_thread.
13384 * event-loop.c: New.
13385 * Makefile.in (OBJ): Add event-loop.o.
13386 (event-loop.o): New rule.
13387
13388 * linux-low.h (pid_of): Moved here.
13389 (lwpid_of): New.
13390 (get_lwp_thread): Use lwpid_of.
13391 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13392 * linux-low.c (pid_of): Delete.
13393 (inferior_pid): Use lwpid_of.
13394 (linux_event_pipe): New.
13395 (target_is_async_p): New.
13396 (delete_lwp): New.
13397 (handle_extended_wait): Use lwpid_of.
13398 (add_lwp): Don't set lwpid field.
13399 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13400 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13401 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13402 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13403 first. Adjust to linux_wait_for_event interface changes. Use
13404 lwpid_of.
13405 (linux_detach): Don't delete the main lwp here.
13406 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13407 (status_pending_p): Don't consider explicitly suspended lwps.
13408 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13409 pointer. Add OPTIONS argument. Change return type to int. Use
13410 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13411 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13412 pointer. Add status pointer argument. Return a pid instead of a
13413 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13414 changes. In non-stop mode, don't switch to a random thread.
13415 (linux_wait): Rename to...
13416 (linux_wait_1): ... this. Add target_options argument, and handle
13417 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13418 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13419 clean exit and signal exit code. Don't stop all threads in
13420 non-stop mode. In all-stop mode, only stop all threads when
13421 reporting a stop to GDB. Handle explicit thread stop requests.
13422 (async_file_flush, async_file_mark): New.
13423 (linux_wait): New.
13424 (send_sigstop): Use lwpid_of.
13425 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13426 interface changes. In non-stop mode, don't switch to a random
13427 thread.
13428 (linux_resume_one_lwp): Use lwpid_of.
13429 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13430 (linux_resume_one_thread): ... this. Handle resume_stop. In
13431 non-stop mode, don't look for pending flag in all threads.
13432 (resume_status_pending_p): Don't consider explicitly suspended
13433 threads.
13434 (my_waitpid): Reimplement. Emulate __WALL.
13435 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13436 Use lwpid_of.
13437 (sigchld_handler, linux_supports_non_stop, linux_async)
13438 (linux_start_non_stop): New.
13439 (linux_target_ops): Register linux_supports_non_stop, linux_async
13440 and linux_start_non_stop.
13441 (initialize_low): Install SIGCHLD handler.
13442 * thread-db.c (thread_db_create_event, find_one_thread)
13443 (thread_db_get_tls_address): Use lwpid_of.
13444 * win32-low.c (win32_detach): Adjust to use resume_kind.
13445 (win32_wait): Add `options' argument.
13446 * spu-low.c (spu_resume): Adjust to use resume_kind.
13447 (spu_wait): Add `options' argument.
13448
13449 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13450
13451 Decouple target code from remote protocol.
13452
13453 * target.h (enum target_waitkind): New.
13454 (struct target_waitstatus): New.
13455 (struct target_ops) <wait>: Return an unsigned long. Take a
13456 target_waitstatus pointer instead of a char pointer.
13457 (mywait): Likewise.
13458 * target.c (mywait): Change prototype to return an unsigned long.
13459 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13460 * server.h (thread_from_wait, old_thread_from_wait): Delete
13461 declarations.
13462 (prepare_resume_reply): Change prototype to take a
13463 target_waitstatus.
13464 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13465 (last_status, last_ptid): New.
13466 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13467 pid instead of a signal.
13468 (attach_inferior): Remove "status" and "signal" parameters.
13469 Adjust.
13470 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13471 not as an address.
13472 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13473 (handle_v_requests, myresume): Remove "status" and "signal"
13474 parameters. Adjust.
13475 (handle_status): New.
13476 (main): Delete local `status'. Adjust.
13477 * remote-utils.c: Include target.h.
13478 (prepare_resume_reply): Change prototype to take a
13479 target_waitstatus. Adjust.
13480
13481 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13482 interface.
13483 * spu-low.c (spu_wait): Adjust.
13484 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13485 Delete.
13486 (win32_wait): Adjust.
13487
13488 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13489
13490 * target.h (struct thread_resume): Delete leave_stopped member.
13491 (struct target_ops): Add a `n' argument to the `resume' callback.
13492 * server.c (start_inferior): Adjust.
13493 (handle_v_cont, myresume): Adjust.
13494 * linux-low.c (check_removed_breakpoint): Adjust to resume
13495 interface change, and to removed leave_stopped field.
13496 (resume_ptr): Delete.
13497 (struct thread_resume_array): New.
13498 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13499 resume interface change.
13500 (linux_continue_one_thread, linux_queue_one_thread)
13501 (resume_status_pending_p): Check if the resume field is NULL
13502 instead of checking the leave_stopped member.
13503 (linux_resume): Adjust to the target resume interface change.
13504 * spu-low.c (spu_resume): Adjust to the target resume interface
13505 change.
13506 * win32-low.c (win32_detach, win32_resume): Ditto.
13507
13508 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13509
13510 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13511 flag.
13512 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13513 pending.
13514 (linux_continue_one_thread): Only preserve the stepping flag if
13515 there's a pending breakpoint.
13516
13517 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13518
13519 * server.c (main): After the inferior having exited, call
13520 remote_close before exiting gdbserver.
13521
13522 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13523
13524 Fix size of FPSCR in Power 7 processors.
13525 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13526 (PPC_FEATURE_HAS_DFP): New #define.
13527 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13528 size of the FPSCR.
13529
13530 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13531
13532 * server.c (handle_query) Whitespace and formatting.
13533
13534 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13535
13536 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13537 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13538 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13539 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13540 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13541 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13542 Makefile.in, configure.ac: Fix whitespace throughout.
13543 * configure: Regenerate.
13544
13545 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13546
13547 * inferiors.c (find_inferior): Make it safe for the callback
13548 function to delete the currently iterated inferior.
13549
13550 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13551
13552 * Makefile.in (linuw_low_h): Move higher.
13553 (thread-db.o): Depend on $(linux_low_h).
13554
13555 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13556
13557 Rename "process" to "lwp" throughout.
13558
13559 * linux-low.c (all_processes): Rename to...
13560 (all_lwps): ... this.
13561 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13562 (add_process): Rename to ...
13563 (add_lwp): ... this. Adjust.
13564 (linux_create_inferior): Adjust.
13565 (linux_attach_lwp): Adjust.
13566 (linux_attach): Adjust.
13567 (linux_kill_one_process): Rename to ...
13568 (linux_kill_one_lwp): ... this. Adjust.
13569 (linux_kill): Adjust.
13570 (linux_detach_one_process): Rename to ...
13571 (linux_detach_one_lwp): ... this. Adjust.
13572 (linux_detach): Adjust.
13573 (check_removed_breakpoint): Adjust.
13574 (status_pending_p): Adjust.
13575 (linux_wait_for_process): Rename to ...
13576 (linux_wait_for_lwp): ... this. Adjust.
13577 (linux_wait_for_event): Adjust.
13578 (send_sigstop): Adjust.
13579 (wait_for_sigstop): Adjust.
13580 (stop_all_processes): Rename to ...
13581 (stop_all_lwps): ... this.
13582 (linux_resume_one_process): Rename to ...
13583 (linux_resume_one_lwp): ... this. Adjust.
13584 (linux_set_resume_request, linux_continue_one_thread)
13585 (linux_queue_one_thread, resume_status_pending_p)
13586 (usr_store_inferior_registers, regsets_store_inferior_registers)
13587 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13588 Adjust.
13589 * linux-low.h (get_process): Rename to ...
13590 (get_lwp): ... this. Adjust.
13591 (get_thread_process): Rename to ...
13592 (get_thread_lwp): ... this. Adjust.
13593 (get_process_thread): Rename to ...
13594 (get_lwp_thread): ... this. Adjust.
13595 (struct process_info): Rename to ...
13596 (struct lwp_info): ... this.
13597 (all_processes): Rename to ...
13598 (all_lwps): ... this.
13599 * proc-service.c (ps_lgetregs): Adjust.
13600 * thread-db.c (thread_db_create_event, find_one_thread)
13601 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13602
13603 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13604
13605 * server.c (handle_query): Handle "qAttached".
13606
13607 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13608
13609 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13610 GPLv3, update license URL.
13611
13612 2009-03-01 Doug Evans <dje@google.com>
13613
13614 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13615 (server_h): Add gdb_signals.h.
13616 (signals.o): Update.
13617 * server.h (target_signal_from_host,target_signal_to_host_p)
13618 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13619
13620 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13621
13622 * remote-utils.c (getpkt): Also generate remote-debug
13623 information if noack_mode is set.
13624
13625 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13626
13627 * server.c (handle_query): Report qXfer:siginfo:read and
13628 qXfer:siginfo:write as supported and handle them.
13629 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13630 * linux-low.c (linux_xfer_siginfo): New.
13631 (linux_target_ops): Set it.
13632
13633 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13634
13635 * server.c (gdbserver_usage): Mention --remote-debug.
13636 (main): Accept '--remote-debug' switch.
13637
13638 2009-01-18 Doug Evans <dje@google.com>
13639
13640 * regcache.c (new_register_cache): No need to check result of xcalloc.
13641 * server.c (handle_search_memory): Back out calls to xmalloc,
13642 result is checked and error is returned to user upon failure.
13643 (handle_query): Ditto. Add more checks for result of malloc.
13644 (handle_v_cont): Check result of malloc, report error back to
13645 user upon failure.
13646 (handle_v_run): Ditto. Call freeargv.
13647 * server.h (freeargv): Declare.
13648 * utils.c (freeargv): New fn.
13649
13650 2009-01-15 Doug Evans <dje@google.com>
13651
13652 * gdbreplay.c (perror_with_name): Make arg const char *.
13653 * server.h (target_signal_to_name): Make return type const char *.
13654 * thread-db.c (thread_db_err_str): Make return type const char *.
13655 * utils.c (perror_with_name): Make arg const char *.
13656
13657 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13658
13659 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13660 when handling a EXIT_PROCESS_DEBUG_EVENT.
13661
13662 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13663
13664 * gdbreplay.c (gdbreplay_version): Update copyright year.
13665 * server.c (gdbserver_version): Likewise.
13666
13667 2009-01-05 Doug Evans <dje@google.com>
13668
13669 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13670 (handle_extended_wait): Improve comment.
13671
13672 2008-12-13 Doug Evans <dje@google.com>
13673
13674 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13675 * server.h (ATTR_MALLOC): New macro.
13676 (xmalloc,xcalloc,xstrdup): Declare.
13677 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13678 * inferiors.c: Ditto.
13679 * linux-low.c: Ditto.
13680 * mem-break.c: Ditto.
13681 * regcache.c: Ditto.
13682 * remote-utils.c: Ditto.
13683 * server.c: Ditto.
13684 * target.c: Ditto.
13685 * win32-low.c: Ditto.
13686
13687 2008-12-12 Doug Evans <dje@google.com>
13688
13689 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13690 in debugging printf.
13691
13692 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13693
13694 2008-12-09 Doug Evans <dje@google.com>
13695
13696 * linux-low.h (struct process_info): Delete member tid, unused.
13697 * thread-db.c (find_one_thread): Update.
13698 (maybe_attach_thread): Update.
13699
13700 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13701
13702 * target.h (struct target_ops): Add qxfer_osdata member.
13703 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13704 and dirent.h.
13705 (linux_qxfer_osdata): New functions.
13706 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13707 callback.
13708 * server.c (handle_query): Handle "qXfer:osdata:read:".
13709 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13710 (buffer_xml_printf): New functions.
13711 * server.h (struct buffer): New.
13712 (buffer_grow_str, buffer_grow_str0): New macros.
13713 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13714 (buffer_xml_printf): Declare.
13715
13716 2008-11-24 Doug Evans <dje@google.com>
13717
13718 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13719
13720 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13721
13722 * server.c (handle_v_run): Always use the supplied argument list.
13723
13724 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13725
13726 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13727 (xtensa_regmap_table): Add entry for scompare1.
13728
13729 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13730
13731 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13732 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13733 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13734 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13735 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13736 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13737 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13738 XML target descriptions.
13739 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13740 when inferior is running on an ISA 2.05 or later processor. Add
13741 special case to return offset for full 64-bit slot of FPSCR when
13742 in 32-bits.
13743
13744 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13745
13746 * Makefile.in (SFILES, clean): Added sparc64 files.
13747 (reg-sparc64.o, reg-sparc64.c): New.
13748 * configure.srv (sparc*-*-linux*): New configuration.
13749 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13750 syscall arguments for SPARC.
13751 (regsets_store_inferior_registers): Likewise.
13752 * linux-sparc-low.c: New file.
13753
13754 2008-10-21 Doug Evans <dje@google.com>
13755
13756 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13757 (READLINE_DIR,READLINE_DEP): Delete.
13758 (INTERNAL_CFLAGS): Update.
13759 (LINTFLAGS): Update.
13760
13761 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13762
13763 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13764 whole argv from the last run, not just argv[0].
13765
13766 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13767
13768 * regcache.c (new_register_cache): Return NULL if the register
13769 cache size isn't known yet.
13770 (free_register_cache): Avoid dereferencing a NULL regcache.
13771
13772 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13773
13774 * configure.srv: Merge MIPS and MIPS64.
13775
13776 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13777
13778 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13779
13780 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13781
13782 * Makefile.in: Add required vsx dependencies.
13783
13784 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13785 Declare init_registers_powerpc_vsx32l.
13786 Declare init_registers_powerpc_vsx64l.
13787 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13788 (ppc_arch_setup): Check for VSX in hwcap.
13789 (ppc_fill_vsxregset): New function.
13790 (ppc_store_vsxregset): New function.
13791 Add new VSX entry in regset_info target_regsets.
13792
13793 * configure.srv: Add new VSX dependencies.
13794
13795 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13796
13797 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13798 (remote_open): Set or clear transport_is_reliable.
13799 (putpkt_binary): Don't expect acks in noack mode.
13800 (getpkt): Don't send ack/nac in noack mode.
13801 * server.c (handle_general_set): Handle QStartNoAckMode.
13802 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13803 qSupported.
13804 (main): Reset noack_mode on every connection.
13805 * server.h (noack_mode): Declare.
13806
13807 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13808
13809 * Makefile.in (GDBREPLAY_OBS): New variable.
13810 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13811
13812 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13813 Daniel Jacobowitz <dan@codesourcery.com>
13814
13815 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13816 (usr_store_inferior_registers): Likewise.
13817 (regsets_store_inferior_registers): Likewise.
13818
13819 2008-07-31 Rolf Jansen <rj@surtec.com>
13820 Pedro Alves <pedro@codesourcery.com>
13821
13822 * configure.ac: Check for memmem declaration.
13823 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13824 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13825 (disable_packet_qfThreadInfo): Unconditionally compile.
13826 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13827 * configure, config.in: Regenerate.
13828
13829 2008-07-28 Doug Kwan <dougkwan@google.com>
13830
13831 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13832 (linux_write_memory): Remove declaration of errno.
13833
13834 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13835
13836 * linux-low.c (handle_extended_wait): Do not use "status"
13837 variable uninitialized.
13838
13839 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13840
13841 * server.c (handle_v_attach): Inhibit reporting dll changes.
13842
13843 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13844
13845 * remote-utils.c (prepare_resume_reply): If requested, don't
13846 output "thread:TID" in the T stop reply.
13847
13848 * server.c (disable_packet_vCont, disable_packet_Tthread)
13849 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13850 (handle_query): If requested, disable support for qC, qfThreadInfo
13851 and qsThreadInfo.
13852 (handle_v_requests): If requested, disable support for vCont.
13853 (gdbserver_show_disableable): New.
13854 (main): Handle --disable-packet and --disable-packet=LIST.
13855
13856 * server.h (disable_packet_vCont, disable_packet_Tthread)
13857 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13858
13859 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13860
13861 * server.c (gdbserver_usage): Mention --version.
13862
13863 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13864
13865 * Makefile.in (gdbreplay.o): New rule.
13866
13867 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13868
13869 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13870 message, not gdbserver.
13871
13872 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13873 Nathan Sidwell <nathan@codesourcery.com>
13874 Joseph Myers <joseph@codesourcery.com>
13875
13876 * acinclude.m4: Include ../../config/acx.m4.
13877 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13878 * configure, config.in: Regenerate.
13879 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13880 * server.c (gdbserver_version): Print PKGVERSION.
13881 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13882 (main): Adjust gdbserver_usage calls.
13883 * gdbreplay.c (version, host_name): Add declarations.
13884 (gdbreplay_version, gdbreplay_usage): New.
13885 (main): Accept --version and --help options.
13886
13887 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13888
13889 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13890 (arm_breakpoint_at): Handle Thumb.
13891 (the_low_target): Add comment.
13892
13893 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13894
13895 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13896
13897 2008-05-09 Doug Evans <dje@google.com>
13898
13899 * server.h (decode_search_memory_packet): Declare.
13900 * remote-utils.c (decode_search_memory_packet): New fn.
13901 * server.c (handle_search_memory_1): New fn.
13902 (handle_search_memory): New fn.
13903 (handle_query): Process qSearch:memory packets.
13904
13905 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13906
13907 * regcache.c (registers_length): Remove.
13908 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13909 full register packet.
13910 * regcache.h (registers_length): Remove prototype.
13911 * server.h (PBUFSIZ): Define to 16384.
13912
13913 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13914
13915 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13916 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13917 powerpc-64l.o, and powerpc-altivec64l.o.
13918 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13919 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13920 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13921 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13922 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13923 to srv_xmlfiles.
13924
13925 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13926 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13927 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13928 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13929 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13930 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13931 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13932 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13933 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13934 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13935 (clean): Update.
13936
13937 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13938 (init_registers_powerpc_32l): ... this new prototype.
13939 (init_registers_powerpc_32): Remove, replace by ...
13940 (init_registers_powerpc_altivec32l): ... this new prototype.
13941 (init_registers_powerpc_e500): Remove, replace by ...
13942 (init_registers_powerpc_e500l): ... this new prototype.
13943 (init_registers_ppc64): Remove, replace by ...
13944 (init_registers_powerpc_64l): ... this new prototype.
13945 (init_registers_powerpc_64): Remove, replace by ...
13946 (init_registers_powerpc_altivec64l): ... this new prototype.
13947 (ppc_num_regs): Set to 73.
13948 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13949 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13950 (ppc_cannot_store_register): Handle orig_r3 and trap.
13951 (ppc_arch_setup): Update init_registers_... calls.
13952 (ppc_fill_gregset): Handle orig_r3 and trap.
13953
13954 * inferiors.c (clear_inferiors): Reset current_inferior.
13955
13956 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13957
13958 * acinclude.m4: Add override.m4.
13959 * configure: Regenerate.
13960
13961 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13962
13963 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13964 initial call to init_register_ppc64.
13965
13966 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13967
13968 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13969 single powerpc*-*-linux* case.
13970 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13971
13972 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13973
13974 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13975 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13976 from reg_xmlfiles.
13977 * linux-ppc-low.c: Include <elf.h>.
13978 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13979 (ppc_hwcap): New global variable.
13980 (ppc_regmap): Remove __SPE__ #ifdef sections.
13981 (ppc_regmap_e500): New global variable.
13982 (ppc_cannot_store_register): Update __SPE__ special case.
13983 (ppc_get_hwcap): New function.
13984 (ppc_arch_setup): Use it to determine whether inferior supports
13985 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13986 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13987 Do not access registers if target does not support AltiVec.
13988 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13989 Do not access registers if target does not support SPE.
13990 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13991
13992 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13993
13994 * linux-low.c (disabled_regsets, num_regsets): New.
13995 (use_regsets_p): Delete.
13996 (linux_wait_for_process): Clear disabled_regsets.
13997 (regsets_fetch_inferior_registers): Check and set it.
13998 (regsets_store_inferior_registers): Likewise.
13999 (linux_fetch_registers, linux_store_registers): Do not use
14000 use_regsets_p.
14001 (initialize_low): Allocate disabled_regsets.
14002
14003 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14004
14005 * Makefile.in (LIBOBJS): New.
14006 (OBS): Use LIBOBJS.
14007 (memmem.o): New rule.
14008 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14009 * configure: Regenerated.
14010
14011 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14012
14013 * server.c (handle_query): Never return "unsupported" for
14014 qXfer:features:read queries.
14015
14016 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14017
14018 * server.c (get_features_xml): Fix inverted condition.
14019 (handle_query): Always support qXfer:feature:read.
14020
14021 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14022
14023 * server.c (wrapper_argv): New.
14024 (start_inferior): Handle wrapper_argv. If set, expect an extra
14025 trap.
14026 (gdbserver_usage): Document --wrapper.
14027 (main): Parse --wrapper.
14028
14029 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14030
14031 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14032 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14033 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14034 (ppc_set_pc): Likewise.
14035 (ppc_arch_setup): New function.
14036 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14037 of collect_register.
14038 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14039
14040 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14041
14042 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14043 instead of linux-ppc64-low.o.
14044 * linux-ppc64-low.c: Remove file.
14045 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14046 (linux-ppc64-low.o): Remove rule.
14047
14048 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14049 (init_registers_powerpc_64): Likewise.
14050 (ppc_regmap): Conditionally define depending on __powerpc64__.
14051 (ppc_cannot_store_register): Do not special-case "fpscr" when
14052 compiled on __powerpc64__.
14053 (ppc_collect_ptrace_register): New function.
14054 (ppc_supply_ptrace_register): New function.
14055 (ppc_breakpoint): Change type to "unsigned int".
14056 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14057 (the_low_target): Conditionally provide initializers for the
14058 arch_setup member depending on __powerpc64__. Install
14059 collect_ptrace_register and supply_ptrace_register members.
14060
14061 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14062
14063 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14064 * server.c (gdbserver_xmltarget): Define.
14065 (get_features_xml): Use it to replace "target.xml" and arch_string.
14066
14067 * configure.srv: Remove srv_xmltarget. Add XML files that were
14068 mentioned there to srv_xmlfiles instead. Remove conditional tests
14069 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14070 srv_xmlfiles and srv_regobj to include all possible choices.
14071 * configure.ac (srv_xmltarget): Remove.
14072 (srv_xmlfiles): Do not add "target.xml".
14073 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14074 checks for supplementary target information.
14075 * configure: Regenerate.
14076 * Makefile.in (XML_TARGET): Remove.
14077 (target.xml): Remove rule.
14078 (clean): Do not clean up target.xml.
14079 (.PRECIOUS): Do not mention target.xml.
14080
14081 * target.h (struct target_ops): Remove arch_string member.
14082 * linux-low.c (linux_arch_string): Remove.
14083 (linux_target_ops): Remove arch_string initializer.
14084 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14085 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14086 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14087 * spu-low.c (spu_arch_string): Remove.
14088 (spu_target_ops): Remove arch_string initializer.
14089 * win32-low.c (win32_arch_string): Remove.
14090 (win32_target_ops): Remove arch_string initializer.
14091 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14092 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14093 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14094
14095 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14096
14097 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14098 by collect_ptrace_register and supply_ptrace_register hooks.
14099 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14100 instead of checking for the_low_target.left_pad_xfer.
14101 (usr_store_inferior_registers): Use collect_ptrace_register callback
14102 instead of checking for the_low_target.left_pad_xfer.
14103
14104 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14105 (s390_supply_ptrace_register): Likewise.
14106 (s390_fill_gregset): Call s390_collect_ptrace_register.
14107 (the_low_target): Update.
14108
14109 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14110 (ppc_supply_ptrace_register): Likewise.
14111 (the_low_target): Update.
14112
14113 * linux-i386-low.c (the_low_target): Update.
14114 * linux-x86-64-low.c (the_low_target): Update.
14115
14116 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14117
14118 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14119 reg-s390.o and reg-s390x.o.
14120
14121 * linux-low.c (new_inferior): New global variable.
14122 (linux_create_inferior, linux_attach): Set it.
14123 (linux_wait_for_process): Call the_low_target.arch_setup after the
14124 target has stopped for the first time.
14125 (initialize_low): Do not call the_low_target.arch_setup.
14126
14127 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14128 (s390_set_pc): Likewise.
14129 (s390_arch_setup): New function.
14130 (the_low_target): Use s390_arch_setup as arch_setup routine.
14131
14132 * regcache.c (realloc_register_cache): New function.
14133 (set_register_cache): Call it for each existing regcache.
14134
14135 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14136
14137 * server.h (init_registers): Remove prototype.
14138
14139 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14140 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14141 instead of init_registers ().
14142 * linux-arm-low.c (init_registers_arm): Add prototype.
14143 (init_registers_arm_with_iwmmxt): Likewise.
14144 (the_low_target): Add initializer for arch_setup field.
14145 * linux-cris-low.c (init_registers_cris): Add prototype.
14146 (the_low_target): Add initializer for arch_setup field.
14147 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14148 (the_low_target): Add initializer for arch_setup field.
14149 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14150 (the_low_target): Add initializer for arch_setup field.
14151 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14152 (the_low_target): Add initializer for arch_setup field.
14153 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14154 (the_low_target): Add initializer for arch_setup field.
14155 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14156 (the_low_target): Add initializer for arch_setup field.
14157 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14158 (init_registers_mips64_linux): Likewise.
14159 (the_low_target): Add initializer for arch_setup field.
14160 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14161 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14162 (the_low_target): Add initializer for arch_setup field.
14163 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14164 (init_registers_powerpc_64): Likewise.
14165 (the_low_target): Add initializer for arch_setup field.
14166 * linux-s390-low.c (init_registers_s390): Add prototype.
14167 (init_registers_s390x): Likewise.
14168 (the_low_target): Add initializer for arch_setup field.
14169 * linux-sh-low.c (init_registers_sh): Add prototype.
14170 (the_low_target): Add initializer for arch_setup field.
14171 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14172 (the_low_target): Add initializer for arch_setup field.
14173 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14174 (the_low_target): Add initializer for arch_setup field.
14175
14176 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14177 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14178 instead of init_registers ().
14179 * win32-arm-low.c (init_registers_arm): Add prototype.
14180 (the_low_target): Add initializer for arch_setup field.
14181 * win32-i386-low.c (init_registers_i386): Add prototype.
14182 (the_low_target): Add initializer for arch_setup field.
14183
14184 * spu-low.c (init_registers_spu): Add prototype.
14185 (initialize_low): Call initialie_registers_spu () instead of
14186 initialize_registers ().
14187
14188 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14189
14190 * server.c (handle_v_requests): When handling the vRun and vAttach
14191 packets, if already debugging a process, don't kill it. Return an
14192 error instead.
14193
14194 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14195
14196 * server.c (handle_query): Correct length check.
14197
14198 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14199
14200 * win32-low.c (do_initial_child_stuff): Add process handle
14201 parameter. Set current_process_handle and current_process_id from the
14202 parameters. Clear globals.
14203 (win32_create_inferior): Don't set current_process_handle and
14204 current_process_id here. Instead pass them on the call to
14205 do_initial_child_stuff.
14206 (win32_attach): Likewise.
14207 (win32_clear_inferiors): New.
14208 (win32_kill): Don't close the current process handle or the
14209 current thread handle here. Instead call win32_clear_inferiors.
14210 (win32_detach): Don't open a new handle to the process. Call
14211 win32_clear_inferiors.
14212 (win32_join): Don't rely on current_process_handle; open a new
14213 handle using the process id.
14214 (win32_wait): Call win32_clear_inferiors when the inferior process
14215 has exited.
14216
14217 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14218
14219 * server.c (monitor_show_help): Add "exit".
14220
14221 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14222
14223 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14224 (clean): Add reg-xtensa.c.
14225 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14226 * configure.srv (xtensa*-*-linux*) New target.
14227 * linux-xtensa-low.c: New.
14228 * xtensa-xtregs.c: New.
14229
14230 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14231
14232 * hostio.c: Don't include errno.h.
14233 (errno_to_fileio_errno): Move to hostio-errno.
14234 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14235 error number outputting to the target->hostio_last_error callback.
14236 (hostio_packet_error): Use FILEIO_EINVAL directly.
14237 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14238 calls to hostio_error.
14239 * hostio-errno.c: New.
14240 * server.h (hostio_last_error_from_errno): Declare.
14241 * target.h (target_ops): Add hostio_last_error member.
14242 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14243 as hostio_last_error handler.
14244 * spu-low.c (spu_target_ops): Likewise.
14245 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14246 (wince_hostio_last_error): New functions.
14247 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14248 as hostio_last_error handler.
14249 (win32_target_ops) [!_WIN32_WCE]: Register
14250 hostio_last_error_from_errno as hostio_last_error handler.
14251 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14252 (hostio-errno.o): New rule.
14253 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14254 * configure.srv (srv_hostio_err_objs): New variable. Default to
14255 hostio-errno.o.
14256 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14257 * configure: Regenerate.
14258
14259 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14260
14261 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14262 (linux_kill, linux_detach): Clean up the process list.
14263 * remote-utils.c (remote_open): Improve port number parsing.
14264 (putpkt_binary, input_interrupt): Only send interrupts if the target
14265 is running.
14266 * server.c (extended_protocol): Make static.
14267 (attached): Define earlier.
14268 (exit_requested, response_needed, program_argv): New variables.
14269 (target_running): New.
14270 (start_inferior): Clear attached here.
14271 (attach_inferior): Set attached here.
14272 (require_running): Define.
14273 (handle_query): Use require_running and target_running. Implement
14274 "monitor exit".
14275 (handle_v_attach, handle_v_run): New.
14276 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14277 (gdbserver_usage): Update.
14278 (main): Redo argument parsing. Handle --debug and --multi. Handle
14279 --attach along with other options or after the port. Save
14280 program_argv. Support no initial program. Resynchronize
14281 communication with GDB after an error. Handle "monitor exit".
14282 Use require_running and target_running. Always allow the extended
14283 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14284 restart in extended mode.
14285 * README: Refer to the GDB manual. Update --attach usage.
14286
14287 2007-12-20 Andreas Schwab <schwab@suse.de>
14288
14289 * linux-low.c (STACK_SIZE): Define.
14290 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14291 (linux_test_for_tracefork): Likewise.
14292
14293 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14294
14295 * linux-low.c (linux_wait_for_event): Update messages. Do not
14296 reinsert auto-delete breakpoints.
14297 * mem-break.c (struct breakpoint): Change return type of handler to
14298 int.
14299 (set_breakpoint_at): Update handler type.
14300 (reinsert_breakpoint_handler): Return 1 instead of calling
14301 delete_breakpoint.
14302 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14303 setting a new one.
14304 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14305 * mem-break.h (set_breakpoint_at): Update handler type.
14306 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14307 * win32-low.c (auto_delete_breakpoint): New.
14308 (get_child_debug_event): Use it.
14309
14310 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14311
14312 * configure.ac: Check for pread and pwrite.
14313 * hostio.c (handle_pread): Fall back to lseek and read.
14314 (handle_pwrite): Fall back to lseek and write.
14315 * config.in, configure: Regenerated.
14316
14317 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14318
14319 * server.c (myresume): Add own_buf argument.
14320 (main): Update calls.
14321
14322 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14323
14324 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14325 * remote-utils.c (remote_open): Do not call disable_async_io.
14326 (block_async_io): Delete.
14327 (unblock_async_io): Make static.
14328 (initialize_async_io): New.
14329 * server.c (handle_v_cont): Handle async I/O here.
14330 (myresume): Likewise. Move other common resume tasks here...
14331 (main): ... from here. Call initialize_async_io. Disable async
14332 I/O before the main loop.
14333 * server.h (initialize_async_io): Declare.
14334 (block_async_io, unblock_async_io): Delete prototypes.
14335 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14336
14337 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14338
14339 * remote-utils.c (readchar): Allow binary data in received messages.
14340
14341 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14342
14343 * win32-low.c (attaching): New global.
14344 (win32_create_inferior): Clear the `attaching' global.
14345 (win32_attach): Set the `attaching' global.
14346 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14347 attaching. Only set a breakpoint at the entry point if not
14348 attaching.
14349
14350 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14351
14352 * server.c (main): Don't report dll events on the initial
14353 connection on attaches.
14354
14355 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14356
14357 * server.c (main): Relax numerical bases supported for the pid of
14358 the --attach command line argument.
14359
14360 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14361
14362 * win32-low.c (win32_attach): Call OpenProcess before
14363 DebugActiveProcess, not after. Add last error output to error
14364 call.
14365
14366 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14367
14368 * win32-low.c (win32_get_thread_context)
14369 (win32_set_thread_context): New functions.
14370 (thread_rec): Use win32_get_thread_context.
14371 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14372 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14373 field.
14374
14375 2007-12-03 Leo Zayas
14376 Pedro Alves <pedro_alves@portugalmail.pt>
14377
14378 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14379 global variables.
14380 (child_add_thread): Minor cleanup.
14381 (child_continue): Resume artificially suspended threads before
14382 calling ContinueDebugEvent.
14383 (suspend_one_thread): New.
14384 (fake_breakpoint_event): New.
14385 (get_child_debug_event): Change return type to int. Check here if
14386 gdb sent an interrupt request. If a soft interrupt was requested,
14387 fake a breakpoint event. Return 0 if there is no event to handle,
14388 and 1 otherwise.
14389 (win32_wait): Don't check here if gdb sent an interrupt request.
14390 Ensure there is a valid event to handle.
14391 (win32_request_interrupt): Add soft interruption method as last
14392 resort.
14393
14394 2007-12-03 Leo Zayas
14395 Pedro Alves <pedro_alves@portugalmail.pt>
14396
14397 * win32-low.h (win32_thread_info): Add descriptions to the
14398 structure members. Replace `suspend_count' counter by a
14399 `suspended' flag.
14400 * win32-low.c (thread_rec): Update condition of when to get the
14401 context from the inferior. Rely on ContextFlags being set if it
14402 has already been retrieved. Only suspend the inferior thread if
14403 we haven't already. Warn if that fails.
14404 (continue_one_thread): s/suspend_count/suspended/. Only call
14405 ResumeThread once. Warn if that fails.
14406
14407 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14408
14409 * win32-low.c (win32_wait): Don't read from the inferior when it
14410 has already exited.
14411
14412 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14413
14414 * Makefile.in (win32_low_h): New variable.
14415 (win32-low.o): Add dependency on $(win32_low_h).
14416 (win32-arm-low.o, win32-i386-low.o): New rules.
14417
14418 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14419
14420 * hostio.c: Correct copyright year.
14421
14422 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14423
14424 * Makefile.in (OBS): Add hostio.o.
14425 (hostio.o): New rule.
14426 * server.h (handle_vFile): Declare.
14427 * hostio.c: New file.
14428 * server.c (handle_v_requests): Take packet_len and new_packet_len
14429 for binary packets. Call handle_vFile.
14430 (main): Update call to handle_v_requests.
14431
14432 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14433
14434 * linux-low.c: Include <sched.h>.
14435
14436 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14437
14438 * linux-low.c (linux_tracefork_grandchild): New.
14439 (linux_tracefork_child): Use clone.
14440 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14441
14442 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14443
14444 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14445
14446 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14447
14448 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14449
14450 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14451
14452 * inferiors.c (change_inferior_id): Delete.
14453 (add_pid_to_list, pull_pid_from_list): New.
14454 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14455 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14456 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14457 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14458 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14459 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14460 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14461 (using_threads): Always set to 1.
14462 (handle_extended_wait): New.
14463 (add_process): Do not set TID.
14464 (linux_create_inferior): Set must_set_ptrace_flags.
14465 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14466 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14467 (linux_thread_alive): Rename TID argument to LWPID.
14468 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14469 (linux_wait_for_event): Do not use TID or check using_threads. Update
14470 call to dead_thread_notify. Call handle_extended_wait.
14471 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14472 (send_sigstop): Delete sigstop_sent.
14473 (wait_for_sigstop): Avoid TID.
14474 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14475 (linux_test_for_tracefork): New.
14476 (linux_lookup_signals): Use thread_db_active and
14477 linux_supports_tracefork_flag.
14478 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14479 * linux-low.h (get_process_thread): Avoid TID.
14480 (struct process_ifo): Move thread_known and tid to the end. Remove
14481 sigstop_sent.
14482 (linux_attach_lwp, thread_db_init): Update prototypes.
14483 * server.h (change_inferior_id): Delete prototype.
14484 (add_pid_to_list, pull_pid_from_list): New prototypes.
14485 * thread-db.c (thread_db_use_events): New.
14486 (find_first_thread): Rename to...
14487 (find_one_thread): ...this. Update callers and messages. Do not
14488 call fatal. Check thread_db_use_events. Do not call
14489 change_inferior_id or new_thread_notify.
14490 (maybe_attach_thread): Update. Do not call new_thread_notify.
14491 (thread_db_init): Set thread_db_use_events. Check use_events.
14492 * utils.c (fatal, warning): Correct message prefix.
14493
14494 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14495
14496 * Makefile.in (clean): Remove new files.
14497 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14498 (powerpc-64.o, powerpc-64.c): New rules.
14499 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14500 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14501 with SPE.
14502 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14503 SPE targets.
14504 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14505 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14506 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14507 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14508 (target_regsets): Add AltiVec and SPE register sets.
14509 * configure.ac: Check for AltiVec and SPE.
14510 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14511 (ppc_fill_vrregset, ppc_store_vrregset): New.
14512 (target_regsets): Add AltiVec register set.
14513 * configure: Regenerated.
14514
14515 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14516
14517 * linux-low.c (O_LARGEFILE): Define.
14518 (linux_read_memory): Use /proc/PID/mem.
14519 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14520 * configure, config.in: Regenerated.
14521
14522 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14523
14524 * linux-low.c (linux_wait_for_event): Do not pass signals while
14525 single-stepping.
14526
14527 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14528
14529 * win32-low.c (create_process): New.
14530 (win32_create_inferior): Use create_process instead of
14531 CreateProcess. If create_process failed retry appending an ".exe"
14532 suffix. Store the GetLastError result immediatelly after
14533 create_process calls and use it on the call to error.
14534
14535 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14536
14537 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14538
14539 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14540
14541 * configure.ac: Switch license to GPLv3.
14542
14543 2007-08-01 Michael Snyder <msnyder@access-company.com>
14544
14545 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14546
14547 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14548
14549 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14550 typedef.
14551 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14552 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14553 CloseToolhelp32Snapshot.
14554 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14555 CloseToolhelp32Snapshot.
14556
14557 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14558
14559 * server.c (main): Check for inferior exit before main loop.
14560
14561 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14562
14563 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14564 instead of on tmp_desc.
14565
14566 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14567 Daniel Jacobowitz <dan@codesourcery.com>
14568
14569 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14570 (add_thread): Minor cleanups.
14571 (clear_inferiors): Move lower in the file. Clear the DLL
14572 list.
14573 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14574 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14575 (xml_escape_text): New.
14576 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14577 for qSupported.
14578 (handle_v_cont): Report errors.
14579 (gdbserver_version): Update.
14580 (main): Correct size of own_buf. Do not report initial DLL events.
14581 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14582 (unloaded_dll, xml_escape_text): New.
14583 * win32-low.c (enum target_waitkind): Update comments.
14584 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14585 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14586 (win32_EnumProcessModules, win32_GetModuleInformation)
14587 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14588 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14589 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14590 (win32_Module32First, win32_Module32Next, load_toolhelp)
14591 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14592 (get_child_debug_event): Handle DLL events.
14593 (win32_wait): Likewise.
14594
14595 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14596
14597 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14598 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14599
14600 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14601
14602 * win32-low.c (handle_output_debug_string): Ignore event if not
14603 waiting.
14604
14605 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14606
14607 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14608
14609 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14612
14613 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14614
14615 * inferiors.c (change_inferior_id): Add comment.
14616 * linux-low.c (check_removed_breakpoint): Add an early
14617 prototype. Improve debug output.
14618 (linux_attach): Doc update.
14619 (linux_detach_one_process, linux_detach): Clean up before releasing
14620 each process.
14621 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14622 * linux-low.h (struct process_info): Doc improvement.
14623 * mem-break.c (delete_all_breakpoints): New.
14624 * mem-break.h (delete_all_breakpoints): New prototype.
14625 * thread-db.c (find_first_thread): New.
14626 (thread_db_create_event): Call it instead of
14627 thread_db_find_new_threads. Clean up unused variables.
14628 (maybe_attach_thread): Remove first thread handling.
14629 (thread_db_find_new_threads): Use find_first_thread.
14630 (thread_db_get_tls_address): Likewise.
14631
14632 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14633
14634 * thread-db.c (thread_db_find_new_threads): Add prototype.
14635 (thread_db_create_event): Check for the main thread before adding
14636 a new thread.
14637 (maybe_attach_thread): Only enable event reporting if TID == 0.
14638 (thread_db_get_tls_address): Check for new threads.
14639
14640 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14641
14642 * linux-low.c (linux_create_inferior): Try execv before execvp.
14643 * spu-low.c (spu_create_inferior): Likewise.
14644
14645 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14646
14647 * linux-low.c (linux_create_inferior): Change execv to execvp.
14648 * spu-low.c (spu_create_inferior): Likewies.
14649
14650 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14651
14652 * Makefile.in (clean): Clean new files instead of deleted ones.
14653 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14654 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14655 rules.
14656 * configure.srv: Specify XML files and new regformats for MIPS and
14657 MIPS64 GNU/Linux.
14658 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14659 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14660 an entry for the restart register.
14661 (mips_cannot_fetch_register, mips_cannot_store_register)
14662 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14663 register names to match the XML descriptions.
14664 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14665 restart register instead of $0.
14666
14667 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14668 Markus Deuling <deuling@de.ibm.com>
14669
14670 * remote-utils.c (decode_xfer_write): New function.
14671 * server.h (decode_xfer_write): Add prototype.
14672 * server.c (handle_query): Add PACKET_LEN argument. Support
14673 qXfer:spu:read and qXfer:spu:write packets.
14674 (main): Pass packet_len to handle_query.
14675 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14676 * target.h (target_ops): Add qxfer_spu.
14677
14678 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14679
14680 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14681 accessing non-seekable spufs files.
14682
14683 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14684
14685 * server.c (handle_query): Add reply for qC packet.
14686
14687 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14688 Leo Zayas <lerele@champenstudios@com>
14689
14690 * server.h (check_remote_input_interrupt_request): New function.
14691 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14692 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14693 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14694 (check_remote_input_interrupt_request): New function.
14695 * server.h (check_remote_input_interrupt_request): Declare.
14696 * win32-low.c (winapi_DebugBreakProcess,
14697 winapi_GenerateConsoleCtrlEvent): New typedefs.
14698 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14699 to 250 ms.
14700 (win32_wait): Check for remote interrupt request
14701 with check_remote_input_interrupt_request.
14702 (win32_request_interrupt): New function.
14703 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14704
14705 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14706
14707 * win32-low.c (debug_registers_changed,
14708 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14709 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14710 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14711 (thread_rec): Get context using the low target.
14712 (child_add_thread): Call thread_added on the low target,
14713 which does the same thing.
14714 (regptr): Delete.
14715 (do_initial_child_stuff): Remove debug registers references.
14716 Set context using the low target. Resume threads after
14717 setting the contexts.
14718 (child_continue): Remove dead variable. Remove debug
14719 registers references.
14720 (child_fetch_inferior_registers): Go through the low target.
14721 (do_child_store_inferior_registers): Remove.
14722 (child_store_inferior_registers): Go through the low target.
14723 (win32_resume): Remove debug registers references.
14724 Set context using the low target.
14725 (handle_exception): Change return type to void. Don't record
14726 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14727 first chance exception.
14728 (get_child_debug_event): Change return type to void. Remove
14729 goto loop. Always return after waiting for debug event.
14730 (win32_wait): Convert to switch statement. Handle spurious
14731 events.
14732
14733 * win32-i386-low.c (debug_registers_changed,
14734 debug_registers_used): New.
14735 (initial_stuff): Rename to ...
14736 (i386_initial_stuff): ... this. Clear debug registers
14737 state variables.
14738 (store_debug_registers): Delete.
14739 (i386_get_thread_context): New.
14740 (load_debug_registers): Delete.
14741 (i386_set_thread_context): New.
14742 (i386_thread_added): New.
14743 (single_step): Rename to ...
14744 (i386_single_step): ... this.
14745 (do_fetch_inferior_registers): Rename to ...
14746 (i386_fetch_inferior_register): ... this.
14747 (i386_store_inferior_register): New.
14748 (the_low_target): Adapt to new interface.
14749
14750 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14751 (arm_get_thread_context): New.
14752 (arm_set_thread_context): New.
14753 (regptr): New.
14754 (do_fetch_inferior_registers): Rename to ...
14755 (arm_fetch_inferior_register): ... this.
14756 (arm_store_inferior_register): New.
14757 (arm_wince_breakpoint): Reimplement as unsigned long.
14758 (arm_wince_breakpoint_len): Define.
14759 (the_low_target): Adapt to new interface.
14760
14761 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14762 load_debug_registers. Add get_thread_context, set_thread_context,
14763 thread_added and store_inferior_register. Rename
14764 fetch_inferior_registers to fetch_inferior_register.
14765 (regptr): Remove declaration.
14766
14767 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14768
14769 * linux-low.c (linux_detach): Change return type to int. Return 0.
14770 * spu-low.c (spu_detach): Likewise.
14771
14772 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14773
14774 * target.h (target_ops): Change return type of detach to int.
14775 Add join.
14776 (join_inferior): New.
14777 * server.c (main): Don't skip detach support on mingw32.
14778 If the inferior doesn't support detaching return error.
14779 Call join_inferior instead of using waitpid.
14780 * linux-low.c (linux_join): New.
14781 (linux_target_op): Add linux_join.
14782 * spu-low.c (spu_join): New.
14783 (spu_target_ops): Add spu_join.
14784 * win32-low.c (win32_detach): Adapt to new interface.
14785 Reopen current_process_handle before detaching. Issue a child
14786 resume before detaching.
14787 (win32_join): New.
14788 (win32_target_op): Add win32_join.
14789
14790 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14791
14792 * win32-low.c (win32-attach): Fix return value.
14793 * target.h (target_ops): Describe ATTACH return values.
14794
14795 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14796
14797 * win32-low.c (GETPROCADDRESS): Define.
14798 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14799 (winapi_DebugSetProcessKillOnExit): Likewise.
14800 (win32_create_inferior): Force usage of ansi CreateProcessA.
14801 (win32_attach): Use GETPROCADDRESS.
14802 (win32_detach): Likewise.
14803
14804 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14805
14806 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14807
14808 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14809
14810 * win32-low.c: Commit leftover changes from 2007-03-29.
14811
14812 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14813
14814 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14815 fields short instead of int. Add explicit padding.
14816 (i387_cache_to_fsave): Remove unnecessary casts.
14817 (i387_fsave_to_cache): Doc fix.
14818 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14819
14820 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14821
14822 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14823 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14824
14825 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14826
14827 * configure.srv (arm*-*-mingw32ce*): Move near the other
14828 arm targets.
14829
14830 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14831
14832 * configure.ac: Add errno checking.
14833 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14834 sys/file.h and malloc.h.
14835 (AC_CHECK_DECLS): Add perror.
14836 (srv_mingwce): Handle.
14837 * configure.srv (i[34567]86-*-cygwin*): Add
14838 win32-i386-low.o to srv_tgtobj.
14839 (i[34567]86-*-mingw*): Likewise.
14840 (arm*-*-mingw32ce*): Add case.
14841 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14842 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14843 [__MINGW32CE__] (strerror): New function.
14844 [__MINGW32CE__] (errno): Define to GetLastError.
14845 [__MINGW32CE__] (COUNTOF): New macro.
14846 (remote_open): Remove extra close call.
14847 * mem-break.c (delete_breakpoint_at): New function.
14848 * mem-break.h (delete_breakpoint_at): Declare.
14849 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14850 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14851 [USE_WIN32API] (read, write): Add char* casts.
14852 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14853 * server.h: Include wincecompat.h on Windows CE.
14854 [HAVE_ERRNO_H]: Check.
14855 (perror): Declare if not declared.
14856 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14857 (perror_with_name): Remove errno declaration.
14858 * wincecompat.h: New.
14859 * wincecompat.c: New.
14860 * win32-low.h: New.
14861 * win32-arm-low.c: New.
14862 * win32-i386-low.c: New.
14863 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14864 (OUTMSG2): Make it safe.
14865 (_T): New macro.
14866 (COUNTOF): New macro.
14867 (NUM_REGS): Get it from the low target.
14868 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14869 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14870 (thread_rec): Let low target handle debug registers.
14871 (child_add_thread): Likewise.
14872 (child_init_thread_list): Likewise.
14873 (continue_one_thread): Likewise.
14874 (regptr): New.
14875 (do_child_fetch_inferior_registers): Move to ...
14876 * win32-i386-low.c: ... here, and rename to ...
14877 (do_fetch_inferior_registers): ... this.
14878 * win32-low.c (child_fetch_inferior_registers):
14879 Go through the low target.
14880 (do_child_store_inferior_registers): Use regptr.
14881 (strwinerror): New function.
14882 (win32_create_inferior): Handle Windows CE.
14883 Use strwinerror instead of strerror on Windows error
14884 codes. Add program to the error output.
14885 Don't close the main thread handle on Windows CE.
14886 (win32_attach): Use coredll.dll on Windows CE.
14887 (win32_kill): Close current process and current
14888 thread handles.
14889 (win32_detach): Use coredll.dll on Windows CE.
14890 (win32_resume): Let low target handle debug registers, and
14891 step request.
14892 (handle_exception): Add/Remove initial breakpoint. Avoid
14893 non-existant WSTOPSIG on Windows CE.
14894 (win32_read_inferior_memory): Cast to remove warning.
14895 (win32_arch_string): Go through the low target.
14896 (initialize_low): Call set_breakpoint_data with the low
14897 target's breakpoint.
14898 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14899 FOP_REGNUM, mappings): Move to ...
14900 * win32-i386-low.c: ... here.
14901 * win32-low.c (win32_thread_info): Move to ...
14902 * win32-low.h: ... here.
14903 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14904 win32-arm-low.c and wincecompat.c.
14905 (all:): Add $EXEEXT.
14906 (install-only:): Likewise.
14907 (gdbserver:): Likewise.
14908 (gdbreplay:): Likewise.
14909 * config.in: Regenerate.
14910 * configure: Regenerate.
14911
14912 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14913
14914 * win32-low.c: Rename typedef thread_info to
14915 win32_thread_info throughout.
14916
14917 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14918
14919 * win32-i386-low.c: Rename to ...
14920 * win32-low.c: ... this.
14921 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14922 * Makefile.in: Likewise.
14923
14924 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14925
14926 * remote-utils.c (monitor_output): Constify msg parameter.
14927 * server.h (monitor_output): Likewise.
14928 * win32-i386-low.c (handle_output_debug_string): New.
14929 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14930 handle_output_debug_string.
14931 (get_child_debug_event): Likewise.
14932
14933 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14934
14935 * server.c (main): Correct strtoul check.
14936
14937 2007-03-27 Jon Ringle <jon@ringle.org>
14938
14939 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14940
14941 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14942
14943 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14944
14945 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14946
14947 * terminal.h: Check HAVE_SGTTY_H.
14948
14949 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14950
14951 * remote-utils.c (remote_open): Print out the assigned port number.
14952
14953 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14954
14955 * remote-utils.c (monitor_output): New function.
14956 * server.c (debug_threads): Define here.
14957 (monitor_show_help): New function.
14958 (handle_query): Handle qRcmd.
14959 (main): Do not handle 'd' packet.
14960 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14961 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14962 of debug_threads.
14963
14964 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14965
14966 * Makefile.in (EXEEXT): New.
14967 (clean): Use $(EXEEXT).
14968
14969 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14970
14971 * target.h (target_ops): Rename send_signal to request_interrupt,
14972 and remove enum target_signal parameter.
14973 * linux-low.c (linux_request_interrupt): Rename from
14974 linux_send_signal, and always send SIGINT.
14975 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14976 and always send SIGINT.
14977 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14978 of send_signal.
14979 (input_interrupt): Likewise.
14980
14981 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14982
14983 * server.c (get_features_xml): Check if target implemented
14984 arch_string.
14985 * win32-i386-low.c (win32_arch_string): New.
14986 (win32_target_ops): Add win32_arch_string as arch_string member.
14987
14988 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14989
14990 * spu-low.c (spu_arch_string): New.
14991 (spu_target_ops): Add spu_arch_string.
14992
14993 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14994
14995 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14996 * configure.ac: Do not check for terminal.h.
14997 * configure, config.in: Regenerated.
14998
14999 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15000
15001 * Makefile.in (OBS): Add $(XML_BUILTIN).
15002 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15003 (clean): Update.
15004 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15005 (arm-with-iwmmxt.c): New.
15006 * config.in, configure: Regenerate.
15007 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15008 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15009 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15010 (arm*-*-linux*): Add iWMMXt and regset support.
15011 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15012 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15013 (arm_store_wmmxregset, target_regsets): New.
15014 * server.c (get_features_xml): Take annex argument. Check builtin
15015 XML documents.
15016 (handle_query): Handle multiple annexes.
15017
15018 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15019
15020 * remote-utils.c [USE_WIN32API] (read, write): Define.
15021 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15022 write.
15023
15024 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * linux-i386-low.c (the_low_target): Set arch_string.
15027 * linux-x86-64-low.c (the_low_target): Likewise.
15028 * linux-low.c (linux_arch_string): New.
15029 (linux_target_ops): Add it.
15030 * linux-low.h (struct linux_target_ops): Add arch_string.
15031 * server.c (write_qxfer_response): Use const void * for DATA.
15032 (get_features_xml): New.
15033 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15034 * target.h (struct target_ops): Add arch_string method.
15035
15036 2007-01-03 Denis Pilat <denis.pilat@st.com>
15037 Daniel Jacobowitz <dan@codesourcery.com>
15038
15039 * linux-low.c (linux_kill): Handle being called with no threads.
15040 * win32-i386-low.c (win32_kill): Likewise.
15041 (get_child_debug_event): Clear current_process_handle.
15042
15043 2006-12-30 Denis PILAT <denis.pilat@st.com>
15044 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * remote-utils.c (remote_open): Check the type of specified
15047 serial port devices before opening them.
15048 * server.c (main): Kill the inferior if an error occurs during
15049 the first remote_open.
15050
15051 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15052
15053 * README: Update supported targets.
15054
15055 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15056
15057 * Makefile.in (clean): Remove reg-mips64.c.
15058 (reg-mips64.c, reg-mips64.o): New rules.
15059 * configure.srv: Handle mips64. Include regset support for mips.
15060 * linux-mips-low.c (union mips_register): New.
15061 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15062 (mips_breakpoint, mips_breakpoint_at): Use int.
15063 (mips_collect_register, mips_supply_register)
15064 (mips_collect_register_32bit, mips_supply_register_32bit)
15065 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15066 (mips_store_fpregset, target_regsets): New.
15067 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15068
15069 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15070
15071 * configure.srv: Add target "spu*-*-*".
15072 * Makefile.in (clean): Remove reg-spu.c.
15073 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15074 * spu-low.c: New file.
15075
15076 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15077
15078 * configure.ac: Correct td_thr_tls_get_addr test.
15079 * configure: Regenerated.
15080
15081 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15082
15083 * linux-low.c (linux_wait_for_event): Reformat. Use the
15084 pass_signals array.
15085 * remote-utils.c (decode_address_to_semicolon): New.
15086 * server.c (pass_signals, handle_general_set): New.
15087 (handle_query): Mention QPassSignals for qSupported.
15088 (main): Call handle_general_set.
15089 * server.h (pass_signals, decode_address_to_semicolon): New.
15090
15091 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15092
15093 * server.c (handle_query): Correct error handling for read_auxv.
15094
15095 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15096
15097 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15098 and srv_linux_thread_db to yes.
15099 * linux-s390-low.c (s390_fill_gregset): New function.
15100 (target_regsets): Define data structure.
15101
15102 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15103
15104 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15105 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15106 * config.in, configure: Regenerated.
15107 * inferiors.c (gdb_id_to_thread): New function.
15108 (gdb_id_to_thread_id): Use it.
15109 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15110 * linux-low.h (struct process_info): Add th member.
15111 (thread_db_get_tls_address): New prototype.
15112 * remote-utils.c (decode_address): Make non-static.
15113 * server.c (handle_query): Handle qGetTLSAddr.
15114 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15115 * target.h (struct target_ops): Add get_tls_address.
15116 * thread-db.c (maybe_attach_thread): Save the thread handle.
15117 (thread_db_get_tls_address): New.
15118
15119 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15120
15121 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15122 (linux_resume_one_process): Take a siginfo_t *. Update all
15123 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15124 (struct pending_signals): Add a siginfo_t.
15125 (linux_wait_for_process): Always set last_status.
15126 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15127 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15128 * linux-low.h (struct process_info): Add last_status.
15129
15130 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15131
15132 * remote-utils.c (try_rle): New function.
15133 (putpkt_binary): Use it.
15134
15135 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15138 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15139 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15140 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15141 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15142 point registers.
15143
15144 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15145
15146 * server.c (terminal_fd): New variable.
15147 (old_foreground_pgrp): Likewise.
15148 (restore_old_foreground_pgrp): New function.
15149 (start_inferior): Record the terminal file descriptor in terminal_fd
15150 and its original foreground group in old_foreground_pgrp. Register
15151 restore_old_foreground_pgrp with atexit().
15152
15153 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15154
15155 * server.c (handle_query): Correct qPart to qXfer.
15156
15157 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15158
15159 * configure.ac: Check for more headers which are missing on
15160 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15161 * configure.srv: Add Cygwin and mingw32.
15162 * remote-utils.c: Don't include headers unconditionally which
15163 are missing on mingw32. Include <winsock.h> for mingw32.
15164 (remote_open): Adjust for mingw32 support. Flush
15165 standard error after writing to it.
15166 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15167 (unblock_async_io, enable_async_io, disable_async_io)
15168 (readchar, getpkt): Update for Winsock support.
15169 (prepare_resume_reply): Expect a protocol signal number.
15170 * server.c: Disable <sys/wait.h> on mingw32.
15171 (start_inferior): Adjust for mingw32 support. Flush
15172 standard error after writing to it.
15173 (attach_inferior): Likewise. Use protocol signal
15174 numbers.
15175 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15176 and names.
15177 * win32-i386-low.c: New file.
15178 * Makefile.in (XM_CLIBS): Set.
15179 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15180 (win32-i386-low.o): New dependency rule.
15181 * linux-low.c (linux_wait): Use target signal numbers.
15182 * target.h (struct target_ops): Doc fix.
15183 * server.h (target_signal_to_name): New prototype.
15184 * gdbreplay.c: Don't include headers unconditionally which
15185 are missing on mingw32. Include <winsock.h> for mingw32.
15186 (remote_close, remote_open): Adjust for Winsock support.
15187 * configure, config.in: Regenerated.
15188
15189 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15190
15191 * server.c (decode_xfer_read, write_qxfer_response): New.
15192 (handle_query): Take a packet length argument. Handle
15193 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15194 the qSupported response.
15195 (main): Update call to handle_query.
15196
15197 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15198
15199 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15200 (putpkt_binary): Renamed from putpkt and adjusted for binary
15201 data.
15202 (putpkt): New wrapper for putpkt_binary.
15203 (readchar): Don't mask off the high bit.
15204 (decode_X_packet): New function.
15205 * server.c (main): Call putpkt_binary if a handler sets the packet
15206 length. Save the length of the incoming packet. Handle 'X'.
15207 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15208
15209 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15210
15211 * server.c (handle_query): Handle qSupported.
15212
15213 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15214
15215 * remote-utils.c (all_symbols_looked_up): New variable.
15216 (look_up_one_symbol): Check it.
15217 * server.h (look_up_one_symbol): New declaration.
15218 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15219
15220 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15221
15222 * Makefile.in (linux-arm-low.o): Update dependencies.
15223 * linux-arm-low.c: Include "gdb_proc_service.h".
15224 (PTRACE_GET_THREAD_AREA): Define.
15225 (ps_get_thread_area): New function.
15226
15227 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15228
15229 * configure.srv (m68k*-*-uclinux*): New target.
15230 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15231 (linux_resume_one_process): Remove extraneous cast.
15232 (linux_read_offsets): New.
15233 (linux_target_op): Add linux_read_offsets on mmuless systems.
15234 * server.c (handle_query): Add qOffsets logic.
15235 * target.h (struct target_ops): Add read_offsets.
15236
15237 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15238
15239 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15240 (PTRACE_GET_THREAD_AREA): Define.
15241 (ps_get_thread_area): New function.
15242 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15243 (linux-x86-64-low.o): Update.
15244
15245 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15246
15247 * configure.ac: Remove checks for prfpregset_t.
15248 * gdb_proc_service.h: New file.
15249 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15250 new "gdb_proc_service.h".
15251 * proc-service.c: Likewise.
15252 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15253 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15254 * Makefile.in (gdb_proc_service_h): Updated.
15255 * configure, config.in: Regenerated.
15256
15257 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15258
15259 * remote-utils.c (prepare_resume_reply): Move declaration
15260 of gdb_id_from_wait to the top of the block.
15261
15262 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15263
15264 * linux-low.c (regsets_store_inferior_registers): Read the regset
15265 from the target before filling it.
15266
15267 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15268
15269 * server.c (attach_inferior): Return SIGTRAP for a successful
15270 attach.
15271
15272 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * Makefile.in (OBS): Add version.o.
15275 (STAGESTUFF): Delete.
15276 (version.o): Add dependencies.
15277 (version.c): Replace rule.
15278 (clean): Remove version.c.
15279 * server.c (gdbserver_version): New.
15280 (gdbserver_usage): Use printf.
15281 (main): Handle --version and --help.
15282 * server.h (version, host_name): Add declarations.
15283
15284 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15285
15286 * linux-arm-low.c:
15287 * linux-arm-low.c:
15288 * inferiors.c:
15289 * i387-fp.h:
15290 * i387-fp.c:
15291 * gdbreplay.c:
15292 * regcache.c:
15293 * proc-service.c:
15294 * mem-break.h:
15295 * mem-break.c:
15296 * linux-x86-64-low.c:
15297 * linux-sh-low.c:
15298 * linux-s390-low.c:
15299 * linux-ppc64-low.c:
15300 * linux-ppc-low.c:
15301 * linux-mips-low.c:
15302 * linux-m68k-low.c:
15303 * linux-m32r-low.c:
15304 * linux-low.h:
15305 * linux-low.c:
15306 * linux-ia64-low.c:
15307 * linux-i386-low.c:
15308 * linux-crisv32-low.c:
15309 * thread-db.c:
15310 * terminal.h:
15311 * target.h:
15312 * target.c:
15313 * server.h:
15314 * server.c:
15315 * remote-utils.c:
15316 * regcache.h:
15317 * utils.c:
15318 * Makefile.in:
15319 * configure.ac:
15320 * gdbserver.1: Add (C) after Copyright. Update the FSF
15321 address.
15322
15323 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15324
15325 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15326 (arm_breakpoint_at): Recognize both breakpoints.
15327 (the_low_target): Use the correct breakpoint instruction.
15328
15329 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15330
15331 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15332 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15333 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15334 (the_low_target): Update.
15335
15336 2005-10-25 Andreas Schwab <schwab@suse.de>
15337
15338 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15339
15340 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15341 (ia64_num_regs): Reduce to 462.
15342
15343 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15344
15345 * acinclude.m4: Correct quoting.
15346 * aclocal.m4: Regenerated.
15347
15348 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15349 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15350 (thread_db_init): Call thread_db_err_str.
15351 * configure.ac: Check for TD_VERSION.
15352 * config.in, configure: Regenerated.
15353
15354 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15355
15356 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15357
15358 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15359
15360 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15361 is not available. Define HAVE_PTRACE_GETREGS if it is.
15362 * config.in, configure: Regenerated.
15363 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15364 * linux-i386-low.c, linux-m68k-low.c: Update to use
15365 HAVE_PTRACE_GETREGS.
15366 * linux-low.c (regsets_fetch_inferior_registers)
15367 (regsets_store_inferior_registers): Only return 0 if we processed
15368 GENERAL_REGS.
15369 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15370 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15371
15372 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15373
15374 * inferiors.c (struct thread_info): Add gdb_id.
15375 (add_thread): Add gdb_id argument.
15376 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15377 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15378 calls to add_thread.
15379 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15380 * server.c (handle_query): Use thread_to_gdb_id.
15381 (handle_v_cont, main): Use gdb_id_to_thread_id.
15382 * server.h (add_thread): Update prototype.
15383 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15384 prototypes.
15385
15386 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15387
15388 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15389 left-padded registers.
15390 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15391 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15392
15393 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15394
15395 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15396 * configure: Regenerate.
15397 * config.in: Regenerate.
15398 * server.h (NEED_DECLARATION_STRERROR):
15399 Replace with !HAVE_DECL_STRERROR.
15400
15401 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15402
15403 * linux-low.c (linux_wait, linux_send_signal): Don't test
15404 an unsigned long variable for > 0 if it could be MAX_ULONG.
15405 * server.c (myresume): Likewise.
15406 * target.c (set_desired_inferior): Likewise.
15407
15408 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15409
15410 * configure.ac: Simplify and improve check for socklen_t.
15411 * configure, config.in: Regenerate.
15412
15413 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15414
15415 * acconfig.h: Remove.
15416 * configure.ac: Add a test for socklen_t. Use three-argument
15417 AC_DEFINE throughout.
15418 * config.in: Regenerated using autoheader 2.59.
15419 * configure: Regenerated.
15420
15421 * gdbreplay.c (socklen_t): Provide a default.
15422 (remote_open): Use socklen_t.
15423 * remote-utils.c (socklen_t): Provide a default.
15424 (remote_open): Use socklen_t.
15425 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15426 unsigned char.
15427
15428 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15429 char for buffers.
15430 * linux-low.c (linux_read_memory, linux_write_memory)
15431 (linux_read_auxv): Likewise.
15432 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15433 (check_mem_write): Likewise.
15434 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15435 Likewise.
15436 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15437 (registers_from_string, register_data): Likewise.
15438 * server.c (handle_query, main): Likewise.
15439 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15440 (decode_M_packet): Likewise.
15441 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15442 * target.h (struct target_ops): Update read_memory, write_memory,
15443 and read_auxv.
15444 (read_inferior_memory, write_inferior_memory): Update.
15445 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15446 to unsigned char *.
15447 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15448 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15449 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15450 linux-s390-low.c, linux-sh-low.c: Update for changes in
15451 read_inferior_memory and the_low_target->breakpoint.
15452
15453 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15454
15455 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15456 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15457 * configure.srv: Add powerpc64-*-linux*.
15458 * linux-ppc64-low.c: New file.
15459
15460 2005-05-23 Orjan Friberg <orjanf@axis.com>
15461
15462 * linux-cris-low.c: New file with support for CRIS.
15463 * linux-crisv32-low.c: Ditto for CRISv32.
15464 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15465 (clean): Add reg-cris.c and reg-crisv32.c.
15466 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15467 reg-crisv32.o, and reg-crisv32.c to make rules.
15468 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15469 recognized targets.
15470
15471 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15472
15473 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15474 of sizeof (PTRACE_XFER_TYPE).
15475 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15476
15477 2005-05-12 Orjan Friberg <orjanf@axis.com>
15478
15479 * target.h (struct target_ops): Add insert_watchpoint,
15480 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15481 pointers for hardware watchpoint support.
15482 * linux-low.h (struct linux_target_ops): Ditto.
15483 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15484 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15485 to linux_target_ops.
15486 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15487 reply packet.
15488 * server.c (main): Recognize 'Z' and 'z' packets.
15489
15490 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15491
15492 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15493 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15494 (the_low_target): Add new members.
15495
15496 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15497
15498 * proc-service.c (ps_lgetregs): Search all_processes instead of
15499 all_threads.
15500
15501 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15502
15503 * server.c (start_inferior): Change return type to int.
15504 (attach_inferior): Change sigptr to int *.
15505 (handle_v_cont, handle_v_requests): Change signal to int *.
15506 (main): Change signal to int.
15507
15508 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15509
15510 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15511 * configure.srv: Add m32r*-*-linux*.
15512 * linux-m32r-low.c: New file.
15513
15514 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15515
15516 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15517
15518 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15519
15520 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15521 Take unsigned long arguments for PIDs.
15522 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15523 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15524 (wait_for_sigstop, linux_resume_one_process)
15525 (regsets_fetch_inferior_registers, linux_send_signal)
15526 (linux_read_auxv): Likewise. Update the types of variables holding
15527 PIDs. Update format string specifiers.
15528 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15529 * remote-utils.c (prepare_resume_reply): Likewise.
15530 * server.c (cont_thread, general_thread, step_thread)
15531 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15532 unsigned long.
15533 (handle_query): Update format specifiers.
15534 (handle_v_cont, main): Use strtoul for thread IDs.
15535 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15536 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15537 (general_thread, step_thread, thread_from_wait)
15538 (old_thread_from_wait): Update.
15539 * target.h (struct thread_resume): Use unsigned long for THREAD.
15540 (struct target_ops): Use unsigned long for arguments to attach and
15541 thread_alive.
15542
15543 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15544
15545 * acinclude.m4: Include bfd/bfd.m4 directly.
15546 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15547 <agriffis@toolchain.org>.
15548 * aclocal.m4, configure: Regenerated.
15549
15550 2005-01-07 Andrew Cagney <cagney@gnu.org>
15551
15552 * configure.ac: Rename configure.in, require autoconf 2.59.
15553 * configure: Re-generate.
15554
15555 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15556
15557 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15558 LIBS when finished.
15559 * aclocal.m4: Regenerated.
15560 * configure: Regenerated.
15561
15562 2004-11-21 Andreas Schwab <schwab@suse.de>
15563
15564 * linux-m68k-low.c (m68k_num_gregs): Define.
15565 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15566 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15567 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15568 (m68k_breakpoint_at): New. Add to the_low_target.
15569
15570 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15571 srv_linux_thread_db to yes.
15572
15573 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15574
15575 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15576 (ARCH_SET_FS): Likewise.
15577 (ARCH_GET_FS): Likewise.
15578 (ARCH_GET_GS): Likewise.
15579
15580 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15581
15582 * linux-i386-low.c (ps_get_thread_area): New.
15583 * linux-x86-64-low.c (ps_get_thread_area): New.
15584 * linux-low.c: Include <sys/syscall.h>.
15585 (linux_kill_one_process): Don't kill the first thread here.
15586 (linux_kill): Kill the first thread here.
15587 (kill_lwp): New function.
15588 (send_sigstop, linux_send_signal): Use it.
15589 * proc-service.c: Clean up #ifdefs.
15590 (fpregset_info): Delete.
15591 (ps_lgetregs): Update and enable implementation.
15592 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15593 implementations.
15594 * remote-utils.c (struct sym_cache, symbol_cache): New.
15595 (input_interrupt): Print a clearer message.
15596 (async_io_enabled): New variable.
15597 (enable_async_io, disable_async_io): Use it. Update comments.
15598 (look_up_one_symbol): Use the symbol cache.
15599 * thread-db.c (thread_db_look_up_symbols): New function.
15600 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15601
15602 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15603
15604 * configure.in: Test for -rdynamic.
15605 * configure: Regenerated.
15606 * Makefile (INTERNAL_LDFLAGS): New.
15607 (gdbserver, gdbreplay): Use it.
15608
15609 2004-09-02 Andrew Cagney <cagney@gnu.org>
15610
15611 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15612
15613 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15614
15615 * linux-low.c (linux_wait): Clear all_processes list also.
15616
15617 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15618
15619 * linux-low.c: Include <errno.h>. Remove extern declaration of
15620 errno.
15621
15622 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15623
15624 * gdbreplay.c, server.h, utils.c: Update copyright years.
15625
15626 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15627
15628 * server.c (main): Print child status or termination signal from
15629 variable 'signal', not 'sig'.
15630
15631 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15632
15633 * linux-low.c (linux_read_memory): Change return type to
15634 int. Check for and return error from ptrace().
15635 * target.c (read_inferior_memory): Change return type to int. Pass
15636 back return status from the_target->read_memory().
15637 * target.h (struct target_ops): Adapt *read_memory() prototype.
15638 Update comment.
15639 (read_inferior_memory): Adapt prototype.
15640 * server.c (main): Return an error packet if
15641 read_inferior_memory() returns an error.
15642
15643 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15644
15645 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15646 Unify with other clean targets.
15647
15648 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15649
15650 * server.c (handle_v_cont): Call set_desired_inferior.
15651
15652 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15653
15654 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15655
15656 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15657
15658 * linux-low.c (linux_wait): Unblock async I/O.
15659 (linux_resume): Block and enable async I/O.
15660 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15661 * server.h (block_async_io, unblock_async_io): Add prototypes.
15662
15663 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15664
15665 * remote-utils.c (remote_open): Print a status notice after
15666 opening a TCP port.
15667 * server.c (attach_inferior): Print a status notice after
15668 attaching.
15669
15670 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15671
15672 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15673
15674 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15675
15676 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15677 error packet.
15678 * server.c, target.h: Update copyright years.
15679
15680 2004-02-25 Roland McGrath <roland@redhat.com>
15681
15682 * target.h (struct target_ops): New member `read_auxv'.
15683 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15684 * linux-low.c (linux_read_auxv): New function.
15685 (linux_target_ops): Initialize `read_auxv' member to that.
15686
15687 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15688
15689 Committed by Jim Blandy <jimb@redhat.com>.
15690
15691 * linux-s390-low.c (s390_num_regs): Update.
15692 (s390_regmap): Remove control registers. Use __s390x__ predefine
15693 instead of GPR_SIZE to distiguish s390 and s390x targets.
15694
15695 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15696
15697 * linux-low.c: Update copyright year.
15698 (check_removed_breakpoint): Clear pending_is_breakpoint.
15699 (linux_set_resume_request, linux_queue_one_thread)
15700 (resume_status_pending_p): New functions.
15701 (linux_continue_one_thread): Use process->resume.
15702 (linux_resume): Only resume threads if there are no pending events.
15703 * linux-low.h (struct process_info): Add resume request
15704 pointer.
15705
15706 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15707
15708 * regcache.c (new_register_cache): Clear the allocated register
15709 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15710
15711 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15712
15713 * linux-low.c (linux_resume): Take a struct thread_resume *
15714 argument.
15715 (linux_wait): Update call.
15716 (resume_ptr): New static variable.
15717 (linux_continue_one_thread): Renamed from
15718 linux_continue_one_process. Use resume_ptr.
15719 (linux_resume): Use linux_continue_one_thread.
15720 * server.c (handle_v_cont, handle_v_requests): New functions.
15721 (myresume): New function.
15722 (main): Handle 'v' case.
15723 * target.h (struct thread_resume): New type.
15724 (struct target_ops): Change argument of "resume" to struct
15725 thread_resume *.
15726 (myresume): Delete macro.
15727
15728 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15729
15730 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15731 (uninstall): Support DESTDIR.
15732
15733 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15734
15735 * configure.srv: Add xscale*linux copy of arm*linux entry.
15736
15737 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15738
15739 * linux-arm-low.c (arm_reinsert_addr): New function.
15740 (the_low_target): Add arm_reinsert_addr.
15741
15742 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15743
15744 * mem-break.c: Remove whitespace at end of file.
15745
15746 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15747
15748 * configure.in: Check whether we need to prototype strerror.
15749 * server.h: Optionally prototype strerror.
15750 * gdbreplay.c (perror_with_name): Use strerror.
15751 * linux-low.c (linux_attach_lwp): Use strerror.
15752 * utils.c (perror_with_name): Use strerror.
15753 * config.in, configure: Regenerated.
15754
15755 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15756
15757 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15758 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15759
15760 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15761
15762 * Makefile.in (SFILES): Update.
15763 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15764 low-sun3.c: Remove files.
15765
15766 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15767
15768 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15769 (linux_detach_one_process, linux_detach): New functions.
15770 (linux_target_ops): Add linux_detach.
15771 * server.c (main): Handle 'D' packet.
15772 * target.h (struct target_ops): Add "detach" member.
15773 (detach_inferior): Define.
15774
15775 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15776
15777 From Kelley Cook <kelleycook@wideopenwest.com>:
15778 * configure.srv: Accept i[34567]86 variants.
15779
15780 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15781
15782 * linux-low.c (linux_wait_for_event): Correct comment typos.
15783 (linux_resume_one_process): Call check_removed_breakpoint.
15784 (linux_send_signal): New function.
15785 (linux_target_ops): Add linux_send_signal.
15786 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15787 of kill.
15788 * target.h (struct target_ops): Add send_signal.
15789
15790 2003-05-29 Jim Blandy <jimb@redhat.com>
15791
15792 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15793 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15794 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15795 away part of the register's value.
15796
15797 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15798
15799 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15800 (linux_wait_for_event, linux_init_signals): Likewise.
15801
15802 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15803
15804 * configure.in: Check for stdlib.h.
15805 * configure: Regenerated.
15806 * config.in: Regenerated.
15807
15808 2003-01-04 Andreas Schwab <schwab@suse.de>
15809
15810 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15811
15812 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15813
15814 * Makefile.in: Remove obsolete code.
15815
15816 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15817
15818 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15819 defined(PT_FPR0_HI).
15820
15821 2002-11-17 Stuart Hughes <seh@zee2.com>
15822
15823 * linux-arm-low.c (arm_num_regs): Increase.
15824 (arm_regmap): Include status register.
15825
15826 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15827
15828 * linux-low.c (register_addr): Remove incorrect -1 check.
15829
15830 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15831
15832 * linux-low.c (linux_create_inferior): Call setpgid. Return
15833 the new PID.
15834 (unstopped_p, linux_signal_pid): Remove.
15835 (linux_target_ops): Remove linux_signal_pid.
15836 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15837 global instead of target method.
15838 * target.h (struct target_ops): Remove signal_pid. Update comment
15839 for create_inferior.
15840 * server.c (signal_pid): New variable.
15841 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15842 gdbserver. Set the child to be the foreground process group.
15843 (attach_inferior): Set signal_pid.
15844
15845 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15846
15847 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15848
15849 2002-08-20 Jim Blandy <jimb@redhat.com>
15850
15851 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15852 default for this.
15853
15854 2002-08-01 Andrew Cagney <cagney@redhat.com>
15855
15856 * Makefile.in: Make chill references obsolete.
15857
15858 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15859
15860 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15861 * configure: Regenerate.
15862 * config.in: Regenerate.
15863
15864 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15865
15866 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15867 (perror_with_name, remote_close, remote_open, expect, play): Static.
15868
15869 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15870
15871 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15872 byte offsets instead of an array of indexes.
15873 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15874
15875 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15876
15877 * regcache.c: Add comment.
15878
15879 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15880
15881 * thread-db.c: New file.
15882 * proc-service.c: New file.
15883 * acinclude.m4: New file.
15884 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15885 proc-service.o, and thread-db.o.
15886 (linux-low.o): Add USE_THREAD_DB.
15887 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15888 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15889 * aclocal.m4: Regenerated.
15890 * config.in: Regenerated.
15891 * configure: Regenerated.
15892 * configure.in: Check for proc_service.h, sys/procfs.h,
15893 thread_db.h, and linux/elf.h headrs.
15894 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15895 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15896 Check for -lthread_db and thread support.
15897 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15898 PowerPC, and SuperH.
15899 * i387-fp.c: Constify arguments.
15900 * i387-fp.h: Likewise.
15901 * inferiors.c: (struct thread_info): Renamed from
15902 `struct inferior_info'. Remove PID member. Use generic inferior
15903 list header. All uses updated.
15904 (inferiors, signal_pid): Removed.
15905 (all_threads): New variable.
15906 (get_thread): Define.
15907 (add_inferior_to_list): New function.
15908 (for_each_inferior): New function.
15909 (change_inferior_id): New function.
15910 (add_inferior): Removed.
15911 (remove_inferior): New function.
15912 (add_thread): New function.
15913 (free_one_thread): New function.
15914 (remove_thread): New function.
15915 (clear_inferiors): Use for_each_inferior and free_one_thread.
15916 (find_inferior): New function.
15917 (find_inferior_id): New function.
15918 (inferior_target_data): Update argument type.
15919 (set_inferior_target_data): Likewise.
15920 (inferior_regcache_data): Likewise.
15921 (set_inferior_regcache_data): Likewise.
15922 * linux-low.c (linux_bp_reinsert): Remove.
15923 (all_processes, stopping_threads, using_thrads)
15924 (struct pending_signals, debug_threads, pid_of): New.
15925 (inferior_pid): Replace with macro.
15926 (struct inferior_linux_data): Remove.
15927 (get_stop_pc, add_process): New functions.
15928 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15929 Use add_process and add_thread.
15930 (linux_attach_lwp): New function, based on old linux_attach. Use
15931 add_process and add_thread. Set stop_expected for new threads.
15932 (linux_attach): New function.
15933 (linux_kill_one_process): New function.
15934 (linux_kill): Kill all LWPs.
15935 (linux_thread_alive): Use find_inferior_id.
15936 (check_removed_breakpoints, status_pending_p): New functions.
15937 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15938 Update. Use WNOHANG. Wait for cloned processes also. Update process
15939 struct for the found process.
15940 (linux_wait_for_event): New function.
15941 (linux_wait): Use it. Support LWPs.
15942 (send_sigstop, wait_for_sigstop, stop_all_processes)
15943 (linux_resume_one_process, linux_continue_one_process): New functions.
15944 (linux_resume): Support LWPs.
15945 (REGISTER_RAW_SIZE): Remove.
15946 (fetch_register): Use register_size instead. Call supply_register.
15947 (usr_store_inferior_registers): Likewise. Call collect_register.
15948 Fix recursive case.
15949 (regsets_fetch_inferior_registers): Improve error message.
15950 (regsets_store_inferior_registers): Add debugging.
15951 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15952 (unstopped_p, linux_signal_pid): New functions.
15953 (linux_target_ops): Add linux_signal_pid.
15954 (linux_init_signals): New function.
15955 (initialize_low): Call it. Initialize using_threads.
15956 * regcache.c (inferior_regcache_data): Add valid
15957 flag.
15958 (get_regcache): Fetch registers lazily. Add fetch argument
15959 and update all callers.
15960 (regcache_invalidate_one, regcache_invalidate): New
15961 functions.
15962 (new_register_cache): Renamed from create_register_cache.
15963 Return the new regcache.
15964 (free_register_cache): Change argument to a void *.
15965 (registers_to_string, registers_from_string): Call get_regcache
15966 with fetch flag set.
15967 (register_data): Make static. Pass fetch flag to get_regcache.
15968 (supply_register): Call get_regcache with fetch flag clear.
15969 (collect_register): Call get_regcache with fetch flag set.
15970 (collect_register_as_string): New function.
15971 * regcache.h: Update.
15972 * remote-utils.c (putpkt): Flush after debug output and use
15973 stderr.
15974 Handle input interrupts while waiting for an ACK.
15975 (input_interrupt): Use signal_pid method.
15976 (getpkt): Flush after debug output and use stderr.
15977 (outreg): Use collect_register_as_string.
15978 (new_thread_notify, dead_thread_notify): New functions.
15979 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15980 and general_thread.
15981 (look_up_one_symbol): Flush after debug output.
15982 * server.c (step_thread, server_waiting): New variables.
15983 (start_inferior): Don't use signal_pid. Update call to mywait.
15984 (attach_inferior): Update call to mywait.
15985 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15986 (main): Don't fetch/store registers explicitly. Use
15987 set_desired_inferior. Support proposed ``Hs'' packet. Update
15988 calls to mywait.
15989 * server.h: Update.
15990 (struct inferior_list, struct_inferior_list_entry): New.
15991 * target.c (set_desired_inferior): New.
15992 (write_inferior_memory): Constify.
15993 (mywait): New function.
15994 * target.h: Update.
15995 (struct target_ops): New signal_pid method.
15996 (mywait): Removed macro, added prototype.
15997
15998 * linux-low.h (regset_func): Removed.
15999 (regset_fill_func, regset_store_func): New.
16000 (enum regset_type): New.
16001 (struct regset_info): Add type field. Use new operation types.
16002 (struct linux_target_ops): stop_pc renamed to get_pc.
16003 Add decr_pc_after_break and breakpoint_at.
16004 (get_process, get_thread_proess, get_process_thread)
16005 (strut process_info, all_processes, linux_attach_lwp)
16006 (thread_db_init): New.
16007
16008 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16009 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16010 (the_low_target): Add new members.
16011 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16012 (i386_store_fpxregset): Constify.
16013 (target_regsets): Add new kind identifier.
16014 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16015 (i386_set_pc): Add debugging.
16016 (i386_breakpoint_at): New function.
16017 (the_low_target): Add new members.
16018 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16019 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16020 (mips_breakpoint_at): New.
16021 (the_low_target): Add new members.
16022 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16023 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16024 (the_low_target): Add new members.
16025 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16026 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16027 (the_low_target): Add new members.
16028 * linux-x86-64-low.c (target_regsets): Add new kind
16029 identifier.
16030
16031 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16032
16033 From Martin Pool <mbp@samba.org>:
16034 * server.c (gdbserver_usage): New function.
16035 (main): Call it.
16036
16037 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16038
16039 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16040 stop_at -> stop_pc.
16041
16042 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16043
16044 * Makefile.in: Remove obsolete code.
16045
16046 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16047
16048 * linux-low.c (regsets_fetch_inferior_registers),
16049 (regsets_store_inferior_registers): Removed cast to int from
16050 ptrace() calls.
16051 * regcache.h: Added declaration of struct inferior_info.
16052
16053 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16054
16055 * inferiors.c (struct inferior_info): Add regcache_data.
16056 (add_inferior): Call create_register_cache.
16057 (clear_inferiors): Call free_register_cache.
16058 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16059 * regcache.c (struct inferior_regcache_data): New.
16060 (registers): Remove.
16061 (get_regcache): New function.
16062 (create_register_cache, free_register_cache): New functions.
16063 (set_register_cache): Don't initialize the register cache here.
16064 (registers_to_string, registers_from_string, register_data): Call
16065 get_regcache.
16066 * regcache.h: Add prototypes.
16067 * server.h: Likewise.
16068
16069 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16070
16071 * mem-break.c: New file.
16072 * mem-break.h: New file.
16073 * Makefile.in: Add mem-break.o rule; update server.h
16074 dependencies.
16075 * inferiors.c (struct inferior_info): Add target_data
16076 member.
16077 (clear_inferiors): Free target_data member if set.
16078 (inferior_target_data, set_inferior_target_data): New functions.
16079 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16080 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16081 * linux-low.c (linux_bp_reinsert): New variable.
16082 (struct inferior_linux_data): New.
16083 (linux_create_inferior): Use set_inferior_target_data.
16084 (linux_attach): Likewise. Call add_inferior.
16085 (linux_wait_for_one_inferior): New function.
16086 (linux_wait): Call it.
16087 (linux_write_memory): Add const.
16088 (initialize_low): Call set_breakpoint_data.
16089 * linux-low.h (struct linux_target_ops): Add breakpoint
16090 handling members.
16091 * server.c (attach_inferior): Remove extra add_inferior
16092 call.
16093 * server.h: Include mem-break.h. Update inferior.c
16094 prototypes.
16095 * target.c (read_inferior_memory)
16096 (write_inferior_memory): New functions.
16097 * target.h (read_inferior_memory)
16098 (write_inferior_memory): Change macros to prototypes.
16099 (struct target_ops): Update comments. Add const to write_memory
16100 definition.
16101
16102 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16103
16104 * linux-low.c (usr_store_inferior_registers): Support
16105 registers which are allowed to fail to store.
16106 * linux-low.h (linux_target_ops): Likewise.
16107 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16108 (ppc_cannot_store_register): FPSCR may not be storable.
16109
16110 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16111
16112 * server.h: Include <string.h> if HAVE_STRING_H.
16113 * ChangeLog: Correct paths in last ChangeLog entry.
16114
16115 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16116
16117 * linux-low.h: Remove obsolete prototypes.
16118 (struct linux_target_ops): New.
16119 (extern the_low_target): New.
16120 * linux-low.c (num_regs, regmap): Remove declarations.
16121 (register_addr): Use the_low_target explicitly.
16122 (fetch_register): Likewise.
16123 (usr_fetch_inferior_registers): Likewise.
16124 (usr_store_inferior_registers): Likewise.
16125 * linux-arm-low.c (num_regs): Remove.
16126 (arm_num_regs): Define.
16127 (arm_regmap): Renamed from regmap, made static.
16128 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16129 made static.
16130 (arm_cannot_store_register): Renamed from cannot_store_register,
16131 made static.
16132 (the_low_target): New.
16133 * linux-i386-low.c (num_regs): Remove.
16134 (i386_num_regs): Define.
16135 (i386_regmap): Renamed from regmap, made static.
16136 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16137 made static.
16138 (i386_cannot_store_register): Renamed from cannot_store_register,
16139 made static.
16140 (the_low_target): New.
16141 * linux-ia64-low.c (num_regs): Remove.
16142 (ia64_num_regs): Define.
16143 (ia64_regmap): Renamed from regmap, made static.
16144 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16145 made static.
16146 (ia64_cannot_store_register): Renamed from cannot_store_register,
16147 made static.
16148 (the_low_target): New.
16149 * linux-m68k-low.c (num_regs): Remove.
16150 (m68k_num_regs): Define.
16151 (m68k_regmap): Renamed from regmap, made static.
16152 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16153 made static.
16154 (m68k_cannot_store_register): Renamed from cannot_store_register,
16155 made static.
16156 (the_low_target): New.
16157 * linux-mips-low.c (num_regs): Remove.
16158 (mips_num_regs): Define.
16159 (mips_regmap): Renamed from regmap, made static.
16160 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16161 made static.
16162 (mips_cannot_store_register): Renamed from cannot_store_register,
16163 made static.
16164 (the_low_target): New.
16165 * linux-ppc-low.c (num_regs): Remove.
16166 (ppc_num_regs): Define.
16167 (ppc_regmap): Renamed from regmap, made static.
16168 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16169 made static.
16170 (ppc_cannot_store_register): Renamed from cannot_store_register,
16171 made static.
16172 (the_low_target): New.
16173 * linux-s390-low.c (num_regs): Remove.
16174 (s390_num_regs): Define.
16175 (s390_regmap): Renamed from regmap, made static.
16176 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16177 made static.
16178 (s390_cannot_store_register): Renamed from cannot_store_register,
16179 made static.
16180 (the_low_target): New.
16181 * linux-sh-low.c (num_regs): Remove.
16182 (sh_num_regs): Define.
16183 (sh_regmap): Renamed from regmap, made static.
16184 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16185 made static.
16186 (sh_cannot_store_register): Renamed from cannot_store_register,
16187 made static.
16188 (the_low_target): New.
16189 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16190 (the_low_target): New.
16191
16192 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16193
16194 * Makefile.in: Add stamp-h target.
16195 * configure.in: Create stamp-h.
16196 * configure: Regenerated.
16197
16198 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16199
16200 * inferiors.c: New file.
16201 * target.c: New file.
16202 * target.h: New file.
16203 * Makefile.in: Add target.o and inferiors.o. Update
16204 dependencies.
16205 * linux-low.c (inferior_pid): New static variable,
16206 moved from server.c.
16207 (linux_create_inferior): Renamed from create_inferior.
16208 Call add_inferior. Return 0 on success instead of a PID.
16209 (linux_attach): Renamed from myattach.
16210 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16211 (linux_thread_alive): Renamed from mythread_alive.
16212 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16213 child dies.
16214 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16215 (regsets_store_inferior_registers): Correct error message.
16216 Add missing ``return 0''.
16217 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16218 (linux_store_registers): Renamed from store_inferior_registers.
16219 (linux_read_memory): Renamed from read_inferior_memory.
16220 (linux_write_memory): Renamed from write_inferior_memory.
16221 (linux_target_ops): New structure.
16222 (initialize_low): Call set_target_ops ().
16223 * remote-utils.c (unhexify): New function.
16224 (hexify): New function.
16225 (input_interrupt): Send signals to ``signal_pid''.
16226 * server.c (inferior_pid): Remove.
16227 (start_inferior): Update create_inferior call.
16228 (attach_inferior): Call add_inferior.
16229 (handle_query): New function.
16230 (main): Call handle_query for `q' packets.
16231 * server.h: Include "target.h". Remove obsolete prototypes.
16232 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16233
16234 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16235
16236 * Makefile.in: Add WARN_CFLAGS. Update configury
16237 dependencies.
16238 * configure.in: Check for <string.h>
16239 * configure: Regenerate.
16240 * config.in: Regenerate.
16241 * gdbreplay.c: Include needed system headers.
16242 (remote_open): Remove strchr prototype.
16243 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16244 * regcache.c (supply_register): Change buf argument to const void *.
16245 (supply_register_by_name): Likewise.
16246 (collect_register): Change buf argument to void *.
16247 (collect_register_by_name): Likewise.
16248 * regcache.h: Add missing prototypes.
16249 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16250 * server.c (handle_query): New function.
16251 (attached): New static variable, moved out of main.
16252 (main): Quiet longjmp clobber warnings.
16253 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16254 * utils.c (error): Remove NORETURN.
16255 (fatal): Likewise.
This page took 0.374461 seconds and 4 git commands to generate.