Add silent Makefile rules
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in: Include silent-rules.mk.
4 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5 (COMPILE): Add ECHO_CXX.
6 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
9 (version-generated.c): Add ECHO_GEN.
10 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
11 (IPAGENT_COMPILE): Add ECHO_CXX.
12 (%-generated.c): Add ECHO_REGDAT.
13
14 2018-03-14 Tom Tromey <tom@tromey.com>
15
16 PR cli/14977:
17 * ax.c (ax_printf): Special case for NULL.
18
19 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
20
21 * linux-low.c (linux_qxfer_libraries_svr4): Use
22 xml_escape_text_append.
23
24 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
25
26 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
27
28 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
29
30 * server.c (handle_general_set): Remove unnecessary xstrdup.
31
32 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
33
34 * server.c (parse_debug_format_options): Adjust to
35 delim_string_to_char_ptr_vec changes.
36 * thread-db.c (thread_db_load_search): Adjust to
37 dirnames_to_char_ptr_vec changes.
38
39 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
40
41 * target.h (target_enable_btrace, target_disable_btrace)
42 (target_read_btrace, target_read_btrace_conf): Turn macro into
43 inline function. Throw error if target method is not defined.
44 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
45 check for btrace target method. Be prepared to handle exceptions
46 from btrace target methods.
47
48 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
49
50 * server.c (captured_main): Change order of error message printed
51 when the current working directory cannot be found.
52
53 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
54
55 * server.c: Include "filenames.h" and "pathstuff.h".
56 (program_name): Delete variable.
57 (program_path): New anonymous class.
58 (get_exec_wrapper): Use "program_path" instead of
59 "program_name".
60 (handle_v_run): Likewise.
61 (captured_main): Likewise.
62 (process_serial_event): Likewise.
63
64 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
65
66 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
67 (OBJS): Add "pathstuff.o".
68 * server.c (current_directory): New global variable.
69 (captured_main): Initialize "current_directory".
70
71 2018-02-26 Alan Hayward <alan.hayward@arm.com>
72
73 * tdesc.c: Use common/tdesc.h.
74 * tdesc.h: Likewise.
75
76 2018-02-20 Alan Hayward <alan.hayward@arm.com>
77 Simon Marchi <simon.marchi@ericsson.com>
78
79 * Makefile.in: Switch order of make rules.
80
81 2018-02-19 Alan Hayward <alan.hayward@arm.com>
82
83 * Makefile.in: Add common directory in build.
84 * configure.ac: Add common reference.
85 * configure: Regenerate.
86
87 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
88
89 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
90 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
91 * spu-low.c (spu_target_ops): Likewise.
92 * win32-low.c (win32_target_ops): Likewise.
93 * server.c (supported_btrace_packets): Report packets unconditionally.
94 * target.h (target_ops) <supports_btrace>: Remove.
95 (target_supports_btrace): Remove.
96
97 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
98
99 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
100 (handle_btrace_disable): Change return type to void. Use exceptions
101 to report errors.
102 (handle_btrace_general_set): Catch exception and copy message to
103 return message.
104
105 2018-02-08 Tom Tromey <tom@tromey.com>
106
107 * linux-low.c (install_software_single_step_breakpoints): Use
108 make_scoped_restore.
109 * inferiors.c (make_cleanup_restore_current_thread): Remove.
110 (do_restore_current_thread_cleanup): Remove.
111 * gdbthread.h (make_cleanup_restore_current_thread): Don't
112 declare.
113
114 2018-02-08 Tom Tromey <tom@tromey.com>
115
116 * mem-break.c (set_raw_breakpoint_at): Use
117 gdb::unique_xmalloc_ptr.
118
119 2018-01-30 Pedro Alves <palves@redhat.com>
120
121 PR gdb/13211
122 * target.c (target_terminal::terminal_state): Rename to ...
123 (target_terminal::m_terminal_state): ... this.
124
125 2018-01-19 James Clarke <jrtc27@jrtc27.com>
126
127 * linux-low.c (handle_extended_wait): Surround call to
128 thread_db_notice_clone with #ifdef USE_THREAD_DB.
129
130 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
131
132 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
133 linux_ptrace_attach_fail_reason_string now returning an
134 std::string.
135 (linux_attach): Likewise.
136 * thread-db.c (attach_thread): Likewise.
137
138 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
139
140 PR gdb/21559
141 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
142 checking for fs_base/gs_base fields in struct user_regs_struct.
143 * configure: Regenerate.
144
145 2018-01-16 Yao Qi <yao.qi@linaro.org>
146
147 PR gdb/18749
148 * linux-low.c (fetch_register): Call supply_register instead of
149 error.
150
151 2018-01-08 Yao Qi <yao.qi@linaro.org>
152 Simon Marchi <simon.marchi@ericsson.com>
153
154 * Makefile.in (OBS): Remove selftest.o.
155 * configure.ac: Set srv_selftest_objs if $development is true.
156 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
157 * configure: Re-generated.
158 * server.c (captured_main): Wrap variable selftest_filter with
159 GDB_SELF_TEST.
160
161 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
162
163 * server.c (parse_debug_format_options): Return std::string.
164 (handle_monitor_command, captured_main): Adjust.
165
166 2018-01-05 Pedro Alves <palves@redhat.com>
167
168 PR gdb/18653
169 * server.c (captured_main): Pass quiet=false to
170 save_original_signals_state.
171
172 2018-01-01 Joel Brobecker <brobecker@adacore.com>
173
174 * gdbreplay.c (gdbreplay_version): Update copyright year in
175 version message.
176 * server.c (gdbserver_version): Likewise.
177
178 2017-12-08 Tom Tromey <tom@tromey.com>
179
180 * ax.c (ax_printf): Update.
181
182 2017-12-07 Yao Qi <yao.qi@linaro.org>
183
184 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
185 aarch64_linux_read_description.
186 * linux-amd64-ipa.c (idx2mask): New array.
187 (get_ipa_tdesc): Move idx2mask out.
188 (initialize_low_tracepoint): Initialize target descriptions.
189 * linux-i386-ipa.c (idx2mask): New array.
190 (get_ipa_tdesc): Move idx2mask out.
191 (initialize_low_tracepoint): Initialize target descriptions.
192
193 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * tdesc.c (struct tdesc_type): Change return type.
196 (tdesc_add_flag): Change parameter type.
197 (tdesc_add_bitfield): Likewise.
198 (tdesc_add_field): Likewise.
199 (tdesc_set_struct_size): Likewise.
200
201 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
202
203 * regcache.c (registers_to_string): Remove unused variable.
204
205 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * inferiors.c (for_each_inferior_with_data): Remove.
208 * inferiors.h (for_each_inferior_with_data): Remove.
209 * server.c (handle_qxfer_threads_worker): Change parameter type.
210 (handle_qxfer_threads_proper): Use for_each_thread.
211
212 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
213
214 * inferiors.c (for_each_inferior): Remove.
215 (clear_inferiors): Use for_each_thread.
216 * inferiors.h (for_each_inferior): Remove.
217 * linux-low.c (linux_wait_for_event_filtered): Use
218 for_each_thread.
219 (linux_stabilize_threads): Likewise.
220 * regcache.c (regcache_release): Likewise.
221 * server.c (gdb_wants_all_threads_stopped): Likewise.
222 (clear_pending_status_callback): Remove.
223 (handle_status): Use for_each_thread.
224 (captured_main): Likewise.
225 * win32-low.c (child_init_thread_list): Likewise.
226 (win32_clear_inferiors): Likewise.
227 (fake_breakpoint_event): Likewise.
228
229 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
230
231 * inferiors.h (find_inferior): Remove.
232 * inferiors.c (find_inferior): Remove.
233
234 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
235
236 * linux-low.c (resume_status_pending_p): Update comment.
237 (need_step_over_p): Update comment.
238
239 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
240
241 * linux-low.c (proceed_one_lwp): Return void, change parameter
242 type.
243 (unsuspend_and_proceed_one_lwp): Likewise.
244 (proceed_all_lwps): Use for_each_thread.
245 (unstop_all_lwps): Likewise.
246
247 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
248
249 * linux-low.c (linux_resume_one_thread): Return void, take
250 parameter directly.
251 (linux_resume): Use for_each_thread.
252
253 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
254
255 * linux-low.c (send_sigstop_callback): Return void, change
256 parameter type. Rename to...
257 (send_sigstop): ... this.
258 (suspend_and_send_sigstop_callback): Return void, change parameter
259 type. Rename to...
260 (suspend_and_send_sigstop): ... this.
261 (stop_all_lwps): Use for_each_thread.
262
263 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
264
265 * linux-low.c (lwp_running): Return bool, remove unused
266 argument.
267 (linux_stabilize_threads): Use find_thread.
268
269 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
270
271 * linux-low.c (select_singlestep_lwp_callback): Remove.
272 (count_events_callback): Remove.
273 (select_event_lwp_callback): Remove.
274 (select_event_lwp): Use find_thread/for_each_thread.
275
276 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
277
278 * linux-low.c (not_stopped_callback): Return bool, take filter
279 argument directly.
280 (linux_wait_for_event_filtered): Use find_thread.
281 (linux_wait_1): Likewise.
282
283 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
284
285 * linux-low.c (same_lwp): Remove.
286 (find_lwp_pid): Use find_thread.
287
288 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
289
290 * linux-low.c (delete_lwp_callback): Remove.
291 (linux_mourn): Use for_each_thread.
292
293 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
294
295 * linux-low.c (linux_detach_lwp_callback): Return void, remove
296 args parameter, don't check for pid.
297 (linux_detach): Use for_each_thread.
298
299 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
300
301 * linux-low.c (struct counter): Remove.
302 (second_thread_of_pid_p): Remove.
303 (last_thread_of_process_p): Use find_thread.
304
305 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
306
307 * inferiors.c (find_inferior_in_random): Remove.
308 * inferiors.h (find_inferior_in_random): Remove.
309 * linux-low.c (status_pending_p_callback): Return bool, accept
310 parameter ptid directly.
311 (linux_wait_for_event_filtered): Use find_thread_in_random.
312 (linux_wait_1): Likewise.
313
314 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
315
316 * inferiors.c (find_inferior_id): Remove.
317 (find_thread_ptid): Move implemention from find_inferior_id to
318 here.
319 * inferiors.h (find_inferior_id): Remove.
320 * server.c (handle_status): Use find_thread_ptid.
321 (process_serial_event): Likewise.
322 * thread-db.c (find_one_thread): Likewise.
323 (thread_db_thread_handle): Likewise.
324 * win32-low.c (thread_rec): Likewise.
325 (child_delete_thread): Likewise.
326 (win32_thread_alive): Likewise.
327 (get_child_debug_event): Likewise.
328
329 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
330
331 * linux-mips-low.c (update_watch_registers_callback): Return
332 void, remove pid_p parameter, don't check for pid.
333 (mips_insert_point, mips_remove_point): Use for_each_thread.
334
335 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
336
337 * lynx.low (lynx_delete_thread_callback): Remove.
338 (lynx_mourn): Use for_each_thread.
339
340 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
341
342 * regcache.c (regcache_invalidate_one): Remove.
343 (regcache_invalidate_pid): use for_each_thread.
344
345 2017-11-26 Tom Tromey <tom@tromey.com>
346
347 * linux-low.c (linux_create_inferior): Update.
348
349 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
350
351 * spu-low.c (spu_create_inferior): Fix typo in argument name.
352
353 2017-11-24 Alan Hayward <alan.hayward@arm.com>
354
355 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
356 * linux-aarch64-low.c (initialize_low_arch): Call init func.
357 * linux-aarch64-tdesc-selftest.c: New file.
358 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
359
360 2017-11-24 Alan Hayward <alan.hayward@arm.com>
361
362 * configure.srv: Add new file.
363 * linux-aarch64-low.c (initialize_low_arch): Call init func.
364 * linux-aarch64-tdesc-selftest.c: New file.
365 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
366
367 2017-11-24 Alan Hayward <alan.hayward@arm.com>
368
369 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
370 * linux-aarch64-low.c (initialize_low_arch): Remove init.
371 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
372
373 2017-11-24 Alan Hayward <alan.hayward@arm.com>
374
375 * configure.srv: Add new files.
376 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
377 aarch64_linux_read_description.
378 * linux-aarch64-low.c (aarch64_linux_read_description):
379 Merge with aarch64_arch_setup.
380 (aarch64_arch_setup): Call aarch64_linux_read_description.
381 * linux-aarch64-tdesc.c: New file.
382 * linux-aarch64-tdesc.h: New file.
383
384 2017-11-24 Yao Qi <yao.qi@linaro.org>
385
386 * configure.srv: Set $srv_regobj for tic6x-linux.
387 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
388 (tic6x_read_description): Move some code to tic6x_arch_setup.
389 (tic6x_tdesc_test): New function.
390 (initialize_low_arch): Call selftests::register_test.
391
392 2017-11-22 Yao Qi <yao.qi@linaro.org>
393
394 * remote-utils.c (prepare_resume_reply): Use memcpy.
395
396 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
397
398 * linux-low.c (kill_one_lwp_callback): Return void, take
399 argument directly, don't filter on pid.
400 (linux_kill): Use for_each_thread.
401
402 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
403
404 * linux-low.c (need_step_over_p): Return bool, remove dummy
405 argument.
406 (linux_resume, proceed_all_lwps): Use find_thread.
407
408 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
409
410 * linux-low.c (resume_status_pending_p): Return bool, remove
411 flag_p argument.
412 (linux_resume): Use find_thread.
413
414 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
415
416 * linux-low.c (struct thread_resume_array): Remove.
417 (linux_set_resume_request): Return void, take arguments
418 directly.
419 (linux_resume): Use for_each_thread.
420
421 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
422
423 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
424 return bool, remove data argument.
425 (linux_stabilize_threads): Use find_thread.
426
427 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
428
429 * linux-low.c (unsuspend_one_lwp): Remove.
430 (unsuspend_all_lwps): Use for_each_thread, inline code from
431 unsuspend_one_lwp.
432
433 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
434
435 * gdbthread.h (find_thread): Add overload with ptid_t filter.
436 * linux-low.c (struct iterate_over_lwps_args): Remove.
437 (iterate_over_lwps_filter): Remove.
438 (iterate_over_lwps): Use find_thread.
439
440 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
441
442 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
443 (linux_handle_new_gdb_connection): Use for_each_thread, inline
444 code from reset_lwp_ptrace_options_callback.
445
446 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
447
448 * linux-arm-low.c (struct update_registers_data): Remove.
449 (update_registers_callback): Return void, take arguments
450 directly, don't check thread's pid.
451 (arm_insert_point, arm_remove_point): Use for_each_thread.
452
453 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
454
455 * win32-low.c (continue_one_thread): Return void, take argument
456 directly.
457 (child_continue): Use for_each_thread.
458
459 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
460
461 * win32-i386-low.c (update_debug_registers_callback): Rename
462 to ...
463 (update_debug_registers): ... this, return void, remove pid_p arg.
464 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
465
466 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
467
468 * inferiors.h (struct process_info): Add constructor, initialize
469 fields..
470 <syscalls_to_catch>: Change type to std::vector<int>.
471 * inferiors.c (add_process): Allocate process_info with new.
472 (remove_process): Free process_info with delete.
473 * linux-low.c (handle_extended_wait): Adjust.
474 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
475 * server.c (handle_general_set): Adjust.
476
477 2017-11-16 Pedro Alves <palves@redhat.com>
478
479 * remote-utils.c (remote_close): Block SIGIO signals instead of
480 uninstalling the SIGIO handler.
481
482 2017-11-16 Alan Hayward <alan.hayward@arm.com>
483
484 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
485
486 2017-11-16 Yao Qi <yao.qi@linaro.org>
487
488 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
489 (tic6x_store_gregset): Likewise.
490 (tic6x_usrregs_info): Move it up.
491
492 2017-11-15 Alan Hayward <alan.hayward@arm.com>
493
494 * Makefile.in: Update arch rules.
495 * configure.srv: Explicitly mark arch/ files.
496
497 2017-11-13 Andreas Schwab <schwab@suse.de>
498
499 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
500 function.
501 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
502
503 2017-11-06 Pedro Alves <palves@redhat.com>
504
505 * config.in, configure: Regenerate.
506
507 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
508
509 * target.c (struct thread_search): Remove.
510 (thread_search_callback): Remove.
511 (prepare_to_access_memory): Use for_each_thread instead of
512 find_inferior. Inline code from thread_search_callback.
513
514 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
515
516 * server.c (struct visit_actioned_threads_data): Remove.
517 (visit_actioned_threads): Change prototype to take arguments
518 directly.
519 (resume): Use find_thread instead of find_inferior.
520
521 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
522
523 * server.c (queue_stop_reply_callback): Change prototype, return
524 void.
525 (find_status_pending_thread_callback): Remove.
526 (handle_status): Replace find_inferior with find_thread and
527 for_each_thread.
528
529 2017-10-25 Alan Hayward <alan.hayward@arm.com>
530
531 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
532 with REGNO.
533 (aarch64_store_gregset): Likewise.
534 (aarch64_fill_fpregset): Likewise.
535 (aarch64_store_fpregset): Likewise.
536
537 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
538
539 * gdbthread.h (find_thread, for_each_thread): New functions.
540 * inferiors.c (thread_of_pid): Remove.
541 (find_any_thread_of_pid): Use find_thread.
542 * linux-low.c (num_lwps): Use for_each_thread.
543
544 2017-10-17 Yao Qi <yao.qi@linaro.org>
545
546 * Makefile.in: Remove one rule.
547 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
548
549 2017-10-17 Yao Qi <yao.qi@linaro.org>
550
551 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
552 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
553
554 2017-10-17 Yao Qi <yao.qi@linaro.org>
555
556 * configure.srv: Rename arm.o with arch/arm.o.
557
558 2017-10-17 Yao Qi <yao.qi@linaro.org>
559
560 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
561 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
562 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
563 (arch-i386.o, arch-amd64.o): Remove rules.
564 (arch/%.o): New rule.
565 Update POSTCOMPILE and COMPILE.pre.
566 * configure.ac: Invoke AC_CONFIG_COMMANDS.
567 * configure: Re-generated.
568 * configure.srv: Replace arch-i386.o with arch/i386.o.
569 Replace arch-amd64.o with arch/amd64.o.
570
571 2017-10-16 Yao Qi <yao.qi@linaro.org>
572
573 * configure: Regenerated.
574
575 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
576
577 * inferiors.h: (struct inferior_list): Remove.
578 (struct inferior_list_entry); Remove.
579 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
580 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
581 get_first_inferior): Remove.
582 (for_each_inferior, for_each_inferior_with_data, find_inferior,
583 find_inferior_id, find_inferior_in_random): Change signature.
584 * inferiors.c (all_threads): Change type to
585 std::list<thread_info *>.
586 (get_thread): Remove macro.
587 (find_inferior, find_inferior_id): Change signature, implement
588 using find_thread.
589 (find_inferior_in_random): Change signature, implement using
590 find_thread_in_random.
591 (for_each_inferior, for_each_inferior_with_data): Change
592 signature, implement using for_each_thread.
593 (add_inferior_to_list, remove_inferior): Remove.
594 (add_thread, get_first_thread, thread_of_pid,
595 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
596 (get_first_inferior, one_inferior_p, clear_inferior_list):
597 Remove.
598 (clear_inferiors, get_thread_process): Update.
599 * gdbthread.h: Include <list>.
600 (struct thread_info) <entry>: Remove field.
601 <id>: New field.
602 (all_threads): Change type to std::list<thread_info *>.
603 (get_first_inferior): Add doc.
604 (find_thread, for_each_thread, find_thread_in_random): New
605 functions.
606 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
607 * linux-arm-low.c (update_registers_callback): Update.
608 * linux-low.c (second_thread_of_pid_p): Update.
609 (kill_one_lwp_callback, linux_detach_lwp_callback,
610 delete_lwp_callback, status_pending_p_callback, same_lwp,
611 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
612 iterate_over_lwps, not_stopped_callback,
613 resume_stopped_resumed_lwps, count_events_callback,
614 select_singlestep_lwp_callback, select_event_lwp_callback,
615 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
616 suspend_and_send_sigstop_callback, wait_for_sigstop,
617 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
618 lwp_running, linux_set_resume_request, resume_status_pending_p,
619 need_step_over_p, start_step_over, linux_resume_one_thread,
620 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
621 reset_lwp_ptrace_options_callback): Update.
622 * linux-mips-low.c (update_watch_registers_callback): Update.
623 * regcache.c (regcache_invalidate_one, regcache_invalidate):
624 Update.
625 (free_register_cache_thread_one): Remove.
626 (regcache_release): Update.
627 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
628 handle_qxfer_threads_worker): Update.
629 (handle_query): Update, use list iterator.
630 (visit_actioned_threads, handle_pending_status,
631 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
632 clear_pending_status_callback, set_pending_status_callback,
633 find_status_pending_thread_callback, handle_status,
634 process_serial_event): Update.
635 * target.c (thread_search_callback): Update.
636 * thread-db.c (thread_db_get_tls_address): Update.
637 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
638 Update.
639 * win32-i386-low.c (update_debug_registers_callback): Update.
640 * win32-low.c (delete_thread_info, child_delete_thread,
641 continue_one_thread, suspend_one_thread,
642 get_child_debug_event): Adjust.
643
644 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
645
646 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
647 * inferiors.h: Include <list>.
648 (struct process_info) <entry>: Remove field.
649 <pid>: New field.
650 (pid_of): Change macro to function.
651 (ptid_of, lwpid_of): Remove macro.
652 (all_processes): Change type to std::list<process_info *>.
653 (ALL_PROCESSES): Remove macro.
654 (for_each_process, find_process): New function.
655 * inferiors.c (all_processes): Change type to
656 std::list<process_info *>.
657 (find_thread_process): Adjust.
658 (add_process): Likewise.
659 (remove_process): Likewise.
660 (find_process_pid): Likewise.
661 (get_first_process): Likewise.
662 (started_inferior_callback): Remove.
663 (have_started_inferiors_p): Adjust.
664 (attached_inferior_callback): Remove.
665 (have_attached_inferiors_p): Adjust.
666 * linux-low.c (check_zombie_leaders): Likewise.
667 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
668 (x86_linux_update_xmltarget): Adjust.
669 * server.c (handle_query): Likewise.
670 (gdb_reattached_process): Remove.
671 (handle_status): Adjust.
672 (kill_inferior_callback): Likewise.
673 (detach_or_kill_inferior): Remove.
674 (print_started_pid): Likewise.
675 (print_attached_pid): Likewise.
676 (detach_or_kill_for_exit): Update.
677 (process_serial_event): Likewise.
678 * linux-arm-low.c (arm_new_fork): Likewise.
679
680 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
681
682 * dll.h: Include <list>.
683 (struct dll_info): Add constructor.
684 <entry>: Remove field.
685 (all_dlls): Change type to std::list<dll_info>.
686 * dll.c: Include <algorithm>.
687 (get_dll): Remove macro.
688 (all_dlls): Change type to std::list<dll_info *>.
689 (free_one_dll): Remove.
690 (match_dll): Likewise.
691 (loaded_dll): Adjust.
692 (unloaded_dll): Adjust to all_dlls type change, use
693 std::find_if. Inline code from match_dll.
694 (clear_dlls): Adjust to all_dlls type change.
695 * server.c (emit_dll_description): Remove.
696 (handle_qxfer_libraries): Adjust to all_dlls type change,
697 integrate emit_dll_description's functionality.
698
699 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
700
701 * linux-low.h (struct linux_target_ops) <delete_process>: New
702 field.
703 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
704 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
705 (struct linux_target_ops): Add delete_process callback.
706 * linux-arm-low.c (arm_delete_process): New.
707 (struct linux_target_ops): Add delete_process callback.
708 * linux-bfin-low.c (struct linux_target_ops): Likewise.
709 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
710 * linux-m32r-low.c (struct linux_target_ops): Likewise.
711 * linux-mips-low.c (mips_linux_delete_process): New.
712 (struct linux_target_ops): Add delete_process callback.
713 * linux-ppc-low.c (struct linux_target_ops): Likewise.
714 * linux-s390-low.c (struct linux_target_ops): Likewise.
715 * linux-sh-low.c (struct linux_target_ops): Likewise.
716 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
717 * linux-tile-low.c (struct linux_target_ops): Likewise.
718 * linux-x86-low.c (x86_linux_delete_process): New.
719 (struct linux_target_ops): Add delete_process callback.
720 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
721
722 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
723
724 * linux-aarch64-low.c (the_low_target): Add thread delete
725 callback.
726 * linux-arm-low.c (arm_delete_thread): New function.
727 (the_low_target): Add thread delete callback.
728 * linux-bfin-low.c (the_low_target): Likewise.
729 * linux-crisv32-low.c (the_low_target): Likewise.
730 * linux-low.c (delete_lwp): Invoke delete_thread callback if
731 set.
732 * linux-low.h (struct linux_target_ops) <delete_thread>: New
733 field.
734 * linux-m32r-low.c (the_low_target): Add thread delete callback.
735 * linux-mips-low.c (mips_linux_delete_thread): New function.
736 (the_low_target): Add thread delete callback.
737 * linux-ppc-low.c (the_low_target): Likewise.
738 * linux-s390-low.c (the_low_target): Likewise.
739 * linux-sh-low.c (the_low_target): Likewise.
740 * linux-tic6x-low.c (the_low_target): Likewise.
741 * linux-tile-low.c (the_low_target): Likewise.
742 * linux-x86-low.c (the_low_target): Likewise.
743 * linux-xtensa-low.c (the_low_target): Likewise.
744
745 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
746
747 * win32-low.c: Include "common-inferior.h".
748
749 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
750
751 * inferiors.c (set_inferior_cwd): New function.
752 * server.c (handle_general_set): Handle QSetWorkingDir packet.
753 (handle_query): Inform that QSetWorkingDir is supported.
754 * win32-low.c (create_process): Pass the inferior's cwd to
755 CreateProcess.
756
757 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
758
759 * inferiors.c (current_inferior_cwd): New global variable.
760 (get_inferior_cwd): New function.
761 * inferiors.h (struct process_info) <cwd>: New field.
762
763 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
764
765 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
766 (OBS): Add gdb_tilde_expand.o.
767
768 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
769
770 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
771 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
772
773 2017-09-29 Pedro Alves <palves@redhat.com>
774
775 * ax.c (gdb_parse_agent_expr): Constify.
776 * ax.h (gdb_parse_agent_expr): Constify.
777 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
778 Constify.
779 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
780 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
781 * remote-utils.h (read_ptid): Constify.
782 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
783 (process_point_options, process_serial_event): Constify.
784 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
785 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
786 (cmd_qtbuffer): Constify.
787
788 2017-09-29 Pedro Alves <palves@redhat.com>
789
790 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
791 fails.
792
793 2017-09-29 Pedro Alves <palves@redhat.com>
794
795 * linux-low.c (handle_extended_wait): Pass parent thread instead
796 of process to thread_db_notice_clone.
797 * linux-low.h (thread_db_notice_clone): Replace parent process
798 parameter with parent thread parameter.
799 * thread-db.c (find_one_thread): Add comment.
800 (thread_db_notice_clone): Replace parent process parameter with
801 parent thread parameter. Temporarily switch to the parent thread.
802
803 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
804
805 * gdbthread.h: Include "common-gdbthread.h".
806 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
807 "if" when validating the ptid.
808 * remote-utils.c: Include "gdbthread.h".
809 (prepare_resume_reply): Use "switch_to_thread".
810 * target.c (done_accessing_memory): Likewise.
811
812 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
813
814 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
815 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
816 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
817 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
818 s390x-gs-linux64-ipa.o to ipa_obj.
819 * linux-s390-low.c (HWCAP_S390_GS): New define.
820 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
821 New functions.
822 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
823 (s390_arch_setup): Check for guarded-storage support and choose
824 appropriate tdesc.
825 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
826 init_registers_s390x_gs_linux64.
827 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
828 enum value.
829 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
830 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
831
832 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
833
834 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
835
836 2017-09-21 Kevin Buettner <kevinb@redhat.com>
837
838 * linux-low.h (struct lwp_info): Add new field, thread_handle.
839 (thread_db_thread_handle): Declare.
840 * linux-low.c (linux_target_ops): Initialize thread_handle.
841 * server.c (handle_qxfer_threads_worker): Add support for
842 "handle" attribute.
843 * target.h (struct target_ops): Add new function pointer,
844 thread_handle.
845 (target_thread_handle): Define.
846 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
847 field in lwp.
848 (thread_db_thread_handle): New function.
849
850 2017-09-21 Kevin Buettner <kevinb@redhat.com>
851
852 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
853 * linux-low.h (thread_db_notice_clone): Declare.
854 * thread-db.c (thread_db_notice_clone): New function.
855
856 2017-09-21 Pedro Alves <palves@redhat.com>
857
858 * server.c (gdb_read_memory, handle_status, process_serial_event)
859 (handle_serial_event, handle_target_event): Adjust to
860 set_desired_thread prototype change.
861 * target.c (set_desired_thread): Remove 'use_general' parameter
862 and adjust.
863 * target.h (set_desired_thread): Remove 'use_general' parameter.
864
865 2017-09-20 Tom Tromey <tom@tromey.com>
866
867 * target.c (target_terminal::terminal_state): Define.
868 (target_terminal::init): Rename from target_terminal_init.
869 (target_terminal::inferior): Rename from
870 target_terminal_inferior.
871 (target_terminal::ours): Rename from target_terminal_ours.
872 (target_terminal::ours_for_output, target_terminal::info): New.
873
874 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
875
876 * server.c (accumulate_file_name_length): Remove.
877 (emit_dll_description): Adjust to std::string change.
878 (handle_qxfer_libraries): Use std::string to hold document.
879
880 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
881
882 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
883 return type of xml_escape_text.
884 * server.c (emit_dll_description): Likewise.
885
886 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
887
888 * server.c (captured_main): Accept argument for --selftest.
889 Update run_tests call.
890 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
891 when registering selftests.
892
893 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
894
895 * regcache.c (get_thread_regcache): Update code to use "std::vector"
896 instead of "VEC" for "target_desc.reg_defs".
897 (regcache_cpy): Likewise.
898 (registers_to_string): Likewise.
899 (registers_from_string): Likewise.
900 (find_regno): Likewise.
901 (supply_regblock): Likewise.
902 (regcache_raw_read_unsigned): Likewise.
903 * tdesc.c (init_target_desc): Likewise.
904 (tdesc_create_reg): Likewise.
905 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
906 (struct target_desc) <reg_defs>: Convert to "std::vector".
907 (target_desc): Do not initialize "reg_defs".
908 (~target_desc): Update code to use "std::vector" instead of "VEC"
909 for "target_desc.reg_defs".
910 (operator==): Likewise.
911
912 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
913
914 * inferiors.h (thread_to_gdb_id): Remove.
915 * inferiors.c (thread_to_gdb_id): Remove.
916 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
917 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
918 lynx_store_registers, lynx_read_memory, lynx_write_memory):
919 Likewise.
920 * nto-low.c (nto_fetch_registers, nto_store_registers,
921 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
922
923 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
924
925 * inferiors.h (gdb_id_to_thread_id): Remove.
926 * inferiors.c (gdb_id_to_thread_id): Remove.
927 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
928 removal. Move pid declaration closer to where it's used.
929
930 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
931
932 * server.c (handle_detach): New function.
933 (process_serial_event): Move code out, call handle_detach.
934
935 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
936
937 * server.c (require_running): Rename to ...
938 (require_running_or_return): ... this ...
939 (require_running_or_break): ... and this.
940 (handle_query, process_serial_event): Adjust.
941
942 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
943
944 * linux-low.c (linux_set_resume_request): Remove unused
945 variables.
946
947 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
948
949 * server.c (first_thread_of): Remove.
950 (process_serial_event): Replace usage of first_thread_of with
951 find_any_thread_of_pid.
952 * tracepoint.c (same_process_p): Remove.
953 (gdb_agent_about_to_close): Replace usage of same_process_p with
954 find_any_thread_of_pid.
955 * linux-x86-low.c (same_process_callback): Remove.
956 (x86_arch_setup_process_callback): Replace usage of
957 same_process_callback with find_any_thread_of_pid.
958 * thread-db.c (any_thread_of): Remove.
959 (switch_to_process): Replace usage of any_thread_of with
960 find_any_thread_of_pid.
961 * inferiors.c (thread_pid_matches_callback): Remove.
962 (find_thread_process): Adjust to use find_any_thread_of_pid.
963
964 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
965
966 * regcache.c (get_thread_regcache): Guard calls to "memset"
967 with "!VEC_empty".
968
969 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
970
971 * linux-low.c (handle_extended_wait): Use
972 "allocate_target_description" instead of "XNEW".
973 * linux-x86-low.c (initialize_low_arch): Likewise.
974
975 2017-09-05 Yao Qi <yao.qi@linaro.org>
976
977 * configure.srv (srv_i386_regobj): Remove.
978 (srv_amd64_regobj): Remove.
979 (srv_regobj): Set it to "" for x86 non-linux targets.
980 * linux-x86-tdesc.c (i386_linux_read_description):
981 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
982 (init_registers_i386): Remove the declaration.
983 (tdesc_i386): Remove the declaration.
984 (lynx_i386_arch_setup): Call i386_create_target_description.
985 * nto-x86-low.c: Likewise.
986 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
987 [!__x86_64__]: include arch/i386.h.
988 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
989
990 2017-09-05 Yao Qi <yao.qi@linaro.org>
991
992 * configure.srv (srv_amd64_linux_xmlfiles): Remove
993 i386/amd64-XXX-linux from it.
994
995 2017-09-05 Yao Qi <yao.qi@linaro.org>
996
997 * configure.srv: Empty srv_amd64_linux_regobj if $development is
998 false.
999 (ipa_amd64_linux_regobj): Remove.
1000 (ipa_x32_linux_regobj): Remove.
1001
1002 2017-09-05 Yao Qi <yao.qi@linaro.org>
1003
1004 * Makefile.in (arch-amd64.o): New rule.
1005 * configure.srv: Append arch-amd64.o.
1006 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1007 (get_ipa_tdesc): Call amd64_linux_read_description.
1008 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1009 and init_registers_amd64_XXX.
1010 * linux-x86-low.c (x86_linux_read_description): Call
1011 amd64_linux_read_description.
1012 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1013 (initialize_low_arch): Don't call init_registers_x32_XXX and
1014 init_registers_amd64_XXX.
1015 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1016 and tdesc_amd64_XXX.
1017 [__x86_64__] (amd64_tdesc_test): New function.
1018 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1019 and init_registers_amd64_XXX.
1020 * linux-x86-tdesc.c: Include arch/amd64.h.
1021 (xcr0_to_tdesc_idx): New function.
1022 (i386_linux_read_description): New function.
1023 (amd64_get_ipa_tdesc_idx): New function.
1024 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1025 (amd64_get_ipa_tdesc): Declare.
1026
1027 2017-09-05 Yao Qi <yao.qi@linaro.org>
1028
1029 * configure.srv (srv_i386_linux_xmlfiles): Remove
1030 i386/i386-XXX-linux.xml from it.
1031
1032 2017-09-05 Yao Qi <yao.qi@linaro.org>
1033
1034 * configure.srv: Set srv_i386_linux_regobj empty if $development
1035 is false.
1036 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1037 initialize_low_tdesc.
1038 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1039 with #if initialize_low_tdesc.
1040 * linux-x86-tdesc-selftest.c: New file.
1041 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1042
1043 2017-09-05 Yao Qi <yao.qi@linaro.org>
1044
1045 * Makefile.in (arch-i386.o): New rule.
1046 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1047 (x86_64-*-linux*): Likewise.
1048 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1049 include arch/i386.h.
1050 (i386_linux_read_description): Remove code and call
1051 i386_create_target_description.
1052 * tdesc.c (allocate_target_description): New function.
1053 * tdesc.h (set_tdesc_architecture): Remove declaration.
1054 (set_tdesc_osabi): Likewise.
1055
1056 2017-09-05 Yao Qi <yao.qi@linaro.org>
1057
1058 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1059 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1060 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1061 .xmltarget.
1062 * server.c (get_features_xml): Call tdesc_get_features_xml.
1063 * tdesc.c (set_tdesc_architecture): New function.
1064 (set_tdesc_osabi): New function.
1065 (tdesc_get_features_xml): New function.
1066 (tdesc_create_feature): Add an argument.
1067 * tdesc.h (struct target_desc) <features>: New field.
1068 <arch, osabi>: New field.
1069 (~target_desc): xfree features, arch, and osabi.
1070 (target_desc::oerator==): Don't compare .xmltarget.
1071 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1072 (set_tdesc_osabi): Likewise.
1073 (tdesc_get_features_xml): Likewise.
1074
1075 2017-09-05 Yao Qi <yao.qi@linaro.org>
1076
1077 * linux-x86-tdesc.c: Include selftest.h.
1078 (i386_tdesc_test): New function.
1079 (initialize_low_tdesc): Call selftests::register_test.
1080 * tdesc.h: Include regdef.h.
1081 (target_desc): Override operator == and !=.
1082
1083 2017-09-05 Yao Qi <yao.qi@linaro.org>
1084
1085 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1086 (ipa_obj): Likewise.
1087 * linux-i386-ipa.c: Include common/x86-xstate.h
1088 (get_ipa_tdesc): Call i386_linux_read_description.
1089 (initialize_low_tracepoint): Don't call init_registers_XXX
1090 functions, call initialize_low_tdesc instead.
1091 * linux-x86-low.c (x86_linux_read_description): Call
1092 i386_linux_read_description.
1093 (initialize_low_arch): Don't call init_registers_i386_XXX
1094 functions, call initialize_low_tdesc.
1095 * linux-x86-tdesc.c: New file.
1096 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1097 (i386_get_ipa_tdesc_idx): Declare.
1098 (i386_get_ipa_tdesc): Declare.
1099 (initialize_low_tdesc): Declare.
1100
1101 2017-09-05 Yao Qi <yao.qi@linaro.org>
1102
1103 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1104 instead of 0.
1105
1106 2017-09-05 Yao Qi <yao.qi@linaro.org>
1107
1108 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1109 * regcache.c (get_thread_regcache): Use VEC_length.
1110 (init_register_cache): Likewise.
1111 (regcache_cpy): Likewise.
1112 (registers_to_string): Iterate reg_defs via VEC_iterate.
1113 (find_regno): Likewise.
1114 (find_register_by_number): Use VEC_index.
1115 (register_size): Call find_register_by_number.
1116 (register_data): Call find_register_by_number.
1117 (supply_regblock): Use VEC_length.
1118 (regcache_raw_read_unsigned): Likewise.
1119 * tdesc.c (init_target_desc): Iterate reg_defs via
1120 VEC_iterate.
1121 (default_description): Update initializer.
1122 (copy_target_description): Don't update field num_registers.
1123 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1124 <num_registers>: Remove.
1125
1126 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1127
1128 * Makefile.in (.SECONDARY): Define target.
1129
1130 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1131
1132 * linux-low.c (linux_wait_1): Adjust.
1133 * server.c (queue_stop_reply_callback): Adjust.
1134
1135 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1136
1137 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1138 QEnvironmentUnset and QEnvironmentReset packets.
1139 (handle_query): Inform remote that QEnvironmentHexEncoded,
1140 QEnvironmentUnset and QEnvironmentReset are supported.
1141
1142 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1143
1144 * inferiors.h (inferior_target_data): Rename to ...
1145 (thread_target_data): ... this.
1146 (inferior_regcache_data): Rename to ...
1147 (thread_regcache_data): ... this.
1148 (set_inferior_regcache_data): Rename to ...
1149 (set_thread_regcache_data): ... this.
1150 * inferiors.c (inferior_target_data): Rename to ...
1151 (thread_target_data): ... this.
1152 (inferior_regcache_data): Rename to ...
1153 (thread_regcache_data): ... this.
1154 (set_inferior_regcache_data): Rename to ...
1155 (set_thread_regcache_data): ... this.
1156 (free_one_thread): Update.
1157 * linux-low.h (get_thread_lwp): Update.
1158 * regcache.c (get_thread_regcache): Update.
1159 (regcache_invalidate_thread): Update.
1160 (free_register_cache_thread): Update.
1161 * win32-i386-low.c (update_debug_registers_callback): Update.
1162 (win32_get_current_dr): Update.
1163 * win32-low.c (thread_rec): Update.
1164 (delete_thread_info): Update.
1165 (continue_one_thread): Update.
1166 (suspend_one_thread): Update.
1167
1168 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1169
1170 * inferiors.c (set_inferior_target_data): Remove.
1171 * inferiors.h (set_inferior_target_data): Remove.
1172
1173 2017-08-18 Yao Qi <yao.qi@linaro.org>
1174
1175 * Makefile.in (OBS): Add selftest.o.
1176 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1177 * configure, config.in: Re-generated.
1178 * server.c: Include common/sefltest.h.
1179 (captured_main): Handle option --selftest.
1180
1181 2017-08-09 Yao Qi <yao.qi@linaro.org>
1182
1183 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1184 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1185 i386-avx-mpx.o and i386-mmx.o.
1186 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1187 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1188 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1189 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1190 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1191 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1192 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1193 i386/amd64-avx-mpx.xml.
1194
1195 2017-08-09 Yao Qi <yao.qi@linaro.org>
1196
1197 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1198 and x32-avx-avx512.o.
1199 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1200 i386/x32-avx-avx512.xml.
1201
1202 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1203
1204 * tracepoint.h (enum class fast_tpoint_collect_result): New
1205 enumeration.
1206 (fast_tracepoint_collecting): Change return type to
1207 fast_tpoint_collect_result.
1208 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1209 * linux-low.h: Include tracepoint.h.
1210 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1211 fast_tpoint_collect_result.
1212 * linux-low.c (handle_tracepoints): Adjust.
1213 (linux_fast_tracepoint_collecting): Change return type to
1214 fast_tpoint_collect_result.
1215 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1216 linux_wait_1, stuck_in_jump_pad_callback,
1217 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1218 proceed_one_lwp): Adjust to type change.
1219
1220 2017-07-10 Yao Qi <yao.qi@linaro.org>
1221
1222 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1223
1224 2017-06-29 Yao Qi <yao.qi@linaro.org>
1225
1226 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1227 Remove.
1228 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1229
1230 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1231
1232 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1233
1234 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1235
1236 * linux-low.c (linux_create_inferior): Adjust code to access the
1237 environment information via 'gdb_environ' class.
1238 * lynx-low.c (lynx_create_inferior): Likewise.
1239 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1240 (get_environ): Return a pointer to 'our_environ'.
1241 (captured_main): Initialize 'our_environ'.
1242 * server.h (get_environ): Adjust prototype.
1243 * spu-low.c (spu_create_inferior): Adjust code to access the
1244 environment information via 'gdb_environ' class.
1245
1246 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1247
1248 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1249 usage of "register" keyword.
1250
1251 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1252
1253 * configure: Re-generate.
1254
1255 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1256
1257 * configure: Re-generate.
1258
1259 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1260
1261 * Makefile.in (COMPILE.pre): Add "-x c++".
1262
1263 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1264
1265 * fork-child.c: Conditionally include <signal.h>.
1266
1267 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1268
1269 * server.c (handle_general_set): Handle new packet
1270 "QStartupWithShell".
1271 (handle_query): Add "QStartupWithShell" to the list of supported
1272 packets.
1273 (gdbserver_usage): Add help text explaining the
1274 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1275 options.
1276 (captured_main): Recognize and act upon the presence of the new
1277 CLI options.
1278
1279 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1280 Pedro Alves <palves@redhat.com>
1281
1282 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1283 * configure: Regenerate.
1284 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1285 "fork-inferior.o".
1286 (i[34567]86-*-lynxos*): Likewise.
1287 (spu*-*-*): Likewise.
1288 * fork-child.c: New file.
1289 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1290 and "environ.h".
1291 (linux_ptrace_fun): New function.
1292 (linux_create_inferior): Adjust function prototype to reflect
1293 change on "target.h". Adjust function code to use
1294 "fork_inferior".
1295 (linux_request_interrupt): Delete "signal_pid".
1296 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1297 (lynx_ptrace_fun): New function.
1298 (lynx_create_inferior): Adjust function prototype to reflect
1299 change on "target.h". Adjust function code to use
1300 "fork_inferior".
1301 * nto-low.c (nto_create_inferior): Adjust function prototype and
1302 code to reflect change on "target.h". Update comments.
1303 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1304 "common-terminal.h" and "environ.h".
1305 (terminal_fd): Moved to fork-child.c.
1306 (old_foreground_pgrp): Likewise.
1307 (restore_old_foreground_pgrp): Likewise.
1308 (last_status): Make it global.
1309 (last_ptid): Likewise.
1310 (our_environ): New variable.
1311 (startup_with_shell): Likewise.
1312 (program_name): Likewise.
1313 (program_argv): Rename to...
1314 (program_args): ...this.
1315 (wrapper_argv): New variable.
1316 (start_inferior): Delete function.
1317 (get_exec_wrapper): New function.
1318 (get_exec_file): Likewise.
1319 (get_environ): Likewise.
1320 (prefork_hook): Likewise.
1321 (post_fork_inferior): Likewise.
1322 (postfork_hook): Likewise.
1323 (postfork_child_hook): Likewise.
1324 (handle_v_run): Update code to deal with arguments coming from the
1325 remote host. Update calls from "start_inferior" to
1326 "create_inferior".
1327 (captured_main): Likewise. Initialize environment variable. Call
1328 "have_job_control".
1329 * server.h (post_fork_inferior): New prototype.
1330 (get_environ): Likewise.
1331 (last_status): Declare.
1332 (last_ptid): Likewise.
1333 (signal_pid): Likewise.
1334 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1335 (spu_ptrace_fun): New function.
1336 (spu_create_inferior): Adjust function prototype to reflect change
1337 on "target.h". Adjust function code to use "fork_inferior".
1338 * target.c (target_terminal_init): New function.
1339 (target_terminal_inferior): Likewise.
1340 (target_terminal_ours): Likewise.
1341 * target.h: Include <vector>.
1342 (struct target_ops) <create_inferior>: Update prototype.
1343 (create_inferior): Update macro.
1344 * utils.c (gdb_flush_out_err): New function.
1345 * win32-low.c (win32_create_inferior): Adjust function prototype
1346 and code to reflect change on "target.h".
1347
1348 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1349
1350 * inferiors.c (switch_to_thread): New function.
1351
1352 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1353
1354 * Makefile.in (SFILE): Add "common/job-control.c".
1355 (OBS): Add "job-control.o".
1356
1357 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1358
1359 * Makefile: Remove "@host_makefile_frag@".
1360
1361 2017-05-05 Pedro Alves <palves@redhat.com>
1362
1363 * configure: Regenerate.
1364
1365 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1366
1367 * configure: Regenerate.
1368
1369 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1370
1371 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1372 software_single_step change of return type to
1373 std::vector<CORE_ADDR>.
1374 * linux-low.c (install_software_single_step_breakpoints):
1375 Likewise.
1376 * linux-low.h (install_software_single_step_breakpoints):
1377 Likewise.
1378
1379 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1380
1381 * remote-utils.c: Include "gdb_termios.h" instead of
1382 "terminal.h".
1383 * terminal.h: Delete file.
1384
1385 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1386
1387 * server.c: Include <vector>.
1388 <program_argv, wrapper_argv>: Convert to std::vector.
1389 (start_inferior): Rewrite function to use C++.
1390 (handle_v_run): Likewise. Update code that calculates the argv
1391 based on the vRun packet; use C++.
1392 (captured_main): Likewise.
1393
1394 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1395
1396 * server.c (handle_v_cont): Initialize thread_resume::thread
1397 with null_ptid.
1398
1399 2017-04-05 Pedro Alves <palves@redhat.com>
1400
1401 * configure: Regenerate.
1402
1403 2017-04-05 Pedro Alves <palves@redhat.com>
1404
1405 * gdbreplay.c (sync_error): Constify.
1406 * linux-x86-low.c (push_opcode): Constify.
1407
1408 2017-04-05 Pedro Alves <palves@redhat.com>
1409
1410 * win32-low.c (get_child_debug_event)
1411 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1412 Report TARGET_WAITKIND_SPURIOUS instead.
1413
1414 2017-04-05 Pedro Alves <palves@redhat.com>
1415
1416 * remote-utils.c (remote_prepare, remote_open): Constify.
1417 * remote-utils.h (remote_prepare, remote_open): Constify.
1418 * server.c (captured_main): Constify 'port' handling.
1419
1420 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * Makefile.in (clean): Clear .deps.
1423
1424 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1425
1426 * .gitignore: Remove generated files, replace with wildcard.
1427 * (clean): Replace removal of generated files with wildcard.
1428 (version.c): Replace with...
1429 (version-generated.c): ...this.
1430 (xml-builtin.c): Replace with...
1431 (xml-builtin-generated.c): ...this.
1432 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1433 (%.c: *regformats*): Replace with...
1434 (%-generated.c: *regformats*): ...this.
1435
1436 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1437
1438 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1439 (xtensa_fill_gregset): Call collect_register_by_name for
1440 threadptr register.
1441 (xtensa_store_gregset): Call supply_register_by_name for
1442 threadptr register.
1443
1444 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1445
1446 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1447 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1448 (xtensa_store_gregset): Call supply_register for all registers in
1449 a0_regnum..a0_regnum + C0_NREGS range.
1450
1451 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1452
1453 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1454 (ax-ipa.o: ax.c): Remove.
1455 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1456 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1457 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1458 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1459 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1460
1461 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1462
1463 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1464 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1465 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1466 (errors-ipa.o: ../common/errors.c): Remove.
1467 (format-ipa.o: ../common/format.c): Remove.
1468 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1469
1470 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1471
1472 * Makefile.in (%-ipa.o: %.c): New rule.
1473 (tracepoint-ipa.o: tracepoint.c): Remove.
1474 (utils-ipa.o: utils.c): Remove.
1475 (remote-utils-ipa.o: remote-utils.c): Remove.
1476 (regcache-ipa.o: regcache.c): Remove.
1477 (i386-linux-ipa.o: i386-linux.c): Remove.
1478 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1479 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1480 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1481 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1482 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1483 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1484 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1485 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1486 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1487 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1488 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1489 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1490 (aarch64-ipa.o: aarch64.c): Remove.
1491 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1492 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1493 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1494 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1495 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1496 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1497 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1498 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1499 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1500 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1501 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1502 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1503 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1504 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1505 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1506 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1507 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1508 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1509 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1510 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1511 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1512 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1513 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1514 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1515 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1516 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1517 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1518 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1519 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1520 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1521 (tdesc-ipa.o: tdesc.c): Remove.
1522 (x32-linux-ipa.o: x32-linux.c): Remove.
1523 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1524 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1525
1526 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1527
1528 * Makefile.in (%.o: ../arch/%.c): New rule.
1529 (arm.o: ../arch/arm.c): Remove.
1530 (arm-linux.o: ../arch/arm-linux.c): Remove.
1531 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1532 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1533
1534 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1535
1536 * Makefile.in (%.o: ../nat/%.c): New rule.
1537 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1538 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1539 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1540 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1541 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1542 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1543 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1544 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1545 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1546 (linux-personality.o: ../nat/linux-personality.c): Remove.
1547 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1548 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1549 (x86-linux.o: ../nat/x86-linux.c): Remove.
1550 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1551 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1552
1553 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1554
1555 * Makefile.in (%.o: ../common/%.c): New rule.
1556 (signals.o: ../common/signals.c): Remove.
1557 (print-utils.o: ../common/print-utils.c): Remove.
1558 (rsp-low.o: ../common/rsp-low.c): Remove.
1559 (common-utils.o: ../common/common-utils.c): Remove.
1560 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1561 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1562 (vec.o: ../common/vec.c): Remove.
1563 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1564 (xml-utils.o: ../common/xml-utils.c): Remove.
1565 (ptid.o: ../common/ptid.c): Remove.
1566 (buffer.o: ../common/buffer.c): Remove.
1567 (format.o: ../common/format.c): Remove.
1568 (filestuff.o: ../common/filestuff.c): Remove.
1569 (agent.o: ../common/agent.c): Remove.
1570 (errors.o: ../common/errors.c): Remove.
1571 (environ.o: ../common/environ.c): Remove.
1572 (common-debug.o: ../common/common-debug.c): Remove.
1573 (cleanups.o: ../common/cleanups.c): Remove.
1574 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1575 (fileio.o: ../common/fileio.c): Remove.
1576 (common-regcache.o: ../common/common-regcache.c): Remove.
1577 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1578 (new-op.o: ../common/new-op.c): Remove.
1579 (btrace-common.o: ../common/btrace-common.c): Remove.
1580
1581 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1582
1583 * Makefile.in (%.o: ../target/%.c): New rule.
1584 (waitstatus.o: ../target/waitstatus.c): Remove.
1585
1586 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1587
1588 * Makefile.in
1589 (%.c: ../regformats/%.dat,
1590 (%.c: ../regformats/arm/%.dat,
1591 (%.c: ../regformats/i386/%.dat,
1592 (%.c: ../regformats/rs6000/%.dat): New rules.
1593 (aarch64.c): Remove.
1594 (reg-arm.c): Remove.
1595 (arm-with-iwmmxt.c): Remove.
1596 (arm-with-vfpv2.c): Remove.
1597 (arm-with-vfpv3.c): Remove.
1598 (arm-with-neon.c): Remove.
1599 (reg-bfin.c): Remove.
1600 (reg-cris.c): Remove.
1601 (reg-crisv32.c): Remove.
1602 (i386.c): Remove.
1603 (i386-linux.c): Remove.
1604 (i386-avx.c): Remove.
1605 (i386-avx-linux.c): Remove.
1606 (i386-avx-avx512.c): Remove.
1607 (i386-avx-avx512-linux.c): Remove.
1608 (i386-mpx.c): Remove.
1609 (i386-mpx-linux.c): Remove.
1610 (i386-avx-mpx-avx512-pku.c): Remove.
1611 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1612 (i386-avx-mpx.c): Remove.
1613 (i386-avx-mpx-linux.c): Remove.
1614 (i386-mmx.c): Remove.
1615 (i386-mmx-linux.c): Remove.
1616 (reg-ia64.c): Remove.
1617 (reg-m32r.c): Remove.
1618 (reg-m68k.c): Remove.
1619 (reg-cf.c): Remove.
1620 (mips-linux.c): Remove.
1621 (mips-dsp-linux.c): Remove.
1622 (mips64-linux.c): Remove.
1623 (mips64-dsp-linux.c): Remove.
1624 (nios2-linux.c): Remove.
1625 (powerpc-32.c): Remove.
1626 (powerpc-32l.c): Remove.
1627 (powerpc-altivec32l.c): Remove.
1628 (powerpc-cell32l.c): Remove.
1629 (powerpc-vsx32l.c): Remove.
1630 (powerpc-isa205-32l.c): Remove.
1631 (powerpc-isa205-altivec32l.c): Remove.
1632 (powerpc-isa205-vsx32l.c): Remove.
1633 (powerpc-e500l.c): Remove.
1634 (powerpc-64l.c): Remove.
1635 (powerpc-altivec64l.c): Remove.
1636 (powerpc-cell64l.c): Remove.
1637 (powerpc-vsx64l.c): Remove.
1638 (powerpc-isa205-64l.c): Remove.
1639 (powerpc-isa205-altivec64l.c): Remove.
1640 (powerpc-isa205-vsx64l.c): Remove.
1641 (s390-linux32.c): Remove.
1642 (s390-linux32v1.c): Remove.
1643 (s390-linux32v2.c): Remove.
1644 (s390-linux64.c): Remove.
1645 (s390-linux64v1.c): Remove.
1646 (s390-linux64v2.c): Remove.
1647 (s390-te-linux64.c): Remove.
1648 (s390-vx-linux64.c): Remove.
1649 (s390-tevx-linux64.c): Remove.
1650 (s390x-linux64.c): Remove.
1651 (s390x-linux64v1.c): Remove.
1652 (s390x-linux64v2.c): Remove.
1653 (s390x-te-linux64.c): Remove.
1654 (s390x-vx-linux64.c): Remove.
1655 (s390x-tevx-linux64.c): Remove.
1656 (tic6x-c64xp-linux.c): Remove.
1657 (tic6x-c64x-linux.c): Remove.
1658 (tic6x-c62x-linux.c): Remove.
1659 (reg-sh.c): Remove.
1660 (reg-sparc64.c): Remove.
1661 (reg-spu.c): Remove.
1662 (amd64.c): Remove.
1663 (amd64-linux.c): Remove.
1664 (amd64-avx.c): Remove.
1665 (amd64-avx-linux.c): Remove.
1666 (amd64-avx-avx512.c): Remove.
1667 (amd64-avx-avx512-linux.c): Remove.
1668 (amd64-mpx.c): Remove.
1669 (amd64-mpx-linux.c): Remove.
1670 (amd64-avx-mpx-avx512-pku.c): Remove.
1671 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1672 (amd64-avx-mpx.c): Remove.
1673 (amd64-avx-mpx-linux.c): Remove.
1674 (x32.c): Remove.
1675 (x32-linux.c): Remove.
1676 (x32-avx.c): Remove.
1677 (x32-avx-linux.c): Remove.
1678 (x32-avx-avx512.c): Remove.
1679 (x32-avx-avx512-linux.c): Remove.
1680 (reg-xtensa.c): Remove.
1681 (reg-tilegx.c): Remove.
1682 (reg-tilegx32.c): Remove.
1683
1684 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1685
1686 * Makefile.in (SFILES): Add "common/environ.c".
1687 (OBJS): Add "common/environ.h".
1688
1689 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1690
1691 * configure.ac: Check if the fs_base and gs_base members of
1692 `struct user_regs_struct' exist.
1693 * config.in: Regenerated.
1694 * configure: Likewise.
1695
1696 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1697
1698 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1699 target_read_memory.
1700 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1701 (get_next_pcs_syscall_next_pc): Likewise.
1702
1703 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1704
1705 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1706 * nto-x86-low.c: Likewise.
1707
1708 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1709
1710 * Makefile.in: Include disable-implicit-rules.mk.
1711
1712 2016-11-23 Pedro Alves <palves@redhat.com>
1713
1714 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1715 (debug_vprintf): Use std::chrono::steady_clock instead of
1716 gettimeofday. Use '.' instead of ':'.
1717 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1718 (get_timestamp): Use std::chrono::steady_clock instead of
1719 gettimeofday.
1720
1721 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1722
1723 * Makefile.in: Fix whitespace formatting.
1724
1725 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1726
1727 * Makefile.in (SFILES, OBS): Flatten list and order
1728 alphabetically.
1729
1730 2016-11-23 Pedro Alves <palves@redhat.com>
1731
1732 * event-loop.c (handle_file_event): Use warning.
1733 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1734 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1735 Use warning.
1736
1737 2016-11-23 Pedro Alves <palves@redhat.com>
1738
1739 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1740 output.
1741 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1742 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1743 debug_printf and debug_flush for debug output.
1744 * server.c (handle_general_set): Likewise.
1745 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1746 output.
1747
1748 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1749
1750 * Makefile.in (.c.o): Replace rule with ...
1751 (%.o: %.c): ... this one.
1752
1753 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1754
1755 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1756 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1757 make.
1758 * configure.ac: Remove checks for the make program.
1759 * configure: Re-generate.
1760
1761 2016-10-28 Pedro Alves <palves@redhat.com>
1762
1763 * Makefile.in (CXX_DIALECT): Get from configure.
1764 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1765 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1766 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1767 * config.in: Regenerate.
1768 * configure: Regenerate.
1769
1770 2016-10-27 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-low.c (linux_supports_range_stepping): Return true if
1773 can_software_single_step return true.
1774
1775 2016-10-27 Yao Qi <yao.qi@linaro.org>
1776
1777 * inferiors.c (find_inferior_in_random): New function.
1778 * inferiors.h (find_inferior_in_random): Declare.
1779 * linux-low.c (linux_wait_for_event_filtered): Call
1780 find_inferior_in_random instead of find_inferior.
1781
1782 2016-10-27 Yao Qi <yao.qi@linaro.org>
1783
1784 * linux-low.c (linux_wait_1): If single-step breakpoints are
1785 inserted, remove them.
1786
1787 2016-10-26 Pedro Alves <palves@redhat.com>
1788
1789 * linux-low.c (handle_extended_wait): Link parent/child fork
1790 threads.
1791 (linux_wait_1): Unlink them.
1792 (linux_set_resume_request): Ignore resume requests for
1793 already-resumed and unhandled fork child threads.
1794 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1795 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1796 New functions.
1797 (handle_v_requests) <vCont>: Don't call require_running.
1798 * server.h (in_queued_stop_replies): New declaration.
1799
1800 2016-10-24 Yao Qi <yao.qi@linaro.org>
1801
1802 PR server/20733
1803 * linux-aarch64-low.c (append_insns): Cast the return value to
1804 'uint32_t *'.
1805
1806 2016-10-10 Yao Qi <yao.qi@linaro.org>
1807
1808 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1809
1810 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1811
1812 * target.c (target_supports_multi_process): New function, moved
1813 from...
1814 * target.h (target_supports_multi_process): ... here. Remove
1815 macro.
1816
1817 2016-10-05 Tom Tromey <tom@tromey.com>
1818
1819 PR remote/20655:
1820 * tracepoint.c (handle_tracepoint_bkpts): Check
1821 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1822
1823 2016-10-05 Yao Qi <yao.qi@linaro.org>
1824
1825 * configure.srv: Update the path of arm-*.xml files.
1826
1827 2016-10-05 Terry Guo <terry.guo@arm.com>
1828 Yao Qi <yao.qi@linaro.org>
1829
1830 * Makefile.in: Adjust the path of rules.
1831 * configure.srv: Update the path of xml files.
1832 * regformats/arm-with-iwmmxt.dat: Regenerated.
1833 * regformats/arm-with-neon.dat: Likewise.
1834 * regformats/arm-with-vfpv2.dat: Likewise.
1835 * regformats/arm-with-vfpv3.dat Likewise.
1836
1837 2016-09-30 Yao Qi <yao.qi@linaro.org>
1838
1839 PR gdbserver/20627
1840 * target.c (target_stop_and_wait): Don't call
1841 target_continue_no_signal, use resume_stop instead.
1842
1843 2016-09-26 Yao Qi <yao.qi@linaro.org>
1844
1845 * linux-low.c (linux_wait_1): Call debug_exit.
1846
1847 2016-09-23 Pedro Alves <palves@redhat.com>
1848
1849 * Makefile.in (SFILES): Add common/new-op.c.
1850 (OBS): Add common/new-op.o.
1851 (new-op.o): New rule.
1852
1853 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1854
1855 * .gitinore: Ignore more files.
1856
1857 2016-09-21 Yao Qi <yao.qi@linaro.org>
1858
1859 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1860 23.
1861
1862 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1863
1864 * server.c (start_inferior): Call target_mourn_inferior instead of
1865 mourn_inferior; pass ptid_t argument to it.
1866 (resume): Likewise.
1867 (handle_target_event): Likewise.
1868 * target.c (target_mourn_inferior): New function.
1869 * target.h (mourn_inferior): Delete macro.
1870
1871 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1872
1873 * linux-low.c (lwp_is_stepping): New function.
1874
1875 2016-09-06 Carl Love <cel@us.ibm.com>
1876
1877 * server.c (start_inferior): Fixed comment, requested comment change
1878 didn't get updated correctly. Removed reference to ptrace () call as
1879 it is only true on Linux systems.
1880
1881 2016-09-06 Carl Love <cel@us.ibm.com>
1882
1883 * server.c (start_inferior): Do not call
1884 function target_post_create_inferior () if the
1885 inferior process has already exited.
1886
1887 2016-09-05 Pedro Alves <palves@redhat.com>
1888
1889 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1890 (COMPILE.pre, CC_LD): Use CXX directly.
1891 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1892 * acinclude.m4: Don't include build-with-cxx.m4.
1893 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1894 * configure: Regenerate.
1895
1896 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1897
1898 PR gdb/19495
1899 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1900 call writing data to own_buf.
1901
1902 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1903
1904 * target.c (mywait): Call target_wait instead of
1905 the_target->wait.
1906 (target_wait): New function.
1907
1908 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1909
1910 * server.c (start_inferior): New variable 'ptid'. Replace calls
1911 to the_target->resume by target_continue{,_no_signal}, depending
1912 on the case.
1913 * target.c (target_stop_and_wait): Call target_continue_no_signal
1914 instead of the_target->resume.
1915 (target_continue): New function.
1916
1917 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1918
1919 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1920
1921 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1922
1923 PR server/20491
1924 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1925 ps_prochandle.
1926 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1927 * linux-arm-low.c (ps_get_thread_area): Likewise.
1928 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1929 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1930 * linux-mips-low.c (ps_get_thread_area): Likewise.
1931 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1932 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1933 * linux-x86-low.c (ps_get_thread_area): Likewise.
1934 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1935
1936 2016-08-19 Pedro Alves <palves@redhat.com>
1937
1938 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1939
1940 2016-08-19 Pedro Alves <palves@redhat.com>
1941
1942 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1943 comment. Use memcpy instead of casting through unsigned long.
1944
1945 2016-08-19 Pedro Alves <palves@redhat.com>
1946
1947 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1948 allocating around 0x80000000.
1949
1950 2016-08-19 Pedro Alves <palves@redhat.com>
1951
1952 PR gdb/20415
1953 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1954 (x32-avx512-linux-ipa.o): New rules.
1955 * configure.ac (x86_64-*-linux*): New x32 check.
1956 * configure.srv (ipa_x32_linux_regobj): New.
1957 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1958 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1959 descriptions.
1960 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1961 descriptions.
1962 * configure: Regenerate.
1963
1964 2016-08-09 Pedro Alves <palves@redhat.com>
1965
1966 PR gdb/18653
1967 * Makefile.in (OBS): Add signals-state-save-restore.o.
1968 (signals-state-save-restore.o): New rule.
1969 * config.in: Regenerate.
1970 * configure: Regenerate.
1971 * linux-low.c: Include "signals-state-save-restore.h".
1972 (linux_create_inferior): Call
1973 restore_original_signals_state.
1974 * server.c: Include "dispositions-save-restore.h".
1975 (captured_main): Call save_original_signals_state.
1976
1977 2016-08-05 Pedro Alves <palves@redhat.com>
1978
1979 * configure: Regenerate.
1980
1981 2016-08-04 Yao Qi <yao.qi@linaro.org>
1982
1983 * linux-low.c (regsets_fetch_inferior_registers): Check
1984 errno is ESRCH or not.
1985
1986 2016-08-02 Yao Qi <yao.qi@linaro.org>
1987
1988 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1989 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1990 (thread_db_load_search): Update.
1991 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1992 td_ta_set_event and td_ta_event_getmsg.
1993
1994 2016-07-26 Pedro Alves <palves@redhat.com>
1995
1996 PR server/20414
1997 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1998 of unsigned long for 64-bit registers and use uint32_t instead of
1999 unsigned int for 32-bit registers.
2000
2001 2016-07-26 Pedro Alves <palves@redhat.com>
2002
2003 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2004 to 'ptrace'.
2005
2006 2016-07-21 Tom Tromey <tom@tromey.com>
2007
2008 * configure: Rebuild.
2009
2010 2016-07-21 Yao Qi <yao.qi@linaro.org>
2011
2012 * mem-break.c (find_gdb_breakpoint): Cast bp to
2013 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2014
2015 2016-07-21 Yao Qi <yao.qi@linaro.org>
2016
2017 * server.c (handle_v_requests): Support s and S actions
2018 if target_supports_software_single_step return true.
2019
2020 2016-07-21 Yao Qi <yao.qi@linaro.org>
2021
2022 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2023 is resume_step, call maybe_hw_step.
2024 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2025 and unstop them.
2026 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2027 breakpoints or not.
2028 (proceed_one_lwp): If resume request is resume_step, install
2029 reinsert breakpoints and call maybe_hw_step.
2030
2031 2016-07-21 Yao Qi <yao.qi@linaro.org>
2032
2033 * linux-low.c (proceed_one_lwp): Declare.
2034 (linux_resume_one_thread): Remove local variable 'step'.
2035 Lift code enqueue signal. Call proceed_one_lwp instead of
2036 linux_resume_one_lwp.
2037
2038 2016-07-21 Yao Qi <yao.qi@linaro.org>
2039
2040 * linux-low.c (linux_resume_one_thread): Call
2041 enqueue_pending_signal.
2042
2043 2016-07-21 Yao Qi <yao.qi@linaro.org>
2044
2045 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2046 * inferiors.c (do_restore_current_thread_cleanup): New function.
2047 (make_cleanup_restore_current_thread): Likewise.
2048 * linux-low.c (install_software_single_step_breakpoints): Call
2049 make_cleanup_restore_current_thread. Switch current_thread to
2050 thread.
2051
2052 2016-07-21 Yao Qi <yao.qi@linaro.org>
2053
2054 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2055 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2056 (clone_one_breakpoint): Likewise.
2057 (delete_reinsert_breakpoints): Change parameter to thread.
2058 Callers updated.
2059 (has_reinsert_breakpoints): Likewise.
2060 (uninsert_reinsert_breakpoints): Likewise.
2061 (reinsert_reinsert_breakpoints): Likewise.
2062 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2063 (delete_reinsert_breakpoints): Likewise.
2064 (reinsert_reinsert_breakpoints): Likewise.
2065 (uninsert_reinsert_breakpoints): Likewise.
2066 (has_reinsert_breakpoints): Likewise.
2067
2068 2016-07-21 Yao Qi <yao.qi@linaro.org>
2069
2070 * inferiors.c (get_thread_process): Make parameter const.
2071 * inferiors.h (get_thread_process): Update declaration.
2072 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2073 Add new parameters child_thread and parent_thread. Callers
2074 updated.
2075 * mem-break.h (clone_all_breakpoints): Update declaration.
2076
2077 2016-07-21 Yao Qi <yao.qi@linaro.org>
2078
2079 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2080 <command_list, handler>: Remove.
2081 (struct gdb_breakpoint): New.
2082 (struct other_breakpoint): New.
2083 (struct reinsert_breakpoint): New.
2084 (is_gdb_breakpoint): New function.
2085 (any_persistent_commands): Update command_list if
2086 is_gdb_breakpoint returns true.
2087 (set_breakpoint): Create breakpoints according to their types.
2088 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2089 (set_gdb_breakpoint_1): Likewise.
2090 (set_gdb_breakpoint): Likewise.
2091 (clear_breakpoint_conditions): Change parameter type to
2092 'struct gdb_breakpoint *'.
2093 (clear_breakpoint_commands): Likewise.
2094 (clear_breakpoint_conditions_and_commands): Likewise.
2095 (add_condition_to_breakpoint): Likewise.
2096 (add_breakpoint_condition): Likewise.
2097 (add_commands_to_breakpoint): Likewise.
2098 (check_breakpoints): Check other_breakpoint.
2099 (clone_one_breakpoint): Clone breakpopint according to its type.
2100 * mem-break.h (struct gdb_breakpoint): Declare.
2101 (set_gdb_breakpoint): Update declaration.
2102 (clear_breakpoint_conditions_and_commands): Likewise.
2103 (add_breakpoint_condition): Likewise.
2104 (add_breakpoint_commands): Likewise.
2105 * server.c (process_point_options): Change parameter type to
2106 'struct gdb_breakpoint *'.
2107
2108 2016-07-21 Yao Qi <yao.qi@linaro.org>
2109
2110 * mem-break.c (set_breakpoint_at): Rename it to ...
2111 (set_breakpoint_type_at): ... it.
2112 (set_breakpoint_at): Call set_breakpoint_type_at.
2113 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2114 * mem-break.h (set_breakpoint_at): Update comments.
2115
2116 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2117
2118 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2119 to buf parameter.
2120 (nios2_store_gregset): Likewise.
2121
2122 2016-07-01 Pedro Alves <palves@redhat.com>
2123 Antoine Tremblay <antoine.tremblay@ericsson.com>
2124
2125 * linux-low.c: Change interface to take the target lwp_info
2126 pointer directly and return void. Handle detaching from a zombie
2127 thread.
2128 (linux_detach_lwp_callback): New function.
2129 (linux_detach): Detach from the leader thread after detaching from
2130 the clone threads.
2131
2132 2016-06-28 Yao Qi <yao.qi@linaro.org>
2133
2134 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2135 for variable new_offset.
2136 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2137 (aarch64_ftrace_insn_reloc_cb): Likewise.
2138 (aarch64_ftrace_insn_reloc_tb): Likewise.
2139 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2140 PRIx64 instead of PRIx32.
2141
2142 2016-06-28 Yao Qi <yao.qi@linaro.org>
2143
2144 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2145 (the_low_target): Install arm_get_syscall_trapinfo.
2146
2147 2016-06-28 Yao Qi <yao.qi@linaro.org>
2148
2149 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2150 function.
2151 (the_low_target): Install aarch64_get_syscall_trapinfo.
2152
2153 2016-06-28 Yao Qi <yao.qi@linaro.org>
2154
2155 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2156 Callers updated.
2157 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2158 Remove parameter sysno.
2159 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2160 sysret.
2161
2162 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2163
2164 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2165 (s390_emit_ne_goto): Likewise.
2166 (s390_emit_lt_goto): Likewise.
2167 (s390_emit_le_goto): Likewise.
2168 (s390_emit_gt_goto): Likewise.
2169 (s390_emit_ge_goto): Likewise.
2170 (s390x_emit_eq_goto): Likewise.
2171 (s390x_emit_ne_goto): Likewise.
2172 (s390x_emit_lt_goto): Likewise.
2173 (s390x_emit_le_goto): Likewise.
2174 (s390x_emit_gt_goto): Likewise.
2175 (s390x_emit_ge_goto): Likewise.
2176 (s390_emit_ops_impl): Mark variable static.
2177 (s390x_emit_ops): Likewise.
2178
2179 2016-06-17 Yao Qi <yao.qi@linaro.org>
2180
2181 * linux-low.c (handle_extended_wait): Call
2182 uninsert_reinsert_breakpoints for the parent process. Remove
2183 reinsert breakpoints from the child process. Reinsert them to
2184 the parent process when vfork is done.
2185 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2186 (reinsert_reinsert_breakpoints): New function.
2187 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2188 (reinsert_reinsert_breakpoints): Declare.
2189
2190 2016-06-17 Yao Qi <yao.qi@linaro.org>
2191
2192 * linux-low.c (handle_extended_wait): If the parent is doing
2193 step-over, remove the reinsert breakpoints from the forked child.
2194
2195 2016-06-17 Yao Qi <yao.qi@linaro.org>
2196
2197 * linux-low.c (unsuspend_all_lwps): Declare.
2198 (linux_low_filter_event): If thread exited, call finish_step_over.
2199 If step-over is finished, unsuspend other threads.
2200
2201 2016-06-17 Yao Qi <yao.qi@linaro.org>
2202
2203 * linux-low.c (linux_resume_one_lwp_throw): Assert
2204 has_reinsert_breakpoints returns false.
2205 * mem-break.c (delete_disabled_breakpoints): Assert
2206 bp type isn't reinsert_breakpoint.
2207
2208 2016-06-17 Yao Qi <yao.qi@linaro.org>
2209
2210 * linux-low.c (maybe_hw_step): New function.
2211 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2212 (finish_step_over): Switch current_thread to lwp temporarily,
2213 and assert has_reinsert_breakpoints returns true.
2214 (proceed_one_lwp): Call maybe_hw_step.
2215 * mem-break.c (has_reinsert_breakpoints): New function.
2216 * mem-break.h (has_reinsert_breakpoints): Declare.
2217
2218 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2219
2220 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2221
2222 2016-05-17 Yao Qi <yao.qi@linaro.org>
2223
2224 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2225 instead of find_inferior.
2226
2227 2016-05-05 Yao Qi <yao.qi@linaro.org>
2228
2229 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2230 Initialize res to zero.
2231
2232 2016-05-05 Yao Qi <yao.qi@linaro.org>
2233
2234 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2235 to uint32_t.
2236
2237 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2238
2239 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2240 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2241 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2242
2243 2016-04-28 Par Olsson <par.olsson@windriver.com>
2244 Simon Marchi <simon.marchi@ericsson.com>
2245
2246 * tracepoint.c (write_inferior_int8): New function.
2247 (cmd_qtenable_disable): Write enable flag using
2248 write_inferior_int8.
2249
2250 2016-04-25 Yao Qi <yao.qi@linaro.org>
2251
2252 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2253 (need_step_over_p): Return zero if the LWP has pending signals
2254 can be delivered on software single step target.
2255
2256 2016-04-25 Yao Qi <yao.qi@linaro.org>
2257
2258 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2259 return instead of error.
2260
2261 2016-04-22 Yao Qi <yao.qi@linaro.org>
2262
2263 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2264 to 23.
2265
2266 2016-04-22 Yao Qi <yao.qi@linaro.org>
2267
2268 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2269 signal when stepping over breakpoint with software single
2270 step.
2271
2272 2016-04-21 Pedro Alves <palves@redhat.com>
2273
2274 * linux-s390-low.c (s390_collect_ptrace_register)
2275 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2276 add casts.
2277 (s390_check_regset): Use void * instead of gdb_byte *.
2278
2279 2016-04-20 Pedro Alves <palves@redhat.com>
2280
2281 * configure: Renegerate.
2282
2283 2016-04-20 Yao Qi <yao.qi@linaro.org>
2284
2285 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2286 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2287 number 16.
2288 (arm_store_gregset): Likewise.
2289
2290 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2291
2292 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2293 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2294 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2295 (amd64-avx-mpx-linux.c): New rules.
2296 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2297 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2298 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2299 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2300 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2301 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2302 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2303 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2304 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2305 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2306 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2307 * linux-x86-low.c (x86_linux_read_description): Add case for
2308 X86_XSTATE_AVX_MPX_MASK.
2309 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2310 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2311 init_registers_i386_avx_mpx_linux.
2312 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2313 (initialize_low_tracepoint): Call
2314 init_registers_i386_avx_mpx_linux.
2315 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2316 (initialize_low_tracepoint): Call
2317 init_registers_amd64_avx_mpx_linux.
2318 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2319 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2320 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2321 declarations.
2322
2323 2016-04-18 Pedro Alves <palves@redhat.com>
2324
2325 * configure: Regenerate.
2326
2327 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2328
2329 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2330 (aarch64_emit_sub): Likewise.
2331
2332 2016-04-12 Pedro Alves <palves@redhat.com>
2333
2334 * utils.c (prepare_to_throw_exception): Delete.
2335
2336 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2337
2338 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2339
2340 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2341
2342 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2343
2344 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2345
2346 * linux-aarch64-ipa.c: Add <elf.h> include.
2347 * linux-ppc-ipa.c: Add <elf.h> include.
2348 * linux-s390-ipa.c: Add <elf.h> include.
2349
2350 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2351
2352 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2353 (get_raw_reg_ptr): Likewise.
2354 (get_trace_state_variable_value_ptr): Likewise.
2355 (set_trace_state_variable_value_ptr): Likewise.
2356 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2357 char *.
2358
2359 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2360 Marcin Kościelnicki <koriakin@0x04.net>
2361
2362 PR/17221
2363 * linux-ppc-low.c (emit_insns): New function.
2364 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2365 (ppc_emit_prologue): New function.
2366 (ppc_emit_epilogue): New function.
2367 (ppc_emit_add): New function.
2368 (ppc_emit_sub): New function.
2369 (ppc_emit_mul): New function.
2370 (ppc_emit_lsh): New function.
2371 (ppc_emit_rsh_signed): New function.
2372 (ppc_emit_rsh_unsigned): New function.
2373 (ppc_emit_ext): New function.
2374 (ppc_emit_zero_ext): New function.
2375 (ppc_emit_log_not): New function.
2376 (ppc_emit_bit_and): New function.
2377 (ppc_emit_bit_or): New function.
2378 (ppc_emit_bit_xor): New function.
2379 (ppc_emit_bit_not): New function.
2380 (ppc_emit_equal): New function.
2381 (ppc_emit_less_signed): New function.
2382 (ppc_emit_less_unsigned): New function.
2383 (ppc_emit_ref): New function.
2384 (ppc_emit_const): New function.
2385 (ppc_emit_reg): New function.
2386 (ppc_emit_pop): New function.
2387 (ppc_emit_stack_flush): New function.
2388 (ppc_emit_swap): New function.
2389 (ppc_emit_stack_adjust): New function.
2390 (ppc_emit_call): New function.
2391 (ppc_emit_int_call_1): New function.
2392 (ppc_emit_void_call_2): New function.
2393 (ppc_emit_if_goto): New function.
2394 (ppc_emit_goto): New function.
2395 (ppc_emit_eq_goto): New function.
2396 (ppc_emit_ne_goto): New function.
2397 (ppc_emit_lt_goto): New function.
2398 (ppc_emit_le_goto): New function.
2399 (ppc_emit_gt_goto): New function.
2400 (ppc_emit_ge_goto): New function.
2401 (ppc_write_goto_address): New function.
2402 (ppc_emit_ops_impl): New static variable.
2403 (ppc64v1_emit_prologue): New function.
2404 (ppc64v2_emit_prologue): New function.
2405 (ppc64_emit_epilogue): New function.
2406 (ppc64_emit_add): New function.
2407 (ppc64_emit_sub): New function.
2408 (ppc64_emit_mul): New function.
2409 (ppc64_emit_lsh): New function.
2410 (ppc64_emit_rsh_signed): New function.
2411 (ppc64_emit_rsh_unsigned): New function.
2412 (ppc64_emit_ext): New function.
2413 (ppc64_emit_zero_ext): New function.
2414 (ppc64_emit_log_not): New function.
2415 (ppc64_emit_bit_and): New function.
2416 (ppc64_emit_bit_or): New function.
2417 (ppc64_emit_bit_xor): New function.
2418 (ppc64_emit_bit_not): New function.
2419 (ppc64_emit_equal): New function.
2420 (ppc64_emit_less_signed): New function.
2421 (ppc64_emit_less_unsigned): New function.
2422 (ppc64_emit_ref): New function.
2423 (ppc64_emit_const): New function.
2424 (ppc64v1_emit_reg): New function.
2425 (ppc64v2_emit_reg): New function.
2426 (ppc64_emit_pop): New function.
2427 (ppc64_emit_stack_flush): New function.
2428 (ppc64_emit_swap): New function.
2429 (ppc64v1_emit_call): New function.
2430 (ppc64v2_emit_call): New function.
2431 (ppc64v1_emit_int_call_1): New function.
2432 (ppc64v2_emit_int_call_1): New function.
2433 (ppc64v1_emit_void_call_2): New function.
2434 (ppc64v2_emit_void_call_2): New function.
2435 (ppc64_emit_if_goto): New function.
2436 (ppc64_emit_eq_goto): New function.
2437 (ppc64_emit_ne_goto): New function.
2438 (ppc64_emit_lt_goto): New function.
2439 (ppc64_emit_le_goto): New function.
2440 (ppc64_emit_gt_goto): New function.
2441 (ppc64_emit_ge_goto): New function.
2442 (ppc64v1_emit_ops_impl): New static variable.
2443 (ppc64v2_emit_ops_impl): New static variable.
2444 (ppc_emit_ops): New function.
2445 (linux_low_target): Wire in ppc_emit_ops.
2446
2447 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2448 Marcin Kościelnicki <koriakin@0x04.net>
2449
2450 PR/17221
2451 * Makefile.in: Add powerpc-*-ipa.o
2452 * configure.srv: Add ipa_obj for powerpc*-linux.
2453 * linux-ppc-ipa.c: New file.
2454 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2455 includes.
2456 (PPC_FIELD): New macro.
2457 (PPC_SEXT): New macro.
2458 (PPC_OP6): New macro.
2459 (PPC_BO): New macro.
2460 (PPC_LI): New macro.
2461 (PPC_BD): New macro.
2462 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2463 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2464 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2465 (ppc_get_thread_area): New function.
2466 (is_elfv2_inferior): New function.
2467 (gen_ds_form): New function.
2468 (GEN_STD): New macro.
2469 (GEN_STDU): New macro.
2470 (GEN_LD): New macro.
2471 (GEN_LDU): New macro.
2472 (gen_d_form): New function.
2473 (GEN_ADDI): New macro.
2474 (GEN_ADDIS): New macro.
2475 (GEN_LI): New macro.
2476 (GEN_LIS): New macro.
2477 (GEN_ORI): New macro.
2478 (GEN_ORIS): New macro.
2479 (GEN_LWZ): New macro.
2480 (GEN_STW): New macro.
2481 (GEN_STWU): New macro.
2482 (gen_xfx_form): New function.
2483 (GEN_MFSPR): New macro.
2484 (GEN_MTSPR): New macro.
2485 (GEN_MFCR): New macro.
2486 (GEN_MTCR): New macro.
2487 (GEN_SYNC): New macro.
2488 (GEN_LWSYNC): New macro.
2489 (gen_x_form): New function.
2490 (GEN_OR): New macro.
2491 (GEN_MR): New macro.
2492 (GEN_LWARX): New macro.
2493 (GEN_STWCX): New macro.
2494 (GEN_CMPW): New macro.
2495 (gen_md_form): New function.
2496 (GEN_RLDICL): New macro.
2497 (GEN_RLDICR): New macro.
2498 (gen_i_form): New function.
2499 (GEN_B): New macro.
2500 (GEN_BL): New macro.
2501 (gen_b_form): New function.
2502 (GEN_BNE): New macro.
2503 (GEN_LOAD): New macro.
2504 (GEN_STORE): New macro.
2505 (gen_limm): New function.
2506 (gen_atomic_xchg): New function.
2507 (gen_call): New function.
2508 (ppc_relocate_instruction): New function.
2509 (ppc_install_fast_tracepoint_jump_pad): New function.
2510 (ppc_get_min_fast_tracepoint_insn_len): New function.
2511 (ppc_get_ipa_tdesc_idx): New function.
2512 (the_low_target): Wire in the new functions.
2513 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2514 tdescs.
2515 * linux-ppc-tdesc.h: New file.
2516
2517 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2518
2519 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2520 (alloc_jump_pad_buffer): New function.
2521 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2522 (alloc_jump_pad_buffer): New function.
2523 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2524 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2525 (alloc_jump_pad_buffer): New function.
2526 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2527 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2528 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2529 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2530
2531 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2532
2533 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2534 * linux-amd64-ipa.c: Likewise.
2535 * linux-i386-ipa.c: Likewise.
2536 * linux-s390-ipa.c: Likewise.
2537 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2538 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2539 set_trace_state_variable_value_ptr.
2540 (struct ipa_sym_addresses): Likewise.
2541 (symbol_list): Likewise.
2542 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2543 accessing gdb_collect directly.
2544 (gdb_collect_ptr_type): New typedef.
2545 (get_raw_reg_ptr_type): New typedef.
2546 (get_trace_state_variable_value_ptr_type): New typedef.
2547 (set_trace_state_variable_value_ptr_type): New typedef.
2548 (gdb_collect_ptr): New global.
2549 (get_raw_reg_ptr): New global.
2550 (get_trace_state_variable_value_ptr): New global.
2551 (set_trace_state_variable_value_ptr): New global.
2552 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2553 accessing get_raw_reg directly.
2554 (get_get_tsv_func_addr): Likewise for
2555 get_trace_state_variable_value_ptr.
2556 (get_set_tsv_func_addr): Likewise for
2557 set_trace_state_variable_value_ptr.
2558 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2559
2560 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2561
2562 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2563
2564 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2565
2566 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2567 packets.
2568 (relocate_instruction): Remove own_buf.
2569 * server.c (own_buf): Make global.
2570 (handle_v_requests): Make global.
2571 * server.h (own_buf): New declaration.
2572 (handle_v_requests): New prototype.
2573
2574 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2575
2576 PR 18377
2577 * linux-s390-low.c (add_insns): New function.
2578 (s390_emit_prologue): New function.
2579 (s390_emit_epilogue): New function.
2580 (s390_emit_add): New function.
2581 (s390_emit_sub): New function.
2582 (s390_emit_mul): New function.
2583 (s390_emit_lsh): New function.
2584 (s390_emit_rsh_signed): New function.
2585 (s390_emit_rsh_unsigned): New function.
2586 (s390_emit_ext): New function.
2587 (s390_emit_log_not): New function.
2588 (s390_emit_bit_and): New function.
2589 (s390_emit_bit_or): New function.
2590 (s390_emit_bit_xor): New function.
2591 (s390_emit_bit_not): New function.
2592 (s390_emit_equal): New function.
2593 (s390_emit_less_signed): New function.
2594 (s390_emit_less_unsigned): New function.
2595 (s390_emit_ref): New function.
2596 (s390_emit_if_goto): New function.
2597 (s390_emit_goto): New function.
2598 (s390_write_goto_address): New function.
2599 (s390_emit_litpool): New function.
2600 (s390_emit_const): New function.
2601 (s390_emit_call): New function.
2602 (s390_emit_reg): New function.
2603 (s390_emit_pop): New function.
2604 (s390_emit_stack_flush): New function.
2605 (s390_emit_zero_ext): New function.
2606 (s390_emit_swap): New function.
2607 (s390_emit_stack_adjust): New function.
2608 (s390_emit_set_r2): New function.
2609 (s390_emit_int_call_1): New function.
2610 (s390_emit_void_call_2): New function.
2611 (s390_emit_eq_goto): New function.
2612 (s390_emit_ne_goto): New function.
2613 (s390_emit_lt_goto): New function.
2614 (s390_emit_le_goto): New function.
2615 (s390_emit_gt_goto): New function.
2616 (s390_emit_ge_goto): New function.
2617 (s390x_emit_prologue): New function.
2618 (s390x_emit_epilogue): New function.
2619 (s390x_emit_add): New function.
2620 (s390x_emit_sub): New function.
2621 (s390x_emit_mul): New function.
2622 (s390x_emit_lsh): New function.
2623 (s390x_emit_rsh_signed): New function.
2624 (s390x_emit_rsh_unsigned): New function.
2625 (s390x_emit_ext): New function.
2626 (s390x_emit_log_not): New function.
2627 (s390x_emit_bit_and): New function.
2628 (s390x_emit_bit_or): New function.
2629 (s390x_emit_bit_xor): New function.
2630 (s390x_emit_bit_not): New function.
2631 (s390x_emit_equal): New function.
2632 (s390x_emit_less_signed): New function.
2633 (s390x_emit_less_unsigned): New function.
2634 (s390x_emit_ref): New function.
2635 (s390x_emit_if_goto): New function.
2636 (s390x_emit_const): New function.
2637 (s390x_emit_call): New function.
2638 (s390x_emit_reg): New function.
2639 (s390x_emit_pop): New function.
2640 (s390x_emit_stack_flush): New function.
2641 (s390x_emit_zero_ext): New function.
2642 (s390x_emit_swap): New function.
2643 (s390x_emit_stack_adjust): New function.
2644 (s390x_emit_int_call_1): New function.
2645 (s390x_emit_void_call_2): New function.
2646 (s390x_emit_eq_goto): New function.
2647 (s390x_emit_ne_goto): New function.
2648 (s390x_emit_lt_goto): New function.
2649 (s390x_emit_le_goto): New function.
2650 (s390x_emit_gt_goto): New function.
2651 (s390x_emit_ge_goto): New function.
2652 (s390_emit_ops): New function.
2653 (struct linux_target_ops): Fill in emit_ops hook.
2654
2655 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2656
2657 PR 18377
2658 * Makefile.in: Add s390 IPA files.
2659 * configure.srv: Build IPA for s390.
2660 * linux-s390-ipa.c: New file.
2661 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2662 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2663 (tdesc_s390_linux32): Likewise.
2664 (init_registers_s390_linux32v1): Likewise.
2665 (tdesc_s390_linux32v1): Likewise.
2666 (init_registers_s390_linux32v2): Likewise.
2667 (tdesc_s390_linux32v2): Likewise.
2668 (init_registers_s390_linux64): Likewise.
2669 (tdesc_s390_linux64): Likewise.
2670 (init_registers_s390_linux64v1): Likewise.
2671 (tdesc_s390_linux64v1): Likewise.
2672 (init_registers_s390_linux64v2): Likewise.
2673 (tdesc_s390_linux64v2): Likewise.
2674 (init_registers_s390_te_linux64): Likewise.
2675 (tdesc_s390_te_linux64): Likewise.
2676 (init_registers_s390_vx_linux64): Likewise.
2677 (tdesc_s390_vx_linux64): Likewise.
2678 (init_registers_s390_tevx_linux64): Likewise.
2679 (tdesc_s390_tevx_linux64): Likewise.
2680 (init_registers_s390x_linux64): Likewise.
2681 (tdesc_s390x_linux64): Likewise.
2682 (init_registers_s390x_linux64v1): Likewise.
2683 (tdesc_s390x_linux64v1): Likewise.
2684 (init_registers_s390x_linux64v2): Likewise.
2685 (tdesc_s390x_linux64v2): Likewise.
2686 (init_registers_s390x_te_linux64): Likewise.
2687 (tdesc_s390x_te_linux64): Likewise.
2688 (init_registers_s390x_vx_linux64): Likewise.
2689 (tdesc_s390x_vx_linux64): Likewise.
2690 (init_registers_s390x_tevx_linux64): Likewise.
2691 (tdesc_s390x_tevx_linux64): Likewise.
2692 (have_hwcap_s390_vx): New static variable.
2693 (s390_arch_setup): Fill have_hwcap_s390_vx.
2694 (s390_get_thread_area): New function.
2695 (s390_ft_entry_gpr_esa): New const.
2696 (s390_ft_entry_gpr_zarch): New const.
2697 (s390_ft_entry_misc): New const.
2698 (s390_ft_entry_fr): New const.
2699 (s390_ft_entry_vr): New const.
2700 (s390_ft_main_31): New const.
2701 (s390_ft_main_64): New const.
2702 (s390_ft_exit_fr): New const.
2703 (s390_ft_exit_vr): New const.
2704 (s390_ft_exit_misc): New const.
2705 (s390_ft_exit_gpr_esa): New const.
2706 (s390_ft_exit_gpr_zarch): New const.
2707 (append_insns): New function.
2708 (s390_relocate_instruction): New function.
2709 (s390_install_fast_tracepoint_jump_pad): New function.
2710 (s390_get_min_fast_tracepoint_insn_len): New function.
2711 (s390_get_ipa_tdesc_idx): New function.
2712 (struct linux_target_ops): Wire in the above functions.
2713 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2714 * linux-s390-tdesc.h: New file.
2715
2716 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2717
2718 * linux-s390-low.c (s390_supports_tracepoints): New function.
2719 (struct linux_target_ops): Fill supports_tracepoints hook.
2720
2721 2016-03-18 Yao Qi <yao.qi@linaro.org>
2722
2723 * linux-low.c (lwp_signal_can_be_delivered): New function.
2724 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2725
2726 2016-03-18 Yao Qi <yao.qi@linaro.org>
2727
2728 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2729 0 if signal is enqueued. Remove 'signal' from one debugging
2730 message. Move one debugging message to some lines below.
2731 Remove code setting 'signal' to 0.
2732
2733 2016-03-18 Yao Qi <yao.qi@linaro.org>
2734
2735 * linux-low.c (linux_low_filter_event): Remove redundant
2736 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2737
2738 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2739
2740 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2741 (struct linux_target_ops): Wire in the above.
2742
2743 2016-03-03 Yao Qi <yao.qi@linaro.org>
2744
2745 * linux-low.c: Update comments to start_step_over.
2746
2747 2016-03-03 Yao Qi <yao.qi@linaro.org>
2748
2749 PR server/19736
2750 * linux-low.c (handle_extended_wait): Set child suspended
2751 if event_lwp->bp_reinsert isn't zero.
2752
2753 2016-03-02 Yao Qi <yao.qi@linaro.org>
2754
2755 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2756 enqueue_pending_signal.
2757
2758 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2759
2760 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2761 is actually loaded.
2762
2763 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2764
2765 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2766 (s390_regmap_3264) [!__s390x__]: New global.
2767 (s390_collect_ptrace_register): Skip map entries containing -1.
2768 (s390_supply_ptrace_register): Ditto.
2769 (s390_fill_gprs_high): New function.
2770 (s390_store_gprs_high): New function.
2771 (s390_regsets): Add NT_S390_HIGH_GPRS.
2772 (s390_get_hwcap): Enable on 31-bit.
2773 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2774 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2775 Detect NT_S390_HIGH_GPRS.
2776 (s390_usrregs_info_3264): Enable on 31-bit.
2777 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2778 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2779
2780 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2781
2782 PR gdb/13808
2783 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2784 * configure.srv: Ditto.
2785 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2786 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2787 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2788 (init_registers_amd64_linux): Remove prototype.
2789 (tdesc_amd64_linux): Remove declaration.
2790 (get_ipa_tdesc): New function.
2791 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2792 initialize remaining tdescs.
2793 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2794 (init_registers_i386_linux): Remove prototype.
2795 (tdesc_i386_linux): Remove declaration.
2796 (get_ipa_tdesc): New function.
2797 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2798 initialize remaining tdescs.
2799 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2800 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2801 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2802 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2803 (x86_get_ipa_tdesc_idx): New function.
2804 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2805 * linux-x86-tdesc.h: New file.
2806 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2807 (target_get_ipa_tdesc_idx): New macro.
2808 * tracepoint.c (ipa_tdesc_idx): New macro.
2809 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2810 (symbol_list): Add ipa_tdesc_idx.
2811 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2812 (ipa_tdesc): Remove.
2813 (ipa_tdesc_idx): New variable.
2814 (get_context_regcache): Use get_ipa_tdesc.
2815 (gdb_collect): Ditto.
2816 (gdb_probe): Ditto.
2817 * tracepoint.h (get_ipa_tdesc): New prototype.
2818 (ipa_tdesc): Remove.
2819
2820 2016-02-24 Pedro Alves <palves@redhat.com>
2821
2822 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2823 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2824 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2825 Factor out common code between the USE_SIGTRAP_SIGINFO and
2826 !USE_SIGTRAP_SIGINFO blocks.
2827 (linux_low_filter_event): Call save_stop_reason instead of
2828 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2829 Update comments.
2830 (linux_wait_1): Update comments.
2831
2832 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2833
2834 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2835 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2836 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2837 ppc_insert_point, ppc_remove_point.
2838
2839 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2840
2841 * linux-s390-low.c (s390_supports_z_point_type): New function.
2842 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2843
2844 2016-02-16 Yao Qi <yao.qi@linaro.org>
2845
2846 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2847 PC. Get pc from regcache_read_pc.
2848
2849 2016-02-12 Yao Qi <yao.qi@linaro.org>
2850
2851 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2852 or linux_get_pc_32bit.
2853 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2854
2855 2016-02-12 Yao Qi <yao.qi@linaro.org>
2856
2857 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2858 arm_linux_get_next_pcs_fixup.
2859
2860 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2861
2862 * tracepoint.c (x_tracepoint_action_download): Change
2863 write_inferior_data_ptr to write_inferior_data_pointer.
2864 (cmd_qtstart): Likewise.
2865 (write_inferior_data_ptr): Remove.
2866 (download_agent_expr): Change write_inferior_data_ptr to
2867 write_inferior_data_pointer.
2868 (download_tracepoint_1): Likewise.
2869 (download_tracepoint): Likewise.
2870 (download_trace_state_variables): Likewise.
2871
2872 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2873 Marcin Kościelnicki <koriakin@0x04.net>
2874
2875 * tracepoint.c (struct tracepoint_action_ops): Remove.
2876 (struct tracepoint_action): Remove ops.
2877 (m_tracepoint_action_download, r_tracepoint_action_download)
2878 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2879 size and offset accordingly.
2880 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2881 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2882 (tracepoint_action_send, tracepoint_action_download): New functions.
2883 Helpers for trace action handlers.
2884 (add_tracepoint_action): Remove setup actions ops.
2885 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2886
2887 2016-02-10 Yao Qi <yao.qi@linaro.org>
2888
2889 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2890
2891 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2892
2893 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2894 to AC_OUTPUT.
2895 * configure: Regenerate.
2896
2897 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2898
2899 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2900 void * to gdb_byte *.
2901 * linux-low.c (siginfo_fixup): Likewise.
2902 (linux_xfer_siginfo): Likewise.
2903 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2904 Likewise.
2905 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2906
2907 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2908
2909 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2910 to srv_tgtobj.
2911 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2912 to srv_tgtobj.
2913 * linux-x86-low.c [__x86_64__]: Include
2914 "nat/amd64-linux-siginfo.h".
2915 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2916 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2917 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2918 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2919 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2920 (cpt_si_fd, si_timerid, si_overrun): Move from
2921 nat/amd64-linux-siginfo.c.
2922 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2923
2924 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2925
2926 * server.c (skip_to_semicolon): Remove.
2927 (process_point_options): Use strchrnul instead of
2928 skip_to_semicolon.
2929
2930 2016-01-26 Yao Qi <yao.qi@linaro.org>
2931
2932 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2933 * linux-low.c (install_software_single_step_breakpoints): Don't
2934 call regcache_read_pc.
2935 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2936 argument pc.
2937
2938 2016-01-26 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-low.c (install_software_single_step_breakpoints): Call
2941 regcache_read_pc instead of get_pc.
2942
2943 2016-01-26 Yao Qi <yao.qi@linaro.org>
2944
2945 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2946 (unblock_async_io): Rename to ...
2947 (block_unblock_async_io): ... it. New function.
2948 (enable_async_io): Don't install SIGIO handler. Unblock it
2949 instead.
2950 (disable_async_io): Don't ignore SIGIO. Block it instead.
2951 (initialize_async_io): Install SIGIO handler. Don't call
2952 unblock_async_io.
2953
2954 2016-01-26 Yao Qi <yao.qi@linaro.org>
2955
2956 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2957 first character is '\003', call *the_target->request_interrupt.
2958
2959 2016-01-25 Yao Qi <yao.qi@linaro.org>
2960
2961 * remote-utils.c (new_thread_notify): Remove.
2962 (dead_thread_notify): Likewise.
2963 * remote-utils.h (new_thread_notify): Remove declaration.
2964 (dead_thread_notify): Likewise.
2965
2966 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2967
2968 * gdb.trace/pending.exp: Fix expected message on continue.
2969
2970 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2971
2972 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2973 it works properly on big-endian machines where sizeof (CORE_ADDR)
2974 != sizeof (void *).
2975
2976 2016-01-21 Pedro Alves <palves@redhat.com>
2977
2978 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2979 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2980 * configure: Regenerate.
2981
2982 2016-01-21 Yao Qi <yao.qi@linaro.org>
2983
2984 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2985 is_thumb and set it according to CPSR saved on the stack.
2986 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2987 arm_sigreturn_next_pc.
2988
2989 2016-01-18 Yao Qi <yao.qi@linaro.org>
2990
2991 * linux-low.c (linux_set_pc_64bit): New function.
2992 (linux_get_pc_64bit): New function.
2993 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2994 Declare.
2995 * linux-sparc-low.c (debug_threads): Remove declaration.
2996 (sparc_get_pc): Remove.
2997 (the_low_target): Use linux_get_pc_64bit instead of
2998 sparc_get_pc.
2999 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3000 (the_low_target): Use linux_get_pc_64bit and
3001 linux_set_pc_64bit.
3002
3003 2016-01-18 Yao Qi <yao.qi@linaro.org>
3004
3005 * linux-arm-low.c (debug_threads): Remove declaration.
3006 (arm_get_pc, arm_set_pc): Remove.
3007 (the_low_target): Use linux_get_pc_32bit and
3008 linux_set_pc_32bit.
3009 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3010 (the_low_target): Use linux_get_pc_32bit and
3011 linux_set_pc_32bit.
3012 * linux-cris-low.c (debug_threads): Remove declaration.
3013 (cris_get_pc, cris_set_pc,): Remove.
3014 (the_low_target): Use linux_get_pc_32bit and
3015 linux_set_pc_32bit.
3016 * linux-crisv32-low.c (debug_threads): Remove declaration.
3017 (cris_get_pc, cris_set_pc): Remove.
3018 (the_low_target): Use linux_get_pc_32bit and
3019 linux_set_pc_32bit.
3020 * linux-low.c: Include inttypes.h.
3021 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3022 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3023 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3024 (the_low_target): Use linux_get_pc_32bit and
3025 linux_set_pc_32bit.
3026 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3027 (the_low_target): Use linux_get_pc_32bit and
3028 linux_set_pc_32bit.
3029 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3030 (the_low_target): Use linux_get_pc_32bit and
3031 linux_set_pc_32bit.
3032 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3033 (the_low_target): Use linux_get_pc_32bit and
3034 linux_set_pc_32bit.
3035 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3036 (the_low_target): Use linux_get_pc_32bit and
3037 linux_set_pc_32bit.
3038
3039 2016-01-18 Gary Benson <gbenson@redhat.com>
3040
3041 * configure.ac (AC_FUNC_FORK): New check.
3042 * config.in: Regenerate.
3043 * configure: Likewise.
3044
3045 2016-01-14 Yao Qi <yao.qi@linaro.org>
3046
3047 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3048 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3049 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3050 arm_get_next_pcs_ctor.
3051
3052 2016-01-12 Josh Stone <jistone@redhat.com>
3053 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3054
3055 * inferiors.h: Include "gdb_vecs.h".
3056 (struct process_info): Add syscalls_to_catch.
3057 * inferiors.c (remove_process): Free syscalls_to_catch.
3058 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3059 syscall_return stops.
3060 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3061 * server.c (handle_general_set): Handle QCatchSyscalls.
3062 (handle_query): Report support for QCatchSyscalls.
3063 * target.h (struct target_ops): Add supports_catch_syscall.
3064 (target_supports_catch_syscall): New macro.
3065 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3066 (struct lwp_info): Add syscall_state.
3067 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3068 Maintain syscall_state and syscalls_to_catch across exec.
3069 (get_syscall_trapinfo): New function, proxy to the_low_target.
3070 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3071 (linux_low_filter_event): Toggle syscall_state entry/return for
3072 syscall traps, and set it ignored for all others.
3073 (gdb_catching_syscalls_p): New function.
3074 (gdb_catch_this_syscall_p): New function.
3075 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3076 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3077 (linux_supports_catch_syscall): New function.
3078 (linux_target_ops): Install it.
3079 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3080 (the_low_target): Install it.
3081
3082 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3083
3084 * acinclude.m4: Include new ../warning.m4 file.
3085 * configure: Regenerated.
3086 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3087
3088 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3089
3090 * ax.c (is_goto_target): Mark static.
3091 * linux-low.c (register_addr): Likewise.
3092 (linux_fetch_registers, linux_store_registers): Likewise.
3093 * mem-break.c (any_persistent_commands): Fix old prototype.
3094 (add_commands_to_breakpoint): Mark static.
3095 * regcache.c (find_register_by_name): Delete unused func.
3096 * remote-utils.c (hex_or_minus_one): Mark static.
3097 * server.c (monitor_show_help): Mark static.
3098 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3099 handle_v_requests): Likewise.
3100
3101 2016-01-12 Pedro Alves <palves@redhat.com>
3102
3103 Remove use of the registered trademark symbol throughout.
3104
3105 2016-01-08 Yao Qi <yao.qi@linaro.org>
3106
3107 * remote-utils.c (getpkt): If c is '\003', call target hook
3108 request_interrupt.
3109
3110 2016-01-06 Yao Qi <yao.qi@linaro.org>
3111
3112 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3113 linux-aarch32-low.c.
3114 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3115 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3116 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3117 (thumb2_breakpoint): Declare.
3118 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3119 linux-aarch32-low.h.
3120 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3121 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3122 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3123
3124 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3125
3126 * gdbreplay.c (gdbreplay_version): Change copyright year in
3127 version message.
3128 * server.c (gdbserver_version): Likewise.
3129
3130 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3131
3132 * server.c (crc32_table): Delete.
3133 (crc32): Use libiberty's xcrc32 function.
3134
3135 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3136
3137 * lynx-low.c (lynx_delete_thread_callback): New function.
3138 (lynx_mourn): Properly delete our process and all of its
3139 threads. Remove call to clear_inferiors.
3140
3141 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3142
3143 * target.c (thread_search_callback): Add check that
3144 the thread_stopped target callback is not NULL before
3145 calling it.
3146
3147 2015-12-21 Yao Qi <yao.qi@linaro.org>
3148
3149 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3150 arm breakpoint.
3151
3152 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3153
3154 * server.c (handle_query): Call target_supports_software_single_step.
3155
3156 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3157
3158 * linux-low.c (single_step): New function.
3159 (linux_resume_one_lwp_throw): Call single_step.
3160 (start_step_over): Likewise.
3161
3162 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3163
3164 * Makefile.in (SFILES): Append arch/arm-linux.c,
3165 arch/arm-get-next-pcs.c.
3166 (arm-linux.o): New rule.
3167 (arm-get-next-pcs.o): New rule.
3168 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3169 arm-linux.o.
3170 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3171 to linux-aarch32-low.c.
3172 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3173 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3174 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3175 (thumb2_breakpoint_len): Likewise.
3176 (arm_is_thumb_mode): Make non-static.
3177 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3178 from linux-aarch32-low.c.
3179 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3180 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3181 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3182 (thumb2_breakpoint_len): Likewise.
3183 (arm_is_thumb_mode): New declaration.
3184 * linux-arm-low.c: Include arch/arm-linux.h
3185 aarch/arm-get-next-pcs.h, sys/syscall.h.
3186 (get_next_pcs_ops): New struct.
3187 (get_next_pcs_addr_bits_remove): New function.
3188 (get_next_pcs_is_thumb): New function.
3189 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3190 (arm_sigreturn_next_pc): Likewise.
3191 (get_next_pcs_syscall_next_pc): Likewise.
3192 (arm_gdbserver_get_next_pcs): Likewise.
3193 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3194 Initialize.
3195 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3196 * server.h: Include gdb_vecs.h.
3197
3198 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3199
3200 * Makefile.in (SFILES): Append common/common-regcache.c.
3201 (OBS): Append common-regcache.o.
3202 (common-regcache.o): New rule.
3203 * regcache.c (init_register_cache): Initialize cache to
3204 REG_UNAVAILABLE.
3205 (regcache_raw_read_unsigned): New function.
3206 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3207 register_status enum.
3208
3209 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3210
3211 * linux-aarch64-low.c (the_low_targets): Rename
3212 breakpoint_reinsert_addr to get_next_pcs.
3213 * linux-arm-low.c (the_low_targets): Likewise.
3214 * linux-bfin-low.c (the_low_targets): Likewise.
3215 * linux-cris-low.c (the_low_targets): Likewise.
3216 * linux-crisv32-low.c (the_low_targets): Likewise.
3217 * linux-low.c (can_software_single_step): Likewise.
3218 (install_software_single_step_breakpoints): New function.
3219 (start_step_over): Use install_software_single_step_breakpoints.
3220 * linux-low.h: New CORE_ADDR vector.
3221 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3222 get_next_pcs.
3223 * linux-mips-low.c (the_low_targets): Likewise.
3224 * linux-nios2-low.c (the_low_targets): Likewise.
3225 * linux-sparc-low.c (the_low_targets): Likewise.
3226
3227 2015-12-17 Pedro Alves <palves@redhat.com>
3228
3229 * linux-low.c (linux_kill_one_lwp): Remove references to
3230 LinuxThreads.
3231 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3232 to 'kill'.
3233 (linux_init_signals): Delete.
3234 (initialize_low): Adjust.
3235 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3236
3237 2015-12-16 Pedro Alves <palves@redhat.com>
3238
3239 * configure.ac (compiler warning flags): When testing a
3240 -Wno-foo option, check whether -Wfoo works instead.
3241 * configure: Regenerate.
3242
3243 2015-12-11 Don Breazeal <donb@codesourcery.com>
3244
3245 * server.c (process_serial_event): Don't exit from gdbserver
3246 in remote mode if there are still active inferiors.
3247
3248 2015-12-11 Yao Qi <yao.qi@linaro.org>
3249
3250 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3251 arm_breakpoint_at if the process is 32-bit.
3252
3253 2015-12-11 Yao Qi <yao.qi@linaro.org>
3254
3255 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3256 arm breakpoint.
3257
3258 2015-12-07 Yao Qi <yao.qi@linaro.org>
3259
3260 * configure.srv: Append arm.o to srv_tgtobj for
3261 aarch64*-*-linux* target.
3262 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3263 from linux-arm-low.c.
3264 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3265 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3266 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3267 (thumb2_breakpoint_len): Likewise.
3268 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3269 (arm_breakpoint_kinds): Likewise.
3270 (arm_breakpoint_kind_from_pc): Likewise.
3271 (arm_sw_breakpoint_from_kind): Likewise.
3272 (arm_breakpoint_kind_from_current_state): Likewise.
3273 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3274 (arm_sw_breakpoint_from_kind): Declare.
3275 (arm_breakpoint_kind_from_current_state): Declare.
3276 (arm_breakpoint_at): Declare.
3277 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3278 arm_sw_breakpoint_from_kind if process is 32-bit.
3279 (aarch64_breakpoint_kind_from_pc): New function.
3280 (aarch64_breakpoint_kind_from_current_state): New function.
3281 (the_low_target): Initialize fields breakpoint_kind_from_pc
3282 and breakpoint_kind_from_current_state.
3283 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3284 linux-aarch32-low.c.
3285 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3286 (arm_breakpoint, arm_breakpoint_len): Likewise.
3287 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3288 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3289 (arm_is_thumb_mode): Likewise.
3290 (arm_breakpoint_at): Likewise.
3291 (arm_breakpoint_kind_from_pc): Likewise.
3292 (arm_sw_breakpoint_from_kind): Likewise.
3293 (arm_breakpoint_kind_from_current_state): Likewise.
3294
3295 Revert:
3296 2015-08-04 Yao Qi <yao.qi@linaro.org>
3297
3298 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3299 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3300 * server.c (extended_protocol): Remove "static".
3301 * server.h (extended_protocol): Declare it.
3302
3303 2015-12-04 Josh Stone <jistone@redhat.com>
3304
3305 * target.h (struct target_ops) <arch_setup>: Rename to ...
3306 (struct target_ops) <post_create_inferior>: ... this.
3307 (target_arch_setup): Rename to ...
3308 (target_post_create_inferior): ... this, calling post_create_inferior.
3309 * server.c (start_inferior): Update target_arch_setup calls to
3310 target_post_create_inferior.
3311 * linux-low.c (linux_low_ptrace_options): Forward declare.
3312 (linux_arch_setup): Update its comment for general use.
3313 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3314 (struct linux_target_ops): Use linux_post_create_inferior.
3315 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3316 to post_create_inferior.
3317 * nto-low.c (struct nto_target_ops): Likewise.
3318 * spu-low.c (struct spu_target_ops): Likewise.
3319 * win32-low.c (struct win32_target_ops): Likewise.
3320
3321 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3322
3323 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3324
3325 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3326
3327 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3328 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3329 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3330 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3331 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3332 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3333 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3334 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3335 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3336 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3337 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3338 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3339
3340 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3341
3342 * linux-low.c (linux_look_up_symbols): Don't call
3343 linux_supports_traceclone.
3344 * linux-low.h (thread_db_init): Remove use_events argument.
3345 * thread-db.c (thread_db_use_event): Remove global variable.
3346 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3347 (struct thread_db) <td_create_bp>: Remove field.
3348 (thread_db_create_event): Remove function.
3349 (thread_db_enable_reporting): Likewise.
3350 (find_one_thread): Don't check for thread_db_use_events.
3351 (attach_thread): Likewise.
3352 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3353 (try_thread_db_load_1): Don't check for thread_db_use_events.
3354 (thread_db_init): Remove use_events argument and thread events
3355 handling.
3356 (remove_thread_event_breakpoints): Remove function.
3357 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3358
3359 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3360
3361 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3362 New function.
3363 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3364 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3365 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3366 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3367 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3368 Initialize.
3369 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3370 New function.
3371 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3372 * linux-low.c (can_hardware_single_step): Use
3373 supports_hardware_single_step.
3374 (can_software_single_step): New function.
3375 (start_step_over): Call can_software_single_step.
3376 (linux_supports_hardware_single_step): New function.
3377 (struct target_ops) <supports_software_single_step>: Initialize.
3378 * linux-low.h (struct linux_target_ops)
3379 <supports_hardware_single_step>: Initialize.
3380 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3381 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3382 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3383 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3384 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3385 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3386 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3387 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3388 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3389 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3390 Initialize.
3391 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3392 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3393 Initialize.
3394 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3395 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3396 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3397 New function.
3398 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3399 * target.h (struct target_ops): <supports_software_single_step>:
3400 New field.
3401 (target_supports_software_single_step): New macro.
3402
3403 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3404
3405 * linux-low.c (linux_wait_1): Fix pc advance condition.
3406 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3407 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3408
3409 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3410
3411 * linux-arm-low.c (arm_is_thumb_mode): New function.
3412 (arm_breakpoint_at): Use arm_is_thumb_mode.
3413 (arm_breakpoint_kind_from_current_state): New function.
3414 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3415 Initialize.
3416 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3417 (linux_breakpoint_kind_from_current_state): New function.
3418 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3419 * linux-low.h (struct linux_target_ops)
3420 <breakpoint_kind_from_current_state>: New field.
3421 * target.h (struct target_ops): Likewise.
3422 (target_breakpoint_kind_from_current_state): New macro.
3423
3424 2015-11-30 Pedro Alves <palves@redhat.com>
3425
3426 * linux-low.c (linux_resume): Wake up the event loop before
3427 returning.
3428
3429 2015-11-30 Pedro Alves <palves@redhat.com>
3430
3431 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3432 check.
3433 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3434 to -1.
3435 * target.c (struct thread_search): New structure.
3436 (thread_search_callback): New function.
3437 (prev_general_thread): New global.
3438 (prepare_to_access_memory, done_accessing_memory): New functions.
3439 * target.h (prepare_to_access_memory, done_accessing_memory):
3440 Replace macros with function declarations.
3441
3442 2015-11-30 Pedro Alves <palves@redhat.com>
3443
3444 PR 14618
3445 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3446 report TARGET_WAITKIND_NO_RESUMED.
3447 * remote-utils.c (prepare_resume_reply): Handle
3448 TARGET_WAITKIND_NO_RESUMED.
3449 * server.c (report_no_resumed): New global.
3450 (handle_query) <qSupported>: Handle "no-resumed+". Report
3451 "no-resumed+" support.
3452 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3453 return error if the client doesn't support no-resumed events.
3454 (push_stop_notification): New function.
3455 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3456 events if the client supports them.
3457
3458 2015-11-30 Pedro Alves <palves@redhat.com>
3459
3460 * linux-low.c (thread_still_has_status_pending_p): Don't check
3461 vCont;t here.
3462 (lwp_resumed): New function.
3463 (status_pending_p_callback): Return early if the LWP is not
3464 supposed to be resumed.
3465
3466 2015-11-30 Pedro Alves <palves@redhat.com>
3467
3468 * linux-low.c (handle_extended_wait): Assert that the LWP's
3469 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3470 thread create events, leave the new child's status pending.
3471 (linux_low_filter_event): If GDB wants to hear about thread exit
3472 events, leave the LWP marked dead and don't delete it.
3473 (linux_wait_for_event_filtered): Don't check for thread exit.
3474 (filter_exit_event): New function.
3475 (linux_wait_1): Use it, when returning an exit event.
3476 (linux_resume_one_lwp_throw): Assert that the LWP's
3477 waitstatus is TARGET_WAITKIND_IGNORE.
3478 * remote-utils.c (prepare_resume_reply): Handle
3479 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3480 * server.c (report_thread_events): New global.
3481 (handle_general_set): Handle QThreadEvents.
3482 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3483 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3484 TARGET_WAITKIND_THREAD_EXITED.
3485 * server.h (report_thread_events): Declare.
3486
3487 2015-11-30 Pedro Alves <palves@redhat.com>
3488
3489 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3490 the thread's last_resume_kind was resume_stop.
3491
3492 2015-11-30 Pedro Alves <palves@redhat.com>
3493
3494 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3495 before returning.
3496
3497 2015-11-30 Pedro Alves <palves@redhat.com>
3498
3499 * server.c (handle_v_requests): Handle vCtrlC.
3500
3501 2015-11-30 Pedro Alves <palves@redhat.com>
3502
3503 * gdbthread.h (find_any_thread_of_pid): Declare.
3504 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3505 functions.
3506 * server.c (handle_query): If current_thread is NULL, look for
3507 another thread of the selected process.
3508
3509 2015-11-26 Daniel Colascione <dancol@dancol.org>
3510 Simon Marchi <simon.marchi@ericsson.com>
3511
3512 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3513 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3514 name in reply.
3515 * target.h (struct target_ops) <thread_name>: New field.
3516 (target_thread_name): New macro.
3517
3518 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3519
3520 * regcache.h (regcache_invalidate_pid): Add declaration.
3521 * regcache.c (regcache_invalidate_pid): New function, extracted
3522 from regcache_invalidate.
3523 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3524 Add trivial documentation comment.
3525 * lynx-low.c: Use regcache_invalidate_pid instead of
3526 regcache_invalidate.
3527
3528 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3529
3530 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3531 and Elf64_auxv_t if the target is Android.
3532
3533 2015-11-22 Doug Evans <xdje42@gmail.com>
3534
3535 * target.h: #include <sys/types.h>.
3536
3537 2015-11-19 Pedro Alves <palves@redhat.com>
3538
3539 * linux-low.c (linux_process_qsupported): Change prototype.
3540 Adjust.
3541 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3542 Change prototype.
3543 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3544 and adjust to loop over all features.
3545 * server.c (handle_query) <qSupported>: Adjust to call
3546 target_process_qsupported once, passing it a vector of unprocessed
3547 features.
3548 * target.h (struct target_ops) <process_qsupported>: Change
3549 prototype.
3550 (target_process_qsupported): Adjust.
3551
3552 2015-11-19 Pedro Alves <palves@redhat.com>
3553
3554 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3555 mode.
3556 * configure: Regenerate.
3557
3558 2015-11-19 Pedro Alves <palves@redhat.com>
3559
3560 * configure: Regenerate.
3561
3562 2015-11-19 Yao Qi <yao.qi@linaro.org>
3563
3564 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3565 type to uint32_t.
3566
3567 2015-11-19 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3570 (struct aarch64_operand): Move enum out.
3571
3572 2015-11-19 Yao Qi <yao.qi@linaro.org>
3573
3574 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3575 struct user_fpsimd_state *.
3576 (aarch64_store_fpregset): Likewise.
3577
3578 2015-11-19 Yao Qi <yao.qi@linaro.org>
3579
3580 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3581 struct user_pt_regs *.
3582 (aarch64_store_gregset): Likewise.
3583
3584 2015-11-18 Pedro Alves <palves@redhat.com>
3585
3586 * Makefile.in (all_object_files): Add $IPA_OBJS.
3587
3588 2015-11-17 Pedro Alves <palves@redhat.com>
3589
3590 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3591 GDB_SIGNAL_0 and gdb_signal_to_string.
3592
3593 2015-11-17 Pedro Alves <palves@redhat.com>
3594
3595 * win32-low.c (handle_output_debug_string): Remove parameter.
3596 (win32_kill): Remove our_status local and adjust call to
3597 handle_output_debug_string.
3598 (get_child_debug_event): Adjust call to
3599 handle_output_debug_string.
3600
3601 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3602
3603 * linux-mips-low.c (mips_fill_gregset): Add cast.
3604 (mips_store_gregset): Likewise.
3605 (mips_fill_fpregset): Likewise.
3606 (mips_store_fpregset): Likewise.
3607
3608 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3609
3610 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3611 priv.
3612
3613 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3614
3615 * linux-mips-low.c (mips_linux_new_thread): Change type of
3616 watch_type to enum target_hw_bp_type.
3617
3618 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3619
3620 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3621 Change return type to arm_hwbp_type.
3622
3623 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3624
3625 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3626 (arm_store_gregset): Likewise.
3627 * linux-arm-low.c (arm_get_hwcap): Likewise.
3628 (arm_read_description): Likewise.
3629
3630 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3631
3632 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3633
3634 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3635
3636 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3637 (ppc_fill_vsxregset): Likewise.
3638 (ppc_store_vsxregset): Likewise.
3639 (ppc_fill_vrregset): Likewise.
3640 (ppc_store_vrregset): Likewise.
3641 (ppc_fill_evrregset): Likewise.
3642 (ppc_store_evrregset): Likewise.
3643
3644 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3645
3646 * linux-ppc-low.c (ppc_usrregs_info): Remove
3647 forward-declaration.
3648 (ppc_arch_setup): Move lower in file.
3649
3650 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3651
3652 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3653 (ps_pdwrite): Likewise.
3654
3655 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3656
3657 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3658 to after assert checks.
3659
3660 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3661
3662 * proc-service.c (ps_pdread): Add/adjust casts.
3663 (ps_pdwrite): Add/adjust casts.
3664
3665 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3666
3667 * server.c (handle_search_memory_1): Cast return value of
3668 memmem.
3669
3670 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3671
3672 * server.c (write_qxfer_response): Change type of data to
3673 gdb_byte *.
3674
3675 2015-10-29 Pedro Alves <palves@redhat.com>
3676
3677 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3678
3679 2015-10-29 Pedro Alves <palves@redhat.com>
3680
3681 * tracepoint.c (clear_installed_tracepoints): Add casts.
3682
3683 2015-10-29 Pedro Alves <palves@redhat.com>
3684
3685 * server.c (handle_v_cont, process_serial_event): Add enum
3686 gdb_signal casts to signal parsing code.
3687
3688 2015-10-29 Pedro Alves <palves@redhat.com>
3689
3690 * linux-low.h (NULL_REGSET): Define.
3691 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3692 * linux-arm-low.c (arm_regsets): Likewise.
3693 * linux-crisv32-low.c (cris_regsets): Likewise.
3694 * linux-m68k-low.c (m68k_regsets): Likewise.
3695 * linux-mips-low.c (mips_regsets): Likewise.
3696 * linux-nios2-low.c (nios2_regsets): Likewise.
3697 * linux-ppc-low.c (ppc_regsets): Likewise.
3698 * linux-s390-low.c (s390_regsets): Likewise.
3699 * linux-sh-low.c (sh_regsets): Likewise.
3700 * linux-sparc-low.c (sparc_regsets): Likewise.
3701 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3702 * linux-tile-low.c (tile_regsets): Likewise.
3703 * linux-x86-low.c (x86_regsets): Likewise.
3704 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3705
3706 2015-10-29 Pedro Alves <palves@redhat.com>
3707
3708 * linux-low.h (NULL_REGSET): Define.
3709 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3710 * linux-arm-low.c (arm_regsets): Likewise.
3711 * linux-crisv32-low.c (cris_regsets): Likewise.
3712 * linux-m68k-low.c (m68k_regsets): Likewise.
3713 * linux-mips-low.c (mips_regsets): Likewise.
3714 * linux-nios2-low.c (nios2_regsets): Likewise.
3715 * linux-ppc-low.c (ppc_regsets): Likewise.
3716 * linux-s390-low.c (s390_regsets): Likewise.
3717 * linux-sh-low.c (sh_regsets): Likewise.
3718 * linux-sparc-low.c (sparc_regsets): Likewise.
3719 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3720 * linux-tile-low.c (tile_regsets): Likewise.
3721 * linux-x86-low.c (x86_regsets): Likewise.
3722 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3723
3724 2015-10-26 Doug Evans <dje@google.com>
3725
3726 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3727
3728 2015-10-26 Doug Evans <dje@google.com>
3729
3730 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3731
3732 2015-10-26 Doug Evans <dje@google.com>
3733
3734 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3735 for debug_printf.
3736 (attach_thread, find_new_threads_callback): Ditto.
3737
3738 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3739
3740 * mem-break.h (set_breakpoint_data): Remove.
3741
3742 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3743
3744 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3745 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3746 (initialize_low): Remove set_breakpoint_data call.
3747 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3748 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3749 (initialize_low): Remove set_breakpoint_data call.
3750 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3751 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3752 (initialize_low): Remove set_breakpoint_data call.
3753
3754 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3755
3756 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3757 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3758 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3759 * target.h (target_breakpoint_kind_from_pc): New macro.
3760
3761 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3762
3763 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3764 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3765 the default breakpoint kind.
3766
3767 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3768
3769 * linux-arm-low.c (arm_supports_z_point_type): Add software
3770 breakpoint support.
3771
3772 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3773
3774 * linux-arm-low.c: Refactor breakpoint definitions.
3775 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3776 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3777
3778 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3779
3780 * Makefile.in: Add arm.c/o.
3781 * configure.srv: Likewise.
3782 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3783 (arm_breakpoint_kind_from_pc): New function.
3784 (arm_sw_breakpoint_from_kind): Return proper kind.
3785 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3786
3787 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3788
3789 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3790 removal.
3791 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3792 (struct raw_breakpoint) <size>: Remove.
3793 (struct raw_breakpoint) <kind>: Add.
3794 (bp_size): New function.
3795 (bp_opcode): Likewise.
3796 (find_raw_breakpoint_at): Adjust for kind.
3797 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3798 (remove_memory_breakpoint): Adjust for kind call bp_size.
3799 (set_raw_breakpoint_at): Adjust for kind.
3800 (set_breakpoint): Likewise.
3801 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3802 (delete_raw_breakpoint): Adjust for kind.
3803 (delete_breakpoint): Likewise.
3804 (find_gdb_breakpoint): Likewise.
3805 (set_gdb_breakpoint_1): Likewise.
3806 (set_gdb_breakpoint): Likewise.
3807 (delete_gdb_breakpoint_1): Likewise.
3808 (delete_gdb_breakpoint): Likewise.
3809 (uninsert_raw_breakpoint): Likewise.
3810 (reinsert_raw_breakpoint): Likewise.
3811 (set_breakpoint_data): Remove.
3812 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3813 (check_mem_read): Adjust for kind call bp_size.
3814 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3815 (clone_one_breakpoint): Adjust for kind.
3816 * mem-break.h (set_gdb_breakpoint): Likewise.
3817 (delete_gdb_breakpoint): Likewise.
3818 * server.c (process_serial_event): Likewise.
3819
3820 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3821
3822 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3823 (struct linux_target_ops) <breakpoint>: Remove.
3824 (struct linux_target_ops) <breakpoint_len>: Remove.
3825 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3826 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3827 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3828 (arm_sw_breakpoint_from_kind): New function.
3829 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3830 (struct linux_target_ops) <breakpoint>: Remove.
3831 (struct linux_target_ops) <breakpoint_len>: Remove.
3832 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3833 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3834 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3835 (struct linux_target_ops) <breakpoint>: Remove.
3836 (struct linux_target_ops) <breakpoint_len>: Remove.
3837 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3838 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3839 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3840 (struct linux_target_ops) <breakpoint>: Remove.
3841 (struct linux_target_ops) <breakpoint_len>: Remove.
3842 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3843 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3844 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3845 and sw_breakpoint_from_kind to increment the pc.
3846 (linux_breakpoint_kind_from_pc): New function.
3847 (linux_sw_breakpoint_from_kind): New function.
3848 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3849 (initialize_low): Call breakpoint_kind_from_pc and
3850 sw_breakpoint_from_kind to replace breakpoint_data/len.
3851 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3852 New field.
3853 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3854 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3855 (struct linux_target_ops) <breakpoint>: Remove.
3856 (struct linux_target_ops) <breakpoint_len>: Remove.
3857 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3858 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3859 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3860 (struct linux_target_ops) <breakpoint>: Remove.
3861 (struct linux_target_ops) <breakpoint_len>: Remove.
3862 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3863 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3864 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3865 (struct linux_target_ops) <breakpoint>: Remove.
3866 (struct linux_target_ops) <breakpoint_len>: Remove.
3867 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3868 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3869 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3870 (struct linux_target_ops) <breakpoint>: Remove.
3871 (struct linux_target_ops) <breakpoint_len>: Remove.
3872 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3873 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3874 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3875 (struct linux_target_ops) <breakpoint>: Remove.
3876 (struct linux_target_ops) <breakpoint_len>: Remove.
3877 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3878 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3879 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3880 (struct linux_target_ops) <breakpoint>: Remove.
3881 (struct linux_target_ops) <breakpoint_len>: Remove.
3882 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3883 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3884 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3885 (struct linux_target_ops) <breakpoint>: Remove.
3886 (struct linux_target_ops) <breakpoint_len>: Remove.
3887 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3888 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3889 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3890 (struct linux_target_ops) <breakpoint>: Remove.
3891 (struct linux_target_ops) <breakpoint_len>: Remove.
3892 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3893 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3894 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3895 (struct linux_target_ops) <breakpoint>: Remove.
3896 (struct linux_target_ops) <breakpoint_len>: Remove.
3897 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3898 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3899 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3900 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3901 (struct linux_target_ops) <breakpoint>: Remove.
3902 (struct linux_target_ops) <breakpoint_len>: Remove.
3903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3905 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3906 (struct linux_target_ops) <breakpoint>: Remove.
3907 (struct linux_target_ops) <breakpoint_len>: Remove.
3908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3910
3911 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3912
3913 * linux-cris-low.c (cris_get_pc): Remove void arg.
3914
3915 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3916
3917 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3918 variable name.
3919
3920 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3921
3922 * inferiors.c (thread_pid_matches_callback): New function.
3923 (find_thread_process): New function.
3924 (remove_thread): Reset current_thread.
3925 (remove_process): Assert threads have been removed first.
3926
3927 2015-10-15 Yao Qi <yao.qi@linaro.org>
3928
3929 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3930 if it is 3.
3931 (aarch64_remove_point): Likewise.
3932 * regcache.c (regcache_register_size): New function.
3933
3934 2015-10-12 Yao Qi <yao.qi@linaro.org>
3935
3936 * linux-aarch64-low.c: Update all callers as emit_load_store
3937 is renamed to aarch64_emit_load_store.
3938
3939 2015-10-12 Yao Qi <yao.qi@linaro.org>
3940
3941 * linux-aarch64-low.c: Update all callers of function renaming
3942 from emit_insn to aarch64_emit_insn.
3943
3944 2015-10-12 Yao Qi <yao.qi@linaro.org>
3945
3946 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3947 arch/aarch64-insn.h.
3948 (struct aarch64_memory_operand): Likewise.
3949 (ENCODE): Likewise.
3950 (emit_insn): Move to arch/aarch64-insn.c.
3951 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3952 (emit_load_store): Move to arch/aarch64-insn.c.
3953 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3954 (can_encode_int32): Remove.
3955
3956 2015-10-12 Yao Qi <yao.qi@linaro.org>
3957
3958 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3959 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3960 (aarch64_relocate_instruction): Likewise.
3961 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3962 (struct aarch64_insn_visitor): Likewise.
3963
3964 2015-10-12 Yao Qi <yao.qi@linaro.org>
3965
3966 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3967 (struct aarch64_insn_visitor): New.
3968 (struct aarch64_insn_relocation_data): New.
3969 (aarch64_ftrace_insn_reloc_b): New function.
3970 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3971 (aarch64_ftrace_insn_reloc_cb): Likewise.
3972 (aarch64_ftrace_insn_reloc_tb): Likewise.
3973 (aarch64_ftrace_insn_reloc_adr): Likewise.
3974 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3975 (aarch64_ftrace_insn_reloc_others): Likewise.
3976 (visitor): New.
3977 (aarch64_relocate_instruction): Use visitor.
3978
3979 2015-10-12 Yao Qi <yao.qi@linaro.org>
3980
3981 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3982 int. Add argument buf.
3983 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3984 aarch64_relocate_instruction.
3985
3986 2015-10-12 Yao Qi <yao.qi@linaro.org>
3987
3988 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3989 argument insn. Remove local variable insn. Don't call
3990 target_read_uint32.
3991 (aarch64_install_fast_tracepoint_jump_pad): Call
3992 target_read_uint32.
3993
3994 2015-09-30 Yao Qi <yao.qi@linaro.org>
3995
3996 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3997 (emit_load_store_pair): Likewise.
3998
3999 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4000
4001 * dll.c (match_dll): Add cast(s).
4002 (unloaded_dll): Likewise.
4003 * linux-low.c (second_thread_of_pid_p): Likewise.
4004 (delete_lwp_callback): Likewise.
4005 (count_events_callback): Likewise.
4006 (select_event_lwp_callback): Likewise.
4007 (linux_set_resume_request): Likewise.
4008 * server.c (accumulate_file_name_length): Likewise.
4009 (emit_dll_description): Likewise.
4010 (handle_qxfer_threads_worker): Likewise.
4011 (visit_actioned_threads): Likewise.
4012 * thread-db.c (any_thread_of): Likewise.
4013 * tracepoint.c (same_process_p): Likewise.
4014 (match_blocktype): Likewise.
4015 (build_traceframe_info_xml): Likewise.
4016
4017 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4018
4019 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4020 assignment.
4021 (gdb_unparse_agent_expr): Likewise.
4022 * hostio.c (require_data): Likewise.
4023 (handle_pread): Likewise.
4024 * linux-low.c (disable_regset): Likewise.
4025 (fetch_register): Likewise.
4026 (store_register): Likewise.
4027 (get_dynamic): Likewise.
4028 (linux_qxfer_libraries_svr4): Likewise.
4029 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4030 (set_fast_tracepoint_jump): Likewise.
4031 (uninsert_fast_tracepoint_jumps_at): Likewise.
4032 (reinsert_fast_tracepoint_jumps_at): Likewise.
4033 (validate_inserted_breakpoint): Likewise.
4034 (clone_agent_expr): Likewise.
4035 * regcache.c (init_register_cache): Likewise.
4036 * remote-utils.c (putpkt_binary_1): Likewise.
4037 (decode_M_packet): Likewise.
4038 (decode_X_packet): Likewise.
4039 (look_up_one_symbol): Likewise.
4040 (relocate_instruction): Likewise.
4041 (monitor_output): Likewise.
4042 * server.c (handle_search_memory): Likewise.
4043 (handle_qxfer_exec_file): Likewise.
4044 (handle_qxfer_libraries): Likewise.
4045 (handle_qxfer): Likewise.
4046 (handle_query): Likewise.
4047 (handle_v_cont): Likewise.
4048 (handle_v_run): Likewise.
4049 (captured_main): Likewise.
4050 * target.c (write_inferior_memory): Likewise.
4051 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4052 * tracepoint.c (init_trace_buffer): Likewise.
4053 (add_tracepoint_action): Likewise.
4054 (add_traceframe): Likewise.
4055 (add_traceframe_block): Likewise.
4056 (cmd_qtdpsrc): Likewise.
4057 (cmd_qtdv): Likewise.
4058 (cmd_qtstatus): Likewise.
4059 (response_source): Likewise.
4060 (response_tsv): Likewise.
4061 (cmd_qtnotes): Likewise.
4062 (gdb_collect): Likewise.
4063 (initialize_tracepoint): Likewise.
4064
4065 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4066
4067 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4068 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4069 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4070 <NOP>: New.
4071 (enum aarch64_condition_codes): New enum.
4072 (w0): New static global.
4073 (fp): Likewise.
4074 (lr): Likewise.
4075 (struct aarch64_memory_operand) <type>: New
4076 MEMORY_OPERAND_POSTINDEX type.
4077 (postindex_memory_operand): New helper function.
4078 (emit_ret): New function.
4079 (emit_load_store_pair): New function, factored out of emit_stp
4080 with support for MEMORY_OPERAND_POSTINDEX.
4081 (emit_stp): Rewrite using emit_load_store_pair.
4082 (emit_ldp): New function.
4083 (emit_load_store): Likewise.
4084 (emit_ldr): Mention post-index instruction in comment.
4085 (emit_ldrh): New function.
4086 (emit_ldrb): New function.
4087 (emit_ldrsw): Mention post-index instruction in comment.
4088 (emit_str): Likewise.
4089 (emit_subs): New function.
4090 (emit_cmp): Likewise.
4091 (emit_and): Likewise.
4092 (emit_orr): Likewise.
4093 (emit_orn): Likewise.
4094 (emit_eor): Likewise.
4095 (emit_mvn): Likewise.
4096 (emit_lslv): Likewise.
4097 (emit_lsrv): Likewise.
4098 (emit_asrv): Likewise.
4099 (emit_mul): Likewise.
4100 (emit_sbfm): Likewise.
4101 (emit_sbfx): Likewise.
4102 (emit_ubfm): Likewise.
4103 (emit_ubfx): Likewise.
4104 (emit_csinc): Likewise.
4105 (emit_cset): Likewise.
4106 (emit_nop): Likewise.
4107 (emit_ops_insns): New helper function.
4108 (emit_pop): Likewise.
4109 (emit_push): Likewise.
4110 (aarch64_emit_prologue): New function.
4111 (aarch64_emit_epilogue): Likewise.
4112 (aarch64_emit_add): Likewise.
4113 (aarch64_emit_sub): Likewise.
4114 (aarch64_emit_mul): Likewise.
4115 (aarch64_emit_lsh): Likewise.
4116 (aarch64_emit_rsh_signed): Likewise.
4117 (aarch64_emit_rsh_unsigned): Likewise.
4118 (aarch64_emit_ext): Likewise.
4119 (aarch64_emit_log_not): Likewise.
4120 (aarch64_emit_bit_and): Likewise.
4121 (aarch64_emit_bit_or): Likewise.
4122 (aarch64_emit_bit_xor): Likewise.
4123 (aarch64_emit_bit_not): Likewise.
4124 (aarch64_emit_equal): Likewise.
4125 (aarch64_emit_less_signed): Likewise.
4126 (aarch64_emit_less_unsigned): Likewise.
4127 (aarch64_emit_ref): Likewise.
4128 (aarch64_emit_if_goto): Likewise.
4129 (aarch64_emit_goto): Likewise.
4130 (aarch64_write_goto_address): Likewise.
4131 (aarch64_emit_const): Likewise.
4132 (aarch64_emit_call): Likewise.
4133 (aarch64_emit_reg): Likewise.
4134 (aarch64_emit_pop): Likewise.
4135 (aarch64_emit_stack_flush): Likewise.
4136 (aarch64_emit_zero_ext): Likewise.
4137 (aarch64_emit_swap): Likewise.
4138 (aarch64_emit_stack_adjust): Likewise.
4139 (aarch64_emit_int_call_1): Likewise.
4140 (aarch64_emit_void_call_2): Likewise.
4141 (aarch64_emit_eq_goto): Likewise.
4142 (aarch64_emit_ne_goto): Likewise.
4143 (aarch64_emit_lt_goto): Likewise.
4144 (aarch64_emit_le_goto): Likewise.
4145 (aarch64_emit_gt_goto): Likewise.
4146 (aarch64_emit_ge_got): Likewise.
4147 (aarch64_emit_ops_impl): New static global variable.
4148 (aarch64_emit_ops): New target function, return
4149 &aarch64_emit_ops_impl.
4150 (struct linux_target_ops): Install it.
4151
4152 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4153
4154 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4155 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4156 aarch64-ipa.o.
4157 * linux-aarch64-ipa.c: New file.
4158 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4159 and endian.h.
4160 (aarch64_get_thread_area): New target method.
4161 (extract_signed_bitfield): New helper function.
4162 (aarch64_decode_ldr_literal): New function.
4163 (enum aarch64_opcodes): New enum.
4164 (struct aarch64_register): New struct.
4165 (struct aarch64_operand): New struct.
4166 (x0): New static global.
4167 (x1): Likewise.
4168 (x2): Likewise.
4169 (x3): Likewise.
4170 (x4): Likewise.
4171 (w2): Likewise.
4172 (ip0): Likewise.
4173 (sp): Likewise.
4174 (xzr): Likewise.
4175 (aarch64_register): New helper function.
4176 (register_operand): Likewise.
4177 (immediate_operand): Likewise.
4178 (struct aarch64_memory_operand): New struct.
4179 (offset_memory_operand): New helper function.
4180 (preindex_memory_operand): Likewise.
4181 (enum aarch64_system_control_registers): New enum.
4182 (ENCODE): New macro.
4183 (emit_insn): New helper function.
4184 (emit_b): New function.
4185 (emit_bcond): Likewise.
4186 (emit_cb): Likewise.
4187 (emit_tb): Likewise.
4188 (emit_blr): Likewise.
4189 (emit_stp): Likewise.
4190 (emit_ldp_q_offset): Likewise.
4191 (emit_stp_q_offset): Likewise.
4192 (emit_load_store): Likewise.
4193 (emit_ldr): Likewise.
4194 (emit_ldrsw): Likewise.
4195 (emit_str): Likewise.
4196 (emit_ldaxr): Likewise.
4197 (emit_stxr): Likewise.
4198 (emit_stlr): Likewise.
4199 (emit_data_processing_reg): Likewise.
4200 (emit_data_processing): Likewise.
4201 (emit_add): Likewise.
4202 (emit_sub): Likewise.
4203 (emit_mov): Likewise.
4204 (emit_movk): Likewise.
4205 (emit_mov_addr): Likewise.
4206 (emit_mrs): Likewise.
4207 (emit_msr): Likewise.
4208 (emit_sevl): Likewise.
4209 (emit_wfe): Likewise.
4210 (append_insns): Likewise.
4211 (can_encode_int32_in): New helper function.
4212 (aarch64_relocate_instruction): New function.
4213 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4214 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4215 (struct linux_target_ops): Install aarch64_get_thread_area,
4216 aarch64_install_fast_tracepoint_jump_pad and
4217 aarch64_get_min_fast_tracepoint_insn_len.
4218
4219 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4220
4221 * Makefile.in (aarch64-insn.o): New rule.
4222 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4223
4224 2015-09-21 Yao Qi <yao.qi@linaro.org>
4225
4226 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4227
4228 2015-09-21 Yao Qi <yao.qi@linaro.org>
4229
4230 * tracepoint.c (max_jump_pad_size): Remove.
4231
4232 2015-09-18 Yao Qi <yao.qi@linaro.org>
4233
4234 * linux-aarch64-low.c: Don't include sys/uio.h.
4235 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4236
4237 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4238
4239 * tracepoint.c (eval_result_type): Change prototype.
4240 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4241
4242 2015-09-15 Pedro Alves <palves@redhat.com>
4243
4244 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4245 Check whether to report exec events instead of checking whether
4246 multiprocess is enabled.
4247
4248 2015-09-15 Pedro Alves <palves@redhat.com>
4249
4250 PR remote/18965
4251 * remote-utils.c (prepare_resume_reply): Merge
4252 TARGET_WAITKIND_VFORK_DONE switch case with the
4253 TARGET_WAITKIND_FORKED case.
4254
4255 2015-09-15 Yao Qi <yao.qi@linaro.org>
4256
4257 * server.c (handle_query): Check string comparison using
4258 "else if" instead of "if".
4259
4260 2015-09-15 Yao Qi <yao.qi@linaro.org>
4261
4262 * server.c (vCont_supported): New global variable.
4263 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4264 matches. Append ";vContSupported+" to own_buf.
4265 (handle_v_requests): Append ";s;S" to own_buf if target supports
4266 hardware single step or vCont_supported is false.
4267 (capture_main): Set vCont_supported to zero.
4268
4269 2015-09-15 Yao Qi <yao.qi@linaro.org>
4270
4271 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4272 it to ...
4273 (linux_supports_hardware_single_step): ... New function.
4274 (linux_target_ops): Update.
4275 * lynx-low.c (lynx_target_ops): Set field
4276 supports_hardware_single_step to target_can_do_hardware_single_step.
4277 * nto-low.c (nto_target_ops): Likewise.
4278 * spu-low.c (spu_target_ops): Likewise.
4279 * win32-low.c (win32_target_ops): Likewise.
4280 * target.c (target_can_do_hardware_single_step): New function.
4281 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4282 Remove. <supports_hardware_single_step>: New field.
4283 (target_supports_conditional_breakpoints): Remove.
4284 (target_supports_hardware_single_step): New macro.
4285 (target_can_do_hardware_single_step): Declare.
4286 * server.c (handle_query): Use target_supports_hardware_single_step
4287 instead of target_supports_conditional_breakpoints.
4288
4289 2015-09-15 Yao Qi <yao.qi@linaro.org>
4290
4291 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4292 function.
4293 (struct linux_target_ops the_low_target): Install
4294 aarch64_linux_siginfo_fixup.
4295
4296 2015-09-11 Don Breazeal <donb@codesourcery.com>
4297 Luis Machado <lgustavo@codesourcery.com>
4298
4299 * linux-low.c (linux_mourn): Static declaration.
4300 (linux_arch_setup): Move in front of
4301 handle_extended_wait.
4302 (linux_arch_setup_thread): New function.
4303 (handle_extended_wait): Handle exec events. Call
4304 linux_arch_setup_thread. Make event_lwp argument a
4305 pointer-to-a-pointer.
4306 (check_zombie_leaders): Do not check stopped threads.
4307 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4308 (linux_low_filter_event): Add lwp and thread for exec'ing
4309 non-leader thread if leader thread has been deleted.
4310 Refactor code into linux_arch_setup_thread and call it.
4311 Pass child lwp pointer by reference to handle_extended_wait.
4312 (linux_wait_for_event_filtered): Update comment.
4313 (linux_wait_1): Prevent clobbering exec event status.
4314 (linux_supports_exec_events): New function.
4315 (linux_target_ops) <supports_exec_events>: Initialize new member.
4316 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4317 new member.
4318 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4319 * server.c (report_exec_events): New global variable.
4320 (handle_query): Handle qSupported query for exec-events feature.
4321 (captured_main): Initialize report_exec_events.
4322 * server.h (report_exec_events): Declare new global variable.
4323 * target.h (struct target_ops) <supports_exec_events>: New
4324 member.
4325 (target_supports_exec_events): New macro.
4326 * win32-low.c (win32_target_ops) <supports_exec_events>:
4327 Initialize new member.
4328
4329 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4330
4331 * linux-low.c (linux_low_enable_btrace): Remove.
4332 (linux_target_ops): Replace linux_low_enable_btrace with
4333 linux_enable_btrace.
4334
4335 2015-09-03 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-aarch64-low.c (aarch64_insert_point): Call
4338 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4339 returns true.
4340
4341 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4342
4343 * linux-low.c (check_stopped_by_breakpoint): Use
4344 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4345
4346 2015-08-27 Pedro Alves <palves@redhat.com>
4347
4348 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4349
4350 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4351
4352 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4353 the XNEW-family equivalent.
4354 (compile_bytecodes): Likewise.
4355 * dll.c (loaded_dll): Likewise.
4356 * event-loop.c (append_callback_event): Likewise.
4357 (create_file_handler): Likewise.
4358 (create_file_event): Likewise.
4359 * hostio.c (handle_open): Likewise.
4360 * inferiors.c (add_thread): Likewise.
4361 (add_process): Likewise.
4362 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4363 * linux-arm-low.c (arm_new_process): Likewise.
4364 (arm_new_thread): Likewise.
4365 * linux-low.c (add_to_pid_list): Likewise.
4366 (linux_add_process): Likewise.
4367 (handle_extended_wait): Likewise.
4368 (add_lwp): Likewise.
4369 (enqueue_one_deferred_signal): Likewise.
4370 (enqueue_pending_signal): Likewise.
4371 (linux_resume_one_lwp_throw): Likewise.
4372 (linux_resume_one_thread): Likewise.
4373 (linux_read_memory): Likewise.
4374 (linux_write_memory): Likewise.
4375 * linux-mips-low.c (mips_linux_new_process): Likewise.
4376 (mips_linux_new_thread): Likewise.
4377 (mips_add_watchpoint): Likewise.
4378 * linux-x86-low.c (initialize_low_arch): Likewise.
4379 * lynx-low.c (lynx_add_process): Likewise.
4380 * mem-break.c (set_raw_breakpoint_at): Likewise.
4381 (set_breakpoint): Likewise.
4382 (add_condition_to_breakpoint): Likewise.
4383 (add_commands_to_breakpoint): Likewise.
4384 (clone_agent_expr): Likewise.
4385 (clone_one_breakpoint): Likewise.
4386 * regcache.c (new_register_cache): Likewise.
4387 * remote-utils.c (look_up_one_symbol): Likewise.
4388 * server.c (queue_stop_reply): Likewise.
4389 (start_inferior): Likewise.
4390 (queue_stop_reply_callback): Likewise.
4391 (handle_target_event): Likewise.
4392 * spu-low.c (fetch_ppc_memory): Likewise.
4393 (store_ppc_memory): Likewise.
4394 * target.c (set_target_ops): Likewise.
4395 * thread-db.c (thread_db_load_search): Likewise.
4396 (try_thread_db_load_1): Likewise.
4397 * tracepoint.c (add_tracepoint): Likewise.
4398 (add_tracepoint_action): Likewise.
4399 (create_trace_state_variable): Likewise.
4400 (cmd_qtdpsrc): Likewise.
4401 (cmd_qtro): Likewise.
4402 (add_while_stepping_state): Likewise.
4403 * win32-low.c (child_add_thread): Likewise.
4404 (get_image_name): Likewise.
4405
4406 2015-08-25 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4409
4410 2015-08-25 Yao Qi <yao.qi@linaro.org>
4411
4412 * Makefile.in (aarch64-linux.o): New rule.
4413 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4414 srv_tgtobj.
4415 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4416 (aarch64_init_debug_reg_state): Make it extern.
4417 (aarch64_linux_prepare_to_resume): Remove.
4418
4419 2015-08-25 Yao Qi <yao.qi@linaro.org>
4420
4421 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4422 lwp_arch_private_info and ptid_of_lwp.
4423
4424 2015-08-25 Yao Qi <yao.qi@linaro.org>
4425
4426 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4427 Find proc_info by find_process_pid. All callers updated.
4428
4429 2015-08-25 Yao Qi <yao.qi@linaro.org>
4430
4431 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4432 Remove.
4433 (debug_reg_change_callback): Remove.
4434 (aarch64_notify_debug_reg_change): Remove.
4435
4436 2015-08-25 Yao Qi <yao.qi@linaro.org>
4437
4438 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4439 Call current_lwp_ptid.
4440
4441 2015-08-25 Yao Qi <yao.qi@linaro.org>
4442
4443 * linux-aarch64-low.c (debug_reg_change_callback): Use
4444 debug_printf.
4445
4446 2015-08-25 Yao Qi <yao.qi@linaro.org>
4447
4448 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4449
4450 2015-08-25 Yao Qi <yao.qi@linaro.org>
4451
4452 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4453
4454 2015-08-25 Yao Qi <yao.qi@linaro.org>
4455
4456 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4457 the code.
4458
4459 2015-08-25 Yao Qi <yao.qi@linaro.org>
4460
4461 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4462 Remove.
4463 (debug_reg_change_callback): Remove argument entry and add argument
4464 lwp. Remove local variable thread. Don't print thread id in the
4465 debugging output. Don't check whether pid of thread equals to pid.
4466 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4467 iterate_over_lwps instead find_inferior.
4468
4469 2015-08-24 Pedro Alves <palves@redhat.com>
4470
4471 * inferiors.c (get_first_process): New function.
4472 * inferiors.h (get_first_process): New declaration.
4473 * remote-utils.c (read_ptid): Default to the first process in the
4474 list, instead of to the current thread's process.
4475
4476 2015-08-24 Pedro Alves <palves@redhat.com>
4477
4478 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4479 * event-loop.c: Likewise.
4480 * remote-utils.c: Likewise.
4481 * tracepoint.c: Likewise.
4482
4483 2015-08-24 Pedro Alves <palves@redhat.com>
4484
4485 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4486 ptid_get_lwp.
4487
4488 2015-08-21 Pedro Alves <palves@redhat.com>
4489
4490 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4491 instead of literal 1.
4492
4493 2015-08-21 Pedro Alves <palves@redhat.com>
4494
4495 * tdesc.c (default_description): Explicitly zero-initialize.
4496
4497 2015-08-21 Pedro Alves <palves@redhat.com>
4498
4499 PR gdb/18749
4500 * inferiors.c (remove_thread): Discard any pending stop reply for
4501 this thread.
4502 * server.c (remove_all_on_match_pid): Rename to ...
4503 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4504 instead of a pid.
4505 (discard_queued_stop_replies): Change parameter to a ptid. Now
4506 extern.
4507 (handle_v_kill, kill_inferior_callback, captured_main)
4508 (process_serial_event): Adjust.
4509 * server.h (discard_queued_stop_replies): Declare.
4510
4511 2015-08-21 Pedro Alves <palves@redhat.com>
4512
4513 * linux-low.c (wait_for_sigstop): Always switch to no thread
4514 selected if the previously current thread dies.
4515 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4516 process instead of the current thread's.
4517 * remote-utils.c (input_interrupt): Don't check if there's no
4518 current thread.
4519 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4520 current thread to the general thread fails, error out.
4521 (handle_qxfer_auxv, handle_qxfer_libraries)
4522 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4523 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4524 (handle_query): Check if there's a thread selected instead of
4525 checking whether there's any thread in the thread list.
4526 (handle_qxfer_threads, handle_qxfer_btrace)
4527 (handle_qxfer_btrace_conf): Don't error out early if there's no
4528 thread in the thread list.
4529 (handle_v_cont, myresume): Don't set the current thread to the
4530 continue thread.
4531 (process_serial_event) <Hg handling>: Also set thread_id if the
4532 previous general thread is still alive.
4533 (process_serial_event) <g/G handling>: If setting the current
4534 thread to the general thread fails, error out.
4535 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4536 thread's lwp instead of the current thread's.
4537 * target.c (set_desired_thread): If the desired thread was not
4538 found, leave the current thread pointing to NULL. Return an int
4539 (boolean) indicating success.
4540 * target.h (set_desired_thread): Change return type to int.
4541
4542 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4543
4544 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4545 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4546 #includes.
4547 (ps_get_thread_area): New function.
4548
4549 2015-08-19 Gary Benson <gbenson@redhat.com>
4550
4551 * hostio.c (handle_pread): Do not attempt to read more data
4552 than hostio_reply_with_data can fit in a packet.
4553
4554 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4555
4556 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4557
4558 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4559
4560 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4561
4562 2015-08-06 Pedro Alves <palves@redhat.com>
4563
4564 * tracepoint.c (expr_eval_result): Now an int.
4565
4566 2015-08-06 Pedro Alves <palves@redhat.com>
4567
4568 * gdbthread.h (struct regcache): Forward declare.
4569 (struct thread_info) <regcache_data>: Now a struct regcache
4570 pointer.
4571 * inferiors.c (inferior_regcache_data)
4572 (set_inferior_regcache_data): Now work with struct regcache
4573 pointers.
4574 * inferiors.h (struct regcache): Forward declare.
4575 (inferior_regcache_data, set_inferior_regcache_data): Now work
4576 with struct regcache pointers.
4577 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4578 (free_register_cache_thread): Remove struct regcache pointer
4579 casts.
4580
4581 2015-08-06 Pedro Alves <palves@redhat.com>
4582
4583 * server.c (captured_main): On error, print the exception message
4584 to stderr, and if run_once is set, throw a quit.
4585
4586 2015-08-06 Pedro Alves <palves@redhat.com>
4587
4588 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4589 the current thread.
4590
4591 2015-08-06 Pedro Alves <palves@redhat.com>
4592
4593 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4594 reading beyond the passed in buffer length.
4595
4596 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4597
4598 * tracepoint.c (symbol_list) <required>: Remove.
4599
4600 2015-08-06 Pedro Alves <palves@redhat.com>
4601
4602 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4603 count if stopping and suspending threads.
4604 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4605 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4606 (linux_detach): Complete an ongoing step-over.
4607 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4608 throughout.
4609 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4610 (linux_wait_1): If passing a signal to the inferior after
4611 finishing a step-over, unsuspend and re-resume all lwps. If we
4612 see a single-step event but the thread should be continuing, don't
4613 pass the trap to gdb.
4614 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4615 internal_error instead of gdb_assert.
4616 (enqueue_pending_signal): New function.
4617 (check_ptrace_stopped_lwp_gone): Add debug output.
4618 (start_step_over): Use internal_error instead of gdb_assert.
4619 (complete_ongoing_step_over): New function.
4620 (linux_resume_one_thread): Don't resume a suspended thread.
4621 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4622 it stepping.
4623
4624 2015-08-06 Pedro Alves <palves@redhat.com>
4625
4626 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4627 (linux_thread_alive): Use lwp_is_marked_dead.
4628 (extended_event_reported): Delete.
4629 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4630 instead of extended_event_reported.
4631 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4632 as well.
4633 (lwp_is_marked_dead): New function.
4634 (lwp_running): Use lwp_is_marked_dead.
4635 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4636 comment.
4637
4638 2015-08-06 Pedro Alves <palves@redhat.com>
4639
4640 * linux-low.c (linux_wait_1): Move fork event output out of the
4641 !report_to_gdb check. Pass event_child->waitstatus to
4642 target_waitstatus_to_string instead of ourstatus.
4643
4644 2015-08-04 Yao Qi <yao.qi@linaro.org>
4645
4646 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4647 if current_thread is 32 bit.
4648
4649 2015-08-04 Yao Qi <yao.qi@linaro.org>
4650
4651 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4652 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4653 * server.c (extended_protocol): Remove "static".
4654 * server.h (extended_protocol): Declare it.
4655
4656 2015-08-04 Yao Qi <yao.qi@linaro.org>
4657
4658 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4659 both aarch64 and aarch32.
4660 (aarch64_set_pc): Likewise.
4661
4662 2015-08-04 Yao Qi <yao.qi@linaro.org>
4663
4664 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4665 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4666 arm-with-neon.xml to srv_xmlfiles.
4667 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4668 (is_64bit_tdesc): New function.
4669 (aarch64_linux_read_description): New function.
4670 (aarch64_arch_setup): Call aarch64_linux_read_description.
4671 (regs_info): Rename to regs_info_aarch64.
4672 (aarch64_regs_info): Return right regs_info.
4673 (initialize_low_arch): Call initialize_low_arch_aarch32.
4674
4675 2015-08-04 Yao Qi <yao.qi@linaro.org>
4676
4677 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4678 * linux-aarch32-low.c: New file.
4679 * linux-aarch32-low.h: New file.
4680 * linux-arm-low.c (arm_fill_gregset): Move it to
4681 linux-aarch32-low.c.
4682 (arm_store_gregset): Likewise.
4683 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4684 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4685 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4686 (regs_info): Rename to regs_info_arm.
4687 (arm_regs_info): Return regs_info_aarch32 if
4688 have_ptrace_getregset is 1 and target description is
4689 arm_with_neon or arm_with_vfpv3.
4690 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4691 Call initialize_low_arch_aarch32 instead.
4692
4693 2015-08-04 Yao Qi <yao.qi@linaro.org>
4694
4695 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4696 * linux-low.c: ... here.
4697 * linux-low.h (have_ptrace_getregset): Declare it.
4698
4699 2015-08-04 Pedro Alves <palves@redhat.com>
4700
4701 * thread-db.c (struct thread_db): Use new typedefs.
4702 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4703 CHK calls.
4704 (disable_thread_event_reporting): Cast result of dlsym to
4705 destination function pointer type.
4706 (thread_db_mourn): Use td_ta_delete_ftype.
4707
4708 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4709
4710 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4711 arch variant.
4712 (CDX_BREAKPOINT): Define for R2.
4713 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4714 (the_low_target): Add comments.
4715
4716 2015-07-30 Yao Qi <yao.qi@linaro.org>
4717
4718 * linux-arm-low.c (arm_hwcap): Remove it.
4719 (arm_read_description): New local variable arm_hwcap. Don't
4720 set arm_hwcap to zero.
4721
4722 2015-07-30 Yao Qi <yao.qi@linaro.org>
4723
4724 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4725 Use regcache->tdesc instead.
4726 (arm_store_wmmxregset): Likewise.
4727 (arm_fill_vfpregset): Likewise.
4728 (arm_store_vfpregset): Likewise.
4729
4730 2015-07-30 Yao Qi <yao.qi@linaro.org>
4731
4732 * linux-arm-low.c: Include arch/arm.h.
4733 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4734 (arm_store_gregset): Likewise.
4735
4736 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4737
4738 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4739 ptrace's 4th parameter.
4740
4741 2015-07-27 Yao Qi <yao.qi@linaro.org>
4742
4743 * configure.srv (case aarch64*-*-linux*): Don't set
4744 srv_linux_usrregs.
4745
4746 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4747
4748 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4749 sys/ptrace.h.
4750 * linux-arm-low.c: Likewise.
4751 * linux-cris-low.c: Likewise.
4752 * linux-crisv32-low.c: Likewise.
4753 * linux-low.c: Likewise.
4754 * linux-m68k-low.c: Likewise.
4755 * linux-mips-low.c: Likewise.
4756 * linux-nios2-low.c: Likewise.
4757 * linux-s390-low.c: Likewise.
4758 * linux-sparc-low.c: Likewise.
4759 * linux-tic6x-low.c: Likewise.
4760 * linux-tile-low.c: Likewise.
4761 * linux-x86-low.c: Likewise.
4762
4763 2015-07-24 Pedro Alves <palves@redhat.com>
4764
4765 * config.in: Regenerate.
4766 * configure: Regenerate.
4767
4768 2015-07-24 Pedro Alves <palves@redhat.com>
4769
4770 * acinclude.m4: Include ../ptrace.m4.
4771 * configure.ac: Call GDB_AC_PTRACE.
4772 * config.in, configure: Regenerate.
4773
4774 2015-07-24 Yao Qi <yao.qi@linaro.org>
4775
4776 * linux-low.c (linux_create_inferior): Remove setting to
4777 proc->priv->new_inferior.
4778 (linux_attach): Likewise.
4779 (linux_low_filter_event): Likewise.
4780 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4781
4782 2015-07-24 Yao Qi <yao.qi@linaro.org>
4783
4784 * linux-low.c (linux_arch_setup): New function.
4785 (linux_low_filter_event): If proc->tdesc is NULL and
4786 proc->attached is true, call the_low_target.arch_setup.
4787 Otherwise, keep status pending, and return.
4788 (linux_resume_one_lwp_throw): Don't call get_pc if
4789 thread->while_stepping isn't NULL. Don't call
4790 get_thread_regcache if proc->tdesc is NULL.
4791 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4792 (linux_target_ops): Install arch_setup.
4793 * server.c (start_inferior): Call the_target->arch_setup.
4794 * target.h (struct target_ops) <arch_setup>: New field.
4795 (target_arch_setup): New marco.
4796 * lynx-low.c (lynx_target_ops): Update.
4797 * nto-low.c (nto_target_ops): Update.
4798 * spu-low.c (spu_target_ops): Update.
4799 * win32-low.c (win32_target_ops): Update.
4800
4801 2015-07-24 Yao Qi <yao.qi@linaro.org>
4802
4803 * linux-low.c (linux_add_process): Don't set
4804 proc->priv->new_inferior.
4805 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4806 (linux_attach): Likewise.
4807
4808 2015-07-24 Yao Qi <yao.qi@linaro.org>
4809
4810 * server.c (start_inferior): Code refactor.
4811
4812 2015-07-24 Yao Qi <yao.qi@linaro.org>
4813
4814 * server.c (process_serial_event): Set general_thread.
4815
4816 2015-07-21 Yao Qi <yao.qi@linaro.org>
4817
4818 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4819 aarch64_linux_get_debug_reg_capacity.
4820
4821 2015-07-17 Yao Qi <yao.qi@linaro.org>
4822
4823 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4824 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4825 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4826 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4827 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4828 (AARCH64_HWP_ALIGNMENT): Likewise.
4829 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4830 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4831 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4832 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4833 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4834 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4835 (struct aarch64_debug_reg_state): Likewise.
4836 (struct arch_lwp_info): Likewise.
4837 (aarch64_align_watchpoint): Likewise.
4838 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4839 (aarch64_watchpoint_length): Likewise.
4840 (aarch64_point_encode_ctrl_reg): Likewise
4841 (aarch64_point_is_aligned): Likewise.
4842 (aarch64_align_watchpoint): Likewise.
4843 (aarch64_linux_set_debug_regs):
4844 (aarch64_dr_state_insert_one_point): Likewise.
4845 (aarch64_dr_state_remove_one_point): Likewise.
4846 (aarch64_handle_breakpoint): Likewise.
4847 (aarch64_handle_aligned_watchpoint): Likewise.
4848 (aarch64_handle_unaligned_watchpoint): Likewise.
4849 (aarch64_handle_watchpoint): Likewise.
4850
4851 2015-07-17 Yao Qi <yao.qi@linaro.org>
4852
4853 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4854 and don't aarch64_get_debug_reg_state. All callers update.
4855 (aarch64_handle_aligned_watchpoint): Likewise.
4856 (aarch64_handle_unaligned_watchpoint): Likewise.
4857 (aarch64_handle_watchpoint): Likewise.
4858 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4859 (aarch64_remove_point): Likewise.
4860
4861 2015-07-17 Yao Qi <yao.qi@linaro.org>
4862
4863 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4864 debug_printf.
4865 (aarch64_handle_unaligned_watchpoint): Likewise.
4866
4867 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4868
4869 Revert the previous 3 commits:
4870 Move gdb_regex* to common/
4871 Move linux_find_memory_regions_full & co.
4872 gdbserver build-id attribute generator
4873
4874 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4875 Jan Kratochvil <jan.kratochvil@redhat.com>
4876
4877 gdbserver build-id attribute generator.
4878 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4879 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4880 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4881 (find_phdr): New.
4882 (get_dynamic): Use find_pdhr to traverse program headers.
4883 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4884 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4885 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4886 (get_hex_build_id): New.
4887 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4888 to reply XML document.
4889
4890 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4891 Jan Kratochvil <jan.kratochvil@redhat.com>
4892
4893 * target.c: Include target/target-utils.h and fcntl.h.
4894 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4895 (target_fileio_read_stralloc): New functions.
4896
4897 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4898
4899 * Makefile.in (OBS): Add gdb_regex.o.
4900 (gdb_regex.o): New.
4901 * config.in: Rebuilt.
4902 * configure: Rebuilt.
4903
4904 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4905 Jan Kratochvil <jan.kratochvil@redhat.com>
4906
4907 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4908 * Makefile.in (OBS): Add target-utils.o.
4909 (linux-maps.o, target-utils.o): New.
4910 * configure.srv (srv_linux_obj): Add linux-maps.o.
4911
4912 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4913
4914 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4915 function, return 1.
4916 (the_low_target): Install it.
4917
4918 2015-07-14 Pedro Alves <palves@redhat.com>
4919
4920 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4921 Instead, ignore ECHILD, and throw an error for other errnos.
4922
4923 2015-07-10 Pedro Alves <palves@redhat.com>
4924
4925 * event-loop.c (struct callback_event) <data>: Change type to
4926 gdb_client_data instance instead of gdb_client_data pointer.
4927 (append_callback_event): Adjust.
4928
4929 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4930
4931 * linux-aarch64-low.c: Add comments for each linux_target_ops
4932 method. Remove comments already covered in target_ops and
4933 linux_target_ops definitions.
4934 (the_low_target): Add comments for each unimplemented method.
4935
4936 2015-07-09 Yao Qi <yao.qi@linaro.org>
4937
4938 * linux-aarch64-low.c (aarch64_regmap): Remove.
4939 (aarch64_usrregs_info): Remove.
4940 (regs_info): Set field usrregs to NULL.
4941
4942 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4943
4944 * linux-low.c: Include "rsp-low.h"
4945 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4946 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4947 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4948 (handle_btrace_enable_pt): New.
4949 (handle_btrace_general_set): Support "pt".
4950 (handle_btrace_conf_general_set): Support "pt:size".
4951
4952 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4953
4954 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4955 Z_PACKET_SW_BP.
4956
4957 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4958
4959 * linux-aarch64-low.c: Remove comment about endianness.
4960 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4961 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4962 memcmp.
4963
4964 2015-06-24 Gary Benson <gbenson@redhat.com>
4965
4966 * linux-i386-ipa.c (stdint.h): Do not include.
4967 * lynx-i386-low.c (stdint.h): Likewise.
4968 * lynx-ppc-low.c (stdint.h): Likewise.
4969 * mem-break.c (stdint.h): Likewise.
4970 * thread-db.c (stdint.h): Likewise.
4971 * tracepoint.c (stdint.h): Likewise.
4972 * win32-low.c (stdint.h): Likewise.
4973
4974 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4975
4976 * server.c (write_qxfer_response): Update call to
4977 remote_escape_output.
4978
4979 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4980 Jan Kratochvil <jan.kratochvil@redhat.com>
4981
4982 Merge multiple hex conversions.
4983 * gdbreplay.c (tohex): Rename to 'fromhex'.
4984 (logchar): Use fromhex.
4985
4986 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4987
4988 * server.c (handle_qxfer_libraries): Set `version' attribute for
4989 <library-list>.
4990
4991 2015-06-10 Gary Benson <gbenson@redhat.com>
4992
4993 * target.h (struct target_ops) <multifs_open>: New field.
4994 <multifs_unlink>: Likewise.
4995 <multifs_readlink>: Likewise.
4996 * linux-low.c (nat/linux-namespaces.h): New include.
4997 (linux_target_ops): Initialize the_target->multifs_open,
4998 the_target->multifs_unlink and the_target->multifs_readlink.
4999 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5000 * hostio.c (hostio_fs_pid): New static variable.
5001 (hostio_handle_new_gdb_connection): New function.
5002 (handle_setfs): Likewise.
5003 (handle_open): Use the_target->multifs_open as appropriate.
5004 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5005 (handle_readlink): Use the_target->multifs_readlink as
5006 appropriate.
5007 (handle_vFile): Handle vFile:setfs packets.
5008 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5009 after target_handle_new_gdb_connection.
5010
5011 2015-06-10 Gary Benson <gbenson@redhat.com>
5012
5013 * configure.ac (AC_CHECK_FUNCS): Add setns.
5014 * config.in: Regenerate.
5015 * configure: Likewise.
5016 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5017 (linux-namespaces.o): New rule.
5018 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5019
5020 2015-06-09 Gary Benson <gbenson@redhat.com>
5021
5022 * hostio.c (handle_open): Process mode argument with
5023 fileio_to_host_mode.
5024
5025 2015-06-01 Yao Qi <yao.qi@linaro.org>
5026
5027 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5028 * linux-x86-low.c: Likewise.
5029
5030 2015-05-28 Don Breazeal <donb@codesourcery.com>
5031
5032 * linux-low.c (handle_extended_wait): Initialize
5033 thread_info.last_resume_kind for new fork children.
5034
5035 2015-05-15 Pedro Alves <palves@redhat.com>
5036
5037 * target.h (target_handle_new_gdb_connection): Rewrite using if
5038 wrapped in do/while.
5039
5040 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5041
5042 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5043 * configure, config.in: Regenerate.
5044 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5045 Declare typedef.
5046
5047 2015-05-12 Don Breazeal <donb@codesourcery.com>
5048
5049 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5050 PTRACE_EVENT_VFORK_DONE.
5051 (linux_low_ptrace_options, extended_event_reported): Add vfork
5052 events.
5053 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5054 and "vforkdone" for RSP 'T' Stop Reply Packet.
5055 * server.h (report_vfork_events): Declare
5056 global variable.
5057
5058 2015-05-12 Don Breazeal <donb@codesourcery.com>
5059
5060 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5061 (the_low_target) <new_fork>: Initialize new member.
5062 * linux-arm-low.c (arm_new_fork): New function.
5063 (the_low_target) <new_fork>: Initialize new member.
5064 * linux-low.c (handle_extended_wait): Call new target function
5065 new_fork.
5066 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5067 * linux-mips-low.c (mips_add_watchpoint): New function
5068 extracted from mips_insert_point.
5069 (the_low_target) <new_fork>: Initialize new member.
5070 (mips_linux_new_fork): New function.
5071 (mips_insert_point): Call mips_add_watchpoint.
5072 * linux-x86-low.c (x86_linux_new_fork): New function.
5073 (the_low_target) <new_fork>: Initialize new member.
5074
5075 2015-05-12 Don Breazeal <donb@codesourcery.com>
5076
5077 * linux-low.c (handle_extended_wait): Implement return value,
5078 rename argument 'event_child' to 'event_lwp', handle
5079 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5080 (linux_low_ptrace_options): New function.
5081 (linux_low_filter_event): Call linux_low_ptrace_options,
5082 use different argument fo linux_enable_event_reporting,
5083 use return value from handle_extended_wait.
5084 (extended_event_reported): New function.
5085 (linux_wait_1): Call extended_event_reported and set
5086 status to report fork events.
5087 (linux_write_memory): Add pid to debug message.
5088 (reset_lwp_ptrace_options_callback): New function.
5089 (linux_handle_new_gdb_connection): New function.
5090 (linux_target_ops): Initialize new structure member.
5091 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5092 * lynx-low.c: Initialize new structure member.
5093 * remote-utils.c (prepare_resume_reply): Implement stop reason
5094 "fork" for "T" stop message.
5095 * server.c (handle_query): Call handle_new_gdb_connection.
5096 * server.h (report_fork_events): Declare global flag.
5097 * target.h (struct target_ops) <handle_new_gdb_connection>:
5098 New member.
5099 (target_handle_new_gdb_connection): New macro.
5100 * win32-low.c: Initialize new structure member.
5101
5102 2015-05-12 Don Breazeal <donb@codesourcery.com>
5103
5104 * mem-break.c (APPEND_TO_LIST): Define macro.
5105 (clone_agent_expr): New function.
5106 (clone_one_breakpoint): New function.
5107 (clone_all_breakpoints): New function.
5108 * mem-break.h: Declare new functions.
5109
5110 2015-05-12 Don Breazeal <donb@codesourcery.com>
5111
5112 * linux-low.c (linux_supports_fork_events): New function.
5113 (linux_supports_vfork_events): New function.
5114 (linux_target_ops): Initialize new structure members.
5115 (initialize_low): Call linux_check_ptrace_features.
5116 * lynx-low.c (lynx_target_ops): Initialize new structure
5117 members.
5118 * server.c (report_fork_events, report_vfork_events):
5119 New global flags.
5120 (handle_query): Add new features to qSupported packet and
5121 response.
5122 (captured_main): Initialize new global variables.
5123 * target.h (struct target_ops) <supports_fork_events>:
5124 New member.
5125 <supports_vfork_events>: New member.
5126 (target_supports_fork_events): New macro.
5127 (target_supports_vfork_events): New macro.
5128 * win32-low.c (win32_target_ops): Initialize new structure
5129 members.
5130
5131 2015-05-12 Gary Benson <gbenson@redhat.com>
5132
5133 * server.c (handle_qxfer_exec_file): Use current process
5134 if annex is empty.
5135
5136 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5137
5138 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5139 Remove HAVE_PTRACE_GETREGS conditionals.
5140 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5141 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5142
5143 2015-05-08 Yao Qi <yao.qi@linaro.org>
5144
5145 * linux-low.c (linux_supports_conditional_breakpoints): New
5146 function.
5147 (linux_target_ops): Install new target method.
5148 * lynx-low.c (lynx_target_ops): Install NULL hook for
5149 supports_conditional_breakpoints.
5150 * nto-low.c (nto_target_ops): Likewise.
5151 * spu-low.c (spu_target_ops): Likewise.
5152 * win32-low.c (win32_target_ops): Likewise.
5153 * server.c (handle_query): Check
5154 target_supports_conditional_breakpoints.
5155 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5156 New field.
5157 (target_supports_conditional_breakpoints): New macro.
5158
5159 2015-05-06 Pedro Alves <palves@redhat.com>
5160
5161 PR server/18081
5162 * server.c (start_inferior): If the process exits, mourn it.
5163
5164 2015-04-21 Gary Benson <gbenson@redhat.com>
5165
5166 * hostio.c (fileio_open_flags_to_host): Factored out to
5167 fileio_to_host_openflags in common/fileio.c. Single use
5168 updated.
5169
5170 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5171
5172 * linux-xtensa-low.c (xtensa_fill_gregset)
5173 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5174 XCHAL_HAVE_LOOP.
5175
5176 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5177
5178 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5179 (regs_info): Replace usrregs pointer with NULL.
5180
5181 2015-04-17 Gary Benson <gbenson@redhat.com>
5182
5183 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5184 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5185 * server.c (handle_qxfer_exec_file): New function.
5186 (qxfer_packets): Add exec-file entry.
5187 (handle_query): Report qXfer:exec-file:read as supported packet.
5188
5189 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5190
5191 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5192
5193 2015-04-09 Gary Benson <gbenson@redhat.com>
5194
5195 * hostio-errno.c (errno_to_fileio_error): Remove function.
5196 Update caller to use remote_fileio_to_fio_error.
5197
5198 2015-04-09 Yao Qi <yao.qi@linaro.org>
5199
5200 * linux-low.c (linux_insert_point): Call
5201 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5202 (linux_remove_point): Call remove_memory_breakpoint if type is
5203 raw_bkpt_type_sw.
5204 * linux-x86-low.c (x86_insert_point): Don't call
5205 insert_memory_breakpoint.
5206 (x86_remove_point): Don't call remove_memory_breakpoint.
5207
5208 2015-04-01 Pedro Alves <palves@redhat.com>
5209 Cleber Rosa <crosa@redhat.com>
5210
5211 * server.c (gdbserver_usage): Reorganize and extend the usage
5212 message.
5213
5214 2015-03-24 Pedro Alves <palves@redhat.com>
5215
5216 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5217 output. Also dump TRAP_TRACE.
5218 (linux_low_filter_event): In debug output, distinguish a
5219 resume_stop SIGSTOP from a delayed SIGSTOP.
5220
5221 2015-03-24 Gary Benson <gbenson@redhat.com>
5222
5223 * linux-x86-low.c (x86_linux_new_thread): Moved to
5224 nat/x86-linux.c.
5225 (x86_linux_prepare_to_resume): Likewise.
5226
5227 2015-03-24 Gary Benson <gbenson@redhat.com>
5228
5229 * Makefile.in (x86-linux-dregs.o): New rule.
5230 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5231 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5232 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5233 (x86_linux_dr_get): Likewise.
5234 (x86_linux_dr_set): Likewise.
5235 (update_debug_registers_callback): Likewise.
5236 (x86_linux_dr_set_addr): Likewise.
5237 (x86_linux_dr_get_addr): Likewise.
5238 (x86_linux_dr_set_control): Likewise.
5239 (x86_linux_dr_get_control): Likewise.
5240 (x86_linux_dr_get_status): Likewise.
5241 (x86_linux_update_debug_registers): Likewise.
5242
5243 2015-03-24 Gary Benson <gbenson@redhat.com>
5244
5245 * linux-x86-low.c (x86_linux_update_debug_registers):
5246 New function, factored out from...
5247 (x86_linux_prepare_to_resume): ...this.
5248
5249 2015-03-24 Gary Benson <gbenson@redhat.com>
5250
5251 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5252 (x86_linux_dr_set): Likewise.
5253 (update_debug_registers_callback): Likewise.
5254 (x86_linux_dr_set_addr): Likewise.
5255 (x86_linux_dr_get_addr): Likewise.
5256 (x86_linux_dr_set_control): Likewise.
5257 (x86_linux_dr_get_control): Likewise.
5258 (x86_linux_dr_get_status): Likewise.
5259 (x86_linux_prepare_to_resume): Likewise.
5260
5261 2015-03-24 Gary Benson <gbenson@redhat.com>
5262
5263 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5264 Use perror_with_name. Pass string through gettext.
5265 (x86_linux_dr_set): Likewise.
5266
5267 2015-03-24 Gary Benson <gbenson@redhat.com>
5268
5269 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5270 (x86_linux_dr_set_addr): ...this.
5271 (x86_dr_low_get_addr): Rename to...
5272 (x86_linux_dr_get_addr): ...this.
5273 (x86_dr_low_set_control): Rename to...
5274 (x86_linux_dr_set_control): ...this.
5275 (x86_dr_low_get_control): Rename to...
5276 (x86_linux_dr_get_control): ...this.
5277 (x86_dr_low_get_status): Rename to...
5278 (x86_linux_dr_get_status): ...this.
5279 (x86_dr_low): Update with new function names.
5280
5281 2015-03-24 Gary Benson <gbenson@redhat.com>
5282
5283 * Makefile.in (x86-linux.o): New rule.
5284 * configure.srv: Add x86-linux.o to relevant targets.
5285 * linux-low.c (lwp_set_arch_private_info): New function.
5286 (lwp_arch_private_info): Likewise.
5287 * linux-x86-low.c: Include nat/x86-linux.h.
5288 (arch_lwp_info): Removed structure.
5289 (update_debug_registers_callback):
5290 Use lwp_set_debug_registers_changed.
5291 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5292 and lwp_set_debug_registers_changed.
5293 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5294
5295 2015-03-24 Gary Benson <gbenson@redhat.com>
5296
5297 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5298 * linux-arm-low.c (arm_new_thread): Likewise.
5299 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5300 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5301 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5302 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5303
5304 2015-03-24 Gary Benson <gbenson@redhat.com>
5305
5306 * linux-low.c (ptid_of_lwp): New function.
5307 (lwp_is_stopped): Likewise.
5308 (lwp_stop_reason): Likewise.
5309 * linux-x86-low.c (update_debug_registers_callback):
5310 Use lwp_is_stopped.
5311 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5312 lwp_stop_reason.
5313
5314 2015-03-24 Gary Benson <gbenson@redhat.com>
5315
5316 * linux-low.h (linux_stop_lwp): Remove declaration.
5317
5318 2015-03-24 Gary Benson <gbenson@redhat.com>
5319
5320 * linux-low.h: Include nat/linux-nat.h.
5321 * linux-low.c (iterate_over_lwps_args): New structure.
5322 (iterate_over_lwps_filter): New function.
5323 (iterate_over_lwps): Likewise.
5324 * linux-x86-low.c (update_debug_registers_callback):
5325 Update signature to what iterate_over_lwps expects.
5326 Remove PID check that iterate_over_lwps now performs.
5327 (x86_dr_low_set_addr): Use iterate_over_lwps.
5328 (x86_dr_low_set_control): Likewise.
5329
5330 2015-03-24 Gary Benson <gbenson@redhat.com>
5331
5332 * linux-x86-low.c (x86_debug_reg_state): New function.
5333 (x86_linux_prepare_to_resume): Use the above.
5334
5335 2015-03-24 Gary Benson <gbenson@redhat.com>
5336
5337 * linux-low.c (current_lwp_ptid): New function.
5338 * linux-x86-low.c: Include nat/linux-nat.h.
5339 (x86_dr_low_get_addr): Use current_lwp_ptid.
5340 (x86_dr_low_get_control): Likewise.
5341 (x86_dr_low_get_status): Likewise.
5342
5343 2015-03-20 Pedro Alves <palves@redhat.com>
5344
5345 * tracepoint.c (cmd_qtstatus): Make "str" const.
5346
5347 2015-03-20 Pedro Alves <palves@redhat.com>
5348
5349 * server.c (handle_general_set): Make "req_str" const.
5350
5351 2015-03-19 Pedro Alves <palves@redhat.com>
5352
5353 * linux-low.c (linux_resume_one_lwp): Rename to ...
5354 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5355 instead call perror_with_name.
5356 (check_ptrace_stopped_lwp_gone): New function.
5357 (linux_resume_one_lwp): Reimplement as wrapper around
5358 linux_resume_one_lwp_throw that swallows errors if the LWP is
5359 gone.
5360
5361 2015-03-19 Pedro Alves <palves@redhat.com>
5362
5363 * linux-low.c (count_events_callback, select_event_lwp_callback):
5364 No longer check whether the thread has resume_stop as last resume
5365 kind.
5366
5367 2015-03-19 Pedro Alves <palves@redhat.com>
5368
5369 * linux-low.c (count_events_callback, select_event_lwp_callback):
5370 Use the lwp's status_pending_p field, not the thread's.
5371
5372 2015-03-19 Pedro Alves <palves@redhat.com>
5373
5374 * linux-low.c (select_event_lwp_callback): Update comments to
5375 no longer mention SIGTRAP.
5376
5377 2015-03-18 Gary Benson <gbenson@redhat.com>
5378
5379 * server.c (handle_query): Do not report vFile:fstat as supported.
5380
5381 2015-03-11 Gary Benson <gbenson@redhat.com>
5382
5383 * hostio.c (sys/types.h): New include.
5384 (sys/stat.h): Likewise.
5385 (common-remote-fileio.h): Likewise.
5386 (handle_fstat): New function.
5387 (handle_vFile): Handle vFile:fstat packets.
5388
5389 2015-03-11 Gary Benson <gbenson@redhat.com>
5390
5391 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5392 struct stat.st_blocks and struct stat.st_blksize.
5393 * configure: Regenerate.
5394 * config.in: Likewise.
5395 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5396 (OBS): Add common-remote-fileio.o.
5397 (common-remote-fileio.o): New rule.
5398
5399 2015-03-09 Pedro Alves <palves@redhat.com>
5400
5401 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5402 'struct sockaddr' pointer in 'accept' call.
5403
5404 2015-03-09 Pedro Alves <palves@redhat.com>
5405
5406 Revert:
5407 2015-03-07 Pedro Alves <palves@redhat.com>
5408 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5409 or <winsock2.h> here. Instead include "gdb_socket.h".
5410 (remote_open): Use union gdb_sockaddr_u.
5411 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5412 or <winsock2.h> here. Instead include "gdb_socket.h".
5413 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5414 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5415 or <sys/un.h>.
5416 (init_named_socket, gdb_agent_helper_thread): Use union
5417 gdb_sockaddr_u.
5418
5419 2015-03-07 Pedro Alves <palves@redhat.com>
5420
5421 * configure.ac (build_warnings): Move
5422 -Wdeclaration-after-statement to the C-specific set.
5423 * configure: Regenerate.
5424
5425 2015-03-07 Pedro Alves <palves@redhat.com>
5426
5427 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5428 or <winsock2.h> here. Instead include "gdb_socket.h".
5429 (remote_open): Use union gdb_sockaddr_u.
5430 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5431 or <winsock2.h> here. Instead include "gdb_socket.h".
5432 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5433 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5434 or <sys/un.h>.
5435 (init_named_socket, gdb_agent_helper_thread): Use union
5436 gdb_sockaddr_u.
5437
5438 2015-03-07 Pedro Alves <palves@redhat.com>
5439
5440 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5441 instead.
5442
5443 2015-03-06 Yao Qi <yao.qi@linaro.org>
5444
5445 * linux-aarch64-low.c (aarch64_insert_point): Use
5446 show_debug_regs as a boolean.
5447 (aarch64_remove_point): Likewise.
5448
5449 2015-03-05 Pedro Alves <palves@redhat.com>
5450
5451 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5452 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5453 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5454 * nto-low.c (nto_target_ops): Likewise.
5455 * spu-low.c (spu_target_ops): Likewise.
5456 * win32-low.c (win32_target_ops): Likewise.
5457
5458 2015-03-04 Pedro Alves <palves@redhat.com>
5459
5460 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5461 Decide whether a breakpoint triggered based on the SIGTRAP's
5462 siginfo.si_code.
5463 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5464 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5465 (linux_low_filter_event): Check for breakpoints before checking
5466 watchpoints.
5467 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5468 siginfo.si_code.
5469 (linux_stopped_by_sw_breakpoint)
5470 (linux_supports_stopped_by_sw_breakpoint)
5471 (linux_stopped_by_hw_breakpoint)
5472 (linux_supports_stopped_by_hw_breakpoint): New functions.
5473 (linux_target_ops): Install new target methods.
5474
5475 2015-03-04 Pedro Alves <palves@redhat.com>
5476
5477 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5478 * server.c (swbreak_feature, hwbreak_feature): New globals.
5479 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5480 (captured_main): Clear swbreak_feature and hwbreak_feature.
5481 * server.h (swbreak_feature, hwbreak_feature): Declare.
5482 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5483 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5484 supports_stopped_by_hw_breakpoint>: New fields.
5485 (target_supports_stopped_by_sw_breakpoint)
5486 (target_stopped_by_sw_breakpoint)
5487 (target_supports_stopped_by_hw_breakpoint)
5488 (target_stopped_by_hw_breakpoint): Declare.
5489
5490 2015-03-04 Pedro Alves <palves@redhat.com>
5491
5492 enum lwp_stop_reason -> enum target_stop_reason
5493 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5494 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5495 (linux_wait_1, stuck_in_jump_pad_callback)
5496 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5497 (linux_stopped_by_watchpoint):
5498 * linux-low.h (enum lwp_stop_reason): Delete.
5499 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5500 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5501
5502 2015-03-04 Yao Qi <yao.qi@linaro.org>
5503
5504 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5505
5506 2015-03-03 Gary Benson <gbenson@redhat.com>
5507
5508 * hostio.c (handle_vFile): Fix prefix lengths.
5509
5510 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5511
5512 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5513 ptr_bits.
5514
5515 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5516
5517 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5518 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5519 (clean): Add "rm -f" for above C files.
5520 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5521 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5522 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5523 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5524 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5525 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5526 (init_registers_s390x_vx_linux64)
5527 (init_registers_s390x_tevx_linux64)
5528 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5529 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5530 declarations.
5531 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5532 (s390_store_vxrs_high): New functions.
5533 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5534 NT_S390_VXRS_HIGH.
5535 (s390_arch_setup): Add logic for selecting one of the new target
5536 descriptions. Activate the new vector regsets if applicable.
5537 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5538 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5539 and init_registers_s390x_tevx_linux64.
5540
5541 2015-03-01 Pedro Alves <palves@redhat.com>
5542
5543 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5544 parameter.
5545
5546 2015-02-27 Pedro Alves <palves@redhat.com>
5547
5548 * linux-x86-low.c (u_debugreg_offset): New function.
5549 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5550
5551 2015-02-27 Pedro Alves <palves@redhat.com>
5552
5553 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5554 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5555 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5556 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5557 (ps_lsetfpregs, ps_getpid)
5558 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5559 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5560 (ps_lsetxregs, ps_plog): Declare.
5561
5562 2015-02-27 Pedro Alves <palves@redhat.com>
5563
5564 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5565 IP_AGENT_EXPORT_FUNC.
5566 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5567 IP_AGENT_EXPORT_FUNC.
5568 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5569 (IP_AGENT_EXPORT): Delete.
5570 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5571 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5572 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5573 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5574 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5575 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5576 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5577 (traceframe_read_count, traceframe_write_count)
5578 (traceframes_created, trace_state_variables, get_raw_reg)
5579 (get_trace_state_variable_value, set_trace_state_variable_value)
5580 (ust_loaded, helper_thread_id, cmd_buf): Use
5581 IPA_SYM_EXPORTED_NAME.
5582 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5583 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5584 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5585 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5586 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5587 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5588 EXTERN_C_PUSH/EXTERN_C_POP.
5589 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5590 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5591 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5592 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5593 (traceframe_write_count, traceframe_read_count)
5594 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5595 (about_to_request_buffer_space, get_trace_state_variable_value)
5596 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5597 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5598 EXTERN_C_PUSH/EXTERN_C_POP.
5599 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5600 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5601 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5602 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5603 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5604 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5605 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5606 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5607 Define.
5608 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5609 (IP_AGENT_EXPORT_VAR_DECL): Define.
5610 (tracing): Declare.
5611 (gdb_agent_get_raw_reg): Declare.
5612
5613 2015-02-27 Tom Tromey <tromey@redhat.com>
5614 Pedro Alves <palves@redhat.com>
5615
5616 Rename symbols whose names are reserved C++ keywords throughout.
5617
5618 2015-02-27 Pedro Alves <palves@redhat.com>
5619
5620 * Makefile.in (COMPILER): New, get it from autoconf.
5621 (CXX): Get from autoconf instead.
5622 (COMPILE.pre): Use COMPILER.
5623 (CC-LD): Rename to ...
5624 (CC_LD): ... this. Use COMPILER.
5625 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5626 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5627 * acinclude.m4: Include build-with-cxx.m4.
5628 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5629 Disable -Werror by default if building in C++ mode.
5630 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5631 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5632 the C++ compiler. Save/restore CXXFLAGS too.
5633 * configure: Regenerate.
5634
5635 2015-02-27 Pedro Alves <palves@redhat.com>
5636
5637 * acinclude.m4: Include libiberty.m4.
5638 * configure.ac: Call libiberty_INIT.
5639 * config.in, configure: Regenerate.
5640
5641 2015-02-26 Pedro Alves <palves@redhat.com>
5642
5643 * linux-low.c (linux_wait_1): When incrementing the PC past a
5644 program breakpoint always use the_low_target.breakpoint_len as
5645 increment, rather than the maximum between that and
5646 the_low_target.decr_pc_after_break.
5647
5648 2015-02-23 Pedro Alves <palves@redhat.com>
5649
5650 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5651 thread was doing a step-over; always adjust the PC if
5652 we stepped over a permanent breakpoint.
5653 (linux_wait_1): If we stepped over breakpoint that was on top of a
5654 permanent breakpoint, manually advance the PC past it.
5655
5656 2015-02-23 Pedro Alves <palves@redhat.com>
5657
5658 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5659 modes.
5660 (x86_fill_gregset, x86_store_gregset): Use it when handling
5661 $orig_eax.
5662
5663 2015-02-20 Pedro Alves <palves@redhat.com>
5664
5665 * thread-db.c: Include "nat/linux-procfs.h".
5666 (thread_db_init): Skip listing new threads if the kernel supports
5667 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5668
5669 2015-02-20 Pedro Alves <palves@redhat.com>
5670
5671 * linux-low.c (status_pending_p_callback): Use ptid_match.
5672
5673 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5674
5675 PR breakpoints/16812
5676 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5677 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5678 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5679
5680 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5681
5682 PR breakpoints/15956
5683 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5684
5685 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5686
5687 * linux-low.c (linux_low_btrace_conf): Print size.
5688 * server.c (handle_btrace_conf_general_set): New.
5689 (hanle_general_set): Call handle_btrace_conf_general_set.
5690 (handle_query): Report Qbtrace-conf:bts:size as supported.
5691
5692 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5693
5694 * linux-low.c (linux_low_enable_btrace): Update parameters.
5695 (linux_low_btrace_conf): New.
5696 (linux_target_ops)<to_btrace_conf>: Initialize.
5697 * server.c (current_btrace_conf): New.
5698 (handle_btrace_enable): Rename to ...
5699 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5700 to target_enable_btrace. Update comment. Update users.
5701 (handle_qxfer_btrace_conf): New.
5702 (qxfer_packets): Add btrace-conf entry.
5703 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5704 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5705 (target_ops)<read_btrace_conf>: New.
5706 (target_enable_btrace): Update parameters.
5707 (target_read_btrace_conf): New.
5708
5709 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5710
5711 * server.c (handle_btrace_general_set): Remove call to
5712 target_supports_btrace.
5713 (supported_btrace_packets): New.
5714 (handle_query): Call supported_btrace_packets.
5715 * target.h: include btrace-common.h.
5716 (btrace_target_info): Removed.
5717 (supports_btrace, target_supports_btrace): Update parameters.
5718
5719 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5720
5721 * Makefile.in (SFILES): Add common/btrace-common.c.
5722 (OBS): Add common/btrace-common.o.
5723 (btrace-common.o): Add build rules.
5724 * linux-low: Include btrace-common.h.
5725 (linux_low_read_btrace): Use struct btrace_data. Call
5726 btrace_data_init and btrace_data_fini.
5727
5728 2015-02-06 Pedro Alves <palves@redhat.com>
5729
5730 * thread-db.c (find_new_threads_callback): Add debug output.
5731
5732 2015-02-04 Pedro Alves <palves@redhat.com>
5733
5734 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5735 (resume_stopped_resumed_lwps): New function.
5736 (linux_wait_for_event_filtered): Use it.
5737
5738 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5739
5740 * Makefile.in (SFILES): Add linux-personality.c.
5741 (linux-personality.o): New rule.
5742 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5743 list of objects to be built.
5744 * linux-low.c: Include nat/linux-personality.h.
5745 (linux_create_inferior): Remove code to disable address space
5746 randomization (moved to ../nat/linux-personality.c). Create
5747 cleanup to disable address space randomization.
5748
5749 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5750
5751 * Makefile.in (posix-strerror.o): New rule.
5752 (mingw-strerror.o): Likewise.
5753 * configure: Regenerated.
5754 * configure.ac: Source file ../common/common.host. Initialize new
5755 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5756
5757 2015-01-14 Yao Qi <yao@codesourcery.com>
5758
5759 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5760 (ppc-linux.o): New rule.
5761 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5762 * configure.ac: AC_CHECK_FUNCS(getauxval).
5763 * config.in: Re-generated.
5764 * configure: Re-generated.
5765 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5766 ppc64_64bit_inferior_p
5767
5768 2015-01-14 Yao Qi <yao@codesourcery.com>
5769
5770 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5771 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5772 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5773 (PT_ORIG_R3, PT_TRAP): Likewise.
5774 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5775 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5776 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5777
5778 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5779
5780 * i387-fp.c (i387_cache_to_xsave): In look over
5781 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5782 zmmh_low_space field by use of zmmh_high_space.
5783
5784 2015-01-09 Pedro Alves <palves@redhat.com>
5785
5786 * linux-low.c (step_over_bkpt): Move higher up in the file.
5787 (handle_extended_wait): Don't store the stop_pc here.
5788 (get_stop_pc): Adjust comments and rename to ...
5789 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5790 stopped for a software breakpoint or hardware breakpoint.
5791 (thread_still_has_status_pending_p): New function.
5792 (status_pending_p_callback): Use
5793 thread_still_has_status_pending_p. If the event is no longer
5794 interesting, resume the LWP.
5795 (handle_tracepoints): Add assert.
5796 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5797 (wstatus_maybe_breakpoint): New function.
5798 (cancel_breakpoint): Delete function.
5799 (check_stopped_by_watchpoint): New function, factored out from
5800 linux_low_filter_event.
5801 (lp_status_maybe_breakpoint): Delete function.
5802 (linux_low_filter_event): Remove filter_ptid argument.
5803 Leave thread group exits pending here. Store the LWP's stop PC.
5804 Always leave events pending.
5805 (linux_wait_for_event_filtered): Pull all events out of the
5806 kernel, and leave them all pending.
5807 (count_events_callback, select_event_lwp_callback): Consider all
5808 events.
5809 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5810 (select_event_lwp): Only give preference to the stepping LWP in
5811 all-stop mode. Adjust comments.
5812 (ignore_event): New function.
5813 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5814 references to cancel_breakpoints. Adjust to renames. Also give
5815 equal priority to all LWPs that have had events in non-stop mode.
5816 If reporting a software breakpoint event, unadjust the LWP's PC.
5817 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5818 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5819 Adjust.
5820 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5821 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5822 (linux_stopped_by_watchpoint): Adjust.
5823 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5824 * linux-low.h (enum lwp_stop_reason): New.
5825 (struct lwp_info) <stop_pc>: Adjust comment.
5826 <stopped_by_watchpoint>: Delete field.
5827 <stop_reason>: New field.
5828 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5829 * mem-break.c (software_breakpoint_inserted_here)
5830 (hardware_breakpoint_inserted_here): New function.
5831 * mem-break.h (software_breakpoint_inserted_here)
5832 (hardware_breakpoint_inserted_here): Declare.
5833 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5834 (cancel_breakpoints): Delete.
5835 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5836 (upload_fast_traceframes): Remove references to
5837 cancel_breakpoints.
5838
5839 2015-01-09 Pedro Alves <palves@redhat.com>
5840
5841 * thread-db.c (find_new_threads_callback): Ignore thread if the
5842 kernel thread ID is -1.
5843
5844 2015-01-09 Pedro Alves <palves@redhat.com>
5845
5846 * linux-low.c (linux_attach_fail_reason_string): Move to
5847 nat/linux-ptrace.c, and rename.
5848 (linux_attach_lwp): Update comment.
5849 (attach_proc_task_lwp_callback): New function.
5850 (linux_attach): Adjust to rename and use
5851 linux_proc_attach_tgid_threads.
5852 (linux_attach_fail_reason_string): Delete declaration.
5853
5854 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5855
5856 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5857 * server.c (gdbserver_version): Likewise.
5858
5859 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5860
5861 * remote-utils.c: Include ctype.h.
5862 (input_interrupt): Explicitly handle the case when the char
5863 received is the NUL byte. Improve the printing of non-ASCII
5864 characters.
5865
5866 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5867
5868 * linux-low.c (linux_low_filter_event): Update call to
5869 linux_enable_event_reporting following the addition of
5870 a new parameter to that function.
5871
5872 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5873
5874 PR server/17457
5875 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5876 (AARCH64_FPCR_REGNO): Likewise.
5877 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5878 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5879 (aarch64_store_fpregset): Likewise.
5880
5881 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5882
5883 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5884 Remove FIXME comment about assumption about N.
5885
5886 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5887
5888 * configure.ac: If large-file support is disabled in GDBserver,
5889 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5890 * configure: Regenerate.
5891
5892 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5893
5894 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5895 warning upon ENODATA from ptrace.
5896 * linux-s390-low.c (s390_store_tdb): New.
5897 (s390_regsets): Add regset for NT_S390_TDB.
5898
5899 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5900
5901 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5902 without a fill_function.
5903 * linux-s390-low.c (s390_fill_last_break): Remove.
5904 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5905 (s390_arch_setup): Use regset's size instead of fill_function for
5906 loop end condition.
5907
5908 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5909
5910 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5911 the regset's store function when ptrace returned an error.
5912 * regcache.c (get_thread_regcache): Invalidate register cache
5913 before fetching inferior's registers.
5914
5915 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5916
5917 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5918 while-loop as for-loop.
5919 (regsets_store_inferior_registers): Likewise.
5920
5921 2014-11-28 Yao Qi <yao@codesourcery.com>
5922
5923 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5924 * config.in, configure: Re-generate.
5925 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5926 is defined.
5927
5928 2014-11-21 Yao Qi <yao@codesourcery.com>
5929
5930 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5931 (AC_CHECK_HEADERS): Remove malloc.h.
5932 * configure: Re-generated.
5933 * config.in: Re-generated.
5934 * server.h: Don't include alloca.h and malloc.h.
5935 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5936 Don't include malloc.h.
5937
5938 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5939
5940 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5941 corresponding ERRNO check in same block.
5942
5943 2014-11-12 Pedro Alves <palves@redhat.com>
5944
5945 * server.c (cont_thread): Update comment.
5946 (start_inferior, attach_inferior): No longer clear cont_thread.
5947 (handle_v_cont): No longer set cont_thread.
5948 (captured_main): Clear cont_thread each time a GDB connects.
5949
5950 2014-11-12 Pedro Alves <palves@redhat.com>
5951
5952 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5953 thread, and don't resume all threads if the Hc thread has exited.
5954
5955 2014-11-12 Pedro Alves <palves@redhat.com>
5956
5957 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5958 the process group instead of to a specific LWP.
5959
5960 2014-10-15 Pedro Alves <palves@redhat.com>
5961
5962 PR server/17487
5963 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5964 parameter.
5965 (arm_set_thread_context): Delete.
5966 (the_low_target): Adjust.
5967 * win32-i386-low.c (debug_registers_changed)
5968 (debug_registers_used): Delete.
5969 (update_debug_registers_callback): New function.
5970 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5971 needing to update their debug registers.
5972 (win32_get_current_dr): New function.
5973 (x86_dr_low_get_addr, x86_dr_low_get_control)
5974 (x86_dr_low_get_status): Fetch the debug register from the thread
5975 record's context.
5976 (i386_initial_stuff): Adjust.
5977 (i386_get_thread_context): Remove current_event parameter. Don't
5978 clear debug_registers_changed nor copy DR values to
5979 debug_reg_state.
5980 (i386_set_thread_context): Delete.
5981 (i386_prepare_to_resume): New function.
5982 (i386_thread_added): Mark the thread as needing to update irs
5983 debug registers.
5984 (the_low_target): Remove i386_set_thread_context and install
5985 i386_prepare_to_resume.
5986 * win32-low.c (win32_get_thread_context): Adjust.
5987 (win32_set_thread_context): Use SetThreadContext
5988 directly.
5989 (win32_prepare_to_resume): New function.
5990 (win32_require_context): New function, factored out from ...
5991 (thread_rec): ... this.
5992 (continue_one_thread): Call win32_prepare_to_resume on each thread
5993 we're about to continue.
5994 (win32_resume): Call win32_prepare_to_resume on the event thread.
5995 * win32-low.h (struct win32_thread_info)
5996 <debug_registers_changed>: New field.
5997 (struct win32_target_ops): Change prototype of set_thread_context,
5998 delete set_thread_context and add prepare_to_resume.
5999 (win32_require_context): New declaration.
6000
6001 2014-10-08 Gary Benson <gbenson@redhat.com>
6002
6003 * server.h: Do not include common-exceptions.h.
6004
6005 2014-10-08 Gary Benson <gbenson@redhat.com>
6006
6007 * server.h: Do not include cleanups.h.
6008
6009 2014-09-30 James Hogan <james.hogan@imgtec.com>
6010
6011 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6012 mips64-dsp-linux.c.
6013
6014 2014-09-23 Yao Qi <yao@codesourcery.com>
6015
6016 * linux-low.c (lp_status_maybe_breakpoint): New function.
6017 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6018 (count_events_callback): Likewise.
6019 (select_event_lwp_callback): Likewise.
6020 (cancel_breakpoints_callback): Likewise.
6021
6022 2014-09-19 Don Breazeal <donb@codesourcery.com>
6023
6024 * linux-low.c (handle_extended_wait): Call
6025 linux_ptrace_get_extended_event.
6026 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6027 linux_is_extended_waitstatus.
6028
6029 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6030
6031 * Makefile.in (CPPFLAGS): Define.
6032 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6033 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6034
6035 2014-09-16 Gary Benson <gbenson@redhat.com>
6036
6037 * inferiors.h (current_inferior): Renamed as...
6038 (current_thread): New variable. All uses updated.
6039 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6040 (maybe_move_out_of_jump_pad): Likewise.
6041 (cancel_breakpoint): Likewise.
6042 (linux_low_filter_event): Likewise.
6043 (wait_for_sigstop): Likewise.
6044 (linux_resume_one_lwp): Likewise.
6045 (need_step_over_p): Likewise.
6046 (start_step_over): Likewise.
6047 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6048 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6049 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6050 and save_inferior as saved_thread.
6051 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6052 saved_thread.
6053 (regcache_invalidate_thread): Likewise.
6054 * remote-utils.c (prepare_resume_reply): Likewise.
6055 * thread-db.c (thread_db_get_tls_address): Likewise.
6056 (disable_thread_event_reporting): Likewise.
6057 (remove_thread_event_breakpoints): Likewise.
6058 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6059 as saved_thread.
6060 * target.h (set_desired_inferior): Renamed as...
6061 (set_desired_thread): New declaration. All uses updated.
6062 * server.c (myresume): Updated comment to reference thread instead
6063 of inferior.
6064 (handle_serial_event): Likewise.
6065 (handle_target_event): Likewise.
6066
6067 2014-09-12 Tom Tromey <tromey@redhat.com>
6068 Gary Benson <gbenson@redhat.com>
6069
6070 * regcache.h: Include common-regcache.h.
6071 (regcache_read_pc): Don't declare.
6072 * regcache.c (get_thread_regcache_for_ptid): New function.
6073
6074 2014-09-11 Tom Tromey <tromey@redhat.com>
6075 Gary Benson <gbenson@redhat.com>
6076
6077 * symbol.c: New file.
6078 * Makefile.in (SFILES): Add symbol.c.
6079 (OBS): Add symbol.o.
6080
6081 2014-09-11 Gary Benson <gbenson@redhat.com>
6082
6083 * target.c (target_stop_ptid, target_continue_ptid): New
6084 functions.
6085
6086 2014-09-11 Tom Tromey <tromey@redhat.com>
6087 Gary Benson <gbenson@redhat.com>
6088
6089 * target.h: Include target/target.h.
6090 * target.c (target_read_memory, target_read_uint32)
6091 (target_write_memory): New functions.
6092
6093 2014-09-11 Gary Benson <gbenson@redhat.com>
6094
6095 * server.h (debug_hw_points): Don't declare.
6096 * server.c (debug_hw_points): Don't define. Replace all uses
6097 with show_debug_regs.
6098 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6099 all uses with show_debug_regs.
6100
6101 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6102
6103 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6104 endianness into account.
6105 (ppc_supply_ptrace_register): Likewise.
6106
6107 2014-09-03 James Hogan <james.hogan@imgtec.com>
6108
6109 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6110 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6111
6112 2014-09-03 Gary Benson <gbenson@redhat.com>
6113
6114 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6115 ALL_DEBUG_ADDRESS_REGISTERS.
6116
6117 2014-09-02 Gary Benson <gbenson@redhat.com>
6118
6119 * i386-low.h: Renamed as...
6120 * x86-low.h: New file. All type, function and variable name
6121 prefixes changed from "i386_" to "x86_". All references updated.
6122 * i386-low.c: Renamed as...
6123 * x86-low.c: New file. All type, function and variable name
6124 prefixes changed from "i386_" to "x86_". All references updated.
6125
6126 2014-09-02 Gary Benson <gbenson@redhat.com>
6127
6128 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6129 (x86_linux_new_thread): Likewise.
6130
6131 2014-08-29 Gary Benson <gbenson@redhat.com>
6132
6133 * server.h (setjmp.h): Do not include.
6134 (toplevel): Do not declare.
6135 (common-exceptions.h): Include.
6136 (cleanups.h): Likewise.
6137 * server.c (toplevel): Do not define.
6138 (exit_code): New static global.
6139 (detach_or_kill_for_exit_cleanup): New function.
6140 (main): New function. Original main renamed to...
6141 (captured_main): New function.
6142 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6143
6144 2014-08-29 Gary Benson <gbenson@redhat.com>
6145
6146 * Makefile.in (SFILES): Add common/common-exceptions.c.
6147 (OBS): Add common-exceptions.o.
6148 (common-exceptions.o): New rule.
6149 * utils.c (prepare_to_throw_exception): New function.
6150
6151 2014-08-29 Gary Benson <gbenson@redhat.com>
6152
6153 * config.in: Regenerate.
6154 * configure: Likewise.
6155
6156 2014-08-29 Gary Benson <gbenson@redhat.com>
6157
6158 * Makefile.in (SFILES): Add common/cleanups.c.
6159 (OBS): cleanups.o.
6160 (cleanups.o): New rule.
6161
6162 2014-08-29 Gary Benson <gbenson@redhat.com>
6163
6164 * utils.c (internal_vwarning): New function.
6165
6166 2014-08-28 Gary Benson <gbenson@redhat.com>
6167
6168 * utils.h (fatal): Remove declaration.
6169 * utils.c (fatal): Remove function.
6170
6171 2014-08-28 Gary Benson <gbenson@redhat.com>
6172
6173 * tracepoint.c (gdb_agent_init): Replace fatal with
6174 perror_with_name.
6175 (initialize_tracepoint): Likewise.
6176
6177 2014-08-28 Gary Benson <gbenson@redhat.com>
6178
6179 * remote-utils.c (remote_prepare): Replace fatal with error.
6180
6181 2014-08-28 Gary Benson <gbenson@redhat.com>
6182
6183 * linux-low.c (linux_async): Replace fatal with warning.
6184 Tidy up and return.
6185 (linux_start_non_stop): Return -1 if linux_async failed.
6186
6187 2014-08-28 Gary Benson <gbenson@redhat.com>
6188
6189 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6190 gdb_assert.
6191 (i386_dr_low_get_addr): Remove vague comment.
6192 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6193 gdb_assert.
6194
6195 2014-08-28 Gary Benson <gbenson@redhat.com>
6196
6197 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6198 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6199 internal_error.
6200 (linux_resume_one_lwp): Likewise.
6201 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6202 gdb_assert.
6203 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6204 with internal_error.
6205 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6206 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6207 (find_register_by_name): Replace fatal with internal_error.
6208 (find_regno): Likewise.
6209 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6210 * thread-db.c (thread_db_create_event): Likewise.
6211 (thread_db_load_search): Likewise.
6212 (try_thread_db_load_1): Likewise.
6213 * tracepoint.c (get_jump_space_head): Replace fatal with
6214 internal_error.
6215 (claim_trampoline_space): Likewise.
6216 (have_fast_tracepoint_trampoline_buffer): Likewise.
6217 (cmd_qtstart): Likewise.
6218 (stop_tracing): Likewise.
6219 (fast_tracepoint_collecting): Likewise.
6220 (target_malloc): Likewise.
6221 (download_tracepoint): Likewise.
6222 (download_trace_state_variables): Replace check with gdb_assert.
6223 (upload_fast_traceframes): Replace fatal with internal_error.
6224
6225 2014-08-19 Tom Tromey <tromey@redhat.com>
6226 Gary Benson <gbenson@redhat.com>
6227
6228 * Makefile.in (SFILES): Add common/common-debug.c.
6229 (OBS): Add common-debug.o.
6230 (common-debug.o): New rule.
6231 * debug.h (debug_printf): Don't declare.
6232 * debug.c (debug_printf): Renamed and rewritten as...
6233 (debug_vprintf): New function.
6234
6235 2014-08-19 Gary Benson <gbenson@redhat.com>
6236
6237 * utils.h: Do not include print-utils.h.
6238
6239 2014-08-19 Tom Tromey <tromey@redhat.com>
6240 Gary Benson <gbenson@redhat.com>
6241
6242 * server.h: Add static assertion.
6243 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6244
6245 2014-08-19 Tom Tromey <tromey@redhat.com>
6246 Gary Benson <gbenson@redhat.com>
6247
6248 * Makefile.in (SFILES): Add common/errors.c.
6249 (OBS): Add errors.o.
6250 (IPA_OBS): Add errors-ipa.o.
6251 (errors.o): New rule.
6252 (errors-ipa.o): Likewise.
6253 * utils.h (perror_with_name, error, warning): Don't declare.
6254 * utils.c (warning): Renamed and rewritten as...
6255 (vwarning): New function.
6256 (error): Renamed and rewritten as...
6257 (verror): New function.
6258 (internal_error): Renamed and rewritten as...
6259 (internal_verror): New function.
6260
6261 2014-08-07 Gary Benson <gbenson@redhat.com>
6262
6263 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6264 * configure: Regenerate.
6265 * config.in: Likewise.
6266 * server.h: Do not include errno.h.
6267 * event-loop.c: Likewise.
6268 * hostio-errno.c: Likewise.
6269 * linux-low.c: Likewise.
6270 * remote-utils.c: Likewise.
6271 * spu-low.c: Likewise.
6272 * utils.c: Likewise.
6273 * gdbreplay.c: Unconditionally include errno.h.
6274
6275 2014-08-07 Gary Benson <gbenson@redhat.com>
6276
6277 * server.h: Do not include string.h.
6278 * event-loop.c: Likewise.
6279 * linux-low.c: Likewise.
6280 * regcache.c: Likewise.
6281 * remote-utils.c: Likewise.
6282 * spu-low.c: Likewise.
6283 * utils.c: Likewise.
6284
6285 2014-08-07 Gary Benson <gbenson@redhat.com>
6286
6287 * server.h: Do not include gdb_assert.h.
6288
6289 2014-08-07 Gary Benson <gbenson@redhat.com>
6290
6291 * server.h: Do not include common-utils.h.
6292
6293 2014-08-07 Gary Benson <gbenson@redhat.com>
6294
6295 * server.h: Do not include ptid.h.
6296 * notif.h: Likewise.
6297
6298 2014-08-07 Gary Benson <gbenson@redhat.com>
6299
6300 * server.h: Do not include gdb_locale.h.
6301
6302 2014-08-07 Gary Benson <gbenson@redhat.com>
6303
6304 * server.h: Do not include gdb/signals.h.
6305 * win32-low.c: Likewise.
6306
6307 2014-08-07 Gary Benson <gbenson@redhat.com>
6308
6309 * server.h: Do not include pathmax.h.
6310
6311 2014-08-07 Gary Benson <gbenson@redhat.com>
6312
6313 * server.h: Do not include libiberty.h.
6314 * linux-bfin-low.c: Likewise.
6315
6316 2014-08-07 Gary Benson <gbenson@redhat.com>
6317
6318 * server.h: Do not include ansidecl.h.
6319
6320 2014-08-07 Gary Benson <gbenson@redhat.com>
6321
6322 * linux-x86-low.c: Do not include stddef.h.
6323 * lynx-ppc-low.c: Likewise.
6324 * tracepoint.c: Likewise.
6325
6326 2014-08-07 Gary Benson <gbenson@redhat.com>
6327
6328 * server.h: Do not include stdarg.h.
6329 * nto-low.c: Likewise.
6330
6331 2014-08-07 Gary Benson <gbenson@redhat.com>
6332
6333 * server.h: Do not include stdlib.h.
6334 * inferiors.c: Likewise.
6335 * linux-low.c: Likewise.
6336 * regcache.c: Likewise.
6337 * spu-low.c: Likewise.
6338 * tracepoint.c: Likewise.
6339 * utils.c: Likewise.
6340
6341 2014-08-07 Gary Benson <gbenson@redhat.com>
6342
6343 * server.h: Do not include stdio.h.
6344 * linux-low.c: Likewise.
6345 * remote-utils.c: Likewise.
6346 * spu-low.c: Likewise.
6347 * utils.c: Likewise.
6348 * wincecompat.c: Likewise.
6349
6350 2014-08-06 Gary Benson <gbenson@redhat.com>
6351
6352 * regcache.c (init_register_cache): Move conditionals inside if.
6353
6354 2014-08-06 Gary Benson <gbenson@redhat.com>
6355
6356 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6357
6358 2014-07-31 Gary Benson <gbenson@redhat.com>
6359
6360 * ax.h: Do not include server.h.
6361 * gdbthread.h: Likewise.
6362 * lynx-low.h: Likewise.
6363 * notif.h: Likewise.
6364
6365 2014-07-30 Gary Benson <gbenson@redhat.com>
6366
6367 * server.h: Include common-defs.h.
6368 Do not include config.h or build-gnulib-gdbserver/config.h.
6369
6370 2014-07-30 Gary Benson <gbenson@redhat.com>
6371
6372 * hostio-errno.c: Move server.h to top of includes list.
6373 * inferiors.c: Likewise.
6374 * linux-x86-low.c: Likewise.
6375 * notif.c: Include server.h.
6376
6377 2014-07-24 Tom Tromey <tromey@redhat.com>
6378 Gary Benson <gbenson@redhat.com>
6379
6380 * server.h (CORE_ADDR): Now unsigned.
6381
6382 2014-07-16 Pedro Alves <palves@redhat.com>
6383
6384 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6385
6386 2014-07-15 Pedro Alves <palves@redhat.com>
6387
6388 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6389 copy.
6390
6391 2014-07-11 Pedro Alves <palves@redhat.com>
6392
6393 * linux-low.c (kill_wait_lwp): New function, based on
6394 kill_one_lwp_callback, but use my_waitpid directly.
6395 (kill_one_lwp_callback, linux_kill): Use it.
6396
6397 2014-06-23 Pedro Alves <palves@redhat.com>
6398
6399 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6400 before setting DR0..DR3.
6401
6402 2014-06-20 Gary Benson <gbenson@redhat.com>
6403
6404 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6405 * configure: Regenerated.
6406 * config.in: Likewise.
6407
6408 2014-06-20 Gary Benson <gbenson@redhat.com>
6409
6410 * Makefile.in (SFILES): Update locations for files moved
6411 from common to nat.
6412 (object file files): Reordered.
6413
6414 2014-06-20 Gary Benson <gbenson@redhat.com>
6415
6416 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6417 (i386_dr_low_set_addr): Likewise.
6418 (i386_dr_low_get_addr): Likewise.
6419 (i386_dr_low_can_set_control): Likewise.
6420 (i386_dr_low_set_control): Likewise.
6421 (i386_dr_low_get_control): Likewise.
6422 (i386_dr_low_get_status): Likewise.
6423 (i386_get_debug_register_length): Likewise.
6424 * linux-x86-low.c (i386_dr_low_set_addr):
6425 Changed signature. Made static.
6426 (i386_dr_low_get_addr): Likewise.
6427 (i386_dr_low_set_control): Likewise.
6428 (i386_dr_low_get_control): Likewise.
6429 (i386_dr_low_get_status): Likewise.
6430 (i386_dr_low): New global variable.
6431 * win32-i386-low.c (i386_dr_low_set_addr):
6432 Changed signature. Made static.
6433 (i386_dr_low_get_addr): Likewise.
6434 (i386_dr_low_set_control): Likewise.
6435 (i386_dr_low_get_control): Likewise.
6436 (i386_dr_low_get_status): Likewise.
6437 (i386_dr_low): New global variable.
6438
6439 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6440
6441 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6442 * Makefile.in (AR, AR_FLAGS): Define.
6443 * configure: Regenerate.
6444
6445 2014-06-19 Gary Benson <gbenson@redhat.com>
6446
6447 * Makefile.in (i386-dregs.o): New rule.
6448 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6449 * i386-low.c (target.h): Remove include.
6450 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6451 (DR_CONTROL_SHIFT): Likewise.
6452 (DR_CONTROL_SIZE): Likewise.
6453 (DR_RW_EXECUTE): Likewise.
6454 (DR_RW_WRITE): Likewise.
6455 (DR_RW_READ): Likewise.
6456 (DR_RW_IORW): Likewise.
6457 (DR_LEN_1): Likewise.
6458 (DR_LEN_2): Likewise.
6459 (DR_LEN_4): Likewise.
6460 (DR_LEN_8): Likewise.
6461 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6462 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6463 (DR_ENABLE_SIZE): Likewise.
6464 (DR_LOCAL_SLOWDOWN): Likewise.
6465 (DR_GLOBAL_SLOWDOWN): Likewise.
6466 (DR_CONTROL_RESERVED): Likewise.
6467 (I386_DR_CONTROL_MASK): Likewise.
6468 (I386_DR_VACANT): Likewise.
6469 (I386_DR_LOCAL_ENABLE): Likewise.
6470 (I386_DR_GLOBAL_ENABLE): Likewise.
6471 (I386_DR_DISABLE): Likewise.
6472 (I386_DR_SET_RW_LEN): Likewise.
6473 (I386_DR_GET_RW_LEN): Likewise.
6474 (I386_DR_WATCH_HIT): Likewise.
6475 (i386_wp_op_t): Likewise.
6476 (i386_show_dr): Likewise.
6477 (i386_length_and_rw_bits): Likewise.
6478 (i386_insert_aligned_watchpoint): Likewise.
6479 (i386_remove_aligned_watchpoint): Likewise.
6480 (i386_handle_nonaligned_watchpoint): Likewise.
6481 i386_update_inferior_debug_regs(): Likewise.
6482 (i386_dr_insert_watchpoint): Likewise.
6483 (i386_dr_remove_watchpoint): Likewise.
6484 (i386_dr_region_ok_for_watchpoint): Likewise.
6485 (i386_dr_stopped_data_address): Likewise.
6486 (i386_dr_stopped_by_watchpoint): Likewise.
6487
6488 2014-06-19 Gary Benson <gbenson@redhat.com>
6489
6490 * i386-low.c (i386_dr_show): Renamed to
6491 i386_show_dr and made static. All uses updated.
6492 (i386_dr_length_and_rw_bits): Renamed to
6493 i386_length_and_rw_bits and made static.
6494 All uses updated.
6495 (i386_dr_insert_aligned_watchpoint): Renamed to
6496 i386_insert_aligned_watchpoint and made static.
6497 All uses updated.
6498 (i386_dr_remove_aligned_watchpoint): Renamed to
6499 i386_remove_aligned_watchpoint and made static.
6500 All uses updated.
6501 (i386_dr_update_inferior_debug_regs): Renamed to
6502 i386_update_inferior_debug_regs and made static.
6503 All uses updated.
6504
6505 2014-06-18 Gary Benson <gbenson@redhat.com>
6506
6507 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6508 (i386_dr_low_can_set_control): Likewise.
6509 (i386_get_debug_register_length): Likewise.
6510 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6511 (i386_dr_low_can_set_control): Likewise.
6512 (i386_get_debug_register_length): Likewise.
6513
6514 2014-06-17 Gary Benson <gbenson@redhat.com>
6515
6516 * i386-low.h (i386-dregs.h): New include.
6517 (DR_FIRSTADDR): Now in i386-dregs.h.
6518 (DR_LASTADDR): Likewise.
6519 (DR_NADDR): Likewise.
6520 (DR_STATUS): Likewise.
6521 (DR_CONTROL): Likewise.
6522 (i386_debug_reg_state): Likewise.
6523 (i386_dr_insert_watchpoint): Likewise.
6524 (i386_dr_remove_watchpoint): Likewise.
6525 (i386_dr_region_ok_for_watchpoint): Likewise.
6526 (i386_dr_stopped_data_address): Likewise.
6527 (i386_dr_stopped_by_watchpoint): Likewise.
6528 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6529
6530 2014-06-18 Gary Benson <gbenson@redhat.com>
6531
6532 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6533 i386_dr_insert_watchpoint.
6534 (i386_low_remove_watchpoint): Renamed to
6535 i386_dr_remove_watchpoint.
6536 (i386_low_region_ok_for_watchpoint): Renamed to
6537 i386_dr_region_ok_for_watchpoint.
6538 (i386_low_stopped_data_address): Renamed to
6539 i386_dr_stopped_data_address.
6540 (i386_low_stopped_by_watchpoint): Renamed to
6541 i386_dr_stopped_by_watchpoint.
6542 * i386-low.c (i386_show_dr): Renamed to
6543 i386_dr_show and made nonstatic. All uses updated.
6544 (i386_length_and_rw_bits): Renamed to
6545 i386_dr_length_and_rw_bits and made nonstatic.
6546 All uses updated.
6547 (i386_insert_aligned_watchpoint): Renamed to
6548 i386_dr_insert_aligned_watchpoint and made nonstatic.
6549 All uses updated.
6550 (i386_remove_aligned_watchpoint): Renamed to
6551 i386_dr_remove_aligned_watchpoint and made nonstatic.
6552 All uses updated.
6553 (i386_update_inferior_debug_regs): Renamed to
6554 i386_dr_update_inferior_debug_regs and made nonstatic.
6555 All uses updated.
6556 (i386_low_insert_watchpoint): Renamed to
6557 i386_dr_insert_watchpoint. All uses updated.
6558 (i386_low_remove_watchpoint): Renamed to
6559 i386_dr_remove_watchpoint. All uses updated.
6560 (i386_low_region_ok_for_watchpoint): Renamed to
6561 i386_dr_region_ok_for_watchpoint. All uses updated.
6562 (i386_low_stopped_data_address): Renamed to
6563 i386_dr_stopped_data_address. All uses updated.
6564 (i386_low_stopped_by_watchpoint): Renamed to
6565 i386_dr_stopped_by_watchpoint. All uses updated.
6566
6567 2014-06-18 Gary Benson <gbenson@redhat.com>
6568
6569 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6570 (i386_dr_low_can_set_control): Likewise.
6571 (i386_insert_aligned_watchpoint): New check.
6572
6573 2014-06-18 Gary Benson <gbenson@redhat.com>
6574
6575 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6576 Renamed to state.
6577
6578 2014-06-18 Gary Benson <gbenson@redhat.com>
6579
6580 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6581 instead of fatal and error.
6582 (i386_handle_nonaligned_watchpoint): Likewise.
6583
6584 2014-06-18 Gary Benson <gbenson@redhat.com>
6585
6586 * i386-low.c (i386_get_debug_register_length): New macro.
6587 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6588 (i386_show_dr): Use debug_printf instead of fprintf. Use
6589 phex to format values.
6590
6591 2014-06-18 Gary Benson <gbenson@redhat.com>
6592
6593 * i386-low.h: Comment changes.
6594 * i386-low.c: Likewise.
6595
6596 2014-06-18 Gary Benson <gbenson@redhat.com>
6597
6598 * i386-low.c: Whitespace changes.
6599
6600 2014-06-12 Tom Tromey <tromey@redhat.com>
6601
6602 * utils.c (freeargv): Remove.
6603
6604 2014-06-12 Tom Tromey <tromey@redhat.com>
6605
6606 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6607 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6608 (parse_debug_format_options): Likewise.
6609 (gdbserver_usage): Likewise.
6610 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6611 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6612 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6613 against libiberty.
6614 ($(LIBGNU)): Depend on libiberty.
6615 (all-lib): Recurse into all subdirs.
6616 (install-only): Invoke "install" target in subdirs.
6617 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6618 targets.
6619 * configure: Rebuild.
6620 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6621 for vasprintf, vsnprintf, or gettimeofday.
6622 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6623 srv_tgtobj.
6624
6625 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6626
6627 * development.sh: Delete.
6628 * Makefile.in (config.status): Adjust dependency on development.sh.
6629 * configure.ac: Adjust development.sh source call.
6630 * configure: Regenerate.
6631
6632 2014-06-02 Pedro Alves <palves@redhat.com>
6633
6634 * ax.c (gdb_free_agent_expr): New function.
6635 * ax.h (gdb_free_agent_expr): New declaration.
6636 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6637 list.
6638 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6639 static.
6640 (clear_breakpoint_conditions_and_commands): New function.
6641 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6642 (clear_breakpoint_conditions_and_commands): New declaration.
6643
6644 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6645
6646 * linux-aarch64-low.c (asm/ptrace.h): Include.
6647
6648 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6649
6650 Fix TLS access for -static -pthread.
6651 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6652 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6653 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6654
6655 2014-05-20 Pedro Alves <palves@redhat.com>
6656
6657 * linux-aarch64-low.c (aarch64_insert_point)
6658 (aarch64_remove_point): No longer check whether the type is
6659 supported here. Adjust to new interface.
6660 (the_low_target): Install aarch64_supports_z_point_type as
6661 supports_z_point_type method.
6662 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6663 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6664 instead of a Z packet char. Adjust.
6665 (arm_supports_z_point_type): New function.
6666 (arm_insert_point, arm_remove_point): Adjust to new interface.
6667 (the_low_target): Install arm_supports_z_point_type.
6668 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6669 (cris_insert_point, cris_remove_point): Adjust to new interface.
6670 Don't check whether the type is supported here.
6671 (the_low_target): Install cris_supports_z_point_type.
6672 * linux-low.c (linux_supports_z_point_type): New function.
6673 (linux_insert_point, linux_remove_point): Adjust to new interface.
6674 * linux-low.h (struct linux_target_ops) <insert_point,
6675 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6676 raw_breakpoint pointer parameter.
6677 <supports_z_point_type>: New method.
6678 * linux-mips-low.c (mips_supports_z_point_type): New function.
6679 (mips_insert_point, mips_remove_point): Adjust to new interface.
6680 Use mips_supports_z_point_type.
6681 (the_low_target): Install mips_supports_z_point_type.
6682 * linux-ppc-low.c (the_low_target): Install NULL as
6683 supports_z_point_type method.
6684 * linux-s390-low.c (the_low_target): Install NULL as
6685 supports_z_point_type method.
6686 * linux-sparc-low.c (the_low_target): Install NULL as
6687 supports_z_point_type method.
6688 * linux-x86-low.c (x86_supports_z_point_type): New function.
6689 (x86_insert_point): Adjust to new insert_point interface. Use
6690 insert_memory_breakpoint. Adjust to new
6691 i386_low_insert_watchpoint interface.
6692 (x86_remove_point): Adjust to remove_point interface. Use
6693 remove_memory_breakpoint. Adjust to new
6694 i386_low_remove_watchpoint interface.
6695 (the_low_target): Install x86_supports_z_point_type.
6696 * lynx-low.c (lynx_target_ops): Install NULL as
6697 supports_z_point_type callback.
6698 * nto-low.c (nto_supports_z_point_type): New.
6699 (nto_insert_point, nto_remove_point): Adjust to new interface.
6700 (nto_target_ops): Install nto_supports_z_point_type.
6701 * mem-break.c: Adjust intro comment.
6702 (struct raw_breakpoint) <raw_type, size>: New fields.
6703 <inserted>: Update comment.
6704 <shlib_disabled>: Delete field.
6705 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6706 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6707 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6708 (raw_bkpt_type_to_target_hw_bp_type): New function.
6709 (find_enabled_raw_code_breakpoint_at): New function.
6710 (find_raw_breakpoint_at): New type and size parameters. Use them.
6711 (insert_memory_breakpoint): New function, based off
6712 set_raw_breakpoint_at.
6713 (remove_memory_breakpoint): New function.
6714 (set_raw_breakpoint_at): Reimplement.
6715 (set_breakpoint): New, based on set_breakpoint_at.
6716 (set_breakpoint_at): Reimplement.
6717 (delete_raw_breakpoint): Go through the_target->remove_point
6718 instead of assuming memory breakpoints.
6719 (find_gdb_breakpoint_at): Delete.
6720 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6721 (find_gdb_breakpoint): New function.
6722 (set_gdb_breakpoint_at): Delete.
6723 (z_type_supported): New function.
6724 (set_gdb_breakpoint_1): New function, loosely based off
6725 set_gdb_breakpoint_at.
6726 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6727 (delete_gdb_breakpoint_at): Delete.
6728 (delete_gdb_breakpoint_1): New function, loosely based off
6729 delete_gdb_breakpoint_at.
6730 (delete_gdb_breakpoint): New function.
6731 (clear_gdb_breakpoint_conditions): Rename to ...
6732 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6733 breakpoint.
6734 (add_condition_to_breakpoint): Make static.
6735 (add_breakpoint_condition): Take a struct breakpoint pointer
6736 instead of an address. Adjust.
6737 (gdb_condition_true_at_breakpoint): Rename to ...
6738 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6739 z_type parameter.
6740 (gdb_condition_true_at_breakpoint): Reimplement.
6741 (add_breakpoint_commands): Take a struct breakpoint pointer
6742 instead of an address. Adjust.
6743 (gdb_no_commands_at_breakpoint): Rename to ...
6744 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6745 parameter. Return true if no breakpoint was found. Change debug
6746 output.
6747 (gdb_no_commands_at_breakpoint): Reimplement.
6748 (run_breakpoint_commands): Rename to ...
6749 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6750 and change return type to boolean.
6751 (run_breakpoint_commands): New function.
6752 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6753 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6754 breakpoint. Go through the_target->remove_point instead of
6755 assuming memory breakpoint.
6756 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6757 software and hardware breakpoints.
6758 (reinsert_raw_breakpoint): Go through the_target->insert_point
6759 instead of assuming memory breakpoint.
6760 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6761 software and hardware breakpoints.
6762 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6763 Check both software and hardware breakpoints.
6764 (validate_inserted_breakpoint): Assert the breakpoint is a
6765 software breakpoint. Set the inserted flag to -1 instead of
6766 setting shlib_disabled.
6767 (delete_disabled_breakpoints): Adjust.
6768 (validate_breakpoints): Only validate software breakpoints.
6769 Adjust to inserted flag change.
6770 (check_mem_read, check_mem_write): Skip breakpoint types other
6771 than software breakpoints. Adjust to inserted flag change.
6772 * mem-break.h (enum raw_bkpt_type): New enum.
6773 (raw_breakpoint, struct process_info): Forward declare.
6774 (Z_packet_to_target_hw_bp_type): Delete declaration.
6775 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6776 (set_gdb_breakpoint, delete_gdb_breakpoint)
6777 (clear_breakpoint_conditions): New declarations.
6778 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6779 (breakpoint_inserted_here): Update comment.
6780 (add_breakpoint_condition, add_breakpoint_commands): Replace
6781 address parameter with a breakpoint pointer parameter.
6782 (gdb_breakpoint_here): Update comment.
6783 (delete_gdb_breakpoint_at): Delete.
6784 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6785 * server.c (process_point_options): Take a struct breakpoint
6786 pointer instead of an address. Adjust.
6787 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6788 delete_gdb_breakpoint.
6789 * spu-low.c (spu_target_ops): Install NULL as
6790 supports_z_point_type method.
6791 * target.h: Include mem-break.h.
6792 (struct target_ops) <prepare_to_access_memory>: Update comment.
6793 <supports_z_point_type>: New field.
6794 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6795 instead of a char. Also take a raw breakpoint pointer.
6796 * win32-arm-low.c (the_low_target): Install NULL as
6797 supports_z_point_type.
6798 * win32-i386-low.c (i386_supports_z_point_type): New function.
6799 (i386_insert_point, i386_remove_point): Adjust to new interface.
6800 (the_low_target): Install i386_supports_z_point_type.
6801 * win32-low.c (win32_supports_z_point_type): New function.
6802 (win32_insert_point, win32_remove_point): Adjust to new interface.
6803 (win32_target_ops): Install win32_supports_z_point_type.
6804 * win32-low.h (struct win32_target_ops):
6805 <supports_z_point_type>: New method.
6806 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6807 instead of a char. Also take a raw breakpoint pointer.
6808
6809 2014-05-20 Pedro Alves <palves@redhat.com>
6810
6811 * mem-break.h: Include break-common.h.
6812 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6813 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6814 (Z_packet_to_target_hw_bp_type): New declaration.
6815 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6816 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6817 (Z_PACKET_ACCESS_WP): Delete macros.
6818 (Z_packet_to_hw_type): Delete function.
6819 * i386-low.h: Don't include break-common.h here.
6820 (Z_packet_to_hw_type): Delete declaration.
6821 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6822 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6823 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6824 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6825 * linux-aarch64-low.c: Don't include break-common.h here.
6826 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6827 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6828 (Z_packet_to_target_hw_bp_type): Delete function.
6829 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6830 function.
6831 (mips_insert_point, mips_remove_point): Use
6832 Z_packet_to_target_hw_bp_type.
6833
6834 2014-05-20 Pedro Alves <palves@redhat.com>
6835
6836 * linux-aarch64-low.c: Include break-common.h.
6837 (enum target_point_type): Delete.
6838 (Z_packet_to_point_type): Rename to ...
6839 (Z_packet_to_target_hw_bp_type): ... this, and return a
6840 target_hw_bp_type instead.
6841 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6842 instead of an enum target_point_type.
6843 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6844 breakpoint type.
6845 (aarch64_dr_state_insert_one_point)
6846 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6847 (aarch64_handle_aligned_watchpoint)
6848 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6849 Take an enum target_hw_bp_type instead of an enum
6850 target_point_type.
6851 (aarch64_supports_z_point_type): New function.
6852 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6853 use Z_packet_to_target_hw_bp_type.
6854
6855 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6856
6857 * configure.ac: Only use -Werror by default when DEVELOPMENT
6858 is true.
6859 * configure: Regenerate.
6860
6861 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6862
6863 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6864 * linux-x86-low.c (X86_64_USER_REGS): New.
6865 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6866
6867 2014-04-28 Yao Qi <yao@codesourcery.com>
6868
6869 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6870 name.
6871
6872 2014-04-25 Pedro Alves <palves@redhat.com>
6873
6874 PR server/16255
6875 * linux-low.c (linux_attach_fail_reason_string): New function.
6876 (linux_attach_lwp): Delete.
6877 (linux_attach_lwp_1): Rename to ...
6878 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6879 argument. Remove "initial" parameter. Return int instead of
6880 void. Don't error or warn here.
6881 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6882 failure to attach to the tgid. Call warning when failing to
6883 attach to an lwp.
6884 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6885 argument. Remove "initial" parameter. Return int instead of
6886 void. Don't error or warn here.
6887 (linux_attach_fail_reason_string): New declaration.
6888 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6889 interface change. Use linux_attach_fail_reason_string.
6890
6891 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6892 Walfred Tedeschi <walfred.tedeschi@intel.com>
6893
6894 * Makefile.in: Added rules to handle new files
6895 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6896 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6897 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6898 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6899 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6900 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6901 x32-avx512-linux.o.
6902 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6903 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6904 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6905 i386/x32-avx512.xml.
6906 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6907 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6908 i386/x32-avx512-linux.xml.
6909 * i387-fp.c (num_avx512_k_registers): New constant for number
6910 of K registers.
6911 (num_avx512_zmmh_low_registers): New constant for number of
6912 lower ZMM registers (0-15).
6913 (num_avx512_zmmh_high_registers): New constant for number of
6914 higher ZMM registers (16-31).
6915 (num_avx512_ymmh_registers): New contant for number of higher
6916 YMM registers (ymm16-31 added by avx521 on x86_64).
6917 (num_avx512_xmm_registers): New constant for number of higher
6918 XMM registers (xmm16-31 added by AVX512 on x86_64).
6919 (struct i387_xsave): Add space for AVX512 registers.
6920 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6921 Add code to handle AVX512 registers.
6922 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6923 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6924 prototypei from generated file.
6925 (tdesc_amd64_avx512_linux): Likewise.
6926 (init_registers_x32_avx512_linux): Likewise.
6927 (tdesc_x32_avx512_linux): Likewise.
6928 (init_registers_i386_avx512_linux): Likewise.
6929 (tdesc_i386_avx512_linux): Likewise.
6930 (x86_64_regmap): Add AVX512 registers.
6931 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6932 mask.
6933 (initialize_low_arch): Add code to initialize AVX512 registers.
6934
6935 2014-04-23 Pedro Alves <palves@redhat.com>
6936
6937 * mem-break.c (find_gdb_breakpoint_at): Make static.
6938 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6939
6940 2014-04-23 Pedro Alves <palves@redhat.com>
6941
6942 * i386-low.c: Don't include break-common.h here.
6943 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6944 prototype to take target_hw_bp_type as argument instead of a Z
6945 packet char.
6946 * i386-low.h: Include break-common.h here.
6947 (Z_packet_to_hw_type): Declare.
6948 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6949 prototypes.
6950 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6951 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6952 (x86_remove_point): Convert the packet number to a
6953 target_hw_bp_type before calling i386_low_remove_watchpoint.
6954 * win32-i386-low.c (i386_insert_point): Convert the packet number
6955 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6956 (i386_remove_point): Convert the packet number to a
6957 target_hw_bp_type before calling i386_low_remove_watchpoint.
6958
6959 2014-04-23 Pedro Alves <palves@redhat.com>
6960
6961 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6962
6963 2014-04-10 Pedro Alves <palves@redhat.com>
6964
6965 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6966 Check if the condition or command is NULL before checking if the
6967 breakpoint is known. On success, return true.
6968 * mem-break.h (add_breakpoint_condition): Document return.
6969 (add_breakpoint_commands): Add describing comment.
6970 * server.c (skip_to_semicolon): New function.
6971 (process_point_options): Use it.
6972
6973 2014-04-09 Pedro Alves <palves@redhat.com>
6974
6975 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6976 to lwpid_of.
6977
6978 2014-02-27 Pedro Alves <palves@redhat.com>
6979
6980 PR 12702
6981 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6982 macros.
6983 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6984 output.
6985 (last_thread_of_process_p): Take a PID argument instead of a
6986 thread pointer.
6987 (linux_wait_for_lwp): Delete.
6988 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6989 functions.
6990 (linux_low_filter_event): New function, party factored out from
6991 linux_wait_for_event.
6992 (linux_wait_for_event): Rename to ...
6993 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6994 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6995 sigsuspend. Check for zombie leaders.
6996 (linux_wait_for_event): Reimplement as wrapper around
6997 linux_wait_for_event_filtered.
6998 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6999 a normal or signal exit is seen, it's the whole process exiting.
7000 (wait_for_sigstop): No longer a for_each_inferior callback.
7001 Rewrite on top of linux_wait_for_event_filtered.
7002 (stop_all_lwps): Call wait_for_sigstop directly.
7003 * server.c (resume, handle_target_event): Handle
7004 TARGET_WAITKIND_NO_RESUMED.
7005
7006 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7007
7008 * win32-low.c (psapi_get_dll_name,
7009 * win32_CreateToolhelp32Snapshot): Delete.
7010 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7011 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7012 Delete.
7013 (handle_load_dll): Add function description.
7014 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7015
7016 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7017
7018 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7019 Add comment.
7020 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7021 base address when calling win32_add_one_solib.
7022 (handle_load_dll): Delete local variable load_addr.
7023 Remove 0x1000 offset applied to DLL base address when calling
7024 win32_add_one_solib.
7025 (handle_unload_dll): Add comment.
7026
7027 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7028
7029 * win32-low.c (win32_add_all_dlls): Renames
7030 win32_ensure_ntdll_loaded. Rewrite function documentation.
7031 Adjust implementation to always load all DLLs.
7032 Add 0x1000 offset to DLL base address when calling
7033 win32_add_one_solib.
7034 (child_initialization_done): New static global.
7035 (do_initial_child_stuff): Set child_initialization_done to
7036 zero during child initialization, and 1 after. Replace call
7037 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7038 Add comment.
7039 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7040 (handle_unload_dll): Add function documentation.
7041 (get_child_debug_event): Ignore load and unload DLL events
7042 during child initialization.
7043
7044 2014-02-20 Doug Evans <dje@google.com>
7045
7046 Remove global all_lwps.
7047 * inferiors.h (ptid_of): Move here from linux-low.h.
7048 (pid_of, lwpid_of): Ditto.
7049 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7050 parameter is a struct thread_info * now.
7051 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7052 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7053 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7054 directly.
7055 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7056 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7057 * linux-arm-low.c (update_registers_callback): Update, "entry"
7058 parameter is a struct thread_info * now.
7059 Fetch lwpid from current_inferior directly.
7060 (arm_insert_point): Pass &all_threads to find_inferior instead of
7061 &all_lwps.
7062 (arm_remove_point): Ditto.
7063 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7064 (arm_prepare_to_resume): Fetch pid from thread.
7065 (arm_read_description): Fetch lwpid from current_inferior directly.
7066 * linux-low.c (all_lwps): Delete.
7067 (delete_lwp): Delete call to remove_inferior.
7068 (handle_extended_wait): Fetch lwpid from thread.
7069 (add_lwp): Don't set lwp->entry.id. Remove call to
7070 add_inferior_to_list.
7071 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7072 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7073 (kill_one_lwp_callback): Ditto.
7074 (linux_kill): Don't dereference NULL pointer.
7075 Fetch ptid,lwpid from thread.
7076 (get_detach_signal): Fetch ptid from thread.
7077 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7078 Simplify call to regcache_invalidate_thread.
7079 (delete_lwp_callback): Update, "entry" parameter is a
7080 struct thread_info * now. Fetch pid from thread.
7081 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7082 (status_pending_p_callback): Update, "entry" parameter is a
7083 struct thread_info * now. Fetch ptid from thread.
7084 (find_lwp_pid): Update, "entry" parameter is a
7085 struct thread_info * now.
7086 (linux_wait_for_lwp): Fetch pid from thread.
7087 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7088 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7089 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7090 (dequeue_one_deferred_signal): Ditto.
7091 (cancel_breakpoint): Fetch ptid from current_inferior.
7092 (linux_wait_for_event): Pass &all_threads to find_inferior,
7093 not &all_lwps. Fetch ptid, lwpid from thread.
7094 (count_events_callback): Update, "entry" parameter is a
7095 struct thread_info * now.
7096 (select_singlestep_lwp_callback): Ditto.
7097 (select_event_lwp_callback): Ditto.
7098 (cancel_breakpoints_callback): Ditto.
7099 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7100 not &all_lwps.
7101 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7102 (unsuspend_one_lwp): Update, "entry" parameter is a
7103 struct thread_info * now.
7104 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7105 not &all_lwps.
7106 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7107 Fetch lwpid from thread, not lwp.
7108 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7109 Pass &all_threads to find_inferior, not &all_lwps.
7110 (send_sigstop): Fetch lwpid from thread, not lwp.
7111 (send_sigstop_callback): Update, "entry" parameter is a
7112 struct thread_info * now.
7113 (suspend_and_send_sigstop_callback): Ditto.
7114 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7115 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7116 struct thread_info * now.
7117 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7118 from thread, lwp.
7119 (lwp_running): Update, "entry" parameter is a
7120 struct thread_info * now.
7121 (stop_all_lwps): Fetch ptid from thread.
7122 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7123 (linux_resume_one_lwp): Fetch lwpid from thread.
7124 (linux_set_resume_request): Update, "entry" parameter is a
7125 struct thread_info * now. Fetch pid, lwpid from thread.
7126 (resume_status_pending_p): Update, "entry" parameter is a
7127 struct thread_info * now.
7128 (need_step_over_p): Ditto. Fetch lwpid from thread.
7129 (start_step_over): Fetch lwpid from thread.
7130 (linux_resume_one_thread): Update, "entry" parameter is a
7131 struct thread_info * now. Fetch lwpid from thread.
7132 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7133 (proceed_one_lwp): Update, "entry" parameter is a
7134 struct thread_info * now. Fetch lwpid from thread.
7135 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7136 struct thread_info * now.
7137 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7138 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7139 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7140 directly.
7141 (regsets_store_inferior_registers): Ditto.
7142 (fetch_register, store_register): Ditto.
7143 (linux_read_memory, linux_write_memory): Ditto.
7144 (linux_request_interrupt): Ditto.
7145 (linux_read_auxv): Ditto.
7146 (linux_xfer_siginfo): Ditto.
7147 (linux_qxfer_spu): Ditto.
7148 (linux_qxfer_libraries_svr4): Ditto.
7149 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7150 moved to inferiors.h.
7151 (get_lwp): Delete.
7152 (get_thread_lwp): Update.
7153 (struct lwp_info): Delete member "entry". Simplify comment for
7154 member "thread".
7155 (all_lwps): Delete.
7156 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7157 current_inferior directly.
7158 (update_watch_registers_callback): Update, "entry" parameter is a
7159 struct thread_info * now. Fetch pid from thread.
7160 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7161 (mips_insert_point): Fetch lwpid from current_inferior.
7162 Pass &all_threads to find_inferior, not &all_lwps.
7163 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7164 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7165 directly.
7166 (mips_stopped_data_address): Ditto.
7167 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7168 directly.
7169 * linux-tile-low.c (tile_arch_setup): Ditto.
7170 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7171 (update_debug_registers_callback): Update, "entry" parameter is a
7172 struct thread_info * now. Fetch pid from thread.
7173 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7174 Pass &all_threads to find_inferior, not &all_lwps.
7175 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7176 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7177 Pass &all_threads to find_inferior, not &all_lwps.
7178 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7179 (i386_dr_low_get_status): Ditto.
7180 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7181 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7182 (x86_linux_read_description): Ditto.
7183 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7184
7185 2014-02-20 Doug Evans <dje@google.com>
7186
7187 * inferiors.c (get_first_inferior): Fix buglet.
7188
7189 2014-02-19 Doug Evans <dje@google.com>
7190
7191 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7192 * inferiors.c (add_thread): Change result type to struct thread_info *.
7193 All callers updated.
7194 (add_lwp): Call add_thread here instead of in callers.
7195 All callers updated.
7196 * linux-low.h (get_lwp_thread): Rewrite.
7197 (struct lwp_info): New member "thread".
7198
7199 2014-02-19 Doug Evans <dje@google.com>
7200
7201 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7202 All callers updated.
7203
7204 2014-02-19 Doug Evans <dje@google.com>
7205
7206 * inferiors.c (add_thread): Fix whitespace.
7207
7208 2014-02-19 Doug Evans <dje@google.com>
7209
7210 * dll.c (clear_dlls): Replace accessing list implemention details
7211 with API function.
7212 * gdbthread.h (get_first_thread): Declare.
7213 * inferiors.c (for_each_inferior_with_data): New function.
7214 (get_first_thread): New function.
7215 (find_thread_ptid): Simplify.
7216 (get_first_inferior): New function.
7217 (clear_list): Delete.
7218 (one_inferior_p): New function.
7219 (clear_inferior_list): New function.
7220 (clear_inferiors): Update.
7221 * inferiors.h (for_each_inferior_with_data): Declare.
7222 (clear_inferior_list): Declare.
7223 (one_inferior_p): Declare.
7224 (get_first_inferior): Declare.
7225 * linux-low.c (linux_wait_for_event): Replace accessing list
7226 implemention details with API function.
7227 * server.c (target_running): Ditto.
7228 (accumulate_file_name_length): New function.
7229 (emit_dll_description): New function.
7230 (handle_qxfer_libraries): Replace accessing list implemention
7231 details with API function.
7232 (handle_qxfer_threads_worker): New function.
7233 (handle_qxfer_threads_proper): Replace accessing list implemention
7234 details with API function.
7235 (handle_query): Ditto.
7236 (visit_actioned_threads_callback_ftype): New typedef.
7237 (visit_actioned_threads_data): New struct.
7238 (visit_actioned_threads): Rewrite to be find_inferior callback.
7239 (resume): Call find_inferior.
7240 (handle_status): Replace accessing list implemention
7241 details with API function.
7242 (process_serial_event): Replace accessing list implemention details
7243 with API function.
7244 * target.c (set_desired_inferior): Replace accessing list implemention
7245 details with API function.
7246 * tracepoint.c (same_process_p): New function.
7247 (gdb_agent_about_to_close): Replace accessing list implemention
7248 details with API function.
7249 * win32-low.c (child_delete_thread): Replace accessing list
7250 implemention details with API function.
7251 (match_dll_by_basename): New function.
7252 (dll_is_loaded_by_basename): New function.
7253 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7254 details call to dll_is_loaded_by_basename.
7255
7256 2014-02-19 Doug Evans <dje@google.com>
7257
7258 * dll.h (struct dll_info): Add comment.
7259 * gdbthread.h (struct thread_info): Add comment.
7260 (current_ptid): Simplify.
7261 * inferiors.c (add_process): Update.
7262 (remove_process): Update.
7263 * inferiors.h (struct process_info): Rename member "head" to "entry".
7264 * linux-low.c (delete_lwp): Update.
7265 (add_lwp): Update.
7266 (last_thread_of_process_p): Update.
7267 (kill_one_lwp_callback, linux_kill): Update.
7268 (status_pending_p_callback): Update.
7269 (wait_for_sigstop): Update. Simplify read of ptid.
7270 (start_step_over): Update.
7271 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7272 (get_lwp_thread): Update.
7273 (struct lwp_info): Rename member "head" to "entry".
7274 * regcache.h (inferior_list_entry): Delete.
7275 * server.c (kill_inferior_callback): Update.
7276 (detach_or_kill_inferior_callback): Update.
7277 (print_started_pid): Update.
7278 (print_attached_pid): Update.
7279 (process_serial_event): Simplify read of ptid.
7280 * thread-db.c (thread_db_create_event): Update.
7281 (thread_db_get_tls_address): Update.
7282 * win32-low.c (current_inferior_ptid): Simplify.
7283
7284 2014-02-19 Tom Tromey <tromey@redhat.com>
7285
7286 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7287 argument.
7288 (target_supports_btrace): Update.
7289
7290 2014-02-14 Yao Qi <yao@codesourcery.com>
7291
7292 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7293 (rsp-low-ipa.o): New target.
7294
7295 2014-02-12 Tom Tromey <tromey@redhat.com>
7296
7297 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7298 convert_ascii_to_int.
7299 * regcache.c (registers_to_string): Likewise.
7300 * remote-utils.c (decode_M_packet): Likewise.
7301 * server.c (process_serial_event): Likewise.
7302
7303 2014-02-12 Tom Tromey <tromey@redhat.com>
7304
7305 * server.c (handle_query, handle_v_run): Use hex2bin, not
7306 unhexify.
7307 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7308
7309 2014-02-12 Tom Tromey <tromey@redhat.com>
7310
7311 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7312 convert_int_to_ascii.
7313 * regcache.c (registers_to_string, collect_register_as_string):
7314 Likewise.
7315 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7316 Likewise.
7317 * server.c (process_serial_event): Likewise.
7318 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7319 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7320
7321 2014-02-12 Tom Tromey <tromey@redhat.com>
7322
7323 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7324 bin2hex, not hexify.
7325 * tracepoint.c (cmd_qtstatus): Likewise.
7326
7327 2014-02-12 Tom Tromey <tromey@redhat.com>
7328
7329 * remote-utils.c (monitor_output): Pass explicit length to
7330 hexify.
7331
7332 2014-02-12 Tom Tromey <tromey@redhat.com>
7333
7334 * tracepoint.c: Include rsp-low.h.
7335 * server.c: Include rsp-low.h.
7336 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7337 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7338 declare.
7339 * remote-utils.c: Include rsp-low.h.
7340 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7341 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7342 (convert_int_to_ascii, convert_ascii_to_int): Move to
7343 common/rsp-low.c.
7344 * regcache.c: Include rsp-low.h.
7345 * ax.c: Include rsp-low.h.
7346 * Makefile.in (SFILES): Add common/rsp-low.c.
7347 (OBS): Add rsp-low.o.
7348 (rsp-low.o): New target.
7349
7350 2014-02-12 Tom Tromey <tromey@redhat.com>
7351
7352 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7353 Include print-utils.h.
7354 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7355 (plongest, thirty_two, phex_nz): Remove.
7356 * Makefile.in (SFILES): Add common/print-utils.c.
7357 (OBS): Add print-utils.o.
7358 (print-utils-ipa.o): New target.
7359 (print-utils.o): New target.
7360 (IPA_OBJS): Add print-utils-ipa.o.
7361
7362 2014-02-06 Tom Tromey <tromey@redhat.com>
7363
7364 * Makefile.in (SFILES): Fix indentation.
7365
7366 2014-02-05 Doug Evans <dje@google.com>
7367
7368 * linux-low.c (linux_wait_for_event): Improve comment.
7369 (linux_wait_1): Keep current_inferior in sync with event_child.
7370
7371 2014-01-22 Doug Evans <dje@google.com>
7372
7373 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7374
7375 2014-01-22 Doug Evans <dje@google.com>
7376
7377 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7378 * configure: Regenerate.
7379 * config.in: Regenerate.
7380 * Makefile.in (SFILES): Add debug.c.
7381 (OBS): Add debug.o.
7382 * debug.c: New file.
7383 * debug.h: New file.
7384 * linux-aarch64-low.c (*): Update all debugging printfs to use
7385 debug_printf instead of fprintf.
7386 * linux-arm-low.c (*): Ditto.
7387 * linux-cris-low.c (*): Ditto.
7388 * linux-crisv32-low.c (*): Ditto.
7389 * linux-m32r-low.c (*): Ditto.
7390 * linux-sparc-low.c (*): Ditto.
7391 * linux-x86.c (*): Ditto.
7392 * linux-low.c (*): Ditto.
7393 (linux_wait_1): Add calls to debug_enter, debug_exit.
7394 (linux_wait): Remove redundant debugging printf.
7395 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7396 (linux_resume, unstop_all_lwps): Ditto.
7397 * mem-break.c (*): Update all debugging printfs to use
7398 debug_printf instead of fprintf.
7399 * remote-utils.c (*): Ditto.
7400 * thread-db.c (*): Ditto.
7401 * server.c #include <ctype.h>, "gdb_vecs.h".
7402 (debug_threads): Moved to debug.c.
7403 (*): Update all debugging printfs to use debug_printf instead of
7404 fprintf.
7405 (start_inferior): Replace call to fflush with call to debug_flush.
7406 (monitor_show_help): Mention set debug-format.
7407 (parse_debug_format_options): New function.
7408 (handle_monitor_command): Handle "monitor set debug-format".
7409 (gdbserver_usage): Mention --debug-format.
7410 (main): Parse --debug-format.
7411 * server.h (debug_threads): Declaration moved to debug.h.
7412 #include "debug.h".
7413 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7414 trace_debug_1 that uses debug_printf.
7415 (tracepoint_look_up_symbols): Update all debugging printfs to use
7416 debug_printf instead of fprintf.
7417
7418 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7419
7420 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7421 sys/ptrace.h.
7422
7423 2014-01-17 Pedro Alves <palves@redhat.com>
7424
7425 PR build/16445
7426 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7427 defined after including gdb_proc_service.h.
7428
7429 2014-01-16 Doug Evans <dje@google.com>
7430
7431 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7432 (match_dll): Use it.
7433
7434 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7435
7436 * target.h (target_ops) <read_btrace>: Change parameters and
7437 return type to allow error reporting.
7438 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7439 trace reading errors on.
7440 * linux-low.c (linux_low_read_btrace): Pass trace reading
7441 errors on.
7442 (linux_low_disable_btrace): New.
7443
7444 2014-01-15 Doug Evans <dje@google.com>
7445
7446 * inferiors.c (thread_id_to_gdb_id): Delete.
7447 * inferiors.h (thread_id_to_gdb_id): Delete.
7448
7449 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7450
7451 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7452 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7453 versions.
7454
7455 2014-01-08 Pedro Alves <palves@redhat.com>
7456
7457 * server.c (handle_status): Don't discard previous queued stop
7458 replies or thread's pending status here.
7459 (main) <disconnection>: Do it here instead.
7460
7461 2014-01-08 Pedro Alves <palves@redhat.com>
7462
7463 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7464 * server.c (visit_actioned_threads, handle_pending_status): New
7465 function.
7466 (handle_v_cont): Factor out parts to ...
7467 (resume): ... this new function. If in all-stop, and a thread
7468 being resumed has a pending status, report it without actually
7469 resuming.
7470 (myresume): Adjust to use the new 'resume' function.
7471 (clear_pending_status_callback, set_pending_status_callback)
7472 (find_status_pending_thread_callback): New functions.
7473 (handle_status): Handle the case of multiple threads having
7474 interesting statuses to report. Report threads' real last signal
7475 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7476 with an interesting thread to report the status for, instead of
7477 always reporting the status of the first thread.
7478
7479 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7480
7481 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7482 * gdbreplay.c (gdbreplay_version): Likewise.
7483
7484 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7485
7486 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7487 iov.iov_len with the real length in use.
7488
7489 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7490
7491 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7492 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7493 for all targets that use win32-low.c.
7494 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7495 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7496
7497 2013-12-13 Pedro Alves <palves@redhat.com>
7498
7499 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7500 if equal to TARGET_WAITKIND_LOADED.
7501 * win32-low.c (cached_status): New static global.
7502 (win32_wait): Add declaration.
7503 (do_initial_child_stuff): Flush all initial pending debug events
7504 up to the initial breakpoint.
7505 (win32_wait): If CACHED_STATUS was set, return that instead
7506 of doing a real wait. Remove the code resuming the execution
7507 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7508 during the initial phase. Also remove the code changing
7509 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7510 TARGET_WAITKIND_STOPPED.
7511
7512 2013-12-11 Yao Qi <yao@codesourcery.com>
7513
7514 * notif.c (handle_notif_ack): Return 0 if no notification
7515 matches.
7516
7517 2013-11-20 Doug Evans <dje@google.com>
7518
7519 * linux-low.c (linux_set_resume_request): Fix comment.
7520
7521 2013-11-20 Doug Evans <dje@google.com>
7522
7523 * linux-low.c (resume_status_pending_p): Tweak comment.
7524
7525 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7526
7527 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7528 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7529 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7530 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7531 (srv_amd64_regobj): Add amd64-mpx.o.
7532 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7533 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7534 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7535 * i387-fp.c (num_pl_bnd_register) Added constant.
7536 (num_pl_bnd_cfg_registers) Added constant.
7537 (struct i387_xsave) Added reserved area and MPX fields.
7538 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7539 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7540 function.
7541 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7542 (init_registers_amd64_mpx_linux): Declare new function.
7543 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7544 (x86_64_regmap): Add MPX registers.
7545 (x86_linux_read_description): Add MPX case.
7546 (initialize_low_arch): Initialize MPX targets.
7547
7548 2013-11-18 Tom Tromey <tromey@redhat.com>
7549
7550 * configure: Rebuild.
7551 * configure.ac: Don't check for stdlib.h.
7552 * gdbreplay.c: Unconditionally include stdlib.h.
7553
7554 2013-11-18 Tom Tromey <tromey@redhat.com>
7555
7556 * config.in: Rebuild.
7557 * configure: Rebuild.
7558 * configure.ac: Don't use AC_HEADER_DIRENT.
7559
7560 2013-11-18 Tom Tromey <tromey@redhat.com>
7561
7562 * server.h: Don't check HAVE_STRING_H.
7563 * gdbreplay.c: Don't check HAVE_STRING_H.
7564 * configure: Rebuild.
7565
7566 2013-11-18 Tom Tromey <tromey@redhat.com>
7567
7568 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7569 LIBGNU.
7570
7571 2013-11-08 Tom Tromey <tromey@redhat.com>
7572
7573 * configure, config.in: Rebuild.
7574 * configure.ac: Remove unused configury.
7575
7576 2013-11-08 Tom Tromey <tromey@redhat.com>
7577
7578 * acinclude.m4: Include common.m4, codeset.m4.
7579 * configure, config.in: Rebuild.
7580 * configure.ac: Use GDB_AC_COMMON.
7581
7582 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7583
7584 * linux-s390-low.c (HWCAP_S390_TE): New define.
7585 (s390_arch_setup): Consider the TE field in the HWCAP for
7586 determining 'have_regset_tdb'.
7587
7588 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7589
7590 PR gdb/16014
7591 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7592 call to sizeof.
7593
7594 2013-10-02 Pedro Alves <palves@redhat.com>
7595
7596 * server.c (process_serial_event): Don't output "GDBserver
7597 exiting" if GDB is connected through stdio.
7598 * target.c (mywait): Likewise, be silent if GDB is connected
7599 through stdio.
7600
7601 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7602
7603 * lynx-low.c (lynx_add_threads_after_attach): New function.
7604 (lynx_attach): Remove call to add_thread. Add call to
7605 lynx_add_threads_after_attach instead.
7606
7607 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7608
7609 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7610 * config.in, configure: Regenerated.
7611
7612 2013-09-18 Yao Qi <yao@codesourcery.com>
7613
7614 PR server/15959
7615 * server.c (start_inferior): Clear 'resume_info'.
7616
7617 2013-09-16 Jiong Wang <jiwang@tilera.com>
7618
7619 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7620 for each register.
7621
7622 2013-09-16 Jiong Wang <jiwang@tilera.com>
7623
7624 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7625 linux-tile-low.o to srv_tgtobj.
7626
7627 2013-09-16 Will Newton <will.newton@linaro.org>
7628
7629 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7630 out regs.
7631
7632 2013-09-06 Pedro Alves <palves@redhat.com>
7633
7634 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7635 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7636 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7637 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7638 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7639 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7640
7641 2013-09-06 Pedro Alves <palves@redhat.com>
7642
7643 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7644 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7645
7646 2013-09-06 Pedro Alves <palves@redhat.com>
7647
7648 * linux-amd64-ipa.c: Include tracepoint.h.
7649 * linux-i386-ipa.c: Include tracepoint.h.
7650
7651 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7652
7653 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7654 (ps_get_thread_area): New function.
7655
7656 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7657
7658 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7659 (initialize_low_arch): Call init_registers_crisv32 rather than
7660 init_register_crisv32.
7661
7662 2013-09-05 Pedro Alves <palves@redhat.com>
7663
7664 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7665 to ...
7666 * hostio.h: ... this new file.
7667 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7668 win32-low.c: Include hostio.h.
7669
7670 2013-09-05 Pedro Alves <palves@redhat.com>
7671
7672 * server.h (gdb_client_data, handler_func, callback_handler_func)
7673 (delete_file_handler, add_file_handler, append_callback_event)
7674 (delete_callback_event, start_event_loop, initialize_event_loop):
7675 Move to event-loop.h and include it.
7676 * event-loop.h: New file.
7677
7678 2013-09-05 Pedro Alves <palves@redhat.com>
7679
7680 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7681 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7682 (loaded_dll, unloaded_dll): Move to ...
7683 * dll.h: ... this new file.
7684 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7685
7686 2013-09-05 Pedro Alves <palves@redhat.com>
7687
7688 * server.h (current_process, get_thread_process, all_processes)
7689 (add_inferior_to_list, for_each_inferior, current_inferior)
7690 (remove_inferior, add_process, remove_process, find_process_pid)
7691 (have_started_inferiors_p, have_attached_inferiors_p)
7692 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7693 (clear_inferiors, find_inferior, find_inferior_id)
7694 (inferior_target_data, set_inferior_target_data)
7695 (inferior_regcache_data, set_inferior_regcache_data): Move to
7696 inferiors.h, and include it.
7697 * inferiors.h: New file.
7698
7699 2013-09-05 Pedro Alves <palves@redhat.com>
7700
7701 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7702 Move ...
7703 * ax.h: ... here.
7704
7705 2013-09-05 Pedro Alves <palves@redhat.com>
7706
7707 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7708 tracepoint.h.
7709 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7710 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7711 (handle_tracepoint_general_set, handle_tracepoint_query)
7712 (tracepoint_finished_step, tracepoint_was_hit)
7713 (release_while_stepping_state_list, current_traceframe)
7714 (in_readonly_region, traceframe_read_mem)
7715 (fetch_traceframe_registers, traceframe_read_sdata)
7716 (traceframe_read_info, struct fast_tpoint_collect_status)
7717 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7718 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7719 (supply_fast_tracepoint_registers)
7720 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7721 (ipa_tdesc, claim_trampoline_space)
7722 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7723 (agent_mem_read, agent_get_trace_state_variable_value)
7724 (agent_set_trace_state_variable_value, agent_tsv_read)
7725 (agent_mem_read_string, get_raw_reg_func_addr)
7726 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7727 * tracepoint.h: ... this new file.
7728
7729 2013-09-05 Pedro Alves <palves@redhat.com>
7730
7731 * server.h (perror_with_name, error, fatal, warning, paddress)
7732 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7733 include it.
7734 * utils.h: New file.
7735
7736 2013-09-05 Pedro Alves <palves@redhat.com>
7737
7738 * server.h (remote_debug, noack_mode, transport_is_reliable)
7739 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7740 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7741 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7742 (write_enn, initialize_async_io, enable_async_io)
7743 (disable_async_io, check_remote_input_interrupt_request)
7744 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7745 (dead_thread_notify, prepare_resume_reply)
7746 (decode_address_to_semicolon, decode_address, decode_m_packet)
7747 (decode_M_packet, decode_X_packet, decode_xfer_write)
7748 (decode_search_memory_packet, unhexify, hexify)
7749 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7750 (look_up_one_symbol, relocate_instruction)
7751 (monitor_output): Move to remote-utils.h, and include it.
7752 * remote-utils.h: New file.
7753
7754 2013-09-05 Pedro Alves <palves@redhat.com>
7755
7756 * server.h (_): Delete.
7757
7758 2013-09-02 Pedro Alves <palves@redhat.com>
7759
7760 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7761 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7762 allocated.
7763 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7764
7765 2013-09-02 Pierre Muller <muller@sourceware.org>
7766
7767 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7768 or WriteProcessMemory complete successfully and handle
7769 ERROR_PARTIAL_COPY error.
7770
7771 2013-09-02 Pedro Alves <palves@redhat.com>
7772
7773 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7774 error instead of EIO.
7775
7776 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7777
7778 PR server/15604
7779 * linux-low.c: Include filestuff.h.
7780 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7781 * lynx-low.c: Include filestuff.h.
7782 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7783 * server.c: Include filestuff.h.
7784 (main): Call notice_open_fds.
7785 * spu-low.c: Include filestuff.h.
7786 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7787
7788 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7789
7790 * Makefile.in: Explain why ../target and ../nat are not
7791 listed as include file search paths.
7792 (linux-waitpid.o): New object file rule.
7793 * configure.srv (srv_native_linux_obj): New variable.
7794 Replace all occurrences of linux native object files with
7795 $srv_native_linux_obj.
7796 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7797 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7798 (linux_enable_event_reporting): Remove declaration.
7799 (my_waitpid): Moved to common/linux-waitpid.c.
7800 (linux_wait_for_event): Pass ptid when calling
7801 linux_enable_event_reporting.
7802 (linux_supports_tracefork_flag): Remove.
7803 (linux_enable_event_reporting): Likewise.
7804 (linux_tracefork_grandchild): Remove.
7805 (STACK_SIZE): Moved to common/linux-ptrace.c.
7806 (linux_tracefork_child): Remove.
7807 (linux_test_for_tracefork): Remove.
7808 (linux_look_up_symbols): Call linux_supports_traceclone.
7809 (initialize_low): Remove call to linux_test_for_tracefork.
7810 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7811 common/linux-ptrace.h.
7812 (PTRACE_TYPE_ARG4): Likewise.
7813 Include linux-ptrace.h.
7814
7815 2013-08-21 Pedro Alves <palves@redhat.com>
7816
7817 * config.in: Renegerate.
7818
7819 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7820
7821 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7822 (SFILES): Remove $(srcdir)/common/target-common.c and
7823 add $(srcdir)/target/waitstatus.c.
7824 (OBS): Remove target-common.o and add waitstatus.o.
7825 (server_h): Remove $(srcdir)/../common/target-common.h and
7826 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7827 and $(srcdir)/../target/waitstatus.h.
7828 (target-common.o): Remove.
7829 (waitstatus.o): New target object file.
7830 * target.h: Do not include target-common.h and
7831 include target/resume.h, target/wait.h and
7832 target/waitstatus.h.
7833
7834 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7835
7836 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7837 to PTRACE_TYPE_ARG3.
7838 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7839 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7840 PTRACE_TYPE_ARG4.
7841 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7842 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7843
7844 2013-07-27 Jie Zhang <jie@codesourcery.com>
7845 Daniel Jacobowitz <dan@codesourcery.com>
7846 Yao Qi <yao@codesourcery.com>
7847
7848 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7849 (mips-linux-watch.o): New rule.
7850 (mips_linux_watch_h): New variable.
7851 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7852 srv_tgtobj.
7853 * linux-mips-low.c: Include mips-linux-watch.h.
7854 (struct arch_process_info, struct arch_lwp_info): New.
7855 (update_watch_registers_callback): New function.
7856 (mips_linux_new_process, mips_linux_new_thread) New functions.
7857 (mips_linux_prepare_to_resume, mips_insert_point): New
7858 functions.
7859 (mips_remove_point, mips_stopped_by_watchpoint): New
7860 functions.
7861 (rsp_bp_type_to_target_hw_bp_type): New function.
7862 (mips_stopped_data_address): New function.
7863 (the_low_target): Add watchpoint support functions.
7864
7865 2013-07-27 Yao Qi <yao@codesourcery.com>
7866
7867 * i386-low.c: Include break-common.h.
7868 (enum target_hw_bp_type): Remove.
7869
7870 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7871
7872 * Makefile.in (SFILES): /common/target-common.c.
7873 (OBS): Add target-common.o.
7874 (server_h): Add $(srcdir)/../common/target-common.h.
7875 (target-common.o): New target.
7876 * server.c (queue_stop_reply_callback): Free
7877 status string after use.
7878 * target.c (target_waitstatus_to_string): Remove.
7879 * target.h: Include target-common.h.
7880 (resume_kind): Likewise.
7881 (target_waitkind): Likewise.
7882 (target_waitstatus): Likewise.
7883 (TARGET_WNOHANG): Likewise.
7884
7885 2013-07-04 Yao Qi <yao@codesourcery.com>
7886
7887 * Makefile.in (host_alias): Use @host_noncanonical@.
7888 (target_alias): Use @target_noncanonical@.
7889 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7890 ACX_NONCANONICAL_HOST.
7891 * configure: Regenerated.
7892
7893 Revert:
7894 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7895
7896 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7897 * configure: Rebuild.
7898 * Makefile.in (version_host, version_target): Get from configure.
7899 (version.c): Use $(version_host) and $(version_target).
7900
7901 2013-07-03 Pedro Alves <palves@redhat.com>
7902
7903 * Makefile.in (config.status): Depend on development.sh.
7904 * acinclude.m4: Include libmcheck.m4.
7905 * configure: Regenerate.
7906
7907 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7908
7909 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7910 attribute inside the parentheses.
7911 (winapi_DebugSetProcessKillOnExit): Ditto.
7912 (winapi_DebugBreakProcess): Ditto.
7913 (winapi_GenerateConsoleCtrlEvent): Ditto.
7914
7915 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7916
7917 * notif.h (notif_event): Add a dummy member to avoid compiler
7918 errors.
7919
7920 2013-07-01 Pedro Alves <palves@redhat.com>
7921
7922 * hostio.c (HOSTIO_PATH_MAX): Define.
7923 (require_filename, handle_open, handle_unlink, handle_readlink):
7924 Use it.
7925
7926 2013-07-01 Pedro Alves <palves@redhat.com>
7927
7928 * server.h: Include "pathmax.h".
7929 * linux-low.c: Don't include sys/param.h.
7930 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7931 MAXPATHLEN.
7932 * win32-low.c: Don't include sys/param.h.
7933 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7934
7935 2013-07-01 Pedro Alves <palves@redhat.com>
7936
7937 * event-loop.c: Don't check HAVE_UNISTD_H before including
7938 <unistd.h>.
7939 * gdbreplay.c: Likewise.
7940 * remote-utils.c: Likewise.
7941 * server.c: Likewise.
7942 * configure.ac: Don't check for unistd.h.
7943 * configure: Regenerate.
7944
7945 2013-06-28 Tom Tromey <tromey@redhat.com>
7946
7947 * Makefile.in (version.c): Use version.in, not
7948 common/version.in.
7949
7950 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7951
7952 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7953 * configure: Rebuild.
7954 * Makefile.in (version_host, version_target): Get from configure.
7955 (version.c): Use $(version_host) and $(version_target).
7956
7957 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7958
7959 Fix trace-status to output user name without trailing colon.
7960 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7961
7962 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7963
7964 Fix trace-status to output proper start-time and stop-time.
7965 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7966 output start time and stop time in hex as gdb expects.
7967
7968 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7969
7970 * tracepoint.c (build_traceframe_info_xml): Output trace state
7971 variables present in the trace buffer.
7972
7973 2013-06-24 Tom Tromey <tromey@redhat.com>
7974
7975 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7976 create-version.sh.
7977 (version.o): Remove.
7978 * gdbreplay.c: Include version.h.
7979 (version, host_name): Don't declare.
7980 * server.h: Include version.h.
7981 (version, host_name): Don't declare.
7982
7983 2013-06-12 Pedro Alves <palves@redhat.com>
7984
7985 * linux-x86-low.c (linux_is_elf64): Delete global.
7986 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7987 with local linux_pid_exe_is_elf_64_file use.
7988
7989 2013-06-11 Pedro Alves <palves@redhat.com>
7990
7991 * linux-low.c (regset_disabled, disable_regset): New functions.
7992 (regsets_fetch_inferior_registers)
7993 (regsets_store_inferior_registers): Use them.
7994 (initialize_regsets_info); Don't allocate the disabled_regsets
7995 array here.
7996 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7997 comment.
7998
7999 2013-06-11 Pedro Alves <palves@redhat.com>
8000
8001 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8002 xmalloc.
8003
8004 2013-06-11 Pedro Alves <palves@redhat.com>
8005
8006 * linux-x86-low.c (initialize_low_arch): Call
8007 init_registers_x32_avx_linux.
8008
8009 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8010
8011 Fix compatibility with Android Bionic.
8012 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8013 it is not empty.
8014
8015 2013-06-07 Pedro Alves <palves@redhat.com>
8016
8017 PR server/14823
8018 * Makefile.in (OBS): Add tdesc.o.
8019 (IPA_OBJS): Add tdesc-ipa.o.
8020 (tdesc-ipa.o): New rule.
8021 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8022 interface.
8023 * linux-low.c (new_inferior): Delete.
8024 (disabled_regsets, num_regsets): Delete.
8025 (linux_add_process): Adjust to set the new per-process
8026 new_inferior flag.
8027 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8028 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8029 was a stop. When calling arch_setup, switch the current inferior
8030 to the thread that got an event.
8031 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8032 (regsets_fetch_inferior_registers)
8033 (regsets_store_inferior_registers): New regsets_info parameter.
8034 Adjust to use it.
8035 (linux_register_in_regsets): New regs_info parameter. Adjust to
8036 use it.
8037 (register_addr, fetch_register, store_register): New usrregs_info
8038 parameter. Adjust to use it.
8039 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8040 parameter regs_info. Adjust to use it.
8041 (linux_fetch_registers): Get the current inferior's regs_info, and
8042 adjust to use it.
8043 (linux_store_registers): Ditto.
8044 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8045 (initialize_low): Don't initialize the target_regsets here. Call
8046 initialize_low_arch.
8047 * linux-low.h (target_regsets): Delete declaration.
8048 (struct regsets_info): New.
8049 (struct usrregs_info): New.
8050 (struct regs_info): New.
8051 (struct process_info_private) <new_inferior>: New field.
8052 (struct linux_target_ops): Delete the num_regs, regmap, and
8053 regset_bitmap fields. New field regs_info.
8054 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8055 * i387-fp.c (num_xmm_registers): Delete.
8056 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8057 calls to new interface.
8058 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8059 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8060 Infer the number of xmm registers from the regcache's target
8061 description.
8062 * i387-fp.h (num_xmm_registers): Delete.
8063 * inferiors.c (add_thread): Don't install the thread's regcache
8064 here.
8065 * proc-service.c (gregset_info): Fetch the current inferior's
8066 regs_info. Adjust to use it.
8067 * regcache.c: Include tdesc.h.
8068 (register_bytes, reg_defs, num_registers)
8069 (gdbserver_expedite_regs): Delete.
8070 (get_thread_regcache): If the thread doesn't have a regcache yet,
8071 create one, instead of aborting gdbserver.
8072 (regcache_invalidate_one): Rename to ...
8073 (regcache_invalidate_thread): ... this.
8074 (regcache_invalidate_one): New.
8075 (regcache_invalidate): Only invalidate registers of the current
8076 process.
8077 (init_register_cache): Add target_desc parameter, and use it.
8078 (new_register_cache): Ditto. Assert the target description has a
8079 non zero registers_size.
8080 (regcache_cpy): Add assertions. Adjust.
8081 (realloc_register_cache, set_register_cache): Delete.
8082 (registers_to_string, registers_from_string): Adjust.
8083 (find_register_by_name, find_regno, find_register_by_number)
8084 (register_cache_size): Add target_desc parameter, and use it.
8085 (free_register_cache_thread, free_register_cache_thread_one)
8086 (regcache_release, register_cache_size): New.
8087 (register_size): Add target_desc parameter, and use it.
8088 (register_data, supply_register, supply_register_zeroed)
8089 (supply_regblock, supply_register_by_name, collect_register)
8090 (collect_register_as_string, collect_register_by_name): Adjust.
8091 * regcache.h (struct target_desc): Forward declare.
8092 (struct regcache) <tdesc>: New field.
8093 (init_register_cache, new_register_cache): Add target_desc
8094 parameter.
8095 (regcache_invalidate_thread): Declare.
8096 (regcache_invalidate_one): Delete declaration.
8097 (regcache_release): Declare.
8098 (find_register_by_number, register_cache_size, register_size)
8099 (find_regno): Add target_desc parameter.
8100 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8101 declarations.
8102 * remote-utils.c: Include tdesc.h.
8103 (outreg, prepare_resume_reply): Adjust.
8104 * server.c: Include tdesc.h.
8105 (gdbserver_xmltarget): Delete declaration.
8106 (get_features_xml, process_serial_event): Adjust.
8107 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8108 declare.
8109 (struct process_info) <tdesc>: New field.
8110 (ipa_tdesc): Declare.
8111 * tdesc.c: New file.
8112 * tdesc.h: New file.
8113 * tracepoint.c: Include tdesc.h.
8114 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8115 (get_context_regcache): Adjust to pass ipa_tdesc down.
8116 (do_action_at_tracepoint): Adjust to get the register cache size
8117 from the context regcache's description.
8118 (traceframe_walk_blocks): Adjust to get the register cache size
8119 from the current trace frame's description.
8120 (traceframe_get_pc): Adjust to get current trace frame's
8121 description and pass it down.
8122 (gdb_collect): Adjust to get the register cache size from the
8123 IPA's description.
8124 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8125 (gdbserver_xmltarget): Delete.
8126 (initialize_low_tracepoint): Set the ipa's target description.
8127 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8128 (initialize_low_tracepoint): Set the ipa's target description.
8129 * linux-x86-low.c: Include tdesc.h.
8130 [__x86_64__] (is_64bit_tdesc): New.
8131 (ps_get_thread_area, x86_get_thread_area): Use it.
8132 (i386_cannot_store_register): Rename to ...
8133 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8134 (i386_cannot_fetch_register): Rename to ...
8135 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8136 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8137 to new interface.
8138 (target_regsets): Rename to ...
8139 (x86_regsets): ... this.
8140 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8141 interface.
8142 (x86_siginfo_fixup): Use is_64bit_tdesc.
8143 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8144 (tdesc_x32_avx_linux, tdesc_x32_linux)
8145 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8146 Declare.
8147 (x86_linux_update_xmltarget): Delete.
8148 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8149 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8150 (AMD64_LINUX_USER64_CS): New.
8151 (x86_linux_read_description): New, based on
8152 x86_linux_update_xmltarget.
8153 (same_process_callback): New.
8154 (x86_arch_setup_process_callback): New.
8155 (x86_linux_update_xmltarget): New.
8156 (x86_regsets_info): New.
8157 (amd64_linux_regs_info): New.
8158 (i386_linux_usrregs_info): New.
8159 (i386_linux_regs_info): New.
8160 (x86_linux_regs_info): New.
8161 (x86_arch_setup): Reimplement.
8162 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8163 (x86_emit_ops): Ditto.
8164 (the_low_target): Adjust. Install x86_linux_regs_info,
8165 x86_cannot_fetch_register, and x86_cannot_store_register.
8166 (initialize_low_arch): New.
8167 * linux-ia64-low.c (tdesc_ia64): Declare.
8168 (ia64_fetch_register): Adjust.
8169 (ia64_usrregs_info, regs_info): New globals.
8170 (ia64_regs_info): New function.
8171 (the_low_target): Adjust.
8172 (initialize_low_arch): New function.
8173 * linux-sparc-low.c (tdesc_sparc64): Declare.
8174 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8175 Adjust.
8176 (sparc_arch_setup): New function.
8177 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8178 (the_low_target): Adjust.
8179 (initialize_low_arch): New function.
8180 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8181 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8182 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8183 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8184 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8185 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8186 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8187 (tdesc_powerpc_isa205_vsx64l): Declare.
8188 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8189 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8190 (ppc_set_pc, ppc_get_hwcap): Adjust.
8191 (ppc_usrregs_info): Forward declare.
8192 (!__powerpc64__) ppc_regmap_adjusted: New global.
8193 (ppc_arch_setup): Adjust to the current process'es target
8194 description.
8195 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8196 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8197 (ppc_store_evrregset): Adjust.
8198 (target_regsets): Rename to ...
8199 (ppc_regsets): ... this, and make static.
8200 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8201 (ppc_regs_info): New function.
8202 (the_low_target): Adjust.
8203 (initialize_low_arch): New function.
8204 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8205 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8206 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8207 (tdesc_s390x_linux64v2): Declare.
8208 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8209 (s390_fill_gregset, s390_store_last_break): Adjust.
8210 (target_regsets): Rename to ...
8211 (s390_regsets): ... this, and make static.
8212 (s390_get_pc, s390_set_pc): Adjust.
8213 (s390_get_hwcap): New target_desc parameter, and use it.
8214 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8215 (s390_arch_setup): Adjust to set the current process'es target
8216 description. Don't adjust the regmap.
8217 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8218 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8219 (regs_info_3264): New globals.
8220 (s390_regs_info): New function.
8221 (the_low_target): Adjust.
8222 (initialize_low_arch): New function.
8223 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8224 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8225 [__mips64] (init_registers_mips_linux)
8226 (init_registers_mips_dsp_linux): Delete defines.
8227 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8228 (have_dsp): New global.
8229 (mips_read_description): New, based on mips_arch_setup.
8230 (mips_arch_setup): Reimplement.
8231 (get_usrregs_info): New function.
8232 (mips_cannot_fetch_register, mips_cannot_store_register)
8233 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8234 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8235 (target_regsets): Rename to ...
8236 (mips_regsets): ... this, and make static.
8237 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8238 (dsp_regs_info, regs_info): New globals.
8239 (mips_regs_info): New function.
8240 (the_low_target): Adjust.
8241 (initialize_low_arch): New function.
8242 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8243 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8244 Declare.
8245 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8246 (arm_read_description): New, with bits factored from
8247 arm_arch_setup.
8248 (arm_arch_setup): Reimplement.
8249 (target_regsets): Rename to ...
8250 (arm_regsets): ... this, and make static.
8251 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8252 (arm_regs_info): New function.
8253 (the_low_target): Adjust.
8254 (initialize_low_arch): New function.
8255 * linux-m68k-low.c (tdesc_m68k): Declare.
8256 (target_regsets): Rename to ...
8257 (m68k_regsets): ... this, and make static.
8258 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8259 (m68k_regs_info): New function.
8260 (m68k_arch_setup): New function.
8261 (the_low_target): Adjust.
8262 (initialize_low_arch): New function.
8263 * linux-sh-low.c (tdesc_sharch): Declare.
8264 (target_regsets): Rename to ...
8265 (sh_regsets): ... this, and make static.
8266 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8267 (sh_regs_info, sh_arch_setup): New functions.
8268 (the_low_target): Adjust.
8269 (initialize_low_arch): New function.
8270 * linux-bfin-low.c (tdesc_bfin): Declare.
8271 (bfin_arch_setup): New function.
8272 (bfin_usrregs_info, regs_info): New globals.
8273 (bfin_regs_info): New function.
8274 (the_low_target): Adjust.
8275 (initialize_low_arch): New function.
8276 * linux-cris-low.c (tdesc_cris): Declare.
8277 (cris_arch_setup): New function.
8278 (cris_usrregs_info, regs_info): New globals.
8279 (cris_regs_info): New function.
8280 (the_low_target): Adjust.
8281 (initialize_low_arch): New function.
8282 * linux-cris-low.c (tdesc_crisv32): Declare.
8283 (cris_arch_setup): New function.
8284 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8285 (cris_regs_info): New function.
8286 (the_low_target): Adjust.
8287 (initialize_low_arch): New function.
8288 * linux-m32r-low.c (tdesc_m32r): Declare.
8289 (m32r_arch_setup): New function.
8290 (m32r_usrregs_info, regs_info): New globals.
8291 (m32r_regs_info): Adjust.
8292 (initialize_low_arch): New function.
8293 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8294 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8295 (tic6x_usrregs_info): Forward declare.
8296 (tic6x_read_description): New function, based on ...
8297 (tic6x_arch_setup): ... this. Reimplement.
8298 (target_regsets): Rename to ...
8299 (tic6x_regsets): ... this, and make static.
8300 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8301 (tic6x_regs_info): New function.
8302 (the_low_target): Adjust.
8303 (initialize_low_arch): New function.
8304 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8305 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8306 (target_regsets): Rename to ...
8307 (xtensa_regsets): ... this, and make static.
8308 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8309 globals.
8310 (xtensa_arch_setup, xtensa_regs_info): New functions.
8311 (the_low_target): Adjust.
8312 (initialize_low_arch): New function.
8313 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8314 (nios2_arch_setup): Set the current process'es tdesc.
8315 (target_regsets): Rename to ...
8316 (nios2_regsets): ... this.
8317 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8318 (nios2_regs_info): New function.
8319 (the_low_target): Adjust.
8320 (initialize_low_arch): New function.
8321 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8322 (aarch64_arch_setup): Set the current process'es tdesc.
8323 (target_regsets): Rename to ...
8324 (aarch64_regsets): ... this.
8325 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8326 (aarch64_regs_info): New function.
8327 (the_low_target): Adjust.
8328 (initialize_low_arch): New function.
8329 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8330 globals.
8331 (target_regsets): Rename to ...
8332 (tile_regsets): ... this.
8333 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8334 (tile_regs_info): New function.
8335 (tile_arch_setup): Set the current process'es tdesc.
8336 (the_low_target): Adjust.
8337 (initialize_low_arch): New function.
8338 * spu-low.c (tdesc_spu): Declare.
8339 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8340 * win32-arm-low.c (tdesc_arm): Declare.
8341 (arm_arch_setup): New function.
8342 (the_low_target): Install arm_arch_setup instead of
8343 init_registers_arm.
8344 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8345 (init_windows_x86): Rename to ...
8346 (i386_arch_setup): ... this. Set `win32_tdesc'.
8347 (the_low_target): Adjust.
8348 * win32-low.c (win32_tdesc): New global.
8349 (child_add_thread): Don't create the thread cache here.
8350 (do_initial_child_stuff): Set the new process'es tdesc.
8351 * win32-low.h (struct target_desc): Forward declare.
8352 (win32_tdesc): Declare.
8353 * lynx-i386-low.c (tdesc_i386): Declare global.
8354 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8355 * lynx-low.c (lynx_tdesc): New global.
8356 (lynx_add_process): Set the new process'es tdesc.
8357 * lynx-low.h (struct target_desc): Forward declare.
8358 (lynx_tdesc): Declare global.
8359 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8360 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8361 * nto-low.c (nto_tdesc): New global.
8362 (do_attach): Set the new process'es tdesc.
8363 * nto-low.h (struct target_desc): Forward declare.
8364 (nto_tdesc): Declare.
8365 * nto-x86-low.c (tdesc_i386): Declare.
8366 (nto_x86_arch_setup): Set `nto_tdesc'.
8367
8368 2013-06-04 Gary Benson <gbenson@redhat.com>
8369
8370 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8371 to qSupported response when appropriate.
8372 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8373 with nonzero-length annex.
8374 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8375 arguments supplied in annex.
8376
8377 2013-05-31 Doug Evans <dje@google.com>
8378
8379 PR server/15594
8380 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8381 64 bits in 64-cross-32 environment.
8382
8383 2013-05-28 Pedro Alves <palves@redhat.com>
8384
8385 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8386 (aarch64-without-fpu.c): Delete rule.
8387 * configure.srv (aarch64*-*-linux*): Remove references to
8388 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8389 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8390 declaration.
8391
8392 2013-05-24 Pedro Alves <palves@redhat.com>
8393
8394 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8395 instead of strchr/decode_address. Error if the range isn't split
8396 with a ','. Don't assume there's be a ':' in the action.
8397
8398 2013-05-23 Yao Qi <yao@codesourcery.com>
8399 Pedro Alves <palves@redhat.com>
8400
8401 * linux-low.c (lwp_in_step_range): New function.
8402 (linux_wait_1): If the thread was range stepping and stopped
8403 outside the stepping range, report the stop to GDB. Otherwise,
8404 continue stepping. Add range stepping debug output.
8405 (linux_set_resume_request): Copy the step range from the resume
8406 request to the lwp.
8407 (linux_supports_range_stepping): New.
8408 (linux_target_ops) <supports_range_stepping>: Set to
8409 linux_supports_range_stepping.
8410 * linux-low.h (struct linux_target_ops)
8411 <supports_range_stepping>: New field.
8412 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8413 * linux-x86-low.c (x86_supports_range_stepping): New.
8414 (the_low_target) <supports_range_stepping>: Set to
8415 x86_supports_range_stepping.
8416 * server.c (handle_v_cont): Handle 'r' action.
8417 (handle_v_requests): Append ";r" if the target supports range
8418 stepping.
8419 * target.h (struct thread_resume) <step_range_start,
8420 step_range_end>: New fields.
8421 (struct target_ops) <supports_range_stepping>:
8422 New field.
8423 (target_supports_range_stepping): New macro.
8424
8425 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8426
8427 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8428 confusion in comment.
8429
8430 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8431
8432 * lynx-low.c (struct process_info_private): New type.
8433 (lynx_add_process): New function.
8434 (lynx_create_inferior, lynx_attach): Replace calls to
8435 add_process by calls to lynx_add_process.
8436 (lynx_resume): If PTID is null, then try using
8437 current_process()->private->last_wait_event_ptid.
8438 Add comments.
8439 (lynx_clear_inferiors): Delete. The contents of that function
8440 has been inlined in lynx_mourn;
8441 (lynx_wait_1): Save the ptid in the process's private data.
8442 (lynx_mourn): Free the process' private data. Replace call
8443 to lynx_clear_inferiors by call to clear_inferiors.
8444
8445 2013-05-17 Yao Qi <yao@codesourcery.com>
8446
8447 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8448 the right place.
8449
8450 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8451
8452 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8453 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8454 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8455 PT_TEXT_END_ADDR guards. Update comments.
8456 (linux_target_op) <read_offsets>: Conditionally define to
8457 linux_read_offsets if the target is UCLIBC and if it defines
8458 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8459
8460 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8461 Andrew Jenner <andrew@codesourcery.com>
8462
8463 * Makefile.in (SFILES): Add linux-nios2-low.c.
8464 (clean): Add action to delete nios2-linux.c.
8465 (nios2-linux.c): New rule.
8466 * configure.srv: Add nios2*-*-linux*.
8467 * linux-nios2-low.c: New.
8468
8469 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8470
8471 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8472
8473 2013-04-25 Hui Zhu <hui@codesourcery.com>
8474
8475 PR gdb/15186
8476 * ax.c (ax_printf): Add fflush.
8477
8478 2013-04-22 Tom Tromey <tromey@redhat.com>
8479
8480 * Makefile.in (SFILES): Add filestuff.c.
8481 (OBS): Add filestuff.o.
8482 (filestuff.o): New target.
8483 * config.in, configure: Rebuild.
8484 * configure.ac: Check for fdwalk, pipe2.
8485
8486 2013-04-17 Pedro Alves <palves@redhat.com>
8487
8488 * configure.ac (USE_THREAD_DB): Delete variable.
8489 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8490 Don't AC_SUBST USE_THREAD_DB.
8491 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8492 * config.in, configure: Regenerate.
8493
8494 2013-04-16 Pedro Alves <palves@redhat.com>
8495
8496 * linux-low.h (struct lwp_info) <thread_known>: Move under
8497 the USE_THREAD_DB #ifdef.
8498
8499 2013-04-16 Pedro Alves <palves@redhat.com>
8500
8501 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8502 (linux-low.o): Delete rule.
8503 * linux-low.h: Always include "gdb_thread_db.h" instead of
8504 conditionally including thread_db.h.
8505 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8506 HAVE_THREAD_DB_H.
8507
8508 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8509
8510 * Makefile.in (install-only): Fix make install regression.
8511
8512 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8513
8514 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8515 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8516 installation.
8517 * gdbserver.1: Remove.
8518
8519 2013-03-22 Pedro Alves <palves@redhat.com>
8520
8521 * linux-low.c (handle_extended_wait): Don't call
8522 linux_enable_event_reporting.
8523
8524 2013-03-15 Tony Theodore <tonyt@logyst.com>
8525
8526 PR build/9098:
8527 * Makefile.in (SHELL): Use @SHELL@.
8528
8529 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8530
8531 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8532 compiler warning.
8533
8534 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8535
8536 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8537 Remove extraneous NULL element.
8538
8539 2013-03-13 Yao Qi <yao@codesourcery.com>
8540
8541 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8542 'V' block in trace frame.
8543
8544 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8545
8546 * target.h (struct target_ops): Add btrace ops.
8547 (target_supports_btrace): New macro.
8548 (target_enable_btrace): New macro.
8549 (target_disable_btrace): New macro.
8550 (target_read_btrace): New macro.
8551 * gdbthread.h (struct thread_info): Add btrace field.
8552 * server.c: Include btrace-common.h.
8553 (handle_btrace_general_set): New function.
8554 (handle_btrace_enable): New function.
8555 (handle_btrace_disable): New function.
8556 (handle_general_set): Call handle_btrace_general_set.
8557 (handle_qxfer_btrace): New function.
8558 (struct qxfer qxfer_packets[]): Add btrace entry.
8559 * inferiors.c (remove_thread): Disable btrace.
8560 * linux-low: Include linux-btrace.h.
8561 (linux_low_enable_btrace): New function.
8562 (linux_low_read_btrace): New function.
8563 (linux_target_ops): Add btrace ops.
8564 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8565 Add srv_linux_btrace=yes.
8566 (x86_64-*-linux*): Add linux-btrace.o.
8567 Add srv_linux_btrace=yes.
8568 * configure.ac: Define HAVE_LINUX_BTRACE.
8569 * config.in: Regenerated.
8570 * configure: Regenerated.
8571
8572 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8573
8574 * server.c (handle_qxfer): Preserve error message if -3 is
8575 returned.
8576 (qxfer): Document the -3 return value.
8577
8578 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8579
8580 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8581 (linux_btrace_h): New variable.
8582 (linux-btrace.o): New rule.
8583
8584 2013-03-08 Stan Shebs <stan@codesourcery.com>
8585 Hafiz Abid Qadeer <abidh@codesourcery.com>
8586
8587 * tracepoint.c (trace_buffer_size): New global.
8588 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8589 (init_trace_buffer): Change to one-argument function. Allocate
8590 trace buffer memory.
8591 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8592 handle QTBuffer:size packet.
8593 (cmd_bigqtbuffer_size): New function.
8594 (initialize_tracepoint): Call init_trace_buffer with
8595 DEFAULT_TRACE_BUFFER_SIZE.
8596 * server.c (handle_query): Add QTBuffer:size in the
8597 supported packets.
8598
8599 2013-03-07 Yao Qi <yao@codesourcery.com>
8600
8601 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8602 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8603 of -1.
8604 (cmd_qtsp): Adjust condition. Do post increment.
8605 Set cur_action and cur_step_action back to 0.
8606
8607 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8608
8609 PR server/15236
8610 * linux-low.c (linux_write_memory): Return early success if LEN is
8611 zero.
8612
8613 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8614
8615 * configure.srv: Add x86_64-*-cygwin* as target.
8616
8617 2013-02-28 Tom Tromey <tromey@redhat.com>
8618
8619 * configure.ac: Invoke AC_SYS_LARGEFILE.
8620 * configure, config.in: Rebuild.
8621
8622 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8623
8624 * win32-low.c: Throughout, fix format strings and casts of
8625 printf-like functions to avoid type related warnings on all
8626 platforms.
8627 (get_child_debug_event): Print dwDebugEventCode as hex since
8628 that's how it's usually documented.
8629
8630 2013-02-28 Yao Qi <yao@codesourcery.com>
8631
8632 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8633 pulongest.
8634
8635 2013-02-27 Jiong Wang <jiwang@tilera.com>
8636
8637 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8638 (reg-tilegx32.c): New rule.
8639 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8640 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8641 different register info initializer according to elf class.
8642 (init_registers_tilgx32): New function. The tilegx32 register info
8643 initializer.
8644 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8645 (tile_store_gregset): Likewise.
8646
8647 2013-02-27 Yao Qi <yao@codesourcery.com>
8648
8649 * server.c (process_point_options): Print debug message when
8650 debug_threads is true.
8651
8652 2013-02-26 Yao Qi <yao@codesourcery.com>
8653
8654 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8655
8656 2013-02-19 Pedro Alves <palves@redhat.com>
8657 Kai Tietz <ktietz@redhat.com>
8658
8659 PR gdb/15161
8660
8661 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8662 instead of strtoul to extract address from packet.
8663 (process_serial_event) <'z'>: Likewise.
8664
8665 2013-02-18 Yao Qi <yao@codesourcery.com>
8666
8667 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8668
8669 2013-02-14 Pedro Alves <palves@redhat.com>
8670
8671 Plug memory leak.
8672
8673 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8674 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8675
8676 2013-02-14 Pedro Alves <palves@redhat.com>
8677
8678 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8679
8680 2013-02-14 Pedro Alves <palves@redhat.com>
8681
8682 * tracepoint.c (save_string): Delete.
8683 (add_tracepoint_action): Use savestring instead of save_string.
8684
8685 2013-02-12 Pedro Alves <palves@redhat.com>
8686
8687 * linux-xtensa-low.c: Ditto.
8688 * xtensa-xtregs.c: Ditto.
8689
8690 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8691
8692 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8693 thread_db.
8694
8695 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8696
8697 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8698 aarch64_num_wp_regs and aarch64_num_bp_regs to
8699 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8700
8701 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8702
8703 * linux-aarch64-low.c (ps_get_thread_area): Replace
8704 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8705
8706 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8707 Marcus Shawcroft <marcus.shawcroft@arm.com>
8708 Nigel Stephens <nigel.stephens@arm.com>
8709 Yufeng Zhang <yufeng.zhang@arm.com>
8710
8711 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8712 (aarch64.c, aarch64-without-fpu.c): New targets.
8713 * configure.srv (aarch64*-*-linux*): New.
8714 * linux-aarch64-low.c: New file.
8715
8716 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8717
8718 * linux-low.c (handle_extended_wait, linux_create_inferior)
8719 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8720 (dequeue_one_deferred_signal, linux_resume_one_thread)
8721 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8722 (linux_tracefork_grandchild, linux_test_for_tracefork)
8723 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8724 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8725 where the argument is 0.
8726
8727 2013-01-25 Yao Qi <yao@codesourcery.com>
8728
8729 * event-loop.c: Include "queue.h".
8730 (gdb_event_p): New typedef.
8731 (struct gdb_event) <next_event>: Remove.
8732 (event_queue): Change to QUEUE(gdb_event_p).
8733 (async_queue_event): Remove.
8734 (gdb_event_xfree): New.
8735 (initialize_event_loop): New.
8736 (process_event): Use API from QUEUE.
8737 (wait_for_event): Likewise.
8738 * server.c (main): Call initialize_event_loop.
8739 * server.h (initialize_event_loop): Declare.
8740
8741 2013-01-18 Yao Qi <yao@codesourcery.com>
8742
8743 * ax.h (struct eval_agent_expr_context): New.
8744 (gdb_eval_agent_expr): Update declaration.
8745 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8746 TFRAME. Add new argument CTX.
8747 * server.h (struct eval_agent_expr_context): Declare.
8748 (agent_mem_read, agent_tsv_read): Update declaration.
8749 (agent_mem_read_string): Likewise.
8750 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8751 (add_traceframe_block): Add new argument TPOINT.
8752 Increase TPOINT->traceframe_usage.
8753 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8754 eval_tracepoint_agent_expr.
8755 (condition_true_at_tracepoint): Likewise.
8756 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8757 (agent_mem_read_string, agent_tsv_read): Likewise.
8758
8759 2013-01-16 Yao Qi <yao@codesourcery.com>
8760
8761 * linux-low.c (linux_resume_one_lwp): Don't check
8762 'lwp->bp_reinsert != 0'.
8763
8764 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8765 Pedro Alves <palves@redhat.com>
8766
8767 * lynx-low.c (ptrace_request_to_str): Define a temporary
8768 macro and use it to simplify this function's implementation.
8769
8770 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8771
8772 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8773 sets errno.
8774
8775 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8776
8777 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8778
8779 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8780
8781 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8782
8783 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8784
8785 * lynx-low.c (lynx_resume): Use the resume_info parameter
8786 to determine the ptid for the lynx_ptrace call, unless
8787 it is equal to minus_one_ptid, in which case we use the
8788 ptid of the current_inferior.
8789 (lynx_wait_1): After having received a thread create/exit
8790 event, resume the inferior's execution using the signaling
8791 thread's ptid, rather than the old ptid.
8792
8793 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8794
8795 * lynx-low.c (lynx_resume): Delete variable ret.
8796
8797 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8798
8799 * gdbreplay.c (gdbreplay_version): Update copyright year.
8800 * server.c (gdbserver_version): Likewise.
8801
8802 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8803
8804 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8805 new thread.
8806
8807 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8808
8809 * lynx-low.c (ptrace_request_to_str): Add handling for
8810 PTRACE_GETTRACESIG.
8811
8812 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8813
8814 * lynx-low.c (lynx_attach): Delete variable new_process.
8815
8816 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8817
8818 * lynx-low.c (lynx_create_inferior): Delete variable
8819 new_process.
8820
8821 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8822
8823 * lynx-low.c (ptrace_request_to_str): Do not handle
8824 PTRACE_GETTHREADLIST if this macro does not exist.
8825
8826 2012-12-15 Yao Qi <yao@codesourcery.com>
8827
8828 * Makefile.in (OBS): Add notif.o.
8829 * notif.c, notif.h: New.
8830 * server.c: Include "notif.h".
8831 (struct vstop_notif) <next>: Remove.
8832 <base>: New field.
8833 (queue_stop_reply): Update.
8834 (push_event, send_next_stop_reply): Remove.
8835 (discard_queued_stop_replies): Update.
8836 (notif_stop): New variable.
8837 (handle_v_stopped): Remove.
8838 (handle_v_requests): Don't call handle_v_stopped. Call
8839 handle_ack_notif instead.
8840 (queue_stop_reply_callback): Call notif_event_enque instead
8841 of queue_stop_reply.
8842 (handle_status): Don't call send_next_stop_reply, call
8843 notif_write_event instead.
8844 (kill_inferior_callback): Likewise.
8845 (detach_or_kill_inferior_callback): Likewise.
8846 (main): Call initialize_notif.
8847 (process_serial_event): Call QUEUE_is_empty.
8848 (handle_target_event): Call notif_push instead of push event.
8849 * server.h (push_event): Remove declaration.
8850
8851 2012-12-10 Tom Tromey <tromey@redhat.com>
8852
8853 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8854 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8855 macros.
8856 (.c.o): Rewrite.
8857 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8858 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8859 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8860 (amd64-linux-ipa.o, ax.o): Rewrite.
8861 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8862 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8863 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8864 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8865 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8866 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8867 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8868 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8869 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8870 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8871 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8872 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8873 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8874 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8875 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8876 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8877 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8878 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8879 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8880 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8881 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8882 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8883 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8884 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8885 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8886 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8887 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8888 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8889 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8890 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8891 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8892 (reg-tilegx.o): Remove.
8893 (all_object_files): New macro.
8894 Include .deps files.
8895 * aclocal.m4, configure: Rebuild.
8896 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8897 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8898 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8899
8900 2012-12-05 Tom Tromey <tromey@redhat.com>
8901
8902 PR gdb/14917:
8903 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8904
8905 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8906
8907 * configure.ac: Check for linux/perf_event.h.
8908 * config.in: Regenerated.
8909 * configure: Regenerated.
8910
8911 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8912
8913 * hostio.c (handle_readlink): Decrease buffer size
8914 parameter passed to readlink by one byte.
8915
8916 2012-11-26 Yao Qi <yao@codesourcery.com>
8917
8918 * configure.ac (build_warnings): Append '-Wempty-body'.
8919 * configure: Regenerated.
8920 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8921 body.
8922
8923 2012-11-15 Pierre Muller <muller@sourceware.org>
8924
8925 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8926 * config.in: Regenerate.
8927 * configure: Regenerate.
8928 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8929 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8930 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8931 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8932 header.
8933 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8934 instead of <sys/wait.h> header.
8935 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8936
8937 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8938
8939 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8940 (various make rules): Remove -DGDBSERVER
8941
8942 2012-11-09 Yao Qi <yao@codesourcery.com>
8943
8944 * spu-low.c (current_ptid): Move it to ..
8945 * gdbthread.h: ... here. New.
8946 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8947 * server.c (myresume, process_serial_event): Likewise.
8948 * thread-db.c (thread_db_find_new_threads): Likewise.
8949 * tracepoint.c (run_inferior_command): Likewise.
8950
8951 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8952
8953 * server.c (handle_search_memory_1): Include access length in
8954 warning message.
8955
8956 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8957
8958 * linux-crisv32-low.c: Fix compile errors.
8959
8960 2012-09-04 Yao Qi <yao@codesourcery.com>
8961
8962 * tracepoint.c (cmd_qtsv): Adjust debug message.
8963 Don't check CUR_TPOINT.
8964
8965 2012-08-28 Yao Qi <yao@codesourcery.com>
8966
8967 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8968 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8969 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8970 Remove declarations of xmalloc, xreallloc, xstrdup and
8971 freeargv.
8972 * Makefile.in (libiberty_h): New.
8973 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8974 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8975
8976 2012-08-23 Yao Qi <yao@codesourcery.com>
8977
8978 * server.h: Remove declaration of 'xsnprintf'.
8979
8980 2012-08-22 Keith Seitz <keiths@redhat.com>
8981
8982 * server.h: Include build-gnulib-gbserver/config.h.
8983 * gdbreplay.c: Likewise.
8984
8985 2012-08-08 Doug Evans <dje@google.com>
8986
8987 * Makefile.in (SFILES): Add gdb_vecs.c.
8988 (OBS): Add gdb_vecs.o.
8989 (gdb_vecs_h, host_defs_h): New variables.
8990 (thread-db.o): Add $(gdb_vecs_h) dependency.
8991 (gdb_vecs.o): New rule.
8992 * thread-db.c: #include "gdb_vecs.h".
8993 (thread_db_load_search): Use a vector to iterate over path elements.
8994 Handle text appearing after "$pdir".
8995
8996 * configure.ac: Add check for strstr.
8997 * config.in: Regenerate.
8998 * configure: Regenerate.
8999
9000 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9001
9002 * hostio.c (handle_pread): If pread fails, fall back to attempting
9003 lseek/read.
9004 (handle_pwrite): Likewise for pwrite.
9005
9006 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9007
9008 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9009 between unsupported TYPE and unimplementable ADDR/LEN combination.
9010 (arm_insert_point): Act on new return value.
9011
9012 2012-07-31 Pedro Alves <palves@redhat.com>
9013
9014 * server.c (process_point_options): Only skip tokens if we find
9015 one that is unrecognized. Don't treat 'X' specially while
9016 skipping unrecognized tokens.
9017
9018 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9019
9020 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9021 to 4-byte-align HW breakpoint addresses for Thumb.
9022
9023 2012-07-27 Yao Qi <yao@codesourcery.com>
9024
9025 PR remote/14161.
9026
9027 * server.h: Declare gdb_agent_about_to_close.
9028 * target.c (kill_inferior): Include "agent.h".
9029 New. Send command 'kill'.
9030 * target.h (kill_inferior): Removed macro.
9031 * tracepoint.c (gdb_agent_about_to_close): New.
9032 (gdb_agent_helper_thread): Handle command 'close'.
9033 Wait endlessly until the inferior stops.
9034 Install gdb_agent_remove_socket to atexit hook.
9035 (agent_socket_name): New static variable.
9036 (gdb_agent_socket_init): Replace local variable 'name' with
9037 'agent_socket_name'.
9038 (gdb_agent_remove_socket): New.
9039
9040 2012-07-27 Yao Qi <yao@codesourcery.com>
9041
9042 * server.c (process_point_options): Stop at 'X' when parsing.
9043
9044 2012-07-19 Michael Eager <eager@eagercon.com>
9045
9046 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9047 to hw_execute.
9048 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9049 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9050 hardware breakpoint.
9051
9052 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9053
9054 * gdbserver/linux-low.c (initialize_low): Call
9055 linux_ptrace_init_warnings.
9056
9057 2012-07-02 Doug Evans <dje@google.com>
9058
9059 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9060 pointer to int.
9061
9062 2012-07-02 Stan Shebs <stan@codesourcery.com>
9063
9064 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9065 (ax.o): Add it to build rule.
9066 (ax-ipa.o): Ditto.
9067 (OBS): Add format.o.
9068 (IPA_OBS): Add format.o.
9069 * server.c (handle_query): Claim support for breakpoint commands.
9070 (process_point_options): Add command case.
9071 (process_serial_event): Leave running if there are printfs in
9072 effect.
9073 * mem-break.h (any_persistent_commands): Declare.
9074 (add_breakpoint_commands): Declare.
9075 (gdb_no_commands_at_breakpoint): Declare.
9076 (run_breakpoint_commands): Declare.
9077 * mem-break.c (struct point_command_list): New struct.
9078 (struct breakpoint): New field command_list.
9079 (any_persistent_commands): New function.
9080 (add_commands_to_breakpoint): New function.
9081 (add_breakpoint_commands): New function.
9082 (gdb_no_commands_at_breakpoint): New function.
9083 (run_breakpoint_commands): New function.
9084 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9085 locally.
9086 * ax.c: Include format.h.
9087 (ax_printf): New function.
9088 (gdb_eval_agent_expr): Add printf opcode.
9089
9090 2012-06-13 Yao Qi <yao@codesourcery.com>
9091
9092 * server.c (start_inferior): Remove duplicated writes to fields
9093 'last_resume_kind' and 'last_status' of 'current_inferior'.
9094
9095 2012-06-12 Yao Qi <yao@codesourcery.com>
9096 Pedro Alves <palves@redhat.com>
9097
9098 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9099 comment.
9100 * server.c (handle_v_cont): Extend comment.
9101
9102 2012-06-11 Yao Qi <yao@codesourcery.com>
9103
9104 * linux-low.c (linux_attach): Add 'static'.
9105
9106 2012-06-06 Yao Qi <yao@codesourcery.com>
9107
9108 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9109
9110 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9111
9112 Fix gcc -flto compilation warning.
9113 * server.c (main): Make variable multi_mode and attach volatile.
9114
9115 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9116
9117 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9118 if the platform doesn't know about it.
9119
9120 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9121
9122 * Makefile.in (SFILES): Add linux-tile-low.c.
9123 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9124 * configure.srv: Handle tilegx-*-linux*.
9125 * linux-tile-low.c: New file.
9126
9127 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9128
9129 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9130
9131 2012-05-24 Pedro Alves <palves@redhat.com>
9132
9133 PR gdb/7205
9134
9135 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9136
9137 2012-05-24 Pedro Alves <palves@redhat.com>
9138
9139 PR gdb/7205
9140
9141 Replace target_signal with gdb_signal throughout.
9142
9143 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9144
9145 * linux-low.c (linux_store_registers): Avoid the copying sequence
9146 when no data has been retrieved by ptrace.
9147
9148 2012-05-22 Will Deacon <will.deacon@arm.com>
9149
9150 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9151 Include asm/ptrace.h.
9152 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9153 already defined.
9154
9155 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9156
9157 * linux-low.c (linux_store_registers): Don't re-retrieve data
9158 with ptrace that has already been obtained from /proc. Always
9159 copy any data retrieved with ptrace to the buffer supplied.
9160
9161 2012-05-11 Yao Qi <yao@codesourcery.com>
9162 Pedro Alves <palves@redhat.com>
9163
9164 * linux-low.c (enum stopping_threads_kind): New.
9165 (stopping_threads): Change type to `enum stopping_threads_kind'.
9166 (handle_extended_wait): If stopping and suspending threads, leave
9167 the new_lwp suspended too.
9168 (linux_wait_for_event): Adjust.
9169 (stop_all_lwps): Set `stopping_threads' to
9170 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9171 whether we're suspending threads or just stopping them. Assert no
9172 recursion happens.
9173
9174 2012-04-29 Yao Qi <yao@codesourcery.com>
9175
9176 * server.h: Move some code to ...
9177 * gdbthread.h: ... here. New.
9178 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9179 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9180 (nto-low.o, win32-low.o): Likewise.
9181 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9182 * regcache.c, remote-utils.c, server.c: Likewise.
9183 * target.c, tracepoint.c, win32-low.c: Likewise.
9184
9185 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9186
9187 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9188 (PTRACE_ARG4_TYPE): Likewise.
9189 (PTRACE_XFER_TYPE): Likewise.
9190 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9191 ptrace to PTRACE_ARG3_TYPE.
9192 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9193 (PTRACE_ARG4_TYPE): Likewise.
9194 (PTRACE_XFER_TYPE): Likewise.
9195 (linux_detach_one_lwp): Cast fourth argument of
9196 ptrace to long then PTRACE_ARG4_TYPE.
9197 (regsets_fetch_inferior_registers): Cast third argument of
9198 ptrace to long then PTRACE_ARG3_TYPE.
9199 (regsets_store_inferior_registers): Likewise.
9200
9201 2012-04-20 Pedro Alves <palves@redhat.com>
9202
9203 * configure: Regenerate.
9204
9205 2012-04-19 Pedro Alves <palves@redhat.com>
9206
9207 * Makefile.in (GNULIB_BUILDDIR): New.
9208 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9209 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9210 (all, install-only, uninstall, clean-info, all-lib, clean): No
9211 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9212 (maintainer-clean realclean distclean): Use subdir_do.
9213 (subdir_do): New.
9214 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9215 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9216 * acinclude.m4: Include acx_configure_dir.m4.
9217 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9218 calls. Call AC_PROG_RANLIB. Configure gnulib using
9219 ACX_CONFIGURE_DIR.
9220 (GNULIB): New.
9221 (GNULIB_STDINT_H): Adjust.
9222 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9223 * gdbreplay.c: Include build-gnulib/config.h.
9224 * server.h: Likewise.
9225 * aclocal.m4: Regenerate.
9226 * config.in: Regenerate.
9227 * configure: Regenerate.
9228
9229 2012-04-19 Pedro Alves <palves@redhat.com>
9230
9231 * Makefile.in (LIBGNU, INCGNU): Adjust.
9232 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9233 (all, install-only, uninstall, clean-info, all-lib, clean)
9234 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9235 * configure.ac: Adjust AC_OUTPUT output.
9236 * aclocal.m4: Regenerate.
9237 * configure: Regenerate.
9238
9239 2012-04-19 Pedro Alves <palves@redhat.com>
9240
9241 * Makefile.in (generated_files): New.
9242 (server_h): Remove the explicit dependency on config.h, and depend
9243 on $generated_files.
9244
9245 2012-04-19 Pedro Alves <palves@redhat.com>
9246
9247 * Makefile.in (INCGNU): Add -Ignulib.
9248
9249 2012-04-19 Pedro Alves <palves@redhat.com>
9250
9251 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9252 (INCGNU): ... this, and spell out -I here.
9253 (GNULIB_LIB): Rename to ...
9254 (LIBGNU): ... this.
9255 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9256
9257 2012-04-19 Pedro Alves <palves@redhat.com>
9258
9259 * config.in: Regenerate.
9260
9261 2012-04-19 Pedro Alves <palves@redhat.com>
9262
9263 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9264 * server.h (memmem): Remove declaration.
9265 * config.in: Regenerate.
9266 * configure: Regenerate.
9267
9268 2012-04-19 Yao Qi <yao@codesourcery.com>
9269
9270 * Makefile.in (SFILES): Add common/vec.c.
9271 (OBS): Add vec.o.
9272 (vec.o): New rule.
9273
9274 2012-04-19 Yao Qi <yao@codesourcery.com>
9275
9276 * remote-utils.c (prepare_resume_reply): Replace with macro
9277 target_core_of_thread.
9278 * server.c (handle_qxfer_threads_proper): Likewise.
9279 * target.h (traget_core_of_thread): New macro.
9280
9281 2012-04-18 Pedro Alves <palves@redhat.com>
9282
9283 * aclocal.m4: Regenerate.
9284 * configure: Regenerate.
9285
9286 2012-04-16 Yao Qi <yao@codesourcery.com>
9287
9288 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9289 duplicated on address.
9290
9291 2012-04-16 Yao Qi <yao@codesourcery.com>
9292
9293 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9294 (struct tracepoint_action_ops) <send>: New field.
9295 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9296 (agent_expr_send, x_tracepoint_action_send): New.
9297 (l_tracepoint_action_send): New.
9298 (cmd_qtdp): Download and install tracepoint
9299 according to `use_agent'.
9300 (run_inferior_command): Add one more parameter `len'.
9301 Update callers.
9302 (tracepoint_send_agent): New.
9303 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9304
9305 2012-04-16 Yao Qi <yao@codesourcery.com>
9306
9307 * tracepoint.c (download_tracepoints): Moved to ...
9308 (cmd_qtstart): ... here.
9309
9310 2012-04-14 Yao Qi <yao@codesourcery.com>
9311
9312 * tracepoint.c: Include inttypes.h.
9313 (struct collect_memory_action): Use sized types.
9314 (struct tracepoint): Likewise.
9315 (cmd_qtdp, stop_tracing): Update print specifiers.
9316 (cmd_qtp, response_tracepoint): Likewise.
9317 (collect_data_at_tracepoint): Likewise.
9318 (collect_data_at_step): Likewise.
9319
9320 2012-04-14 Yao Qi <yao@codesourcery.com>
9321
9322 Import gnulib module inttypes.
9323 * aclocal.m4, config.in, configure: Regenerated.
9324
9325 2012-04-14 Yao Qi <yao@codesourcery.com>
9326
9327 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9328 Makefile and config.status at last.
9329
9330 2012-04-13 Yao Qi <yao@codesourcery.com>
9331
9332 * tracepoint.c: Include stdint.h unconditionally.
9333
9334 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9335
9336 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9337 on BFD_HAVE_SYS_PROCFS_TYPE.
9338 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9339 * configure: Regenerate.
9340 * config.in: Likewise.
9341
9342 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9343
9344 * Makefile.in (clean): Also remove x32.c x32-linux.c
9345 x32-avx.c x32-avx-linux.c.
9346 (x32.o): New target.
9347 (x32.c): Likewise.
9348 (x32-linux.o): Likewise.
9349 (x32-linux.c): Likewise.
9350 (x32-avx.o): Likewise.
9351 (x32-avx.c): Likewise.
9352 (x32-avx-linux.o): Likewise.
9353 (x32-avx-linux.c): Likewise.
9354
9355 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9356 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9357 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9358 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9359 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9360 i386/x32-avx-linux.xml.
9361
9362 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9363 (init_registers_x32_avx_linux): Likwise.
9364 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9365 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9366
9367 2012-04-13 Pedro Alves <palves@redhat.com>
9368
9369 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9370 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9371 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9372 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9373 the sub-make.
9374
9375 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9376
9377 * linux-x86-low.c (compat_x32_clock_t): New.
9378 (compat_x32_siginfo_t): Likewise.
9379 (compat_x32_siginfo_from_siginfo): Likewise.
9380 (siginfo_from_compat_x32_siginfo): Likewise.
9381 (linux_is_elf64): Likewise.
9382 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9383 and siginfo_from_compat_x32_siginfo for x32.
9384 (x86_arch_setup): Set linux_is_elf64.
9385
9386 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9387
9388 PR gdb/13969
9389 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9390 e_machine field.
9391 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9392 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9393 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9394 compatible with process.
9395
9396 2012-04-12 Yao Qi <yao@codesourcery.com>
9397
9398 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9399 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9400 (install-only, install-info, clean): Handle sub dir gnulib.
9401 (all-lib, am--refresh): New targets.
9402 (memmem.o): Remove target.
9403 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9404 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9405 (AC_REPLACE_FUNCS): Remove memmem.
9406 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9407 (AC_OUTPUT): Generate Makefile in gnulib/.
9408 * aclocal.m4, config.in, configure: Regenerated.
9409
9410 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9411
9412 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9413
9414 2012-04-05 Pedro Alves <palves@redhat.com>
9415
9416 -Werror=strict-aliasing
9417
9418 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9419 pointer.
9420
9421 2012-04-04 Pedro Alves <palves@redhat.com>
9422
9423 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9424 (sparc_store_gregset_from_stack, sparc_store_gregset)
9425 (sparc_breakpoint_at): Fix formatting.
9426
9427 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9428
9429 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9430 are available.
9431 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9432 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9433 * config.in: Regenerate.
9434 * configure: Likewise.
9435
9436 2012-03-29 Pedro Alves <palves@redhat.com>
9437
9438 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9439 Correct ptrace arguments.
9440
9441 2012-03-28 Pedro Alves <palves@redhat.com>
9442
9443 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9444 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9445 (IA64_FR1_REGNUM): New defines.
9446 (ia64_fetch_register): New.
9447 (the_low_target): Install it.
9448 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9449 field.
9450 * linux-low.c (linux_fetch_registers): Try the
9451 the_low_target.fetch_register hook first.
9452
9453 * linux-arm-low.c (the_low_target): Adjust.
9454 * linux-bfin-low.c (the_low_target): Adjust.
9455 * linux-cris-low.c (the_low_target): Adjust.
9456 * linux-crisv32-low.c (the_low_target): Adjust.
9457 * linux-m32r-low.c (the_low_target): Adjust.
9458 * linux-m68k-low.c (the_low_target): Adjust.
9459 * linux-mips-low.c (the_low_target): Adjust.
9460 * linux-ppc-low.c (the_low_target): Adjust.
9461 * linux-s390-low.c (the_low_target): Adjust.
9462 * linux-sh-low.c (the_low_target): Adjust.
9463 * linux-sparc-low.c (the_low_target): Adjust.
9464 * linux-tic6x-low.c (the_low_target): Adjust.
9465 * linux-x86-low.c (the_low_target): Adjust.
9466 * linux-xtensa-low.c (the_low_target): Adjust.
9467
9468 2012-03-26 Pedro Alves <palves@redhat.com>
9469
9470 * server.c (handle_qxfer_libraries): Don't bail early if
9471 the_target->qxfer_libraries_svr4 is not NULL.
9472
9473 2012-03-26 Pedro Alves <palves@redhat.com>
9474
9475 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9476
9477 2012-03-23 Pedro Alves <palves@redhat.com>
9478
9479 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9480 "library-list-svr4" element's start tag when the the DSO list is
9481 empty.
9482
9483 2012-03-23 Pedro Alves <palves@redhat.com>
9484
9485 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9486 a variable whose type size is the same as the inferior's pointer
9487 size.
9488
9489 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9490
9491 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9492 struct siginfo.
9493 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9494 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9495 * linux-low.h: Include <signal.h>.
9496 (struct siginfo): Remove forward declaration.
9497 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9498 struct siginfo.
9499
9500 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9501
9502 * .gitignore: Ignore more files.
9503
9504 2012-03-19 Pedro Alves <palves@redhat.com>
9505 Jan Kratochvil <jan.kratochvil@redhat.com>
9506
9507 * server.c (cont_thread, general_thread): Add describing comments.
9508 (start_inferior): Clear `cont_thread'.
9509 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9510 of a process.
9511
9512 2012-03-15 Yao Qi <yao@codesourcery.com>
9513
9514 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9515 handling to ...
9516 (cmd_qtdp): ... here.
9517
9518 2012-03-15 Yao Qi <yao@codesourcery.com>
9519
9520 * tracepoint.c (struct tracepoint_action_ops): New.
9521 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9522 (m_tracepoint_action_download): New.
9523 (r_tracepoint_action_download): New.
9524 (x_tracepoint_action_download): New.
9525 (l_tracepoint_action_download): New.
9526 (add_tracepoint_action): Install `action->ops' according type.
9527 (download_tracepoint_1): Move code `download' function pointer
9528 of various tracepoint_action_ops.
9529
9530 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9531
9532 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9533 linux_ptrace_attach_warnings.
9534
9535 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9536
9537 * Makefile.in (linux-ptrace.o): New.
9538 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9539 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9540 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9541 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9542 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9543 of these targets.
9544 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9545
9546 2012-03-08 Yao Qi <yao@codesourcery.com>
9547 Pedro Alves <palves@redhat.com>
9548
9549 Fix PR server/13392.
9550 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9551 offset of JMP insn.
9552 * tracepoint.c (remove_tracepoint): New.
9553 (cmd_qtdp): Call remove_tracepoint when failed to install.
9554
9555 2012-03-07 Pedro Alves <palves@redhat.com>
9556
9557 * linux-low.c (get_detach_signal): New.
9558 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9559 Pass on pending signals to PTRACE_DETACH. Check the result of the
9560 ptrace call.
9561 * server.c (program_signals, program_signals_p): New.
9562 (handle_general_set): Handle QProgramSignals.
9563 * server.h (program_signals, program_signals_p): Declare.
9564
9565 2012-03-05 Pedro Alves <palves@redhat.com>
9566 Jan Kratochvil <jan.kratochvil@redhat.com>
9567
9568 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9569 New comment why.
9570
9571 2012-03-03 Yao Qi <yao@codesourcery.com>
9572
9573 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9574 agent_look_up_symbols.
9575
9576 2012-03-03 Yao Qi <yao@codesourcery.com>
9577
9578 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9579 (linux-x86-low.o): Likewise.
9580 * server.h: Remove in_process_agent_loaded.
9581 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9582 common/agent.c.
9583 Update callers.
9584
9585 2012-03-03 Yao Qi <yao@codesourcery.com>
9586
9587 * tracepoint.c (gdb_agent_capability): New global.
9588 (in_process_agent_loaded_ust): Renamed to
9589 `in_process_agent_supports_ust'.
9590 Update callers.
9591 (in_process_agent_supports_ust): Call agent_capability_check.
9592 (clear_installed_tracepoints): Assert that agent supports
9593 agent.
9594
9595 2012-03-03 Yao Qi <yao@codesourcery.com>
9596
9597 * linux-low.c (linux_supports_agent): New.
9598 (linux_target_ops): Initialize field `supports_agent' with
9599 linux_supports_agent.
9600 * target.h (struct target_ops) <supports_agent>: New.
9601 (target_supports_agent): New macro.
9602 * server.c (handle_general_set): Handle packet 'QAgent'.
9603 (handle_query): Send `QAgent+'.
9604 * Makefile.in (server.o): Depends on agent.h.
9605
9606 2012-03-03 Yao Qi <yao@codesourcery.com>
9607
9608 * Makefile.in (OBS): Add agent.o.
9609 Add new rule for agent.o.
9610 Track dependence of tracepoint.c on agent.h.
9611 * tracepoint.c (run_inferior_command_1):
9612 (run_inferior_command): Call agent_run_command.
9613 (gdb_ust_connect_sync_socket): Deleted. Move it to
9614 common/agent.c.
9615 (resume_thread, stop_thread): Likewise.
9616 (gdb_ust_socket_init): Renamed to ...
9617 (gdb_agent_socket_init): ... New.
9618 (gdb_ust_thread): Renamed to ...
9619 (gdb_agent_helper_thread): ... New.
9620 (gdb_ust_init): Move some code to ...
9621 (gdb_agent_init): ... here. New.
9622 [HAVE_UST]: Call gdb_ust_init.
9623 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9624 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9625 * config.in, configure: Regenerated.
9626
9627 2012-03-02 Pedro Alves <palves@redhat.com>
9628
9629 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9630 * linux-low.c (struct simple_pid_list): New.
9631 (stopped_pids): New a struct simple_pid_list pointer.
9632 (add_to_pid_list, pull_pid_from_list): New.
9633 (handle_extended_wait): Don't assume the first signal new children
9634 report is SIGSTOP. Adjust call to pull_pid_from_list.
9635 (linux_wait_for_lwp): Adjust.
9636
9637 2012-03-02 Yao Qi <yao@codesourcery.com>
9638
9639 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9640 debug log.
9641
9642 2012-03-02 Yao Qi <yao@codesourcery.com>
9643
9644 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9645 `stop_pc' and `tpoint'. Update caller.
9646
9647 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9648
9649 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9650 * linux-low.c (use_linux_regsets): New macro.
9651 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9652 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9653 (linux_register_in_regsets): New function.
9654 (usr_fetch_inferior_registers): Skip registers covered by
9655 regsets.
9656 (usr_store_inferior_registers): Likewise.
9657 (usr_fetch_inferior_registers): New macro.
9658 (usr_store_inferior_registers): Likewise.
9659 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9660 (linux_store_registers): Likewise.
9661 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9662 prototype.
9663 (init_registers_mips64_dsp_linux): Likewise.
9664 (init_registers_mips_linux): New macro.
9665 (init_registers_mips_dsp_linux): Likewise.
9666 (mips_dsp_num_regs): Likewise.
9667 (DSP_BASE, DSP_CONTROL): New fallback macros.
9668 (mips_base_regs): New macro.
9669 (mips_regmap): Use it. Fix the size.
9670 (mips_dsp_regmap): New variable.
9671 (mips_dsp_regset_bitmap): Likewise.
9672 (mips_arch_setup): New function.
9673 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9674 than mips_regmap.
9675 (mips_cannot_store_register): Likewise.
9676 (the_low_target): Update .arch_setup, .num_regs and .regmap
9677 initializers. Add .regset_bitmap initializer.
9678 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9679 initializer.
9680 * linux-bfin-low.c (the_low_target): Likewise.
9681 * linux-cris-low.c (the_low_target): Likewise.
9682 * linux-crisv32-low.c (the_low_target): Likewise.
9683 * linux-ia64-low.c (the_low_target): Likewise.
9684 * linux-m32r-low.c (the_low_target): Likewise.
9685 * linux-m68k-low.c (the_low_target): Likewise.
9686 * linux-ppc-low.c (the_low_target): Likewise.
9687 * linux-s390-low.c (the_low_target): Likewise.
9688 * linux-sh-low.c (the_low_target): Likewise.
9689 * linux-sparc-low.c (the_low_target): Likewise.
9690 * linux-tic6x-low.c (the_low_target): Likewise.
9691 * linux-x86-low.c (the_low_target): Likewise.
9692 * linux-xtensa-low.c (the_low_target): Likewise.
9693 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9694 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9695 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9696 srv_xmlfiles.
9697 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9698 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9699
9700 2012-02-29 Yao Qi <yao@codesourcery.com>
9701 Pedro Alves <palves@redhat.com>
9702
9703 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9704 `step_over_finished' is true.
9705
9706 2012-02-27 Pedro Alves <palves@redhat.com>
9707
9708 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9709 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9710
9711 2012-02-27 Pedro Alves <palves@redhat.com>
9712
9713 PR server/9684
9714 * linux-low.c (pid_is_stopped): New.
9715 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9716
9717 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9718
9719 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9720 of conditions.
9721
9722 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9723
9724 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9725
9726 2012-02-24 Luis Machado <lgustavo@codesourcery>
9727
9728 * server.c (handle_query): Advertise support for target-side
9729 breakpoint condition evaluation.
9730 (process_point_options): New function.
9731 (process_serial_event): When inserting a breakpoint, check for
9732 a target-side condition that should be evaluated.
9733
9734 * mem-break.c: Include regcache.h and ax.h.
9735 (point_cond_list_t): New data structure.
9736 (breakpoint) <cond_list>: New field.
9737 (find_gdb_breakpoint_at): Make non-static.
9738 (delete_gdb_breakpoint_at): Clear any target-side
9739 conditions.
9740 (clear_gdb_breakpoint_conditions): New function.
9741 (add_condition_to_breakpoint): Likewise.
9742 (add_breakpoint_condition): Likewise.
9743 (gdb_condition_true_at_breakpoint): Likewise.
9744 (gdb_breakpoint_here): Return result directly instead
9745 of going through a local variable.
9746
9747 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9748 (clear_gdb_breakpoint_conditions): Likewise.
9749 (add_breakpoint_condition): Likewise.
9750 (gdb_condition_true_at_breakpoint): Likewise.
9751
9752 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9753 (need_step_over_p): Take target-side breakpoint condition into
9754 consideration.
9755
9756 2012-02-24 Luis Machado <lgustavo@codesourcery>
9757
9758 * server.h: Include tracepoint.h.
9759 (agent_mem_read, agent_get_trace_state_variable_value,
9760 agent_set_trace_state_variable_value,
9761 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9762 get_set_tsv_func_addr): New prototypes.
9763
9764 * ax.h: New include file.
9765 * ax.c: New source file.
9766
9767 * tracepoint.c: Include ax.h.
9768 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9769 agent_expr, eval_result_type): Move to ax.h.
9770 (parse_agent_expr): Rename to ...
9771 (gdb_parse_agent_expr): ... this, make it non-static and move
9772 to ax.h.
9773 (unparse_agent_expr) Rename to ...
9774 (gdb_unparse_agent_expr): ... this, make it non-static and move
9775 to ax.h.
9776 (eval_agent_expr): Rename to ...
9777 (eval_tracepoint_agent_expr): ... this.
9778 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9779 forward declarations.
9780 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9781 (agent_get_trace_state_variable_value): New function.
9782 (agent_set_trace_state_variable_value): New function.
9783 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9784 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9785 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9786 (condition_true_at_tracepoint): Likewise.
9787 (parse_agent_expr): Rename to ...
9788 (gdb_parse_agent_expr): ... this and move to ax.c.
9789 (unparse_agent_expr): Rename to ...
9790 (gdb_unparse_agent_expr): ... this and move to ax.c.
9791 (gdb_agent_op_name): Move to ax.c.
9792 (eval_agent_expr): Rename to ...
9793 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9794 and move to ax.c.
9795 (eval_tracepoint_agent_expr): New function.
9796 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9797 non-static.
9798 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9799 ax.c.
9800 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9801 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9802 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9803 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9804 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9805 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9806 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9807 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9808 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9809 (compile_bytecodes): Remove forward declaration.
9810 (is_goto_target): Move to ax.c.
9811 (compile_bytecodes): Move to ax.c and call
9812 agent_get_trace_state_variable_value (...) and
9813 agent_set_trace_state_variable_value (...).
9814
9815 * Makefile.in: Update ax.c and IPA dependencies.
9816
9817 2012-02-24 Pedro Alves <palves@redhat.com>
9818
9819 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9820 (cmd_bigqtbuffer_circular): ... this. Only handle
9821 'QTBuffer:circular:'.
9822 (handle_tracepoint_general_set): Adjust.
9823
9824 2012-02-16 Yao Qi <yao@codesourcery.com>
9825
9826 * inferiors.c: Move code to ...
9827 * dll.c: .... here. New.
9828 * server.h: Declare clear_dlls.
9829 * Makefile.in (SFILES): Add dll.c.
9830 (OBS): Add dll.o
9831 (dll.o): New rule.
9832
9833 2012-02-11 Yao Qi <yao@codesourcery.com>
9834
9835 * server.c: (handle_monitor_command): Add a new parameter
9836 `own_buf'.
9837 (handle_query): Update caller.
9838
9839 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9840
9841 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9842 * configure, config.in: Regenerate.
9843 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9844 is not defined.
9845
9846 2012-02-02 Pedro Alves <palves@redhat.com>
9847
9848 Try SIGKILL first, then PTRACE_KILL.
9849 * linux-low.c (linux_kill_one_lwp): New.
9850 (linux_kill_one_lwp): Rename to ...
9851 (kill_one_lwp_callback): ... this. Use the new
9852 linux_kill_one_lwp.
9853
9854 2012-02-02 Pedro Alves <palves@redhat.com>
9855
9856 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9857 inferior.
9858
9859 2012-01-27 Pedro Alves <palves@redhat.com>
9860
9861 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9862 (elf_64_file_p): Make static.
9863 (linux_pid_exe_is_elf_64_file): New.
9864 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9865 Delete declarations.
9866 (linux_pid_exe_is_elf_64_file): Declare.
9867 * linux-x86-low.c (x86_arch_setup): Use
9868 linux_pid_exe_is_elf_64_file.
9869
9870 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9871
9872 * linux-low.c (linux_wait_for_event_1): Rename to ...
9873 (linux_wait_for_event): ... here and merge it with former
9874 linux_wait_for_event - new variable wait_ptid, use it.
9875 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9876
9877 2012-01-23 Pedro Alves <palves@redhat.com>
9878
9879 * server.c (main): Avoid yet another case of infinite loop while
9880 detaching/killing after a longjmp.
9881
9882 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9883
9884 Code cleanup.
9885 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9886
9887 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9888
9889 * hostio.c (handle_readlink): New function.
9890 (handle_vFile): Call it to handle "vFile:readlink" packets.
9891
9892 2012-01-20 Pedro Alves <palves@redhat.com>
9893 Ulrich Weigand <ulrich.weigand@linaro.org>
9894
9895 * server.c (handle_v_requests): Only support vAttach and vRun to
9896 start multiple processes when in extended protocol mode.
9897
9898 2012-01-17 Pedro Alves <palves@redhat.com>
9899
9900 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9901 memalign plus mprotect to allocate the scratch buffer.
9902
9903 2012-01-13 Pedro Alves <palves@redhat.com>
9904
9905 * server.c (attach_inferior): Clear `cont_thread'.
9906
9907 2012-01-13 Pedro Alves <palves@redhat.com>
9908
9909 * server.c (main): Avoid infinite loop while detaching/killing
9910 after a longjmp.
9911
9912 2012-01-09 Doug Evans <dje@google.com>
9913
9914 * server.c (start_inferior): Set last_ptid in --wrapper case.
9915
9916 2012-01-06 Yao Qi <yao@codesourcery.com>
9917
9918 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9919 defined.
9920 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9921
9922 2012-01-04 Yao Qi <yao@codesourcery.com>
9923
9924 * tracepoint.c (cmd_qtdp): Print debug message
9925 for static tracepoint.
9926
9927 2012-01-04 Yao Qi <yao@codesourcery.com>
9928
9929 * tracepoint.c (trace_vdebug): Differentiate debug message
9930 between gdbserver and IPA.
9931
9932 2012-01-03 Yao Qi <yao@codesourcery.com>
9933
9934 * tracepoint.c (tracepoint_was_hit): Don't collect for
9935 static tracepoint.
9936
9937 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9938
9939 * terminal.h: Reformat copyright header.
9940
9941 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9942
9943 * server.c (gdbserver_version): Update copyright year.
9944 * gdbreplay.c (gdbreplay_version): Likewise.
9945
9946 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9947
9948 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9949
9950 Revert:
9951 2011-12-18 Hui Zhu <teawater@gmail.com>
9952 * linux-low.c (linux_create_inferior): Save return value to ret.
9953
9954 2011-12-18 Hui Zhu <teawater@gmail.com>
9955
9956 * linux-low.c (linux_create_inferior): Save return value to ret.
9957
9958 2011-12-16 Doug Evans <dje@google.com>
9959
9960 * linux-low.c (linux_create_inferior): If stdio connection,
9961 redirect stdin from /dev/null, stdout to stderr.
9962 * remote-utils.c (remote_is_stdio): New static global.
9963 (remote_connection_is_stdio): New function.
9964 (remote_prepare): Handle stdio connection.
9965 (remote_open): Ditto.
9966 (remote_close): Don't close stdin for stdio connections.
9967 (read_prim,write_prim): New functions. Replace all calls to
9968 read/write to these.
9969 * server.c (main): Watch for "-" argument. Move call to
9970 remote_prepare before start_inferior.
9971 * server.h (STDIO_CONNECTION_NAME): New macro.
9972 (remote_connection_is_stdio): Declare.
9973
9974 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9975 in debugging output.
9976
9977 2011-12-15 Yao Qi <yao@codesourcery.com>
9978
9979 * tracepoint.c: Include sys/syscall.h.
9980 (gdb_ust_thread): Remove preprocessor conditional.
9981
9982 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9983
9984 * linux-low.c (linux_detach_one_lwp): Call
9985 the_low_target.prepare_to_resume before detaching.
9986
9987 2011-12-14 Yao Qi <yao@codesourcery.com>
9988
9989 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9990 of write.
9991
9992 2011-12-14 Yao Qi <yao@codesourcery.com>
9993
9994 * i386-low.c (i386_low_stopped_data_address): Initialize local
9995 variable `control'.
9996
9997 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9998
9999 PR remote/13492
10000
10001 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10002 DR_CONTROL unless necessary. Extend comments.
10003 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10004 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10005
10006 2011-12-13 Yao Qi <yao@codesourcery.com>
10007
10008 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10009 macros.
10010 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10011
10012 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10013
10014 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10015 Print new debug message for such case.
10016
10017 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10018
10019 Fix overlapping memcpy.
10020 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10021 the read_inferior_memory transfer.
10022 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10023 write_inferior_memory transfer.
10024 (set_fast_tracepoint_jump): New variable buf. Use it for the
10025 read_inferior_memory and write_inferior_memory transfers.
10026 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10027 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10028 Use it for the write_inferior_memory transfer.
10029 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10030 buffers.
10031
10032 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10033
10034 * linux-low.c (fetch_register, store_register): Make code
10035 consistent, fix formatting.
10036
10037 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10038
10039 * linux-low.c (usr_store_inferior_registers): Factor out code
10040 to handle individual registers into...
10041 (store_register): ... this new function.
10042
10043 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10044
10045 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10046 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10047 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10048 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10049 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10050 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10051 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10052 (srv_xmlfiles): Add new XML files.
10053
10054 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10055 and <sys/uio.h>.
10056 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10057 (init_registers_s390_linux32v1): Add prototype.
10058 (init_registers_s390_linux32v2): Likewise.
10059 (init_registers_s390_linux64v1): Likewise.
10060 (init_registers_s390_linux64v2): Likewise.
10061 (init_registers_s390x_linux64v1): Likewise.
10062 (init_registers_s390x_linux64v2): Likewise.
10063 (s390_num_regs): Increment to 52.
10064 (s390_regmap): Add orig_r2 register.
10065 (s390_num_regs_3264): Increment to 68.
10066 (s390_regmap_3264): Add orig_r2 register.
10067 (s390_collect_ptrace_register): Handle orig_r2 register.
10068 (s390_supply_ptrace_register): Likewise.
10069 (s390_fill_last_break): New function.
10070 (s390_store_last_break): Likewise.
10071 (s390_fill_system_call): New function.
10072 (s390_store_system_call): Likewise.
10073 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10074 register sets.
10075 (s390_check_regset): New function.
10076 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10077 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10078 Update target_regsets for available register sets.
10079
10080 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10081 Jan Kratochvil <jan.kratochvil@redhat.com>
10082
10083 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10084 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10085 New.
10086 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10087 * linux-low.h (struct process_info_private): New member r_debug.
10088 * server.c (handle_qxfer_libraries): Call
10089 the_target->qxfer_libraries_svr4.
10090 (handle_qxfer_libraries_svr4): New function.
10091 (qxfer_packets): New entry "libraries-svr4".
10092 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10093 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10094 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10095 PACKET_qXfer_libraries_svr4.
10096
10097 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10098
10099 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10100 PSW address/mask between 8-byte and 16-byte formats.
10101 (s390_supply_ptrace_register): Likewise.
10102 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10103 basic addressing mode bit.
10104
10105 2011-11-24 Stan Shebs <stan@codesourcery.com>
10106
10107 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10108
10109 2011-11-17 Stan Shebs <stan@codesourcery.com>
10110
10111 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10112 (tracing_start_time): New global.
10113 (tracing_stop_time): New global.
10114 (tracing_user_name): New global.
10115 (tracing_notes): New global.
10116 (tracing_stop_note): New global.
10117 (cmd_qtstart): Set traceframe_usage, start_time.
10118 (stop_tracing): Set stop_time.
10119 (cmd_qtstatus): Report additional status.
10120 (cmd_qtp): New function.
10121 (handle_tracepoint_query): Call it.
10122 (cmd_qtnotes): New function.
10123 (handle_tracepoint_general_set): Call it.
10124 (get_timestamp): Rename from tsv_get_timestamp.
10125
10126 2011-11-14 Stan Shebs <stan@codesourcery.com>
10127 Kwok Cheung Yeung <kcy@codesourcery.com>
10128
10129 * linux-x86-low.c (small_jump_insn): New.
10130 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10131 trampoline and error message, build a trampoline and issue a small
10132 jump instruction to it.
10133 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10134 trampoline and error message.
10135 (x86_get_min_fast_tracepoint_insn_len): New.
10136 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10137 * linux-low.h (struct linux_target_ops): Add arguments to
10138 install_fast_tracepoint_jump_pad operation, add new operation.
10139 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10140 arguments.
10141 (linux_get_min_fast_tracepoint_insn_len): New function.
10142 (linux_target_op): Add new operation.
10143 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10144 (gdb_trampoline_buffer_end): Ditto.
10145 (gdb_trampoline_buffer_error): Ditto.
10146 (struct ipa_sym_addresses): Add fields for new IPA variables.
10147 (symbol_list): Add entries for new IPA variables.
10148 (struct tracepoint): Add fields to hold the address range of the
10149 trampoline used by the tracepoint.
10150 (trampoline_buffer_head): New static variable.
10151 (trampoline_buffer_tail): Ditto.
10152 (claim_trampoline_space): New function.
10153 (have_fast_tracepoint_trampoline_buffer): New function.
10154 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10155 structure.
10156 (install_fast_tracepoint): Ditto, also add error buffer argument.
10157 (cmd_qtminftpilen): New function.
10158 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10159 (fast_tracepoint_from_trampoline_address): New function.
10160 (fast_tracepoint_collecting): Handle trampoline as part of jump
10161 pad space.
10162 (set_trampoline_buffer_space): New function.
10163 (initialize_tracepoint): Initialize new IPA variables.
10164 * target.h (struct target_ops): Add arguments to
10165 install_fast_tracepoint_jump_pad operation, add new
10166 get_min_fast_tracepoint_insn_len operation.
10167 (target_get_min_fast_tracepoint_insn_len): New.
10168 (install_fast_tracepoint_jump_pad): Add arguments.
10169 * server.h (IPA_BUFSIZ): Define.
10170 * linux-i386-ipa.c: Include extra header files.
10171 (initialize_fast_tracepoint_trampoline_buffer): New function.
10172 (initialize_low_tracepoint): Call it.
10173 * server.h (set_trampoline_buffer_space): Declare.
10174 (claim_trampoline_space): Ditto.
10175 (have_fast_tracepoint_trampoline_buffer): Ditto.
10176
10177 2011-11-14 Yao Qi <yao@codesourcery.com>
10178
10179 * server.c (handle_query): Handle InstallInTrace for qSupported.
10180 * tracepoint.c (add_tracepoint): Sort list.
10181 (install_tracepoint, download_tracepoint): New.
10182 (cmd_qtdp): Call them to install and download tracepoints.
10183 (sort_tracepoints): Removed.
10184 (cmd_qtstart): Update.
10185
10186 2011-11-14 Yao Qi <yao@codesourcery.com>
10187
10188 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10189 * mem-break.h: Declare.
10190 * tracepoint.c (cmd_qtstart): Move some code to ...
10191 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10192 New.
10193 (download_tracepoints): Move some code to ...
10194 (download_tracepoint_1): ... here. New.
10195
10196 2011-11-08 Yao Qi <yao@codesourcery.com>
10197
10198 * remote-utils.c (relocate_instruction): A comment fix.
10199
10200 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10201
10202 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10203 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10204 dr_status_mirror and dr_control_mirror from debug_reg_state.
10205 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10206 (i386_initial_stuff): Remove use of deleted globals.
10207 (i386_get_thread_context, i386_set_thread_context,
10208 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10209 from debug_reg_state.
10210
10211 2011-11-05 Yao Qi <yao@codesourcery.com>
10212
10213 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10214 address as TPOINT's.
10215
10216 2011-11-02 Stan Shebs <stan@codesourcery.com>
10217
10218 * tracepoint.c (agent_mem_read_string): New function.
10219 (eval_agent_expr): Call it for tracenz.
10220 * server.c (handle_query): Report support for tracenz.
10221
10222 2011-11-02 Yao Qi <yao@codesourcery.com>
10223
10224 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10225
10226 2011-11-02 Yao Qi <yao@codesourcery.com>
10227
10228 * target.h: Fix a typo in comment.
10229
10230 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10231
10232 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10233 clobber the breakpoints' shadows with fast tracepoint jumps.
10234 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10235 * target.c (write_inferior_memory): Also pass MYADDR down to
10236 check_mem_write.
10237
10238 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10239
10240 * configure.ac: Check support for personality routine.
10241 * configure: Regenerate.
10242 * config.in: Likewise.
10243 * linux-low.c: Include <sys/personality.h>.
10244 Define ADDR_NO_RANDOMIZE if necessary.
10245 (linux_create_inferior): Disable address space randomization when
10246 forking inferior, if requested.
10247 (linux_supports_disable_randomization): New function.
10248 (linux_target_ops): Install it.
10249 * server.h (disable_randomization): Declare.
10250 * server.c (disable_randomization): New global variable.
10251 (handle_general_set): Handle QDisableRandomization.
10252 (handle_query): Likewise for qSupported.
10253 (main): Support --disable-randomization and --no-disable-randomization
10254 command line arguments.
10255 * target.h (struct target_ops): Add supports_disable_randomization.
10256 (target_supports_disable_randomization): New macro.
10257
10258 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10259
10260 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10261 ifdef check.
10262 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10263 [!PT_GETDSBT] (target_loadmap): New definition.
10264 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10265 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10266 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10267 and PT_GETDSBT to LINUX_LOADMAP.
10268 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10269 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10270
10271 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10272
10273 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10274 (arm_linux_hwbp_cap): New static variable.
10275 (arm_linux_get_hwbp_cap): Replace by ...
10276 (arm_linux_init_hwbp_cap): ... this new function.
10277 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10278 (arm_linux_get_hw_watchpoint_count): Likewise.
10279 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10280 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10281 (arm_prepare_to_resume): Use perror_with_name instead of error.
10282
10283 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10284
10285 * linux-arm-low.c: Include <signal.h>.
10286 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10287 (struct arm_linux_hwbp_cap): New data type.
10288 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10289 (struct arm_linux_hw_breakpoint): New data type.
10290 (MAX_BPTS, MAX_WPTS): Define.
10291 (struct arch_process_info, struct arch_lwp_info): New data types.
10292 (arm_linux_get_hwbp_cap): New function.
10293 (arm_linux_get_hw_breakpoint_count): Likewise.
10294 (arm_linux_get_hw_watchpoint_count): Likewise.
10295 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10296 (arm_hwbp_control_initialize): Likewise.
10297 (arm_hwbp_control_is_enabled): Likewise.
10298 (arm_hwbp_control_is_initialized): Likewise.
10299 (arm_hwbp_control_disable): Likewise.
10300 (arm_linux_hw_breakpoint_equal): Likewise.
10301 (arm_linux_hw_point_initialize): Likewise.
10302 (struct update_registers_data): New data structure.
10303 (update_registers_callback: New function.
10304 (arm_insert_point): Likewise.
10305 (arm_remove_point): Likewise.
10306 (arm_stopped_by_watchpoint): Likewise.
10307 (arm_stopped_data_address): Likewise.
10308 (arm_new_process): Likewise.
10309 (arm_new_thread): Likewise.
10310 (arm_prepare_to_resume): Likewise.
10311 (the_low_target): Register arm_insert_point, arm_remove_point,
10312 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10313 arm_new_thread, and arm_prepare_to_resume.
10314
10315 2011-09-15 Stan Shebs <stan@codesourcery.com>
10316
10317 * server.h (struct emit_ops): Add compare-goto fields.
10318 * tracepoint.c (gdb_agent_op_sizes): New table.
10319 (emit_eq_goto): New function.
10320 (emit_ne_goto): New function.
10321 (emit_lt_goto): New function.
10322 (emit_le_goto): New function.
10323 (emit_gt_goto): New function.
10324 (emit_ge_goto): New function.
10325 (is_goto_target): New function.
10326 (compile_bytecodes): Recognize special cases of compare-goto
10327 combinations and call specialized emitters for them.
10328 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10329 (amd64_emit_ne_goto): New function.
10330 (amd64_emit_lt_goto): New function.
10331 (amd64_emit_le_goto): New function.
10332 (amd64_emit_gt_goto): New function.
10333 (amd64_emit_ge_goto): New function.
10334 (amd64_emit_ops): Add the new functions.
10335 (i386_emit_eq_goto): New function.
10336 (i386_emit_ne_goto): New function.
10337 (i386_emit_lt_goto): New function.
10338 (i386_emit_le_goto): New function.
10339 (i386_emit_gt_goto): New function.
10340 (i386_emit_ge_goto): New function.
10341 (i386_emit_ops): Add the new functions.
10342
10343 2011-09-08 Stan Shebs <stan@codesourcery.com>
10344
10345 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10346 (i386_emit_epilogue): Restore %ebx.
10347
10348 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10349
10350 * server.c (step_thread): Remove definition.
10351 (process_serial_event): Don't handle Hs.
10352 * server.h (step_thread): Remove declaration.
10353 * target.c (set_desired_inferior): Remove use of step_thread.
10354
10355 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10356
10357 * linux-low.c: Include linux-procfs.h.
10358 (linux_attach_lwp_1): Update comments.
10359 (linux_attach): Scan for existing threads when attaching to a
10360 process that is the tgid.
10361 * Makefile.in: Update dependencies.
10362
10363 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10364
10365 * configure.srv: Add linux-procfs.o dependencies.
10366
10367 2011-08-14 Yao Qi <yao@codesourcery.com>
10368
10369 * target.h (struct target_ops): Fix indent.
10370 * win32-low.c (win32_target_ops): Fix comment.
10371
10372 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10373 Yao Qi <yao@codesourcery.com>
10374
10375 * Makefile.in (clean): Remove tic6x-*.c files.
10376 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10377 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10378 (tic6x-c64xp-linux.c): Likewise.
10379 * configure.srv: Add support for tic6x-*-uclinux.
10380 * linux-tic6x-low.c: New.
10381 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10382
10383 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10384 Yao Qi <yao@codesourcery.com>
10385
10386 * target.h (struct target_ops): Add read_loadmap.
10387 * linux-low.c (struct target_loadseg): New type.
10388 (struct target_loadmap): New type.
10389 (linux_read_loadmap): New function.
10390 (linux_target_ops): Add linux_read_loadmap.
10391 * server.c (handle_query): Support qXfer:fdpic:read packet.
10392 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10393 to NULL.
10394
10395 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10396
10397 * win32-low.c: Include <stdint.h>.
10398
10399 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10400
10401 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10402 to the inferior here.
10403 (i386_remove_aligned_watchpoint): Ditto.
10404 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10405 fit part of the watchpoint in the debug registers.
10406 (i386_update_inferior_debug_regs): New.
10407 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10408 registers, and only update the inferior on success.
10409 (i386_low_remove_watchpoint): Ditto.
10410
10411 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10412
10413 * linux-low.c (compare_ints, unique, list_threads, show_process,
10414 linux_core_of_thread): Delete.
10415 (linux_target_ops): Change linux_core_of_thread to
10416 linux_common_core_of_thread.
10417 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10418 * utils.c (malloc_failure): Change type of argument.
10419 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10420 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10421 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10422 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10423 (IPA_OBJS): Add common-utils-ipa.o.
10424 (ptid_h, linux_osdata_h): New macros.
10425 (server_h): Add common/common-utils.h, common/xml-utils.h,
10426 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10427 common/ptid.h.
10428 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10429 ptid.o, buffer.o): New rules.
10430 (linux-low.o): Add common/linux-osdata.h as a dependency.
10431 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10432 * configure.ac: Add AC_HEADER_DIRENT check.
10433 * config.in: Regenerate.
10434 * configure: Regenerate.
10435 * remote-utils.c (xml_escape_text): Delete.
10436 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10437 buffer_xml_printf): Move to common/buffer.c.
10438 * server.c (main): Remove call to initialize_inferiors.
10439 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10440 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10441 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10442 internal_error, gdb_assert, gdb_assert_fail): Delete.
10443 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10444 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10445 common/buffer.h.
10446 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10447 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10448 initialize_inferiors): Delete.
10449
10450 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10451
10452 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10453 symbol error.
10454
10455 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10456
10457 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10458 assertion.
10459 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10460
10461 2011-05-26 Yao Qi <yao@codesourcery.com>
10462
10463 * Makefile.in (thread-db.o): Track dependence to
10464 common/gdb_thread_db.h.
10465 * thread-db.c: include gdb_thread_db.h from right place.
10466
10467 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10468
10469 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10470 __FILE__ and __LINE__ to internal_error.
10471
10472 2011-05-13 Doug Evans <dje@google.com>
10473
10474 * thread-db.c (try_thread_db_load_from_sdir): New function.
10475 (try_thread_db_load_from_dir): New function.
10476 (thread_db_load_search): Handle $sdir, ignore $pdir.
10477 Remove trying of system directories if search of
10478 libthread-db-search-path fails, that is now done via $sdir.
10479
10480 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10481
10482 * server.c (handle_query): Add EnableDisableTracepoints to the list
10483 of supported features.
10484 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10485 tracepoints.
10486 (cmd_qtenable_disable): New.
10487 (cmd_qtstart): Install tracepoints even if disabled.
10488 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10489 receiving a QTEnable or QTDisable packet.
10490 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10491 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10492 tracepoints.
10493 (gdb_probe): Skip data collection if static tracepoint is disabled.
10494
10495 2011-05-10 Doug Evans <dje@google.com>
10496
10497 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10498
10499 2011-05-04 Doug Evans <dje@google.com>
10500
10501 * linux-low.c (linux_join): Skip process lookup.
10502 * spu-low.c (spu_join): Ditto.
10503 * server.c (join_inferiors_callback): Delete.
10504 (process_serial_event): For 'D' packet (detach) call join_inferior
10505 directly.
10506
10507 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10508
10509 * README: Don't mention xscale*-*-linux*.
10510 * configure.srv (xscale*-*-linux*): Don't handle target.
10511
10512 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10513
10514 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10515 casting pointers.
10516 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10517 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10518 (i386_emit_void_call_2): Likewise.
10519
10520 2011-04-26 Yao Qi <yao@codesourcery.com>
10521
10522 * linux-low.c: Move common macros to linux-ptrace.h.
10523 Include linux-ptrace.h.
10524 * Makefile.in (linux_ptrace_h): New.
10525 (linux-low.o): Depends on linux-ptrace.h.
10526
10527 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10528
10529 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10530 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10531 (remote_prepare): New function with most of the TCP code from ...
10532 (remote_open): ... here. Detect PORT here unconditionally. Move also
10533 setting transport_is_reliable.
10534 * server.c (run_once): New variable.
10535 (gdbserver_usage): Document it.
10536 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10537 the first run if RUN_ONCE.
10538 * server.h (run_once, remote_prepare): New declarations.
10539
10540 2011-04-19 Tom Tromey <tromey@redhat.com>
10541
10542 * win32-low.c (handle_load_dll): Remove duplicate "the".
10543
10544 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10545
10546 Remove support for old Cygwin 1.5 versions.
10547 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10548 function to avoid warning.
10549 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10550 warning.
10551
10552 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10553
10554 * gdbserver/server.h (Macro _): Define it if not available.
10555
10556 2011-03-14 Michael Snyder <msnyder@vmware.com>
10557
10558 * hostio.c (handle_close): Remove unnecessary null test.
10559
10560 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10561
10562 * Makefile.in (maintainer-clean realclean distclean): Remove
10563 "make ... subdir_do" command.
10564
10565 2011-03-10 Michael Snyder <msnyder@vmware.com>
10566
10567 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10568
10569 * server.c (handle_v_run): Free alloced buffer on early return.
10570
10571 2011-03-09 Yao Qi <yao@codesourcery.com>
10572
10573 Revert:
10574 2011-03-04 Yao Qi <yao@codesourcery.com>
10575
10576 * Makefile.in: Remove GNU make feature --directory.
10577
10578 2011-03-05 Yao Qi <yao@codesourcery.com>
10579
10580 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10581 (subdir_do): New make target. Copied from gdb/Makefile.
10582 (maintainer-clean, realclean, distclean, clean): Call corresponding
10583 make targets in common/Makefile.
10584
10585 2011-02-11 Yao Qi <yao@codesourcery.com>
10586
10587 * configure.ac: Call AC_PROG_RANLIB.
10588 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10589 * configure: Regenerate.
10590
10591 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10592
10593 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10594
10595 2011-03-06 Yao Qi <yao@codesourcery.com>
10596
10597 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10598
10599 2011-03-05 Yao Qi <yao@codesourcery.com>
10600
10601 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10602 (subdir_do): New make target. Copied from gdb/Makefile.
10603 (maintainer-clean, realclean, distclean, clean): Call corresponding
10604 make targets in common/Makefile.
10605
10606 2011-03-04 Yao Qi <yao@codesourcery.com>
10607
10608 * Makefile.in: Remove GNU make feature --directory.
10609
10610 2011-03-04 Michael Snyder <msnyder@vmware.com>
10611
10612 * server.c (queue_stop_reply): Call xmalloc not malloc.
10613
10614 2011-03-02 Michael Snyder <msnyder@vmware.com>
10615
10616 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10617
10618 2011-02-28 Michael Snyder <msnyder@vmware.com>
10619
10620 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10621 (cmd_qtframe): Ditto.
10622 (cmd_qtbuffer): Ditto.
10623 (cmd_bigqtbuffer): Ditto.
10624
10625 * utils.c (decimal2str): Initialize 'width' to nine, then
10626 don't mess with it.
10627
10628 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10629
10630 * hostio.c (require_data): Free *data, not data.
10631
10632 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10633
10634 * hostio.c (require_data): Use free, not xfree.
10635
10636 2011-02-27 Michael Snyder <msnyder@vmware.com>
10637
10638 * server.c (handle_query): Discard unused value.
10639
10640 * hostio.c (require_data): Free malloc memory before returning
10641 error.
10642
10643 2011-02-26 Michael Snyder <msnyder@vmware.com>
10644
10645 * linux-low.c (list_threads): Call closedir for dirent.
10646
10647 2011-02-27 Michael Snyder <msnyder@vmware.com>
10648
10649 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10650 a case statement falls through.
10651
10652 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10653
10654 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10655 in comparison.
10656
10657 2011-02-26 Michael Snyder <msnyder@vmware.com>
10658
10659 * utils.c (decimal2str): Eliminate dead code and dead param.
10660 (pulongest): Drop dead param from call to decimal2str.
10661 (plongest): Ditto.
10662
10663 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10664
10665 Revert the following patch (not approved yet):
10666 2011-02-21 Hui Zhu <teawater@gmail.com>
10667 * tracepoint.c (tp_printf): New function.
10668 (eval_agent_expr): Handle gdb_agent_op_printf.
10669
10670 2011-02-21 Hui Zhu <teawater@gmail.com>
10671
10672 * tracepoint.c (tp_printf): New function.
10673 (eval_agent_expr): Handle gdb_agent_op_printf.
10674
10675 2011-02-18 Tom Tromey <tromey@redhat.com>
10676
10677 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10678 (tracepoint.o): Likewise.
10679 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10680 (gdb_agent_op_names): Likewise.
10681
10682 2011-02-18 Tom Tromey <tromey@redhat.com>
10683
10684 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10685 gdb_agent_op_rot>: New constants.
10686 (gdb_agent_op_names): Add pick and roll.
10687 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10688 cases.
10689
10690 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10691
10692 * aclocal.m4: Regenerated with aclocal-1.11.1.
10693
10694 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10695
10696 * server.c (handle_qxfer_traceframe_info): New.
10697 (qxfer_packets): Register "traceframe-info".
10698 (handle_query): Report support for qXfer:traceframe-info:read+.
10699 * tracepoint.c (match_blocktype): New.
10700 (traceframe_find_block_type): Rename to ...
10701 (traceframe_walk_blocks): ... this. Add callback filter argument,
10702 and use it.
10703 (traceframe_find_block_type): New, reimplemented on top of
10704 traceframe_walk_blocks.
10705 (build_traceframe_info_xml): New.
10706 (traceframe_read_info): New.
10707 * server.h (traceframe_read_info): Declare.
10708
10709 2011-02-11 Yao Qi <yao@codesourcery.com>
10710
10711 * configure.ac: Call AC_PROG_RANLIB.
10712 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10713 * configure: Regenerate.
10714
10715 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10716
10717 * server.c (gdb_read_memory): Change return semantics to allow
10718 partial transfers.
10719 (handle_search_memory_1): Adjust.
10720 (process_serial_event) <'m' packet>: Handle partial transfers.
10721 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10722
10723 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10724
10725 * regcache.c (init_register_cache): Initialize
10726 regcache->register_status.
10727 (free_register_cache): Release regcache->register_status.
10728 (regcache_cpy): Copy register_status.
10729 (registers_to_string): Print 'x's for unavailable registers.
10730 (supply_register): Mark the register's status valid or
10731 unavailable, depending on whether a buffer was passed in or not.
10732 (supply_register_zeroed): New.
10733 (supply_regblock): Mark the registers' status valid or
10734 unavailable, depending on whether a buffer was passed in or not.
10735 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10736 (struct regcache): New `register_status' field.
10737 (supply_register_zeroed): Declare.
10738 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10739 supply_register_zeroed, rather than passing a NULL buffer to
10740 supply_register.
10741 * tracepoint.c (fetch_traceframe_registers): Update comment.
10742
10743 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10744
10745 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10746 buffer explicit.
10747
10748 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10749
10750 * server.h (decode_xfer_write): Change prototype.
10751 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10752 and don't extract the annex here.
10753 * server.c (decode_xfer_read): Remove `annex' parameter,
10754 and don't extract the annex here.
10755 (decode_xfer): New.
10756 (struct qxfer): New.
10757 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10758 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10759 (handle_qxfer_statictrace): New functions, abstracted out from
10760 handle_query, and made to use the struct qxfer interface.
10761 (handle_threads_qxfer_proper): Rename to ...
10762 (handle_qxfer_threads_proper): ... this.
10763 (handle_threads_qxfer): Rename to ...
10764 (handle_qxfer_threads): ... this. Adjust.
10765 (qxfer_packets): New array.
10766 (handle_qxfer): New function.
10767 (handle_query): Use handle_qxfer.
10768
10769 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10770
10771 * gdbreplay.c: Shorten lines of >= 80 columns.
10772 * linux-low.c: Ditto.
10773 * linux-ppc-low.c: Ditto.
10774 * linux-s390-low.c: Ditto.
10775 * linux-sparc-low.c: Ditto.
10776 * linux-x86-low.c: Ditto.
10777 * linux-xtensa-low.c: Ditto.
10778 * mem-break.c: Ditto.
10779 * nto-low.c: Ditto.
10780 * regcache.h: Ditto.
10781 * remote-utils.c: Ditto.
10782 * server.c: Ditto.
10783 * server.h: Ditto.
10784 * thread-db.c: Ditto.
10785 * tracepoint.c: Ditto.
10786 * utils.c: Ditto.
10787 * win32-low.h: Ditto.
10788
10789 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10790
10791 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10792 update.
10793
10794 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10795
10796 * server.c (gdbserver_version): Update copyright year in version
10797 output.
10798 * gdbreplay.c (gdbreplay_version): Ditto.
10799
10800 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10801
10802 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10803 * linux-bfin-low.c: New file.
10804 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10805 PT_DATA_ADDR for BFIN targets.
10806 * Makefile.in (SFILES): Add linux-bfin-low.c.
10807 (clean): Remove reg-bfin.c.
10808 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10809 * README: Mention supported Blackfin targets.
10810
10811 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10812
10813 * .gitignore: New file.
10814
10815 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10816
10817 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10818
10819 2010-10-22 Jie Zhang <jie@codesourcery.com>
10820
10821 * Makefile.in: Add FLAGS_TO_PASS variable.
10822 (install): Remove dependency of install-only and recursively
10823 invoke make for install-only.
10824
10825 2010-10-04 Doug Evans <dje@google.com>
10826
10827 * Makefile.in (uninstall): Use $(DESTDIR).
10828
10829 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10830
10831 PR gdb/11842
10832
10833 * linux-x86-low.c (compat_siginfo_from_siginfo)
10834 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10835 si_code is < 0. Check for si_code == SI_TIMER before checking for
10836 si_code < 0.
10837
10838 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10839
10840 * lynx-i386-low.c: New file.
10841 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10842
10843 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10844
10845 * lynx-low.c (ptrace_request_to_str): Remove handling for
10846 request values that have been removed in LynxOS 5.x.
10847
10848 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10849
10850 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10851 <ptrace.h>
10852
10853 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10854
10855 * configure.ac: Add --enable-inprocess-agent option.
10856 * configure: Rebuilt.
10857
10858 2010-09-06 Yao Qi <yao@codesourcery.com>
10859
10860 * linux-low.c (linux_kill): Remove unused variable.
10861 (linux_stabilize_threads): Likewise.
10862 * server.c (start_inferior): Likewise.
10863 (queue_stop_reply_callback): Likewise.
10864 * tracepoint.c (do_action_at_tracepoint): Likewise.
10865
10866 2010-09-06 Yao Qi <yao@codesourcery.com>
10867
10868 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10869 on return.
10870
10871 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10872
10873 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10874
10875 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10876
10877 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10878 "$(IPA_DEPFILES)".
10879
10880 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10881
10882 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10883 gdbserver/lynx-ppc-low.c: New files.
10884 * Makefile.in (lynx_low_h): New variable.
10885 (lynx-low.o, lynx-ppc-low.o): New rules.
10886 * configure.ac: On LynxOS, link with -lnetinet.
10887 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10888 * configure: regenerate.
10889
10890 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10891
10892 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10893 * configure.ac: Add check for vasprintf and vsnprintf.
10894 * configure, config.in: Regenerate.
10895 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10896
10897 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10898
10899 * gdbreplay.c: Move include of alloca.h up, next to include of
10900 malloc.h.
10901 * server.h: Add include of malloc.h.
10902 * mem-break.c: Remove include of malloc.h.
10903 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10904
10905 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10906
10907 * Makefile.in (memmem.o): Build with -Wno-error.
10908
10909 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10910
10911 * utils.c (xsnprintf): Make non-static.
10912 * server.h: Add xsnprintf declaration.
10913 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10914 replace calls to snprintf by calls to xsnprintf throughout.
10915
10916 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10917
10918 * configure.ac: Add configure check for alloca.
10919 * configure, config.in: Regenerate.
10920 * server.h: Include alloca.h if it exists.
10921 * gdbreplay.c: Include alloca.h if it exists.
10922
10923 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10924
10925 * linux-low.c (__SIGRTMIN): Define if not already defined.
10926 (linux_create_inferior): Check for __ANDROID__ rather than
10927 __SIGRTMIN.
10928 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10929 are already deferred.
10930 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10931 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10932 stopped and already has a pending signal to report.
10933 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10934 a pending signal to report or is moving out of a jump pad.
10935 (linux_init_signals): Check for __ANDROID__ rather than
10936 __SIGRTMIN.
10937
10938 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10939
10940 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10941 debug_threads check. Avoid a linear search when not doing debug
10942 output.
10943
10944 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10945
10946 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10947 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10948 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10949 (process_event): Change local fd's type to gdb_fildes_t.
10950 (create_file_handler): Adjust prototype.
10951 (delete_file_handler): Adjust prototype.
10952 (handle_file_event): Adjust prototype. Use pfildes.
10953 (create_file_event): Adjsut prototype.
10954 * remote-utils.c (remote_desc, listen_desc): Change type to
10955 gdb_fildes_t.
10956 * server.h: New gdb_fildes_t typedef.
10957 [USE_WIN32API]: Include winsock2.h.
10958 (delete_file_handler, add_file_handler): Adjust prototypes.
10959 (pfildes): Declare.
10960 * utils.c (pfildes): New.
10961
10962 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10963
10964 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10965 * configure: Regenerate.
10966
10967 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10968
10969 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10970 (linux_done_accessing_memory): ... this.
10971 (linux_target_ops): Adjust.
10972 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10973 * nto-low.c (nto_target_ops): Adjust comment.
10974 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10975 * spu-low.c (spu_target_ops): Adjust comment.
10976 * target.h (target_ops): Rename unprepare_to_access_memory field
10977 to done_accessing_memory.
10978 (unprepare_to_access_memory): Rename to ...
10979 (done_accessing_memory): ... this.
10980
10981 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10982
10983 * linux-low.c (linux_prepare_to_access_memory): New.
10984 (linux_unprepare_to_access_memory): New.
10985 (linux_target_ops): Install them.
10986 * server.c (read_memory): Rename to ...
10987 (gdb_read_memory): ... this. Use
10988 prepare_to_access_memory/prepare_to_access_memory.
10989 (write_memory): Rename to ...
10990 (gdb_write_memory): ... this. Use
10991 prepare_to_access_memory/prepare_to_access_memory.
10992 (handle_search_memory_1): Adjust.
10993 (process_serial_event): Adjust.
10994 * target.h (struct target_ops): New fields
10995 prepare_to_access_memory and unprepare_to_access_memory.
10996 (prepare_to_access_memory, unprepare_to_access_memory): New.
10997 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10998 prepare_to_access_memory/prepare_to_access_memory.
10999 * nto-low.c (nto_target_ops): Adjust.
11000 * spu-low.c (spu_target_ops): Adjust.
11001 * win32-low.c (win32_target_ops): Adjust.
11002
11003 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11004
11005 * Makefile.in (WARN_CFLAGS): Get it from configure.
11006 (WERROR_CFLAGS): New.
11007 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11008 * configure.ac: Introduce --enable-werror, which adds -Werror to
11009 the compiler command line. Enabled by default. Disable with
11010 --disable-werror. Add -Wdeclaration-after-statement
11011 Wpointer-arith and -Wformat-nonliteral to warning flags.
11012 * configure: Regenerate.
11013
11014 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11015
11016 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11017
11018 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11019
11020 * gdbreplay.c (remote_error): New.
11021 (gdbchar): New.
11022 (expect): Use gdbchar. Check for error reading from GDB.
11023 Clarify sync error output.
11024 (play): Check for errors writing to GDB.
11025 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11026 * remote-utils.c (getpkt): Check for errors writing to the remote
11027 descriptor.
11028
11029 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11030
11031 * linux-low.c (linux_wait_1): Move non-debugging code out of
11032 `debug_threads' control.
11033
11034 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11035
11036 * linux-low.c (linux_wait_1): Don't set last_status here.
11037 * server.c (push_event, queue_stop_reply_callback): Assert we're
11038 not pushing a TARGET_WAITKIND_IGNORE event.
11039 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11040 (myresume, handle_target_event): Set the thread's last_resume_kind
11041 and last_status from the target returned status.
11042
11043 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11044
11045 PR threads/10729
11046
11047 * linux-x86-low.c (update_debug_registers_callback): New.
11048 (i386_dr_low_set_addr): Use it.
11049 (i386_dr_low_get_addr): New.
11050 (i386_dr_low_set_control): Use update_debug_registers_callback.
11051 (i386_dr_low_get_control): New.
11052 (i386_dr_low_get_status): Adjust.
11053 * linux-low.c (linux_stop_lwp): New.
11054 * linux-low.h (linux_stop_lwp): Declare.
11055
11056 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11057 argument instead of a i386_debug_reg_state.
11058 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11059 a i386_debug_reg_state.
11060 (i386_insert_aligned_watchpoint): Adjust.
11061 (i386_remove_aligned_watchpoint): Adjust.
11062 (i386_low_stopped_data_address): Read the debug registers from the
11063 inferior instead of from the mirrors.
11064 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11065 (i386_dr_low_get_addr): Declare.
11066 (i386_dr_low_get_control): Declare.
11067 (i386_dr_low_get_status): Change prototype.
11068
11069 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11070 (i386_dr_low_get_addr): New.
11071 (i386_dr_low_get_control): New.
11072 (i386_dr_low_get_status): Adjust prototype. Return
11073 dr_status_mirror.
11074 (i386_initial_stuff): Clear dr_status_mirror and
11075 dr_control_mirror.
11076 (i386_get_thread_context): Adjust.
11077 (i386_set_thread_context): Adjust.
11078 (i386_thread_added): Adjust.
11079
11080 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11081
11082 * linux-low.h (linux_thread_area): Delete declaration.
11083
11084 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11085
11086 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11087 after its termination.
11088
11089 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11090
11091 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11092 (gdb_wants_all_stopped): Delete.
11093 (linux_wait_1): Don't call them.
11094 * server.c (handle_v_cont): Tag all threads as want-stopped.
11095 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11096 stopped as "client-wants-stopped".
11097
11098 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11099
11100 * Makefile.in (signals_h): New.
11101 (server_h): Depend on it.
11102 (server.o): Don't depend on $(signals_def).
11103 (signals.o): Depend on $(signals_def).
11104
11105 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11106
11107 * Makefile.in (signals_def): New.
11108 (server_h): Append include/gdb/signals.h and signals_def.
11109 (server.o): Append signals_def.
11110
11111 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11112
11113 * server.c (handle_target_event): Use target_signal_to_host for
11114 resume_info.sig initialization.
11115 * target.h (struct thread_resume) <sig>: New comment.
11116
11117 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11118
11119 * server.c (handle_query): strcpy() the returned string from paddress()
11120 instead of sprintf().
11121 * utils.c (paddress): Return phex_nz().
11122
11123 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11124
11125 * server.c (handle_v_cont): Call mourn_inferior if process
11126 just exited.
11127 (myresume): Likewise.
11128
11129 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11130
11131 Static tracepoints, and integration with UST.
11132
11133 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11134 * mem-break.c (uninsert_all_breakpoints)
11135 (reinsert_all_breakpoints): New.
11136 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11137 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11138 (gdb_agent_ust_loaded, helper_thread_id)
11139 (gdb_agent_helper_thread_id): New macros.
11140 (struct ipa_sym_addresses): Add addr_ust_loaded,
11141 addr_helper_thread_id, addr_cmd_buf.
11142 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11143 (in_process_agent_loaded_ust): New.
11144 (write_e_ust_not_loaded): New.
11145 (maybe_write_ipa_ust_not_loaded): New.
11146 (struct collect_static_trace_data_action): New.
11147 (enum tracepoint_type) <static_tracepoint>: New.
11148 (struct tracepoint) <handle>: Mention static tracepoints.
11149 (struct static_tracepoint_ctx): New.
11150 (CMD_BUF_SIZE): New.
11151 (add_tracepoint_action): Handle static tracepoint actions.
11152 (unprobe_marker_at): New.
11153 (clear_installed_tracepoints): Handle static tracepoints.
11154 (cmd_qtdp): Handle static tracepoints.
11155 (probe_marker_at): New.
11156 (cmd_qtstart): Handle static tracepoints.
11157 (response_tracepoint): Handle static tracepoints.
11158 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11159 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11160 (get_context_regcache): Handle static tracepoints.
11161 (do_action_at_tracepoint): Handle static tracepoint actions.
11162 (traceframe_find_block_type): Handle static trace data blocks.
11163 (traceframe_read_sdata): New.
11164 (download_tracepoints): Download static tracepoint actions.
11165 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11166 (GDB_PROBE_NAME): New.
11167 (ust_ops): New.
11168 (GET_UST_SYM): New.
11169 (USTF): New.
11170 (dlsym_ust): New.
11171 (ust_marker_to_static_tracepoint): New.
11172 (gdb_probe): New.
11173 (collect_ust_data_at_tracepoint): New.
11174 (gdb_ust_probe): New.
11175 (UNIX_PATH_MAX, SOCK_DIR): New.
11176 (gdb_ust_connect_sync_socket): New.
11177 (resume_thread, stop_thread): New.
11178 (run_inferior_command): New.
11179 (init_named_socket): New.
11180 (gdb_ust_socket_init): New.
11181 (cstr_to_hexstr): New.
11182 (next_st): New.
11183 (first_marker, next_marker): New.
11184 (response_ust_marker): New.
11185 (cmd_qtfstm, cmd_qtsstm): New.
11186 (unprobe_marker_at, probe_marker_at): New.
11187 (cmd_qtstmat, gdb_ust_thread): New.
11188 (gdb_ust_init): New.
11189 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11190 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11191 (ST_REGENTRY): New.
11192 (x86_64_st_collect_regmap): New.
11193 (X86_64_NUM_ST_COLLECT_GREGS): New.
11194 (AMD64_RIP_REGNUM): New.
11195 (supply_static_tracepoint_registers): New.
11196 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11197 (ST_REGENTRY): New.
11198 (i386_st_collect_regmap): New.
11199 (i386_NUM_ST_COLLECT_GREGS): New.
11200 (supply_static_tracepoint_registers): New.
11201 * server.c (handle_query): Handle qXfer:statictrace:read.
11202 <qSupported>: Report support for StaticTracepoints, and
11203 qXfer:statictrace:read features.
11204 * server.h (traceframe_read_sdata)
11205 (supply_static_tracepoint_registers): Declare.
11206 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11207 (unpack_varlen_hex): Include in IPA build.
11208 * Makefile.in (ustlibs, ustinc): New.
11209 (IPA_OBJS): Add remote-utils-ipa.o.
11210 ($(IPA_LIB)): Link -ldl and -lpthread.
11211 (UST_CFLAGS): New.
11212 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11213 * config.in, configure: Regenerate.
11214
11215 2010-06-20 Ian Lance Taylor <iant@google.com>
11216 Pedro Alves <pedro@codesourcery.com>
11217
11218 * linux-x86-low.c (always_true): Delete.
11219 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11220 trying to fool the compiler with always_true.
11221
11222 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11223
11224 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11225 conditions in gdbserver.
11226
11227 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11228
11229 * spu-low.c (spu_read_memory): Wrap around local store limit.
11230 (spu_write_memory): Likewise.
11231
11232 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11233
11234 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11235 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11236 LONGEST uses.
11237 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11238 uses.
11239 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11240 uses with LONGEST uses.
11241
11242 2010-06-14 Stan Shebs <stan@codesourcery.com>
11243 Pedro Alves <pedro@codesourcery.com>
11244
11245 Bytecode compiler.
11246
11247 * linux-x86-low.c: Include limits.h.
11248 (add_insns): New.
11249 (always_true): New.
11250 (EMIT_ASM): New.
11251 (EMIT_ASM32): New.
11252 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11253 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11254 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11255 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11256 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11257 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11258 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11259 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11260 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11261 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11262 (amd64_emit_void_call_2): New.
11263 (amd64_emit_ops): New.
11264 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11265 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11266 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11267 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11268 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11269 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11270 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11271 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11272 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11273 (i386_emit_stack_adjust, i386_emit_int_call_1)
11274 (i386_emit_void_call_2): New.
11275 (i386_emit_ops): New.
11276 (x86_emit_ops): New.
11277 (the_low_target): Install x86_emit_ops.
11278 * server.h (struct emit_ops): New.
11279 (get_raw_reg_func_addr): Declare.
11280 (current_insn_ptr, emit_error): Declare.
11281 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11282 (set_trace_state_variable_value): New defines.
11283 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11284 addr_get_trace_state_variable_value and
11285 addr_set_trace_state_variable_value.
11286 (symbol_list): New fields for get_raw_reg,
11287 get_trace_state_variable_value and set_trace_state_variable_value.
11288 (condfn): New typedef.
11289 (struct tracepoint): New field `compiled_cond'.
11290 (do_action_at_tracepoint): Clear compiled_cond.
11291 (get_trace_state_variable_value, set_trace_state_variable_value):
11292 Export in the IPA.
11293 (condition_true_at_tracepoint): If there's a compiled condition,
11294 run that.
11295 (current_insn_ptr, emit_error): New globals.
11296 (struct bytecode_address): New.
11297 (get_raw_reg_func_addr): New.
11298 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11299 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11300 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11301 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11302 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11303 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11304 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11305 (compile_tracepoint_condition, compile_bytecodes): New.
11306 * target.h (emit_ops): Forward declare.
11307 (struct target_ops): New field emit_ops.
11308 (target_emit_ops): New.
11309 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11310 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11311 * linux-low.c (linux_emit_ops): New.
11312 (linux_target_ops): Install it.
11313 * linux-low.h (struct linux_target_ops): New field emit_ops.
11314
11315 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11316
11317 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11318 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11319
11320 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11321 Stan Shebs <stan@codesourcery.com>
11322
11323 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11324 (all): Depend on $(extra_libraries).
11325 (install-only): Install the IPA.
11326 (IPA_OBJS, IPA_LIB): New.
11327 (clean): Remove the IPA lib.
11328 (IPAGENT_CFLAGS): New.
11329 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11330 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11331 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11332 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11333 * configure.ac: Check for atomic builtins support in the compiler.
11334 (IPA_DEPFILES, extra_libraries): Define.
11335 * configure.srv (ipa_obj): Add description.
11336 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11337 (i[34567]86-*-linux*): Set ipa_obj.
11338 (x86_64-*-linux*): Set ipa_obj.
11339 * linux-low.c (stabilizing_threads): New.
11340 (supports_fast_tracepoints): New.
11341 (linux_detach): Stabilize threads before detaching.
11342 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11343 the lwp is either not stabilizing, or is moving out of a jump pad.
11344 (linux_fast_tracepoint_collecting): New.
11345 (maybe_move_out_of_jump_pad): New.
11346 (enqueue_one_deferred_signal): New.
11347 (dequeue_one_deferred_signal): New.
11348 (linux_wait_for_event_1): If moving out of a jump pad, defer
11349 pending signals to later.
11350 (linux_stabilize_threads): New.
11351 (linux_wait_1): Check if threads need moving out of jump pads, and
11352 do it if so.
11353 (stuck_in_jump_pad_callback): New.
11354 (move_out_of_jump_pad_callback): New.
11355 (lwp_running): New.
11356 (linux_resume_one_lwp): Handle moving out of jump pads.
11357 (linux_set_resume_request): Dequeue deferred signals.
11358 (need_step_over_p): Also step over fast tracepoint jumps.
11359 (start_step_over): Also uninsert fast tracepoint jumps.
11360 (finish_step_over): Also reinsert fast tracepoint jumps.
11361 (linux_install_fast_tracepoint_jump): New.
11362 (linux_target_ops): Install linux_stabilize_threads and
11363 linux_install_fast_tracepoint_jump_pad.
11364 * linux-low.h (linux_target_ops) <get_thread_area,
11365 install_fast_tracepoint_jump_pad>: New fields.
11366 (struct lwp_info) <collecting_fast_tracepoint,
11367 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11368 (linux_get_thread_area): Declare.
11369 * linux-x86-low.c (jump_insn): New.
11370 (x86_get_thread_area): New.
11371 (append_insns): New.
11372 (push_opcode): New.
11373 (amd64_install_fast_tracepoint_jump_pad): New.
11374 (i386_install_fast_tracepoint_jump_pad): New.
11375 (x86_install_fast_tracepoint_jump_pad): New.
11376 (the_low_target): Install x86_get_thread_area and
11377 x86_install_fast_tracepoint_jump_pad.
11378 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11379 (struct fast_tracepoint_jump): New.
11380 (fast_tracepoint_jump_insn): New.
11381 (fast_tracepoint_jump_shadow): New.
11382 (find_fast_tracepoint_jump_at): New.
11383 (fast_tracepoint_jump_here): New.
11384 (delete_fast_tracepoint_jump): New.
11385 (set_fast_tracepoint_jump): New.
11386 (uninsert_fast_tracepoint_jumps_at): New.
11387 (reinsert_fast_tracepoint_jumps_at): New.
11388 (set_breakpoint_at): Use write_inferior_memory.
11389 (uninsert_raw_breakpoint): Use write_inferior_memory.
11390 (check_mem_read): Mask out fast tracepoint jumps.
11391 (check_mem_write): Mask out fast tracepoint jumps.
11392 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11393 (set_fast_tracepoint_jump): Declare.
11394 (delete_fast_tracepoint_jump)
11395 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11396 (reinsert_fast_tracepoint_jumps_at): Declare.
11397 * regcache.c: Don't compile many functions when building the
11398 in-process agent library.
11399 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11400 the register buffer in the heap.
11401 (free_register_cache): If the register buffer isn't owned by the
11402 regcache, don't free it.
11403 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11404 pre-existing register caches.
11405 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11406 type.
11407 (convert_ascii_to_int): : Constify `from' parameter type.
11408 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11409 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11410 the needed buffer in-place.
11411 (relocate_instruction): New.
11412 * server.c (handle_query) <qSymbols>: If the target supports
11413 tracepoints, give it a chance of looking up symbols. Report
11414 support for fast tracepoints.
11415 (handle_status): Stabilize threads.
11416 (process_serial_event): Adjust.
11417 * server.h (struct fast_tracepoint_jump): Forward declare.
11418 (struct process_info) <fast_tracepoint_jumps>: New field.
11419 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11420 (decode_X_packet, decode_M_packet): Adjust.
11421 (relocate_instruction): Declare.
11422 (in_process_agent_loaded): Declare.
11423 (tracepoint_look_up_symbols): Declare.
11424 (struct fast_tpoint_collect_status): Declare.
11425 (fast_tracepoint_collecting): Declare.
11426 (force_unlock_trace_buffer): Declare.
11427 (handle_tracepoint_bkpts): Declare.
11428 (initialize_low_tracepoint)
11429 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11430 * target.h (struct target_ops) <stabilize_threads,
11431 install_fast_tracepoint_jump_pad>: New fields.
11432 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11433 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11434 [HAVE_STDINT_H]: Include stdint.h.
11435 (trace_debug_1): Rename to ...
11436 (trace_vdebug): ... this.
11437 (trace_debug): Rename to ...
11438 (trace_debug_1): ... this. Add `level' parameter.
11439 (trace_debug): New.
11440 (ATTR_USED, ATTR_NOINLINE): New.
11441 (IP_AGENT_EXPORT): New.
11442 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11443 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11444 (about_to_request_buffer_space, trace_buffer_is_full)
11445 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11446 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11447 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11448 (traceframe_write_count, traceframes_created)
11449 (trace_state_variables)
11450 New renaming defines.
11451 (struct ipa_sym_addresses): New.
11452 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11453 (symbol_list): New.
11454 (ipa_sym_addrs): New.
11455 (all_tracepoint_symbols_looked_up): New.
11456 (in_process_agent_loaded): New.
11457 (write_e_ipa_not_loaded): New.
11458 (maybe_write_ipa_not_loaded): New.
11459 (tracepoint_look_up_symbols): New.
11460 (debug_threads) [IN_PROCESS_AGENT]: New.
11461 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11462 (UNKNOWN_SIDE_EFFECTS): New.
11463 (stop_tracing): New.
11464 (flush_trace_buffer): New.
11465 (stop_tracing_bkpt): New.
11466 (flush_trace_buffer_bkpt): New.
11467 (read_inferior_integer): New.
11468 (read_inferior_uinteger): New.
11469 (read_inferior_data_pointer): New.
11470 (write_inferior_data_pointer): New.
11471 (write_inferior_integer): New.
11472 (write_inferior_uinteger): New.
11473 (struct collect_static_trace_data_action): Delete.
11474 (enum tracepoint_type): New.
11475 (struct tracepoint) <type>: New field `type'.
11476 <actions_str, step_actions, step_actions_str>: Only include in
11477 GDBserver.
11478 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11479 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11480 (tracepoints): Use IP_AGENT_EXPORT.
11481 (last_tracepoint): Don't include in the IPA.
11482 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11483 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11484 (alloced_trace_state_variables): New.
11485 (trace_state_variables): Use IP_AGENT_EXPORT.
11486 (traceframe_t): Delete unused variable.
11487 (circular_trace_buffer): Don't include in the IPA.
11488 (trace_buffer_start): Delete.
11489 (struct trace_buffer_control): New.
11490 (trace_buffer_free): Delete.
11491 (struct ipa_trace_buffer_control): New.
11492 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11493 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11494 New.
11495 (trace_buffer_ctrl): New.
11496 (TRACE_BUFFER_CTRL_CURR): New.
11497 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11498 Reimplement as macros.
11499 (trace_buffer_wrap): Delete.
11500 (traceframe_write_count, traceframe_read_count)
11501 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11502 (struct tracepoint_hit_ctx) <type>: New field.
11503 (struct fast_tracepoint_ctx): New.
11504 (memory_barrier): New.
11505 (cmpxchg): New.
11506 (record_tracepoint_error): Update atomically in the IPA.
11507 (clear_inferior_trace_buffer): New.
11508 (about_to_request_buffer_space): New.
11509 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11510 updating the same buffer.
11511 (add_tracepoint): Default the tracepoint's type to trap
11512 tracepoint, and orig_size to -1.
11513 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11514 internal variables.
11515 (create_trace_state_variable): New parameter `gdb'. Handle it.
11516 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11517 (cmd_qtdp): Handle fast tracepoints.
11518 (cmd_qtdv): Adjust.
11519 (max_jump_pad_size): New.
11520 (gdb_jump_pad_head): New.
11521 (get_jump_space_head): New.
11522 (claim_jump_space): New.
11523 (sort_tracepoints): New.
11524 (MAX_JUMP_SIZE): New.
11525 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11526 IPA.
11527 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11528 support. Upload fast traceframes, and delete internal IPA
11529 breakpoints.
11530 (stop_tracing_handler): New.
11531 (flush_trace_buffer_handler): New.
11532 (cmd_qtstop): Upload fast tracepoints.
11533 (response_tracepoint): Handle fast tracepoints.
11534 (tracepoint_finished_step): Upload fast traceframes. Set the
11535 tracepoint hit context's tracepoint type.
11536 (handle_tracepoint_bkpts): New.
11537 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11538 type. Add comment about fast tracepoints.
11539 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11540 non-existing action_str field.
11541 (get_context_regcache): Handle fast tracepoints.
11542 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11543 to the regcache.
11544 (fast_tracepoint_from_jump_pad_address): New.
11545 (fast_tracepoint_from_ipa_tpoint_address): New.
11546 (collecting_t): New.
11547 (force_unlock_trace_buffer): New.
11548 (fast_tracepoint_collecting): New.
11549 (collecting): New.
11550 (gdb_collect): New.
11551 (write_inferior_data_ptr): New.
11552 (target_tp_heap): New.
11553 (target_malloc): New.
11554 (download_agent_expr): New.
11555 (UALIGN): New.
11556 (download_tracepoints): New.
11557 (download_trace_state_variables): New.
11558 (upload_fast_traceframes): New.
11559 (IPA_FIRST_TRACEFRAME): New.
11560 (IPA_NEXT_TRACEFRAME_1): New.
11561 (IPA_NEXT_TRACEFRAME): New.
11562 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11563 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11564 (gdb_jump_pad_buffer_end): New.
11565 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11566 (initialize_tracepoint): Adjust.
11567 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11568 buffer. Initialize the low module.
11569 * utils.c (PREFIX, TOOLNAME): New.
11570 (malloc_failure): Use PREFIX.
11571 (error): In the IPA, an error causes an exit.
11572 (fatal, warning): Use PREFIX.
11573 (internal_error): Use TOOLNAME.
11574 (NUMCELLS): Increase to 10.
11575 * configure, config.in: Regenerate.
11576
11577 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11578
11579 * server.c (handle_query) <qSupported>: Do two passes over the
11580 qSupported string to avoid nesting strtok.
11581
11582 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11583
11584 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11585 (CDEPS): New.
11586 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11587 -Wl,--dynamic-list.
11588 * configure: Regenerate.
11589 * proc-service.list: New.
11590
11591 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11592
11593 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11594 New comment.
11595
11596 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11597
11598 * gdbreplay.c (remote_open): Check error return from socket() call by
11599 its equality to -1 not by it being negative.
11600 * remote-utils.c (remote_open): Likewise.
11601
11602 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11603
11604 * config.h: Regenerate.
11605
11606 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11607
11608 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11609 doesn't provide PTRACE_GET_THREAD_AREA.
11610
11611 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11612
11613 * linux-m68k-low.c: Include <asm/ptrace.h>
11614 (ps_get_thread_area): Implement.
11615
11616 2010-05-03 Doug Evans <dje@google.com>
11617
11618 * event-loop.c (struct callback_event): New struct.
11619 (callback_list): New global.
11620 (append_callback_event, delete_callback_event): New functions.
11621 (process_callback): New function.
11622 (start_event_loop): Call it.
11623 * remote-utils.c (NOT_SCHEDULED): Define.
11624 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11625 moved out of readchar.
11626 (readchar): Rewrite. Call reschedule before returning.
11627 (reset_readchar): New function.
11628 (remote_close): Call it.
11629 (process_remaining, reschedule): New functions.
11630 * server.h (callback_handler_func): New typedef.
11631 (append_callback_event, delete_callback_event): Declare.
11632
11633 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11634
11635 * proc-service.c (ps_pglobal_lookup): Use
11636 thread_db_look_up_one_symbol.
11637 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11638 parameter. Use it instead of all_symbols_looked_up.
11639 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11640 field.
11641 (all_symbols_looked_up): Don't declare.
11642 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11643 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11644 field.
11645 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11646 Set all_symbols_looked_up here.
11647 (thread_db_look_up_one_symbol): New.
11648 (thread_db_get_tls_address): Adjust.
11649 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11650 thread_db object on the heap, and tentatively set it in the
11651 process structure.
11652 (thread_db_init): Don't set all_symbols_looked_up here.
11653 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11654
11655 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11656
11657 * linux-low.c (linux_kill, linux_detach): Adjust.
11658 (status_pending_p_callback): Remove redundant statement. Check
11659 for !TARGET_WAITIKIND_IGNORE, instead of
11660 TARGET_WAITKIND_STOPPED.
11661 (handle_tracepoints): Make sure LWP is locked. Adjust.
11662 (linux_wait_for_event_1): Adjust.
11663 (linux_cancel_breakpoints): New.
11664 (unsuspend_one_lwp): New.
11665 (unsuspend_all_lwps): New.
11666 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11667 (send_sigstop_callback): Change return type to int, add new
11668 `except' parameter and handle it.
11669 (suspend_and_send_sigstop_callback): New.
11670 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11671 pass them down. If SUSPEND, also increment the lwp's suspend
11672 count.
11673 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11674 (need_step_over_p): Don't consider suspended LWPs.
11675 (start_step_over): Adjust.
11676 (proceed_one_lwp): Change return type to int, add new `except'
11677 parameter and handle it.
11678 (unsuspend_and_proceed_one_lwp): New.
11679 (proceed_all_lwps): Use find_inferior instead of
11680 for_each_inferior.
11681 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11682 also decrement the suspend count of LWPs. Pass `except' down,
11683 instead of hacking its suspend count.
11684 (linux_pause_all): Add `freeze' parameter. Adjust.
11685 (linux_unpause_all): New.
11686 (linux_target_ops): Install linux_unpause_all.
11687 * server.c (handle_status): Adjust.
11688 * target.h (struct target_ops): New fields `unpause_all' and
11689 `cancel_breakpoints'. Add new parameter to `pause_all'.
11690 (pause_all): Add new `freeze' parameter.
11691 (unpause_all): New.
11692 (cancel_breakpoints): New.
11693 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11694 cancel breakpoints.
11695 (cmd_qtstart): Pause threads.
11696 (stop_tracing): Pause threads, and cancel breakpoints.
11697 * win32-low.c (win32_target_ops): Adjust.
11698
11699 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11700
11701 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11702 the inferior right away from here...
11703 (linux_wait_1): ... to here, and adjust to check the thread's
11704 last_resume_kind instead of the lwp's step or stop_expected flags.
11705
11706 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11707
11708 * README: Use consistent `GDB' and `GDBserver' spellings.
11709
11710 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11711
11712 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11713 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11714 (linux_detach_one_lwp): Assume the lwp is stopped.
11715 (any_thread_of): Delete.
11716 (linux_detach): Stop all lwps here. Don't blindly delete all
11717 breakpoints.
11718 (delete_lwp_callback): New.
11719 (linux_mourn): Delete all lwps of the process that is gone.
11720 (linux_wait_1): Don't delete the last lwp of the process here.
11721 * mem-break.h (mark_breakpoints_out): Declare.
11722 * mem-break.c (mark_breakpoints_out): New.
11723 (free_all_breakpoints): Use it.
11724 * server.c (handle_target_event): If the process is gone, mark
11725 breakpoints out.
11726 * thread-db.c (struct thread_db) <create_bp>: New field.
11727 (thread_db_enable_reporting): Fix prototype. Store a thread event
11728 breakpoint reference in the thread_db struct.
11729 (thread_db_load_search): Clear the thread_db object.
11730 (try_thread_db_load_1): Ditto.
11731 (switch_to_process): New.
11732 (disable_thread_event_reporting): Use it.
11733 (remove_thread_event_breakpoints): New.
11734 (thread_db_detach, thread_db_mourn): Use it.
11735
11736 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11737
11738 * linux-low.c (linux_enable_event_reporting): New.
11739 (linux_wait_for_event_1, handle_extended_wait): Use it.
11740
11741 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11742
11743 * linux-low.c (linux_kill_one_lwp, linux_kill)
11744 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11745 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11746 SIGSTOP even if the LWP is stopped.
11747 (send_sigstop_callback): New.
11748 (stop_all_lwps): Use send_sigstop_callback instead.
11749 (linux_resume_one_thread): Adjust.
11750 (proceed_one_lwp): Still proceed an LWP that the client has
11751 requested to stop, if we haven't reported it as stopped yet. Make
11752 sure that LWPs the client want stopped, have a pending SIGSTOP.
11753
11754 2010-04-26 Doug Evans <dje@google.com>
11755
11756 * server.c (handle_general_set): Make static.
11757
11758 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11759 Print received char after testing for error/eof instead of before.
11760 (input_interrupt): Tweak comment.
11761
11762 2010-04-23 Doug Evans <dje@google.com>
11763
11764 * server.c (start_inferior): Print inferior argv if --debug.
11765
11766 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11767
11768 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11769 * nto-x86-low.c: Include server.h
11770
11771 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11772
11773 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11774 be consistent with other sources of this directory.
11775 (init_registers_amd64): Correct name of source file of this function
11776 in the comment.
11777
11778 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11779
11780 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11781 64-bit executables.
11782
11783 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11784
11785 * win32-i386-low.c: Add 64-bit support.
11786 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11787 (init_registers_amd64): Declare.
11788 (mappings): Add 64-bit version of array.
11789 (init_windows_x86): New function.
11790 (the_low_target): Change init_arch field to init_windows_x86.
11791
11792 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11793
11794 * win32-low.c: Adapt to support also 64-bit architecture.
11795 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11796 (get_image_name): Use SIZE_T type for local variable `done'.
11797 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11798 (toolhelp_get_dll_name): Idem.
11799 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11800 Use uintptr_t typecast to avoid warning.
11801 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11802 (handle_exception): Use phex_nz to avoid warning.
11803 (win32_wait): Remove unused local variable `process'.
11804
11805 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11806
11807 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11808 `amd64-avx.o'.
11809
11810 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11811
11812 * configure.ac: Use `ws2_32' library for srv_mingw.
11813 * configure: Regenerate.
11814 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11815 * remote-utils.c: Likewise.
11816
11817 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11818
11819 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11820 if __x86_64__ is defined.
11821
11822 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11823
11824 * configure: Regenerate.
11825
11826 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11827
11828 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11829 * target.h (target_ops): New get_tib_address field.
11830 * win32-low.h (win32_thread_info): Add thread_local_base field.
11831 * win32-low.c (child_add_thread): Add tlb argument.
11832 Set thread_local_base field to TLB.
11833 (get_child_debug_event): Adapt to child_add_thread change.
11834 (win32_get_tib_address): New function.
11835 (win32_target_ops): Set get_tib_address field to
11836 win32_get_tib_address.
11837 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11838
11839 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11840
11841 * linux-low.c (linux_mourn): Also remove the process.
11842 * server.c (handle_target_event): Don't remove the process here.
11843 * nto-low.c (nto_mourn): New.
11844 (nto_target_ops): Install it.
11845 * spu-low.c (spu_mourn): New.
11846 (spu_target_ops): Install it.
11847 * win32-low.c (win32_mourn): New.
11848 (win32_target_ops): Install it.
11849
11850 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11851
11852 * server.h (buffer_xml_printf): Remove redundant `;'.
11853
11854 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11855
11856 * regcache.c (set_register_cache): Invalidate regcaches before
11857 changing the register cache layout.
11858 (regcache_invalidate_one): Allow a NULL regcache.
11859 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11860 regcaches before changing the register cache layout or the target
11861 regsets.
11862
11863 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11864
11865 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11866 variable warning on Linux/x86-64.
11867
11868 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11869
11870 GDBserver disconnected tracing support.
11871
11872 * linux-low.c (linux_remove_process): Delete.
11873 (add_lwp): Don't set last_resume_kind here.
11874 (linux_kill): Use `mourn'.
11875 (linux_detach): Use `thread_db_detach', and `mourn'.
11876 (linux_mourn): New.
11877 (linux_attach_lwp_1): Adjust comment.
11878 (linux_attach): last_resume_kind moved the thread_info; adjust.
11879 (status_pending_p_callback): Adjust.
11880 (linux_wait_for_event_1): Adjust.
11881 (count_events_callback, select_singlestep_lwp_callback)
11882 (select_event_lwp_callback, cancel_breakpoints_callback)
11883 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11884 (proceed_one_lwp): Adjust.
11885 (linux_async): Add debug output.
11886 (linux_thread_stopped): New.
11887 (linux_pause_all): New.
11888 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11889 linux_pause_all.
11890 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11891 (thread_db_free): Delete declaration.
11892 (thread_db_detach, thread_db_mourn): Declare.
11893 * thread-db.c (thread_db_init): Use thread_db_mourn.
11894 (thread_db_free): Delete, split in two.
11895 (disable_thread_event_reporting): New.
11896 (thread_db_detach): New.
11897 (thread_db_mourn): New.
11898
11899 * server.h (struct thread_info) <last_resume_kind>: New field.
11900 <attached>: Add comment.
11901 <gdb_detached>: New field.
11902 (handler_func): Change return type to int.
11903 (handle_serial_event, handle_target_event): Ditto.
11904 (gdb_connected): Declare.
11905 (tracing): Delete.
11906 (disconnected_tracing): Declare.
11907 (stop_tracing): Declare.
11908
11909 * server.c (handle_query) <qSupported>: Report support for
11910 disconnected tracing.
11911 (queue_stop_reply_callback): Account for running threads.
11912 (gdb_wants_thread_stopped): New.
11913 (gdb_wants_all_threads_stopped): New.
11914 (gdb_reattached_process): New.
11915 (handle_status): Clear the `gdb_detached' flag of all processes.
11916 In all-stop, stop all threads.
11917 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11918 (process_serial_event): If the remote connection breaks, or if an
11919 exit was forced with "monitor exit", force an event loop exit.
11920 Handle disconnected tracing on detach.
11921 (handle_serial_event): Adjust.
11922 (handle_target_event): If GDB isn't connected, forward events back
11923 to the inferior, unless the last process exited, in which case,
11924 exit gdbserver. Adjust interface.
11925
11926 * remote-utils.c (remote_open): Don't block in accept. Instead
11927 register an event loop source on the listen socket file
11928 descriptor. Refactor bits into ...
11929 (listen_desc): ... this new global.
11930 (gdb_connected): ... this new function.
11931 (enable_async_notification): ... this new function.
11932 (handle_accept_event): ... this new function.
11933 (remote_close): Clear remote_desc.
11934
11935 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11936
11937 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11938 New fields.
11939 (mourn_inferior): Define.
11940 (target_process_qsupported): Avoid the dangling else problem.
11941 (thread_stopped): Define.
11942 (pause_all): Define.
11943 (target_waitstatus_to_string): Declare.
11944 * target.c (target_waitstatus_to_string): New.
11945
11946 * tracepoint.c (tracing): Make extern.
11947 (disconnected_tracing): New.
11948 (stop_tracing): Make extern. Handle tracing stops due to GDB
11949 disconnecting.
11950 (cmd_qtdisconnected): New.
11951 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11952 (handle_tracepoint_general_set): Handle QTDisconnected.
11953
11954 * event-loop.c (event_handler_func): Change return type to int.
11955 (process_event): Bail out if the event handler wants the event
11956 loop to stop.
11957 (handle_file_event): Ditto.
11958 (start_event_loop): Bail out if the event handler wants the event
11959 loop to stop.
11960
11961 * nto-low.c (nto_target_ops): Adjust.
11962 * spu-low.c (spu_wait): Don't remove the process here.
11963 (spu_target_ops): Adjust.
11964 * win32-low.c (win32_wait): Don't remove the process here.
11965 (win32_target_ops): Adjust.
11966
11967 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11968
11969 * regcache.c (realloc_register_cache): Invalidate inferior's
11970 regcache before recreating it.
11971
11972 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11973
11974 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11975
11976 2010-04-09 Stan Shebs <stan@codesourcery.com>
11977 Pedro Alves <pedro@codesourcery.com>
11978
11979 * server.h (LONGEST): New.
11980 (struct thread_info) <while_stepping>: New field.
11981 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11982 Declare.
11983 (initialize_tracepoint, handle_tracepoint_general_set)
11984 (handle_tracepoint_query, tracepoint_finished_step)
11985 (tracepoint_was_hit, release_while_stepping_state_list):
11986 (current_traceframe): Declare.
11987 * server.c (handle_general_set): Handle tracepoint packets.
11988 (read_memory): New.
11989 (write_memory): New.
11990 (handle_search_memory_1): Use read_memory.
11991 (handle_query): Report support for conditional tracepoints, trace
11992 state variables, and tracepoint sources. Handle tracepoint
11993 queries.
11994 (main): Initialize the tracepoints module.
11995 (process_serial_event): Handle traceframe reads/writes.
11996
11997 * linux-low.c (handle_tracepoints): New.
11998 (linux_wait_1): Call it.
11999 (linux_resume_one_lwp): Handle while-stepping.
12000 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12001 (linux_target_ops): Install them.
12002 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12003 New field.
12004 * linux-x86-low.c (x86_supports_tracepoints): New.
12005 (the_low_target). Install it.
12006
12007 * mem-break.h (delete_breakpoint): Declare.
12008 * mem-break.c (delete_breakpoint): Make external.
12009
12010 * target.h (struct target_ops): Add `supports_tracepoints',
12011 `read_pc', and `write_pc' fields.
12012 (target_supports_tracepoints): Define.
12013 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12014 (phex_nz): New.
12015
12016 * regcache.h (struct regcache) <registers_owned>: New field.
12017 (init_register_cache, regcache_cpy): Declare.
12018 (regcache_read_pc, regcache_write_pc): Declare.
12019 (register_cache_size): Declare.
12020 (supply_regblock): Declare.
12021 * regcache.c (init_register_cache): New.
12022 (new_register_cache): Use it.
12023 (regcache_cpy): New.
12024 (register_cache_size): New.
12025 (supply_regblock): New.
12026 (regcache_read_pc, regcache_write_pc): New.
12027
12028 * tracepoint.c: New.
12029
12030 * Makefile.in (OBS): Add tracepoint.o.
12031 (tracepoint.o): New rule.
12032
12033 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12034
12035 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12036 (i386-mmx.o): New.
12037 (i386-mmx.c): Likewise.
12038 (i386-mmx-linux.o): Likewise.
12039 (i386-mmx-linux.c): Likewise.
12040
12041 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12042 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12043 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12044 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12045
12046 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12047 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12048 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12049
12050 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12051
12052 * Makefile.in (clean): Updated.
12053 (i386-avx.o): New.
12054 (i386-avx.c): Likewise.
12055 (i386-avx-linux.o): Likewise.
12056 (i386-avx-linux.c): Likewise.
12057 (amd64-avx.o): Likewise.
12058 (amd64-avx.c): Likewise.
12059 (amd64-avx-linux.o): Likewise.
12060 (amd64-avx-linux.c): Likewise.
12061
12062 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12063 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12064 (srv_amd64_regobj): Add amd64-avx.o.
12065 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12066 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12067 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12068 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12069 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12070 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12071 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12072
12073 * i387-fp.c: Include "i386-xstate.h".
12074 (i387_xsave): New.
12075 (i387_cache_to_xsave): Likewise.
12076 (i387_xsave_to_cache): Likewise.
12077 (x86_xcr0): Likewise.
12078
12079 * i387-fp.h (i387_cache_to_xsave): Likewise.
12080 (i387_xsave_to_cache): Likewise.
12081 (x86_xcr0): Likewise.
12082
12083 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12084 * linux-crisv32-low.c (target_regsets): Likewise.
12085 * linux-m68k-low.c (target_regsets): Likewise.
12086 * linux-mips-low.c (target_regsets): Likewise.
12087 * linux-ppc-low.c (target_regsets): Likewise.
12088 * linux-s390-low.c (target_regsets): Likewise.
12089 * linux-sh-low.c (target_regsets): Likewise.
12090 * linux-sparc-low.c (target_regsets): Likewise.
12091 * linux-xtensa-low.c (target_regsets): Likewise.
12092
12093 * linux-low.c: Include <sys/uio.h>.
12094 (regsets_fetch_inferior_registers): Support nt_type.
12095 (regsets_store_inferior_registers): Likewise.
12096 (linux_process_qsupported): New.
12097 (linux_target_ops): Add linux_process_qsupported.
12098
12099 * linux-low.h (regset_info): Add nt_type.
12100 (linux_target_ops): Add process_qsupported.
12101
12102 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12103 and <sys/uio.h>.
12104 (init_registers_i386_avx_linux): New.
12105 (init_registers_amd64_avx_linux): Likewise.
12106 (xmltarget_i386_linux_no_xml): Likewise.
12107 (xmltarget_amd64_linux_no_xml): Likewise.
12108 (PTRACE_GETREGSET): Likewise.
12109 (PTRACE_SETREGSET): Likewise.
12110 (x86_fill_xstateregset): Likewise.
12111 (x86_store_xstateregset): Likewise.
12112 (use_xml): Likewise.
12113 (x86_linux_update_xmltarget): Likewise.
12114 (x86_linux_process_qsupported): Likewise.
12115 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12116 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12117 init_registers_i386_linux here. Call
12118 x86_linux_update_xmltarget.
12119 (the_low_target): Add x86_linux_process_qsupported.
12120
12121 * server.c (handle_query): Call target_process_qsupported.
12122
12123 * target.h (target_ops): Add process_qsupported.
12124 (target_process_qsupported): New.
12125
12126 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12127
12128 * inferiors.c (add_thread): Set last_status kind to
12129 TARGET_WAITKIND_IGNORE.
12130 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12131 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12132 (linux_wait_1): Move `thread' local definition to block that uses
12133 it. Don't NULL initialize `event_child'.
12134 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12135 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12136 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12137
12138 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12139
12140 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12141 an extended waitstatus, or by a watchpoint.
12142 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12143 thread was stepping or has been stopped by a watchpoint.
12144
12145 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12146
12147 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12148 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12149 of another, then delete the previous, and validate all
12150 breakpoints.
12151 (validate_inserted_breakpoint): New.
12152 (delete_disabled_breakpoints): New.
12153 (validate_breakpoints): New.
12154 (check_mem_read): Validate breakpoints before trusting their
12155 shadow. Delete disabled breakpoints.
12156 (check_mem_write): Validate breakpoints before trusting they
12157 should be inserted. Delete disabled breakpoints.
12158 * mem-break.h (validate_breakpoints):
12159 * server.c (handle_query): Validate breakpoints when we see a
12160 qSymbol query.
12161
12162 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12163
12164 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12165 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12166 if we could tell there's a GDB breakpoint at stop_pc.
12167 (need_step_over_p): Don't do a step over if we find a GDB
12168 breakpoint at the resume PC.
12169
12170 * mem-break.c (struct raw_breakpoint): New.
12171 (enum bkpt_type): New type `gdb_breakpoint'.
12172 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12173 fields. New field `raw'.
12174 (find_raw_breakpoint_at): New.
12175 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12176 breakpoint instead.
12177 (set_breakpoint_at): Adjust.
12178 (delete_raw_breakpoint): New.
12179 (release_breakpoint): New.
12180 (delete_breakpoint): Rename to...
12181 (delete_breakpoint_1): ... this. Add proc parameter. Use
12182 release_breakpoint. Return ENOENT.
12183 (delete_breakpoint): Reimplement.
12184 (find_breakpoint_at): Delete.
12185 (find_gdb_breakpoint_at): New.
12186 (delete_breakpoint_at): Delete.
12187 (set_gdb_breakpoint_at): New.
12188 (delete_gdb_breakpoint_at): New.
12189 (gdb_breakpoint_here): New.
12190 (set_reinsert_breakpoint): Use release_breakpoint.
12191 (uninsert_breakpoint): Rename to ...
12192 (uninsert_raw_breakpoint): ... this.
12193 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12194 (reinsert_raw_breakpoint): Change parameter type to
12195 raw_breakpoint.
12196 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12197 instead.
12198 (check_breakpoints): Adjust. Use release_breakpoint.
12199 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12200 (breakpoint_inserted_here): Ditto.
12201 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12202 Don't trust the breakpoint's shadow if it is not inserted.
12203 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12204 (delete_all_breakpoints): Adjust.
12205 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12206 use delete_breakpoint_1.
12207
12208 * mem-break.h (breakpoints_supported): Delete declaration.
12209 (set_gdb_breakpoint_at): Declare.
12210 (gdb_breakpoint_here): Declare.
12211 (delete_breakpoint_at): Delete.
12212 (delete_gdb_breakpoint_at): Declare.
12213
12214 * server.h (struct raw_breakpoint): Forward declare.
12215 (struct process_info): New field `raw_breakpoints'.
12216
12217 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12218 breakpoints.
12219
12220 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12221
12222 * linux-low.c (status_pending_p_callback): Fix comment.
12223 (linux_wait_for_event_1): Move most of the internal breakpoint
12224 handling from here...
12225 (linux_wait_1): ... to here.
12226 (count_events_callback): New.
12227 (select_singlestep_lwp_callback): New.
12228 (select_event_lwp_callback): New.
12229 (cancel_breakpoints_callback): New.
12230 (select_event_lwp): New.
12231 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12232 priority to all LWPs that have had events that should be reported
12233 to the client. Cancel breakpoints when about to reporting the
12234 event to the client, not while stopping lwps. No longer cancel
12235 finished single-steps here.
12236 (cancel_finished_single_step): Delete.
12237 (cancel_finished_single_steps): Delete.
12238
12239 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12240
12241 * mem-break.c (enum bkpt_type): New.
12242 (struct breakpoint): New field `type'.
12243 (set_breakpoint_at): Change return type to struct breakpoint
12244 pointer. Set type to `other_breakpoint' by default.
12245 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12246 in the breakpoint list.
12247 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12248 (reinsert_breakpoint): Rename to ...
12249 (reinsert_raw_breakpoint): ... this.
12250 (reinsert_breakpoints_at): Adjust.
12251 * mem-break.h (struct breakpoint): Declare.
12252 (set_breakpoint_at): Change return type to struct breakpoint
12253 pointer.
12254
12255 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12256
12257 * server.c (handle_query): Assign, not compare.
12258
12259 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12260
12261 Teach linux gdbserver to step-over-breakpoints.
12262
12263 * linux-low.c (can_hardware_single_step): New.
12264 (supports_breakpoints): New.
12265 (handle_extended_wait): If stopping threads, read the stop pc of
12266 the new cloned LWP.
12267 (get_pc): New.
12268 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12269 low target doesn't support retrieving the PC.
12270 (add_lwp): Set last_resume_kind to resume_continue.
12271 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12272 (linux_attach): Don't clear stop_expected. Set the lwp's
12273 last_resume_kind to resume_stop.
12274 (linux_detach_one_lwp): Don't check for removed breakpoints.
12275 (check_removed_breakpoint): Delete.
12276 (status_pending_p): Rename to ...
12277 (status_pending_p_callback): ... this. Don't check for removed
12278 breakpoints. Don't consider threads that are stopped from GDB's
12279 perspective.
12280 (linux_wait_for_lwp): Always read the stop_pc here.
12281 (cancel_breakpoint): New.
12282 (step_over_bkpt): New global.
12283 (linux_wait_for_event_1): Implement stepping over breakpoints.
12284 (gdb_wants_lwp_stopped): New.
12285 (gdb_wants_all_stopped): New.
12286 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12287 single-step traps here. Store the thread's last reported target
12288 wait status.
12289 (send_sigstop): Don't clear stop_expected. Always set it,
12290 instead.
12291 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12292 (cancel_finished_single_step): New.
12293 (cancel_finished_single_steps): New.
12294 (wait_for_sigstop): Don't cancel finished single-step traps here.
12295 (linux_resume_one_lwp): Don't check for removed breakpoints.
12296 Don't set `step' on non-hardware step archs.
12297 (linux_set_resume_request): Ignore resume_stop requests if already
12298 stopping or stopped. Set the lwp's last_resume_kind.
12299 (resume_status_pending_p): Don't check for removed breakpoints.
12300 (need_step_over_p): New.
12301 (start_step_over): New.
12302 (finish_step_over): New.
12303 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12304 requests. Clear the thread's last reported target waitstatus.
12305 Don't use the `suspended' flag. Don't consider pending breakpoints.
12306 (linux_resume): Start a step-over if necessary.
12307 (proceed_one_lwp): New.
12308 (proceed_all_lwps): New.
12309 (unstop_all_lwps): New.
12310 * linux-low.h (struct lwp_info): Rewrite comment for the
12311 `suspended' flag. Add the `stop_pc' field. Delete the
12312 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12313 Add `'last_resume_kind' and `need_step_over' fields.
12314 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12315 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12316 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12317 (set_raw_breakpoint_at): New.
12318 (set_breakpoint_at): Rewrite to use it.
12319 (reinsert_breakpoint_handler): Delete.
12320 (set_reinsert_breakpoint): New.
12321 (reinsert_breakpoint_by_bp): Delete.
12322 (delete_reinsert_breakpoints): New.
12323 (uninsert_breakpoint): Rewrite.
12324 (uninsert_breakpoints_at): New.
12325 (reinsert_breakpoint): Rewrite.
12326 (reinsert_breakpoints_at): New.
12327 (check_breakpoints): Rewrite.
12328 (breakpoint_here): New.
12329 (breakpoint_inserted_here): New.
12330 (check_mem_read): Adjust.
12331 * mem-break.h (breakpoints_supported, breakpoint_here)
12332 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12333 (reinsert_breakpoint_by_bp): Delete declaration.
12334 (delete_reinsert_breakpoints): Declare.
12335 (reinsert_breakpoint): Delete declaration.
12336 (reinsert_breakpoints_at): Declare.
12337 (uninsert_breakpoint): Delete declaration.
12338 (uninsert_breakpoints_at): Declare.
12339 (check_breakpoints): Adjust prototype.
12340 * server.h: Adjust include order.
12341 (struct thread_info): Declare here. Add a `last_status' field.
12342
12343 2010-03-23 Michael Snyder <msnyder@vmware.com>
12344
12345 * server.c (crc32): New function.
12346 (handle_query): Add handling for 'qCRC:' request.
12347
12348 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12349
12350 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12351 lwp had been stopped by a watchpoint.
12352
12353 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12354
12355 * server.h (internal_error): Declare.
12356 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12357 * utils.c (internal_error): New function.
12358
12359 2010-03-15 Andreas Schwab <schwab@redhat.com>
12360
12361 * configure.srv: Fix typo setting srv_regobj.
12362
12363 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12364
12365 * linux-low.c (fetch_register): Avoid passing a non string literal
12366 format to `error'.
12367 (usr_store_inferior_registers): Ditto.
12368
12369 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12370
12371 * linux-low.c (linux_write_memory): Bail out early if peeking
12372 memory failed.
12373
12374 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12375
12376 * linux-low.h (struct lwp_info): New fields
12377 `stopped_by_watchpoint' and `stopped_data_address'.
12378 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12379 here, and cache them in the lwp object.
12380 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12381 directly.
12382 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12383 field.
12384 (linux_stopped_by_watchpoint): Rewrite.
12385 (linux_stopped_data_address): Rewrite.
12386
12387 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12388
12389 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12390 switching the current inferior, not before.
12391
12392 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12393
12394 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12395 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12396 i386-linux.c and amd64-linux.c.
12397 (reg-i386.o): Removed.
12398 (reg-i386.c): Likewise.
12399 (reg-i386-linux.o): Likewise.
12400 (reg-i386-linux.c): Likewise.
12401 (reg-x86-64.o): Likewise.
12402 (reg-x86-64.c): Likewise.
12403 (reg-x86-64-linux.o): Likewise.
12404 (reg-x86-64-linux.c): Likewise.
12405 (i386.o): New.
12406 (i386.c): Likewise.
12407 (i386-linux.o): Likewise.
12408 (i386-linux.c): Likewise.
12409 (amd64.o): Likewise.
12410 (amd64.c): Likewise.
12411 (amd64-linux.o): Likewise.
12412 (amd64-linux.c): Likewise.
12413
12414 * configure.srv (srv_i386_regobj): New.
12415 (srv_i386_linux_regobj): Likewise.
12416 (srv_amd64_regobj): Likewise.
12417 (srv_amd64_linux_regobj): Likewise.
12418 (srv_i386_32bit_xmlfiles): Likewise.
12419 (srv_i386_64bit_xmlfiles): Likewise.
12420 (srv_i386_xmlfiles): Likewise.
12421 (srv_amd64_xmlfiles): Likewise.
12422 (srv_i386_linux_xmlfiles): Likewise.
12423 (srv_amd64_linux_xmlfiles): Likewise.
12424 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12425 srv_xmlfiles to $srv_i386_xmlfiles.
12426 (i[34567]86-*-mingw32ce*): Likewise.
12427 (i[34567]86-*-mingw*): Likewise.
12428 (i[34567]86-*-nto*): Likewise.
12429 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12430 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12431 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12432 (x86_64-*-linux*): Likewise.
12433
12434 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12435 (init_registers_amd64_linux): New.
12436 (x86_arch_setup): Replace init_registers_x86_64_linux with
12437 init_registers_amd64_linux.
12438
12439 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12440
12441 * configure.ac: Check for libdl. If it is not available link against
12442 static libthread_db.
12443 * configure: Regenerate.
12444
12445 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12446
12447 PR9605
12448
12449 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12450 handing a read watchpoint.
12451 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12452
12453 2010-02-12 Doug Evans <dje@google.com>
12454
12455 * linux-low.c (linux_supports_tracefork_flag): Document.
12456 (linux_look_up_symbols): Add comment.
12457
12458 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12459
12460 * regcache.c (supply_register): Clear regcache if buf is NULL.
12461
12462 2010-02-02 Nicolas Roche <roche@sourceware.org>
12463 Joel Brobecker <brobecker@adacore.com>
12464
12465 * inferiors.c (find_inferior): Add function documentation.
12466 (unloaded_dll): Handle the case where the unloaded dll has not
12467 been previously registered in the dll list.
12468
12469 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12470
12471 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12472 (thumb2_breakpoint): New.
12473 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12474
12475 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12476
12477 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12478 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12479 breakpoints.
12480
12481 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12482
12483 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12484
12485 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12486
12487 * linux-s390-low.c (s390_collect_ptrace_register)
12488 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12489
12490 2010-01-21 Doug Evans <dje@google.com>
12491
12492 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12493 (PTRACE_ARG4_TYPE): New macro.
12494 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12495 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12496 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12497 (usr_store_inferior_registers): Ditto.
12498 (linux_read_memory, linux_write_memory): Ditto.
12499 (linux_test_for_tracefork): Ditto.
12500
12501 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12502 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12503
12504 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12505
12506 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12507 target.
12508
12509 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12510
12511 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12512 prototype to take a regcache. Adjust.
12513
12514 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12515
12516 * regcache.h (struct thread_info): Forward declare.
12517 (struct regcache): New.
12518 (new_register_cache): Adjust prototype.
12519 (get_thread_regcache): Declare.
12520 (free_register_cache): Adjust prototype.
12521 (registers_to_string, registers_from_string): Ditto.
12522 (supply_register, supply_register_by_name, collect_register)
12523 (collect_register_as_string, collect_register_by_name): Ditto.
12524 * regcache.c (struct inferior_regcache_data): Delete.
12525 (get_regcache): Rename to ...
12526 (get_thread_regcache): ... this. Adjust. Switch inferior before
12527 fetching registers.
12528 (regcache_invalidate_one): Adjust.
12529 (regcache_invalidate): Fix prototype.
12530 (new_register_cache): Return the new register cache.
12531 (free_register_cache): Change prototype.
12532 (realloc_register_cache): Adjust.
12533 (registers_to_string): Change prototype to take a regcache. Adjust.
12534 (registers_from_string): Ditto.
12535 (register_data): Ditto.
12536 (supply_register): Ditto.
12537 (supply_register_by_name): Ditto.
12538 (collect_register): Ditto.
12539 (collect_register_as_string): Ditto.
12540 (collect_register_by_name): Ditto.
12541 * server.c (process_serial_event): Adjust.
12542 * linux-low.h (regset_fill_func, regset_store_func): Change
12543 prototype.
12544 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12545 Change prototype.
12546 * linux-low.c (get_stop_pc): Adjust.
12547 (check_removed_breakpoint): Adjust.
12548 (linux_wait_for_event): Adjust.
12549 (linux_resume_one_lwp): Adjust.
12550 (fetch_register): Add regcache parameter. Adjust.
12551 (usr_store_inferior_registers): Ditto.
12552 (regsets_fetch_inferior_registers): Ditto.
12553 (regsets_store_inferior_registers): Ditto.
12554 (linux_fetch_registers, linux_store_registers): Ditto.
12555 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12556 regcache. Adjust.
12557 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12558 Ditto.
12559 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12560 prototype to take a regcache.
12561 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12562 * remote-utils.c (convert_ascii_to_int, outreg)
12563 (prepare_resume_reply): Change prototype to take a regcache.
12564 Adjust.
12565 * target.h (struct target_ops) <fetch_registers, store_registers>:
12566 Change prototype to take a regcache.
12567 (fetch_inferior_registers, store_inferior_registers): Change
12568 prototype to take a regcache. Adjust.
12569 * proc-service.c (ps_lgetregs): Adjust.
12570 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12571 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12572 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12573 take a regcache. Adjust.
12574 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12575 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12576 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12577 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12578 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12579 (cris_cannot_fetch_register):
12580 (cris_breakpoint_at): Change prototype to take a regcache.
12581 Adjust.
12582 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12583 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12584 to take a regcache. Adjust.
12585 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12586 Adjust.
12587 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12588 take a regcache. Adjust.
12589 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12590 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12591 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12592 * linux-mips-low.c (mips_get_pc):
12593 (mips_set_pc): Change prototype to take a regcache. Adjust.
12594 (mips_reinsert_addr): Adjust.
12595 (mips_collect_register): Change prototype to take a regcache.
12596 Adjust.
12597 (mips_supply_register):
12598 (mips_collect_register_32bit, mips_supply_register_32bit)
12599 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12600 (mips_store_fpregset): Ditto.
12601 * linux-ppc-low.c (ppc_supply_ptrace_register)
12602 (ppc_supply_ptrace_register): Ditto.
12603 (parse_spufs_run): Adjust.
12604 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12605 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12606 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12607 take a regcache. Adjust.
12608 * linux-s390-low.c (s390_collect_ptrace_register)
12609 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12610 (s390_set_pc): Change prototype to take a regcache. Adjust.
12611 (s390_arch_setup): Adjust.
12612 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12613 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12614 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12615 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12616 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12617 regcache. Adjust.
12618 (sparc_breakpoint_at): Adjust.
12619 * linux-xtensa-low.c (xtensa_fill_gregset):
12620 (xtensa_store_gregset):
12621 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12622 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12623 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12624 prototype to take a regcache. Adjust.
12625 * win32-arm-low.c (arm_fetch_inferior_register)
12626 (arm_store_inferior_register): Change prototype to take a
12627 regcache. Adjust.
12628 * win32-i386-low.c (i386_fetch_inferior_register)
12629 (i386_store_inferior_register): Change prototype to take a
12630 regcache. Adjust.
12631 * win32-low.c (child_fetch_inferior_registers)
12632 (child_store_inferior_registers): Change prototype to take a
12633 regcache. Adjust.
12634 (win32_wait): Adjust.
12635 (win32_fetch_inferior_registers): Change prototype to take a
12636 regcache. Adjust.
12637 (win32_store_inferior_registers): Adjust.
12638 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12639 store_inferior_register>: Change prototype to take a regcache.
12640
12641 2010-01-20 Doug Evans <dje@google.com>
12642
12643 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12644 #ifdef.
12645 (linux_wait_for_event1, linux_init_signals): Ditto.
12646 (W_STOPCODE): Provide definition if missing.
12647
12648 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12649
12650 * linux-low.c (linux_core_of_thread): New.
12651 (compare_ints, show_process, list_threads): New.
12652 (linux_qxfer_osdata): Report threads and cores.
12653 (linux_target_op): Register linux_core_of_thread.
12654 * remote-utils.c (prepare_resume_reply): Report the core.
12655 (buffer_xml_printf): Support %d specifier.
12656 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12657 New.
12658 (handle_query): Handle qXfer:threads. Announce availability
12659 thereof.
12660 * target.h (struct target_ops): New field core_of_thread.
12661
12662 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12663
12664 * Makefile.in (clean): Remove new generated files.
12665 (reg-s390.o, reg-s390.c): Remove rules.
12666 (reg-s390x.o, reg-s390x.c): Likewise.
12667 (s390-linux32.o, s390-linux32.c): Add rules.
12668 (s390-linux64.o, s390-linux64.c): Likewise.
12669 (s390x-linux64.o, s390x-linux64.c): Likewise.
12670 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12671 * linux-s390-low.c: Include <elf.h>.
12672 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12673 (init_registers_s390): Remove prototype.
12674 (init_registers_s390x): Likewise.
12675 (init_registers_s390_linux32): Add prototype.
12676 (init_registers_s390_linux64): Likewise.
12677 (init_registers_s390x_linux64): Likewise.
12678 (s390_num_regs_3264): New define.
12679 (s390_regmap_3264): New global variable.
12680 (s390_cannot_fetch_register): Remove obsolete check.
12681 (s390_cannot_store_register): Likewise.
12682 (s390_collect_ptrace_register): Handle upper/lower register halves.
12683 (s390_supply_ptrace_register): Likewise.
12684 (s390_fill_gregset): Update to register number changes.
12685 (s390_get_hwcap): New routine.
12686 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12687 Install appropriate regmap and register set.
12688
12689 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12690
12691 * server.c (gdbserver_version): Update copyright year to 2010.
12692 * gdbreplay.c (gdbreplay_version): Likewise.
12693
12694 2009-12-28 Doug Evans <dje@google.com>
12695
12696 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12697 elf/external.h. Include <elf.h> instead but only if necessary.
12698
12699 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12700
12701 * linux-low.c (linux_remove_process): Remove `detaching'
12702 parameter. Don't release/detach from thread_db here.
12703 (linux_kill): Release/detach from thread_db here, ...
12704 (linux_detach): ... and here, before actually detaching.
12705 (linux_wait_1): ... and here, when a process exits.
12706 * thread-db.c (any_thread_of): New.
12707 (thread_db_free): Switch the current inferior to a thread of the
12708 passed in process.
12709
12710 2009-12-21 Doug Evans <dje@google.com>
12711
12712 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12713
12714 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12715 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12716 warning ifndef __NR_tkill. Move setting of errno there too.
12717 Delete unnecessary resetting of errno after syscall.
12718 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12719
12720 * configure.ac: Check for dladdr.
12721 * config.in: Regenerate.
12722 * configure: Regenerate.
12723 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12724 (try_thread_db_load): Update.
12725
12726 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12727
12728 2009-12-18 Doug Evans <dje@google.com>
12729
12730 * event-loop.c: Include unistd.h if it exists.
12731
12732 * linux-low.c (my_waitpid): Move definition away from being in
12733 between linux_tracefork_child/linux_test_for_tracefork.
12734
12735 * gdb_proc_service.h (psaddr_t): Fix type.
12736 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12737 signature to match glibc.
12738
12739 2009-12-16 Doug Evans <dje@google.com>
12740
12741 * linux-low.c (linux_read_memory): Fix argument to read.
12742
12743 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12744
12745 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12746 events, don't leave current_inferior pointing at null.
12747
12748 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12749
12750 * win32-low.c (LOG): Delete.
12751 (OUTMSG): Output to stderr.
12752 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12753 on compile time LOG macro.
12754 (win32_wait): Fix debug output.
12755
12756 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12757
12758 * win32-low.c (win32_add_one_solib): If the dll name is
12759 "ntdll.dll", prepend the system directory to the dll path.
12760
12761 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12762
12763 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12764
12765 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12766 Vladimir Prus <vladimir@codesourcery.com>
12767
12768 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12769 * configure.ac: Check for __mcoldfire__ and set
12770 gdb_cv_m68k_is_coldfire.
12771 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12772 reg-cf.o and reg-m68k.o.
12773 * configure: Regenerated.
12774
12775 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12776
12777 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12778 Pass it to thread_db_free.
12779 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12780 proper `detaching' argument to linux_remove_process.
12781 * linux-low.h (thread_db_free): Add `detaching' parameter.
12782 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12783 to thread_db_free.
12784 (thread_db_free): Add `detaching' parameter. Only
12785 call td_ta_clear_event if detaching from process.
12786
12787 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12788
12789 * thread-db.c (thread_db_free): Fix typo.
12790
12791 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12792
12793 PR gdb/10838
12794 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12795
12796 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12797
12798 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12799 with an i686 compiler.
12800 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12801 needed.
12802 * configure: Rebuilt.
12803
12804 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12805
12806 PR gdb/10783
12807
12808 * server.c (handle_search_memory_1): Correct read_addr initialization
12809 in loop for searching subsequent chunks.
12810
12811 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12812
12813 * configure.ac: New --with-libthread-db option.
12814 * thread-db.c: Allow direct dependence on libthread_db.
12815 (thread_db_free): Adjust.
12816 * config.in: Regenerate.
12817 * configure: Likewise.
12818
12819 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12820
12821 PR gdb/10757
12822 * thread-db.c (attach_thread): New function.
12823 (maybe_attach_thread): Return success/failure.
12824 (find_new_threads_callback): Adjust.
12825 (thread_db_find_new_threads): Loop until no new threads.
12826
12827 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12828
12829 * proc-service.c (ps_lgetregs): Formatting.
12830
12831 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12832
12833 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12834 * configure.ac: Adjust.
12835 * linux-low.h (struct process_info_private): Move members to struct
12836 thread_db.
12837 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12838 * linux-low.c (linux_remove_process): Adjust.
12839 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12840 * server.c (handle_query): Move code ...
12841 (handle_monitor_command): ... here. New function.
12842 * target.h (struct target_ops): New member.
12843 * thread-db.c (struct thread_db): New.
12844 (libthread_db_search_path): New variable.
12845 (thread_db_create_event, thread_db_enable_reporting)
12846 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12847 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12848 (try_thread_db_load_1, dladdr_to_soname): New functions.
12849 (try_thread_db_load, thread_db_load_search): New functions.
12850 (thread_db_init): Search for libthread_db.
12851 (thread_db_free): New function.
12852 (thread_db_handle_monitor_command): Likewise.
12853 * config.in: Regenerate.
12854 * configure: Regenerate.
12855
12856 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12857
12858 * spu-low.c (spu_kill): Wait for inferior to terminate.
12859 Call clear_inferiors.
12860 (spu_detach): Call clear_inferiors.
12861
12862 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12863
12864 * aclocal.m4: Regenerate.
12865 * config.in: Likewise.
12866 * configure: Likewise.
12867
12868 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12869
12870 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12871 (parse_spufs_run): New function.
12872 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12873 (ppc_breakpoint_at): Handle SPU breakpoints.
12874
12875 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12876
12877 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12878 (SPUFS_MAGIC): Define.
12879 (spu_enumerate_spu_ids): New function.
12880 (linux_qxfer_spu): New function.
12881 (linux_target_ops): Install linux_qxfer_spu.
12882
12883 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12884
12885 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12886 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12887 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12888 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12889 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12890 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12891 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12892 (init_registers_powerpc_cell32l): Add prototype.
12893 (init_registers_powerpc_cell64l): Likewise.
12894 (ppc_arch_setup): Detect Cell/B.E. architecture.
12895
12896 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12897
12898 * Makefile.in (datarootdir): New variable.
12899
12900 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12901
12902 * linux-low.c (linux_write_memory): Update debugging output.
12903 * Makefile.in (clean): Add new descriptions.
12904 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12905 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12906 * configure.srv: Add new files for arm*-*-linux*.
12907 * linux-arm-low.c: Add new declarations.
12908 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12909 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12910 (HWCAP_VFPv3D16): New.
12911 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12912 instead of __IWMMXT__.
12913 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12914 (arm_arch_setup): New.
12915 (target_regsets): Remove #ifdef. Add VFP regset.
12916 (the_low_target): Use arm_arch_setup.
12917
12918 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12919
12920 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12921 the main thread again.
12922
12923 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12924
12925 Adding Neutrino gdbserver.
12926 * configure: Regenerated.
12927 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12928 * configure.srv (i[34567]86-*-nto*): New target.
12929 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12930 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12931 (nto_comctrl) [__QNX__]: New function.
12932 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12933
12934 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12935
12936 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12937 srv_tgtobj.
12938
12939 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12940 Pedro Alves <pedro@codesourcery.com>
12941
12942 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12943 don't support CONTEXT_EXTENDED_REGISTERS.
12944 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12945 (the_low_target): Install them.
12946 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12947 failing with ERROR_PIPE_NOT_CONNECTED.
12948
12949 2009-06-30 Doug Evans <dje@google.com>
12950 Pierre Muller <muller@ics.u-strasbg.fr>
12951
12952 Add h/w watchpoint support to x86-linux, win32-i386.
12953 * Makefile.in (SFILES): Add i386-low.c
12954 (i386_low_h): Define.
12955 (i386-low.o): Add dependencies.
12956 (linux-x86-low.o): Add i386-low.h dependency.
12957 (win32-i386-low.o): Ditto.
12958 * i386-low.c: New file.
12959 * i386-low.h: New file.
12960 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12961 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12962 * linux-low.c (linux_add_process): Initialize arch_private.
12963 (linux_remove_process): Free arch_private.
12964 (add_lwp): Initialize arch_private.
12965 (delete_lwp): Free arch_private.
12966 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12967 provided.
12968 * linux-low.h (process_info_private): New member arch_private.
12969 (lwp_info): New member arch_private.
12970 (linux_target_ops): New members new_process, new_thread,
12971 prepare_to_resume.
12972 (ptid_of): New macro.
12973 * linux-x86-low.c: Include stddef.h, i386-low.h.
12974 (arch_process_info): New struct.
12975 (arch_lwp_info): New struct.
12976 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12977 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12978 (i386_dr_low_get_status): New function.
12979 (x86_insert_point, x86_remove_point): New functions.
12980 (x86_stopped_by_watchpoint): New function.
12981 (x86_stopped_data_address): New function.
12982 (x86_linux_new_process, x86_linux_new_thread): New functions.
12983 (x86_linux_prepare_to_resume): New function.
12984 (the_low_target): Add entries for insert_point, remove_point,
12985 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12986 prepare_to_resume.
12987 * server.c (debug_hw_points): New global.
12988 (monitor_show_help): Document set debug-hw-points.
12989 (handle_query): Process "set debug-hw-points".
12990 * server.h (debug_hw_points): Declare.
12991 (paddress): Declare.
12992 * utils.c (NUMCELLS, CELLSIZE): New macros.
12993 (get_sell, xsnprintf, paddress): New functions.
12994 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12995 remove_point, stopped_by_watchpoint, stopped_data_address.
12996 * win32-i386-low.c: Include i386-low.h.
12997 (debug_reg_state): Replaces dr.
12998 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12999 (i386_dr_low_get_status): New function.
13000 (i386_insert_point, i386_remove_point): New functions.
13001 (i386_stopped_by_watchpoint): New function.
13002 (i386_stopped_data_address): New function.
13003 (i386_initial_stuff): Update.
13004 (get_thread_context,set_thread_context,i386_thread_added): Update.
13005 (the_low_target): Add entries for insert_point,
13006 remove_point, stopped_by_watchpoint, stopped_data_address.
13007 * win32-low.c (win32_insert_watchpoint): New function.
13008 (win32_remove_watchpoint): New function.
13009 (win32_stopped_by_watchpoint): New function.
13010 (win32_stopped_data_address): New function.
13011 (win32_target_ops): Add entries for insert_watchpoint,
13012 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13013 * win32-low.h (win32_target_ops): New members insert_point,
13014 remove_point, stopped_by_watchpoint, stopped_data_address.
13015
13016 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13017
13018 * server.c (process_serial_event): Re-return unsupported, not
13019 error, if the type isn't recognized. Re-allow supporting only
13020 insert or remove packets. Also call require_running for
13021 breakpoints. Add missing break statement to default case. Tidy.
13022 * target.h (struct target_ops): Rename insert_watchpoint to
13023 insert_point, and remove_watchpoint to remove_point.
13024
13025 * linux-low.h (struct linux_target_ops): Likewise.
13026 * linux-low.c (linux_insert_watchpoint): Rename to ...
13027 (linux_insert_point): ... this. Adjust.
13028 (linux_remove_watchpoint): Rename to ...
13029 (linux_remove_point): ... this. Adjust.
13030 (linux_target_ops): Adjust.
13031 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13032 (cris_insert_point): ... this.
13033 (cris_remove_watchpoint): Rename to ...
13034 (cris_remove_point): ... this.
13035 (the_low_target): Adjust.
13036
13037 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13038
13039 * server.c (handle_v_kill): Pass signal_pid to
13040 kill_inferior if multi_process is zero.
13041
13042 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13043
13044 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13045 * target.h (target_ops): Comment for *_watchpoint to make it clear
13046 the functions can get types '0' and '1'.
13047
13048 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13049
13050 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13051 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13052 * regcache.c (get_regcache): Likewise.
13053 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13054 * win32-low.c (child_fetch_inferior_registers): Remove check for
13055 regno 0.
13056
13057 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13058 Pedro Alves <pedro@codesourcery.com>
13059
13060 * target.h (struct target_ops) <supports_multi_process>: New
13061 callback.
13062 (target_supports_multi_process): New.
13063 * server.c (handle_query): Even if GDB reports support, only
13064 enable multi-process if the target also supports it. Report
13065 multi-process support only if the target backend supports it.
13066 * linux-low.c (linux_supports_multi_process): New function.
13067 (linux_target_ops): Install it as target_supports_multi_process
13068 callback.
13069
13070 2009-05-24 Doug Evans <dje@google.com>
13071
13072 Global renaming of find_thread_pid to find_thread_ptid.
13073 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13074 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13075 All callers updated.
13076
13077 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13078 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13079 directly.
13080
13081 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13082 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13083 (linux_resume_one_lwp): Ditto.
13084
13085 2009-05-23 Doug Evans <dje@google.com>
13086
13087 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13088 from struct inferior_list_entry * to struct lwp_info *.
13089 All callers updated.
13090
13091 2009-05-13 Doug Evans <dje@google.com>
13092
13093 * linux-x86-low.c: Don't include assert.h.
13094 (x86_siginfo_fixup): Use fatal, not assert.
13095 (x86_arch_setup): Fix comment.
13096
13097 2009-05-12 Doug Evans <dje@google.com>
13098
13099 Biarch support for i386/amd64 gdbserver.
13100 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13101 Add linux-x86-low.c.
13102 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13103 (linux-x86-low.o): Add.
13104 * linux-x86-64-low.c: Delete.
13105 * linux-i386-low.c: Delete.
13106 * linux-x86-low.c: New file.
13107 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13108 linux-x86-low.o.
13109 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13110 linux-x86-low.o.
13111 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13112 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13113 (linux_child_pid_to_exec_file): New function.
13114 (elf_64_header_p, elf_64_file_p): New functions.
13115 (siginfo_fixup): New function.
13116 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13117 give target a chance to convert layout.
13118 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13119 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13120
13121 2009-05-07 Doug Evans <dje@google.com>
13122
13123 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13124 (regsets_store_inferior_registers): Ditto.
13125
13126 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13127
13128 PR server/10048
13129
13130 * linux-low.c (must_set_ptrace_flags): Delete.
13131 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13132 of the global.
13133 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13134 `lwp->must_set_ptrace_flags' instead.
13135 (linux_wait_for_event_1): Set ptrace options here.
13136 (linux_wait_1): ... not here.
13137
13138 2009-04-30 Doug Evans <dje@google.com>
13139
13140 * inferiors.c (started_inferior_callback): New function.
13141 (attached_inferior_callback): New function.
13142 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13143 * server.c (print_started_pid, print_attached_pid): New functions.
13144 (detach_or_kill_for_exit): New function.
13145 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13146 * server.h (have_started_inferiors_p): Declare.
13147 (have_attached_inferiors_p): Declare.
13148
13149 * inferiors.c (remove_process): Fix memory leak, free process.
13150 * linux-low.c (linux_remove_process): New function.
13151 (linux_kill): Call it instead of remove_process.
13152 (linux_detach, linux_wait_1): Ditto.
13153
13154 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13155
13156 * configure.srv: Add x86 Windows CE target.
13157
13158 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13159
13160 * inferiors.c (get_thread_process): Make global.
13161 * server.h (get_thread_process): Add prototype.
13162 * thread-db.c (find_one_thread): Use get_thread_process
13163 instead of current_process.
13164 (thread_db_get_tls_address): Do not crash if called when
13165 thread layer is not yet initialized.
13166
13167 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13168
13169 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13170 * spu-low.c (current_tid): Rename to ...
13171 (current_ptid): ... this.
13172 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13173 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13174 ptid_get_lwp (current_ptid) instead of current_tid.
13175 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13176 instead of current_tid. Use find_process_pid to verify pid
13177 argument is valid. Pass proper argument to remove_process.
13178 (spu_thread_alive): Compare current_ptid instead of current_tid.
13179 (spu_resume): Likewise.
13180
13181 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13182
13183 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13184 variable.
13185
13186 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13187
13188 Implement the multiprocess extensions, and add linux multiprocess
13189 support.
13190
13191 * server.h (ULONGEST): Declare.
13192 (struct ptid, ptid_t): New.
13193 (minus_one_ptid, null_ptid): Declare.
13194 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13195 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13196 (struct inferior_list_entry): Change `id' type from unsigned from
13197 to ptid_t.
13198 (struct sym_cache, struct breakpoint, struct
13199 process_info_private): Forward declare.
13200 (struct process_info): Declare.
13201 (current_process): Declare.
13202 (all_processes): Declare.
13203 (initialize_inferiors): Declare.
13204 (add_thread): Adjust to use ptid_t.
13205 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13206 (add_process, remove_process, find_thread_pid): Declare.
13207 (find_inferior_id): Adjust to use ptid_t.
13208 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13209 (multi_process): Declare.
13210 (push_event): Adjust to use ptid_t.
13211 (read_ptid, write_ptid): Declare.
13212 (prepare_resume_reply): Adjust to use ptid_t.
13213 (clear_symbol_cache): Declare.
13214 * inferiors.c (all_processes): New.
13215 (null_ptid, minus_one_ptid): New.
13216 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13217 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13218 (add_thread): Change unsigned long to ptid. Remove gdb_id
13219 parameter. Adjust.
13220 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13221 (gdb_id_to_thread): Rename to ...
13222 (find_thread_pid): ... this. Change unsigned long to ptid.
13223 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13224 (loaded_dll, pull_pid_from_list): Adjust.
13225 (add_process, remove_process, find_process_pid)
13226 (get_thread_process, current_process, initialize_inferiors): New.
13227 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13228 (struct target_waitstatus) <related_pid>: Ditto.
13229 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13230 return type to int.
13231 (struct target_ops) <join>: Add `pid' argument.
13232 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13233 (struct target_ops) <wait>: Add `ptid' field. Change return type
13234 to ptid.
13235 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13236 (mywait): Add `ptid' argument. Change return type to ptid_t.
13237 (target_pid_to_str): Declare.
13238 * target.c (set_desired_inferior): Adjust to use ptids.
13239 (mywait): Add new `ptid' argument. Adjust.
13240 (target_pid_to_str): New.
13241 * mem-break.h (free_all_breakpoints): Declare.
13242 * mem-break.c (breakpoints): Delelete.
13243 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13244 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13245 to use per-process breakpoint list.
13246 (free_all_breakpoints): New.
13247 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13248 (symbol_cache, all_symbols_looked_up): Delete.
13249 (hexchars): New.
13250 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13251 read_ptid): New.
13252 (prepare_resume_reply): Change ptid argument's type from unsigned
13253 long to ptid_t. Adjust. Implement W;process and X;process.
13254 (free_sym_cache, clear_symbol_cache): New.
13255 (look_up_one_symbol): Adjust to per-process symbol cache. *
13256 * server.c (cont_thread, general_thread, step_thread): Change type
13257 to ptid_t.
13258 (attached): Delete.
13259 (multi_process): New.
13260 (last_ptid): Change type to ptid_t.
13261 (struct vstop_notif) <ptid>: Change type to ptid_t.
13262 (queue_stop_reply, push_event): Change `ptid' argument's type to
13263 ptid_t.
13264 (discard_queued_stop_replies): Add `pid' argument.
13265 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13266 changes. Don't reference the `attached' global.
13267 (attach_inferior): Adjust to mywait interface changes.
13268 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13269 features. Handle and report "multiprocess+". Handle
13270 "qAttached:PID".
13271 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13272 changes.
13273 (handle_v_kill): New.
13274 (handle_v_stopped): Adjust to use target_pid_to_str.
13275 (handle_v_requests): Allow multiple attaches and runs when
13276 multiprocess extensions are in effect. Handle "vKill".
13277 (myresume): Adjust to use ptids.
13278 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13279 (handle_status): Adjust to discard_queued_stop_replies interface
13280 change.
13281 (first_thread_of, kill_inferior_callback)
13282 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13283 (main): Call initialize_inferiors. Adjust to use ptids, killing
13284 and detaching from all inferiors. Handle multiprocess packet
13285 variants.
13286 * linux-low.h: Include gdb_proc_service.h.
13287 (struct process_info_private): New.
13288 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13289 <lwpid_of>: Use ptid_get_lwp.
13290 (get_lwp_thread): Adjust.
13291 (struct lwp_info): Add `dead' member.
13292 (find_lwp_pid): Declare.
13293 * linux-low.c (thread_db_active): Delete.
13294 (new_inferior): Adjust comment.
13295 (inferior_pid): Delete.
13296 (linux_add_process): New.
13297 (handle_extended_wait): Adjust.
13298 (add_lwp): Change unsigned long to ptid.
13299 (linux_create_inferior): Add process to processes table. Adjust
13300 to use ptids. Don't set new_inferior here.
13301 (linux_attach_lwp): Rename to ...
13302 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13303 it. Adjust to use ptids.
13304 (linux_attach_lwp): New.
13305 (linux_attach): Add process to processes table. Don't set
13306 new_inferior here.
13307 (struct counter): New.
13308 (second_thread_of_pid_p, last_thread_of_process_p): New.
13309 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13310 multiple processes.
13311 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13312 processes. Remove process from process table.
13313 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13314 to multiple processes.
13315 (any_thread_of): New.
13316 (linux_detach): Add `pid' argument, and handle it. Remove process
13317 from processes table.
13318 (linux_join): Add `pid' argument. Handle it.
13319 (linux_thread_alive): Change unsighed long argument to ptid_t.
13320 Consider dead lwps as not being alive.
13321 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13322 threads we're not interested in.
13323 (same_lwp, find_lwp_pid): New.
13324 (linux_wait_for_lwp): Change `pid' argument's type from int to
13325 ptid_t. Adjust.
13326 (linux_wait_for_event): Rename to ...
13327 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13328 from int to ptid_t. Adjust.
13329 (linux_wait_for_event): New.
13330 (linux_wait_1): Add `ptid' argument. Change return type to
13331 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13332 that exit from the process table.
13333 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13334 Adjust.
13335 (mark_lwp_dead): New.
13336 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13337 stopping all threads, mark its main lwp as dead.
13338 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13339 ptids.
13340 (fetch_register, usr_store_inferior_registers)
13341 (regsets_fetch_inferior_registers)
13342 (regsets_store_inferior_registers, linux_read_memory)
13343 (linux_write_memory): Inline `inferior_pid'.
13344 (linux_look_up_symbols): Adjust to use per-process
13345 `thread_db_active'.
13346 (linux_request_interrupt): Adjust to use ptids.
13347 (linux_read_auxv): Inline `inferior_pid'.
13348 (initialize_low): Don't reference thread_db_active.
13349 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13350 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13351 (ps_getpid): Return the pid of the current inferior.
13352 * thread-db.c (proc_handle, thread_agent): Delete.
13353 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13354 per-process data.
13355 (find_one_thread): Change argument type to ptid_t. Adjust to
13356 per-process data.
13357 (maybe_attach_thread): Adjust to per-process data and ptids.
13358 (thread_db_find_new_threads): Ditto.
13359 (thread_db_init): Ditto.
13360 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13361 processes table. Adjust to use ptids.
13362 (spu_kill, spu_detach): Adjust interface. Remove process from
13363 processes table.
13364 (spu_join, spu_thread_alive): Adjust interface.
13365 (spu_wait): Adjust interface. Remove process from processes
13366 table. Adjust to use ptids.
13367 * win32-low.c (current_inferior_tid): Delete.
13368 (current_inferior_ptid): New.
13369 (debug_event_ptid): New.
13370 (thread_rec): Take a ptid. Adjust.
13371 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13372 (child_delete_thread): Ditto.
13373 (do_initial_child_stuff): Add `attached' argument. Add process to
13374 processes table.
13375 (child_fetch_inferior_registers, child_store_inferior_registers):
13376 Adjust.
13377 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13378 (win32_attach): Pass 1 to do_initial_child_stuff.
13379 (win32_kill): Adjust interface. Remove process from processes
13380 table.
13381 (win32_detach): Ditto.
13382 (win32_join): Adjust interface.
13383 (win32_thread_alive): Take a ptid.
13384 (win32_resume): Adjust to use ptids.
13385 (get_child_debug_event): Ditto.
13386 (win32_wait): Adjust interface. Remove exiting process from
13387 processes table.
13388
13389 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13390
13391 Non-stop mode support.
13392
13393 * server.h (non_stop): Declare.
13394 (gdb_client_data, handler_func): Declare.
13395 (delete_file_handler, add_file_handler, start_event_loop):
13396 Declare.
13397 (handle_serial_event, handle_target_event, push_event)
13398 (putpkt_notif): Declare.
13399 * target.h (enum resume_kind): New.
13400 (struct thread_resume): Replace `step' field by `kind' field.
13401 (TARGET_WNOHANG): Define.
13402 (struct target_ops) <wait>: Add `options' argument.
13403 <supports_non_stop, async, start_non_stop>: New fields.
13404 (target_supports_non_stop, target_async): New.
13405 (start_non_stop): Declare.
13406 (mywait): Add `options' argument.
13407 * target.c (mywait): Add `options' argument. Print child exit
13408 notifications here.
13409 (start_non_stop): New.
13410 * server.c (non_stop, own_buf, mem_buf): New globals.
13411 (struct vstop_notif): New.
13412 (notif_queue): New global.
13413 (queue_stop_reply, push_event, discard_queued_stop_replies)
13414 (send_next_stop_reply): New.
13415 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13416 interface changes.
13417 (attach_inferior): In non-stop mode, don't wait for the target
13418 here.
13419 (handle_general_set): Handle QNonStop.
13420 (handle_query): When handling qC, return the current general
13421 thread, instead of the first thread of the list.
13422 (handle_query): If the backend supports non-stop mode, include
13423 QNonStop+ in the qSupported query response.
13424 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13425 and non-stop mode.
13426 (handle_v_attach, handle_v_run): Handle non-stop mode.
13427 (handle_v_stopped): New.
13428 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13429 (myresume): Adjust to use resume_kind. Handle non-stop.
13430 (queue_stop_reply_callback): New.
13431 (handle_status): Handle non-stop mode.
13432 (main): Clear non_stop flag on reconnection. Use the event-loop.
13433 Refactor serial protocol handling from here ...
13434 (process_serial_event): ... to this new function. When GDB
13435 selects any thread, select one here. In non-stop mode, wait until
13436 GDB acks all pending events before exiting.
13437 (handle_serial_event, handle_target_event): New.
13438 * remote-utils.c (remote_open): Install remote_desc in the event
13439 loop.
13440 (remote_close): Remove remote_desc from the event loop.
13441 (putpkt_binary): Rename to...
13442 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13443 (putpkt_binary): New as wrapper around putpkt_binary_1.
13444 (putpkt_notif): New.
13445 (prepare_resume_reply): In non-stop mode, don't change the
13446 general_thread.
13447 * event-loop.c: New.
13448 * Makefile.in (OBJ): Add event-loop.o.
13449 (event-loop.o): New rule.
13450
13451 * linux-low.h (pid_of): Moved here.
13452 (lwpid_of): New.
13453 (get_lwp_thread): Use lwpid_of.
13454 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13455 * linux-low.c (pid_of): Delete.
13456 (inferior_pid): Use lwpid_of.
13457 (linux_event_pipe): New.
13458 (target_is_async_p): New.
13459 (delete_lwp): New.
13460 (handle_extended_wait): Use lwpid_of.
13461 (add_lwp): Don't set lwpid field.
13462 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13463 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13464 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13465 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13466 first. Adjust to linux_wait_for_event interface changes. Use
13467 lwpid_of.
13468 (linux_detach): Don't delete the main lwp here.
13469 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13470 (status_pending_p): Don't consider explicitly suspended lwps.
13471 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13472 pointer. Add OPTIONS argument. Change return type to int. Use
13473 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13474 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13475 pointer. Add status pointer argument. Return a pid instead of a
13476 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13477 changes. In non-stop mode, don't switch to a random thread.
13478 (linux_wait): Rename to...
13479 (linux_wait_1): ... this. Add target_options argument, and handle
13480 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13481 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13482 clean exit and signal exit code. Don't stop all threads in
13483 non-stop mode. In all-stop mode, only stop all threads when
13484 reporting a stop to GDB. Handle explicit thread stop requests.
13485 (async_file_flush, async_file_mark): New.
13486 (linux_wait): New.
13487 (send_sigstop): Use lwpid_of.
13488 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13489 interface changes. In non-stop mode, don't switch to a random
13490 thread.
13491 (linux_resume_one_lwp): Use lwpid_of.
13492 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13493 (linux_resume_one_thread): ... this. Handle resume_stop. In
13494 non-stop mode, don't look for pending flag in all threads.
13495 (resume_status_pending_p): Don't consider explicitly suspended
13496 threads.
13497 (my_waitpid): Reimplement. Emulate __WALL.
13498 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13499 Use lwpid_of.
13500 (sigchld_handler, linux_supports_non_stop, linux_async)
13501 (linux_start_non_stop): New.
13502 (linux_target_ops): Register linux_supports_non_stop, linux_async
13503 and linux_start_non_stop.
13504 (initialize_low): Install SIGCHLD handler.
13505 * thread-db.c (thread_db_create_event, find_one_thread)
13506 (thread_db_get_tls_address): Use lwpid_of.
13507 * win32-low.c (win32_detach): Adjust to use resume_kind.
13508 (win32_wait): Add `options' argument.
13509 * spu-low.c (spu_resume): Adjust to use resume_kind.
13510 (spu_wait): Add `options' argument.
13511
13512 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13513
13514 Decouple target code from remote protocol.
13515
13516 * target.h (enum target_waitkind): New.
13517 (struct target_waitstatus): New.
13518 (struct target_ops) <wait>: Return an unsigned long. Take a
13519 target_waitstatus pointer instead of a char pointer.
13520 (mywait): Likewise.
13521 * target.c (mywait): Change prototype to return an unsigned long.
13522 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13523 * server.h (thread_from_wait, old_thread_from_wait): Delete
13524 declarations.
13525 (prepare_resume_reply): Change prototype to take a
13526 target_waitstatus.
13527 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13528 (last_status, last_ptid): New.
13529 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13530 pid instead of a signal.
13531 (attach_inferior): Remove "status" and "signal" parameters.
13532 Adjust.
13533 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13534 not as an address.
13535 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13536 (handle_v_requests, myresume): Remove "status" and "signal"
13537 parameters. Adjust.
13538 (handle_status): New.
13539 (main): Delete local `status'. Adjust.
13540 * remote-utils.c: Include target.h.
13541 (prepare_resume_reply): Change prototype to take a
13542 target_waitstatus. Adjust.
13543
13544 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13545 interface.
13546 * spu-low.c (spu_wait): Adjust.
13547 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13548 Delete.
13549 (win32_wait): Adjust.
13550
13551 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13552
13553 * target.h (struct thread_resume): Delete leave_stopped member.
13554 (struct target_ops): Add a `n' argument to the `resume' callback.
13555 * server.c (start_inferior): Adjust.
13556 (handle_v_cont, myresume): Adjust.
13557 * linux-low.c (check_removed_breakpoint): Adjust to resume
13558 interface change, and to removed leave_stopped field.
13559 (resume_ptr): Delete.
13560 (struct thread_resume_array): New.
13561 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13562 resume interface change.
13563 (linux_continue_one_thread, linux_queue_one_thread)
13564 (resume_status_pending_p): Check if the resume field is NULL
13565 instead of checking the leave_stopped member.
13566 (linux_resume): Adjust to the target resume interface change.
13567 * spu-low.c (spu_resume): Adjust to the target resume interface
13568 change.
13569 * win32-low.c (win32_detach, win32_resume): Ditto.
13570
13571 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13572
13573 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13574 flag.
13575 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13576 pending.
13577 (linux_continue_one_thread): Only preserve the stepping flag if
13578 there's a pending breakpoint.
13579
13580 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13581
13582 * server.c (main): After the inferior having exited, call
13583 remote_close before exiting gdbserver.
13584
13585 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13586
13587 Fix size of FPSCR in Power 7 processors.
13588 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13589 (PPC_FEATURE_HAS_DFP): New #define.
13590 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13591 size of the FPSCR.
13592
13593 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13594
13595 * server.c (handle_query) Whitespace and formatting.
13596
13597 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13598
13599 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13600 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13601 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13602 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13603 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13604 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13605 Makefile.in, configure.ac: Fix whitespace throughout.
13606 * configure: Regenerate.
13607
13608 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13609
13610 * inferiors.c (find_inferior): Make it safe for the callback
13611 function to delete the currently iterated inferior.
13612
13613 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13614
13615 * Makefile.in (linuw_low_h): Move higher.
13616 (thread-db.o): Depend on $(linux_low_h).
13617
13618 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13619
13620 Rename "process" to "lwp" throughout.
13621
13622 * linux-low.c (all_processes): Rename to...
13623 (all_lwps): ... this.
13624 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13625 (add_process): Rename to ...
13626 (add_lwp): ... this. Adjust.
13627 (linux_create_inferior): Adjust.
13628 (linux_attach_lwp): Adjust.
13629 (linux_attach): Adjust.
13630 (linux_kill_one_process): Rename to ...
13631 (linux_kill_one_lwp): ... this. Adjust.
13632 (linux_kill): Adjust.
13633 (linux_detach_one_process): Rename to ...
13634 (linux_detach_one_lwp): ... this. Adjust.
13635 (linux_detach): Adjust.
13636 (check_removed_breakpoint): Adjust.
13637 (status_pending_p): Adjust.
13638 (linux_wait_for_process): Rename to ...
13639 (linux_wait_for_lwp): ... this. Adjust.
13640 (linux_wait_for_event): Adjust.
13641 (send_sigstop): Adjust.
13642 (wait_for_sigstop): Adjust.
13643 (stop_all_processes): Rename to ...
13644 (stop_all_lwps): ... this.
13645 (linux_resume_one_process): Rename to ...
13646 (linux_resume_one_lwp): ... this. Adjust.
13647 (linux_set_resume_request, linux_continue_one_thread)
13648 (linux_queue_one_thread, resume_status_pending_p)
13649 (usr_store_inferior_registers, regsets_store_inferior_registers)
13650 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13651 Adjust.
13652 * linux-low.h (get_process): Rename to ...
13653 (get_lwp): ... this. Adjust.
13654 (get_thread_process): Rename to ...
13655 (get_thread_lwp): ... this. Adjust.
13656 (get_process_thread): Rename to ...
13657 (get_lwp_thread): ... this. Adjust.
13658 (struct process_info): Rename to ...
13659 (struct lwp_info): ... this.
13660 (all_processes): Rename to ...
13661 (all_lwps): ... this.
13662 * proc-service.c (ps_lgetregs): Adjust.
13663 * thread-db.c (thread_db_create_event, find_one_thread)
13664 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13665
13666 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13667
13668 * server.c (handle_query): Handle "qAttached".
13669
13670 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13671
13672 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13673 GPLv3, update license URL.
13674
13675 2009-03-01 Doug Evans <dje@google.com>
13676
13677 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13678 (server_h): Add gdb_signals.h.
13679 (signals.o): Update.
13680 * server.h (target_signal_from_host,target_signal_to_host_p)
13681 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13682
13683 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13684
13685 * remote-utils.c (getpkt): Also generate remote-debug
13686 information if noack_mode is set.
13687
13688 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13689
13690 * server.c (handle_query): Report qXfer:siginfo:read and
13691 qXfer:siginfo:write as supported and handle them.
13692 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13693 * linux-low.c (linux_xfer_siginfo): New.
13694 (linux_target_ops): Set it.
13695
13696 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13697
13698 * server.c (gdbserver_usage): Mention --remote-debug.
13699 (main): Accept '--remote-debug' switch.
13700
13701 2009-01-18 Doug Evans <dje@google.com>
13702
13703 * regcache.c (new_register_cache): No need to check result of xcalloc.
13704 * server.c (handle_search_memory): Back out calls to xmalloc,
13705 result is checked and error is returned to user upon failure.
13706 (handle_query): Ditto. Add more checks for result of malloc.
13707 (handle_v_cont): Check result of malloc, report error back to
13708 user upon failure.
13709 (handle_v_run): Ditto. Call freeargv.
13710 * server.h (freeargv): Declare.
13711 * utils.c (freeargv): New fn.
13712
13713 2009-01-15 Doug Evans <dje@google.com>
13714
13715 * gdbreplay.c (perror_with_name): Make arg const char *.
13716 * server.h (target_signal_to_name): Make return type const char *.
13717 * thread-db.c (thread_db_err_str): Make return type const char *.
13718 * utils.c (perror_with_name): Make arg const char *.
13719
13720 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13721
13722 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13723 when handling a EXIT_PROCESS_DEBUG_EVENT.
13724
13725 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13726
13727 * gdbreplay.c (gdbreplay_version): Update copyright year.
13728 * server.c (gdbserver_version): Likewise.
13729
13730 2009-01-05 Doug Evans <dje@google.com>
13731
13732 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13733 (handle_extended_wait): Improve comment.
13734
13735 2008-12-13 Doug Evans <dje@google.com>
13736
13737 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13738 * server.h (ATTR_MALLOC): New macro.
13739 (xmalloc,xcalloc,xstrdup): Declare.
13740 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13741 * inferiors.c: Ditto.
13742 * linux-low.c: Ditto.
13743 * mem-break.c: Ditto.
13744 * regcache.c: Ditto.
13745 * remote-utils.c: Ditto.
13746 * server.c: Ditto.
13747 * target.c: Ditto.
13748 * win32-low.c: Ditto.
13749
13750 2008-12-12 Doug Evans <dje@google.com>
13751
13752 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13753 in debugging printf.
13754
13755 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13756
13757 2008-12-09 Doug Evans <dje@google.com>
13758
13759 * linux-low.h (struct process_info): Delete member tid, unused.
13760 * thread-db.c (find_one_thread): Update.
13761 (maybe_attach_thread): Update.
13762
13763 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13764
13765 * target.h (struct target_ops): Add qxfer_osdata member.
13766 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13767 and dirent.h.
13768 (linux_qxfer_osdata): New functions.
13769 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13770 callback.
13771 * server.c (handle_query): Handle "qXfer:osdata:read:".
13772 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13773 (buffer_xml_printf): New functions.
13774 * server.h (struct buffer): New.
13775 (buffer_grow_str, buffer_grow_str0): New macros.
13776 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13777 (buffer_xml_printf): Declare.
13778
13779 2008-11-24 Doug Evans <dje@google.com>
13780
13781 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13782
13783 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13784
13785 * server.c (handle_v_run): Always use the supplied argument list.
13786
13787 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13788
13789 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13790 (xtensa_regmap_table): Add entry for scompare1.
13791
13792 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13793
13794 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13795 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13796 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13797 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13798 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13799 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13800 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13801 XML target descriptions.
13802 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13803 when inferior is running on an ISA 2.05 or later processor. Add
13804 special case to return offset for full 64-bit slot of FPSCR when
13805 in 32-bits.
13806
13807 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13808
13809 * Makefile.in (SFILES, clean): Added sparc64 files.
13810 (reg-sparc64.o, reg-sparc64.c): New.
13811 * configure.srv (sparc*-*-linux*): New configuration.
13812 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13813 syscall arguments for SPARC.
13814 (regsets_store_inferior_registers): Likewise.
13815 * linux-sparc-low.c: New file.
13816
13817 2008-10-21 Doug Evans <dje@google.com>
13818
13819 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13820 (READLINE_DIR,READLINE_DEP): Delete.
13821 (INTERNAL_CFLAGS): Update.
13822 (LINTFLAGS): Update.
13823
13824 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13825
13826 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13827 whole argv from the last run, not just argv[0].
13828
13829 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13830
13831 * regcache.c (new_register_cache): Return NULL if the register
13832 cache size isn't known yet.
13833 (free_register_cache): Avoid dereferencing a NULL regcache.
13834
13835 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13836
13837 * configure.srv: Merge MIPS and MIPS64.
13838
13839 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13840
13841 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13842
13843 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13844
13845 * Makefile.in: Add required vsx dependencies.
13846
13847 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13848 Declare init_registers_powerpc_vsx32l.
13849 Declare init_registers_powerpc_vsx64l.
13850 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13851 (ppc_arch_setup): Check for VSX in hwcap.
13852 (ppc_fill_vsxregset): New function.
13853 (ppc_store_vsxregset): New function.
13854 Add new VSX entry in regset_info target_regsets.
13855
13856 * configure.srv: Add new VSX dependencies.
13857
13858 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13859
13860 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13861 (remote_open): Set or clear transport_is_reliable.
13862 (putpkt_binary): Don't expect acks in noack mode.
13863 (getpkt): Don't send ack/nac in noack mode.
13864 * server.c (handle_general_set): Handle QStartNoAckMode.
13865 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13866 qSupported.
13867 (main): Reset noack_mode on every connection.
13868 * server.h (noack_mode): Declare.
13869
13870 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13871
13872 * Makefile.in (GDBREPLAY_OBS): New variable.
13873 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13874
13875 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13876 Daniel Jacobowitz <dan@codesourcery.com>
13877
13878 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13879 (usr_store_inferior_registers): Likewise.
13880 (regsets_store_inferior_registers): Likewise.
13881
13882 2008-07-31 Rolf Jansen <rj@surtec.com>
13883 Pedro Alves <pedro@codesourcery.com>
13884
13885 * configure.ac: Check for memmem declaration.
13886 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13887 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13888 (disable_packet_qfThreadInfo): Unconditionally compile.
13889 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13890 * configure, config.in: Regenerate.
13891
13892 2008-07-28 Doug Kwan <dougkwan@google.com>
13893
13894 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13895 (linux_write_memory): Remove declaration of errno.
13896
13897 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13898
13899 * linux-low.c (handle_extended_wait): Do not use "status"
13900 variable uninitialized.
13901
13902 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13903
13904 * server.c (handle_v_attach): Inhibit reporting dll changes.
13905
13906 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13907
13908 * remote-utils.c (prepare_resume_reply): If requested, don't
13909 output "thread:TID" in the T stop reply.
13910
13911 * server.c (disable_packet_vCont, disable_packet_Tthread)
13912 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13913 (handle_query): If requested, disable support for qC, qfThreadInfo
13914 and qsThreadInfo.
13915 (handle_v_requests): If requested, disable support for vCont.
13916 (gdbserver_show_disableable): New.
13917 (main): Handle --disable-packet and --disable-packet=LIST.
13918
13919 * server.h (disable_packet_vCont, disable_packet_Tthread)
13920 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13921
13922 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13923
13924 * server.c (gdbserver_usage): Mention --version.
13925
13926 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13927
13928 * Makefile.in (gdbreplay.o): New rule.
13929
13930 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13931
13932 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13933 message, not gdbserver.
13934
13935 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13936 Nathan Sidwell <nathan@codesourcery.com>
13937 Joseph Myers <joseph@codesourcery.com>
13938
13939 * acinclude.m4: Include ../../config/acx.m4.
13940 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13941 * configure, config.in: Regenerate.
13942 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13943 * server.c (gdbserver_version): Print PKGVERSION.
13944 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13945 (main): Adjust gdbserver_usage calls.
13946 * gdbreplay.c (version, host_name): Add declarations.
13947 (gdbreplay_version, gdbreplay_usage): New.
13948 (main): Accept --version and --help options.
13949
13950 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13951
13952 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13953 (arm_breakpoint_at): Handle Thumb.
13954 (the_low_target): Add comment.
13955
13956 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13957
13958 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13959
13960 2008-05-09 Doug Evans <dje@google.com>
13961
13962 * server.h (decode_search_memory_packet): Declare.
13963 * remote-utils.c (decode_search_memory_packet): New fn.
13964 * server.c (handle_search_memory_1): New fn.
13965 (handle_search_memory): New fn.
13966 (handle_query): Process qSearch:memory packets.
13967
13968 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13969
13970 * regcache.c (registers_length): Remove.
13971 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13972 full register packet.
13973 * regcache.h (registers_length): Remove prototype.
13974 * server.h (PBUFSIZ): Define to 16384.
13975
13976 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13977
13978 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13979 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13980 powerpc-64l.o, and powerpc-altivec64l.o.
13981 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13982 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13983 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13984 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13985 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13986 to srv_xmlfiles.
13987
13988 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13989 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13990 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13991 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13992 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13993 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13994 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13995 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13996 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13997 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13998 (clean): Update.
13999
14000 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14001 (init_registers_powerpc_32l): ... this new prototype.
14002 (init_registers_powerpc_32): Remove, replace by ...
14003 (init_registers_powerpc_altivec32l): ... this new prototype.
14004 (init_registers_powerpc_e500): Remove, replace by ...
14005 (init_registers_powerpc_e500l): ... this new prototype.
14006 (init_registers_ppc64): Remove, replace by ...
14007 (init_registers_powerpc_64l): ... this new prototype.
14008 (init_registers_powerpc_64): Remove, replace by ...
14009 (init_registers_powerpc_altivec64l): ... this new prototype.
14010 (ppc_num_regs): Set to 73.
14011 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14012 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14013 (ppc_cannot_store_register): Handle orig_r3 and trap.
14014 (ppc_arch_setup): Update init_registers_... calls.
14015 (ppc_fill_gregset): Handle orig_r3 and trap.
14016
14017 * inferiors.c (clear_inferiors): Reset current_inferior.
14018
14019 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14020
14021 * acinclude.m4: Add override.m4.
14022 * configure: Regenerate.
14023
14024 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14025
14026 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14027 initial call to init_register_ppc64.
14028
14029 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14030
14031 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14032 single powerpc*-*-linux* case.
14033 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14034
14035 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14036
14037 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14038 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14039 from reg_xmlfiles.
14040 * linux-ppc-low.c: Include <elf.h>.
14041 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14042 (ppc_hwcap): New global variable.
14043 (ppc_regmap): Remove __SPE__ #ifdef sections.
14044 (ppc_regmap_e500): New global variable.
14045 (ppc_cannot_store_register): Update __SPE__ special case.
14046 (ppc_get_hwcap): New function.
14047 (ppc_arch_setup): Use it to determine whether inferior supports
14048 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14049 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14050 Do not access registers if target does not support AltiVec.
14051 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14052 Do not access registers if target does not support SPE.
14053 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14054
14055 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14056
14057 * linux-low.c (disabled_regsets, num_regsets): New.
14058 (use_regsets_p): Delete.
14059 (linux_wait_for_process): Clear disabled_regsets.
14060 (regsets_fetch_inferior_registers): Check and set it.
14061 (regsets_store_inferior_registers): Likewise.
14062 (linux_fetch_registers, linux_store_registers): Do not use
14063 use_regsets_p.
14064 (initialize_low): Allocate disabled_regsets.
14065
14066 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14067
14068 * Makefile.in (LIBOBJS): New.
14069 (OBS): Use LIBOBJS.
14070 (memmem.o): New rule.
14071 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14072 * configure: Regenerated.
14073
14074 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14075
14076 * server.c (handle_query): Never return "unsupported" for
14077 qXfer:features:read queries.
14078
14079 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14080
14081 * server.c (get_features_xml): Fix inverted condition.
14082 (handle_query): Always support qXfer:feature:read.
14083
14084 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14085
14086 * server.c (wrapper_argv): New.
14087 (start_inferior): Handle wrapper_argv. If set, expect an extra
14088 trap.
14089 (gdbserver_usage): Document --wrapper.
14090 (main): Parse --wrapper.
14091
14092 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14093
14094 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14095 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14096 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14097 (ppc_set_pc): Likewise.
14098 (ppc_arch_setup): New function.
14099 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14100 of collect_register.
14101 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14102
14103 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14104
14105 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14106 instead of linux-ppc64-low.o.
14107 * linux-ppc64-low.c: Remove file.
14108 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14109 (linux-ppc64-low.o): Remove rule.
14110
14111 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14112 (init_registers_powerpc_64): Likewise.
14113 (ppc_regmap): Conditionally define depending on __powerpc64__.
14114 (ppc_cannot_store_register): Do not special-case "fpscr" when
14115 compiled on __powerpc64__.
14116 (ppc_collect_ptrace_register): New function.
14117 (ppc_supply_ptrace_register): New function.
14118 (ppc_breakpoint): Change type to "unsigned int".
14119 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14120 (the_low_target): Conditionally provide initializers for the
14121 arch_setup member depending on __powerpc64__. Install
14122 collect_ptrace_register and supply_ptrace_register members.
14123
14124 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14125
14126 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14127 * server.c (gdbserver_xmltarget): Define.
14128 (get_features_xml): Use it to replace "target.xml" and arch_string.
14129
14130 * configure.srv: Remove srv_xmltarget. Add XML files that were
14131 mentioned there to srv_xmlfiles instead. Remove conditional tests
14132 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14133 srv_xmlfiles and srv_regobj to include all possible choices.
14134 * configure.ac (srv_xmltarget): Remove.
14135 (srv_xmlfiles): Do not add "target.xml".
14136 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14137 checks for supplementary target information.
14138 * configure: Regenerate.
14139 * Makefile.in (XML_TARGET): Remove.
14140 (target.xml): Remove rule.
14141 (clean): Do not clean up target.xml.
14142 (.PRECIOUS): Do not mention target.xml.
14143
14144 * target.h (struct target_ops): Remove arch_string member.
14145 * linux-low.c (linux_arch_string): Remove.
14146 (linux_target_ops): Remove arch_string initializer.
14147 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14148 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14149 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14150 * spu-low.c (spu_arch_string): Remove.
14151 (spu_target_ops): Remove arch_string initializer.
14152 * win32-low.c (win32_arch_string): Remove.
14153 (win32_target_ops): Remove arch_string initializer.
14154 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14155 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14156 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14157
14158 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14159
14160 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14161 by collect_ptrace_register and supply_ptrace_register hooks.
14162 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14163 instead of checking for the_low_target.left_pad_xfer.
14164 (usr_store_inferior_registers): Use collect_ptrace_register callback
14165 instead of checking for the_low_target.left_pad_xfer.
14166
14167 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14168 (s390_supply_ptrace_register): Likewise.
14169 (s390_fill_gregset): Call s390_collect_ptrace_register.
14170 (the_low_target): Update.
14171
14172 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14173 (ppc_supply_ptrace_register): Likewise.
14174 (the_low_target): Update.
14175
14176 * linux-i386-low.c (the_low_target): Update.
14177 * linux-x86-64-low.c (the_low_target): Update.
14178
14179 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14180
14181 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14182 reg-s390.o and reg-s390x.o.
14183
14184 * linux-low.c (new_inferior): New global variable.
14185 (linux_create_inferior, linux_attach): Set it.
14186 (linux_wait_for_process): Call the_low_target.arch_setup after the
14187 target has stopped for the first time.
14188 (initialize_low): Do not call the_low_target.arch_setup.
14189
14190 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14191 (s390_set_pc): Likewise.
14192 (s390_arch_setup): New function.
14193 (the_low_target): Use s390_arch_setup as arch_setup routine.
14194
14195 * regcache.c (realloc_register_cache): New function.
14196 (set_register_cache): Call it for each existing regcache.
14197
14198 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14199
14200 * server.h (init_registers): Remove prototype.
14201
14202 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14203 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14204 instead of init_registers ().
14205 * linux-arm-low.c (init_registers_arm): Add prototype.
14206 (init_registers_arm_with_iwmmxt): Likewise.
14207 (the_low_target): Add initializer for arch_setup field.
14208 * linux-cris-low.c (init_registers_cris): Add prototype.
14209 (the_low_target): Add initializer for arch_setup field.
14210 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14211 (the_low_target): Add initializer for arch_setup field.
14212 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14213 (the_low_target): Add initializer for arch_setup field.
14214 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14215 (the_low_target): Add initializer for arch_setup field.
14216 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14217 (the_low_target): Add initializer for arch_setup field.
14218 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14219 (the_low_target): Add initializer for arch_setup field.
14220 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14221 (init_registers_mips64_linux): Likewise.
14222 (the_low_target): Add initializer for arch_setup field.
14223 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14224 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14225 (the_low_target): Add initializer for arch_setup field.
14226 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14227 (init_registers_powerpc_64): Likewise.
14228 (the_low_target): Add initializer for arch_setup field.
14229 * linux-s390-low.c (init_registers_s390): Add prototype.
14230 (init_registers_s390x): Likewise.
14231 (the_low_target): Add initializer for arch_setup field.
14232 * linux-sh-low.c (init_registers_sh): Add prototype.
14233 (the_low_target): Add initializer for arch_setup field.
14234 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14235 (the_low_target): Add initializer for arch_setup field.
14236 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14237 (the_low_target): Add initializer for arch_setup field.
14238
14239 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14240 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14241 instead of init_registers ().
14242 * win32-arm-low.c (init_registers_arm): Add prototype.
14243 (the_low_target): Add initializer for arch_setup field.
14244 * win32-i386-low.c (init_registers_i386): Add prototype.
14245 (the_low_target): Add initializer for arch_setup field.
14246
14247 * spu-low.c (init_registers_spu): Add prototype.
14248 (initialize_low): Call initialie_registers_spu () instead of
14249 initialize_registers ().
14250
14251 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14252
14253 * server.c (handle_v_requests): When handling the vRun and vAttach
14254 packets, if already debugging a process, don't kill it. Return an
14255 error instead.
14256
14257 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * server.c (handle_query): Correct length check.
14260
14261 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14262
14263 * win32-low.c (do_initial_child_stuff): Add process handle
14264 parameter. Set current_process_handle and current_process_id from the
14265 parameters. Clear globals.
14266 (win32_create_inferior): Don't set current_process_handle and
14267 current_process_id here. Instead pass them on the call to
14268 do_initial_child_stuff.
14269 (win32_attach): Likewise.
14270 (win32_clear_inferiors): New.
14271 (win32_kill): Don't close the current process handle or the
14272 current thread handle here. Instead call win32_clear_inferiors.
14273 (win32_detach): Don't open a new handle to the process. Call
14274 win32_clear_inferiors.
14275 (win32_join): Don't rely on current_process_handle; open a new
14276 handle using the process id.
14277 (win32_wait): Call win32_clear_inferiors when the inferior process
14278 has exited.
14279
14280 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14281
14282 * server.c (monitor_show_help): Add "exit".
14283
14284 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14285
14286 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14287 (clean): Add reg-xtensa.c.
14288 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14289 * configure.srv (xtensa*-*-linux*) New target.
14290 * linux-xtensa-low.c: New.
14291 * xtensa-xtregs.c: New.
14292
14293 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14294
14295 * hostio.c: Don't include errno.h.
14296 (errno_to_fileio_errno): Move to hostio-errno.
14297 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14298 error number outputting to the target->hostio_last_error callback.
14299 (hostio_packet_error): Use FILEIO_EINVAL directly.
14300 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14301 calls to hostio_error.
14302 * hostio-errno.c: New.
14303 * server.h (hostio_last_error_from_errno): Declare.
14304 * target.h (target_ops): Add hostio_last_error member.
14305 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14306 as hostio_last_error handler.
14307 * spu-low.c (spu_target_ops): Likewise.
14308 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14309 (wince_hostio_last_error): New functions.
14310 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14311 as hostio_last_error handler.
14312 (win32_target_ops) [!_WIN32_WCE]: Register
14313 hostio_last_error_from_errno as hostio_last_error handler.
14314 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14315 (hostio-errno.o): New rule.
14316 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14317 * configure.srv (srv_hostio_err_objs): New variable. Default to
14318 hostio-errno.o.
14319 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14320 * configure: Regenerate.
14321
14322 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14323
14324 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14325 (linux_kill, linux_detach): Clean up the process list.
14326 * remote-utils.c (remote_open): Improve port number parsing.
14327 (putpkt_binary, input_interrupt): Only send interrupts if the target
14328 is running.
14329 * server.c (extended_protocol): Make static.
14330 (attached): Define earlier.
14331 (exit_requested, response_needed, program_argv): New variables.
14332 (target_running): New.
14333 (start_inferior): Clear attached here.
14334 (attach_inferior): Set attached here.
14335 (require_running): Define.
14336 (handle_query): Use require_running and target_running. Implement
14337 "monitor exit".
14338 (handle_v_attach, handle_v_run): New.
14339 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14340 (gdbserver_usage): Update.
14341 (main): Redo argument parsing. Handle --debug and --multi. Handle
14342 --attach along with other options or after the port. Save
14343 program_argv. Support no initial program. Resynchronize
14344 communication with GDB after an error. Handle "monitor exit".
14345 Use require_running and target_running. Always allow the extended
14346 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14347 restart in extended mode.
14348 * README: Refer to the GDB manual. Update --attach usage.
14349
14350 2007-12-20 Andreas Schwab <schwab@suse.de>
14351
14352 * linux-low.c (STACK_SIZE): Define.
14353 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14354 (linux_test_for_tracefork): Likewise.
14355
14356 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14357
14358 * linux-low.c (linux_wait_for_event): Update messages. Do not
14359 reinsert auto-delete breakpoints.
14360 * mem-break.c (struct breakpoint): Change return type of handler to
14361 int.
14362 (set_breakpoint_at): Update handler type.
14363 (reinsert_breakpoint_handler): Return 1 instead of calling
14364 delete_breakpoint.
14365 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14366 setting a new one.
14367 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14368 * mem-break.h (set_breakpoint_at): Update handler type.
14369 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14370 * win32-low.c (auto_delete_breakpoint): New.
14371 (get_child_debug_event): Use it.
14372
14373 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14374
14375 * configure.ac: Check for pread and pwrite.
14376 * hostio.c (handle_pread): Fall back to lseek and read.
14377 (handle_pwrite): Fall back to lseek and write.
14378 * config.in, configure: Regenerated.
14379
14380 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * server.c (myresume): Add own_buf argument.
14383 (main): Update calls.
14384
14385 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14386
14387 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14388 * remote-utils.c (remote_open): Do not call disable_async_io.
14389 (block_async_io): Delete.
14390 (unblock_async_io): Make static.
14391 (initialize_async_io): New.
14392 * server.c (handle_v_cont): Handle async I/O here.
14393 (myresume): Likewise. Move other common resume tasks here...
14394 (main): ... from here. Call initialize_async_io. Disable async
14395 I/O before the main loop.
14396 * server.h (initialize_async_io): Declare.
14397 (block_async_io, unblock_async_io): Delete prototypes.
14398 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14399
14400 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14401
14402 * remote-utils.c (readchar): Allow binary data in received messages.
14403
14404 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14405
14406 * win32-low.c (attaching): New global.
14407 (win32_create_inferior): Clear the `attaching' global.
14408 (win32_attach): Set the `attaching' global.
14409 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14410 attaching. Only set a breakpoint at the entry point if not
14411 attaching.
14412
14413 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14414
14415 * server.c (main): Don't report dll events on the initial
14416 connection on attaches.
14417
14418 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14419
14420 * server.c (main): Relax numerical bases supported for the pid of
14421 the --attach command line argument.
14422
14423 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14424
14425 * win32-low.c (win32_attach): Call OpenProcess before
14426 DebugActiveProcess, not after. Add last error output to error
14427 call.
14428
14429 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14430
14431 * win32-low.c (win32_get_thread_context)
14432 (win32_set_thread_context): New functions.
14433 (thread_rec): Use win32_get_thread_context.
14434 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14435 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14436 field.
14437
14438 2007-12-03 Leo Zayas
14439 Pedro Alves <pedro_alves@portugalmail.pt>
14440
14441 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14442 global variables.
14443 (child_add_thread): Minor cleanup.
14444 (child_continue): Resume artificially suspended threads before
14445 calling ContinueDebugEvent.
14446 (suspend_one_thread): New.
14447 (fake_breakpoint_event): New.
14448 (get_child_debug_event): Change return type to int. Check here if
14449 gdb sent an interrupt request. If a soft interrupt was requested,
14450 fake a breakpoint event. Return 0 if there is no event to handle,
14451 and 1 otherwise.
14452 (win32_wait): Don't check here if gdb sent an interrupt request.
14453 Ensure there is a valid event to handle.
14454 (win32_request_interrupt): Add soft interruption method as last
14455 resort.
14456
14457 2007-12-03 Leo Zayas
14458 Pedro Alves <pedro_alves@portugalmail.pt>
14459
14460 * win32-low.h (win32_thread_info): Add descriptions to the
14461 structure members. Replace `suspend_count' counter by a
14462 `suspended' flag.
14463 * win32-low.c (thread_rec): Update condition of when to get the
14464 context from the inferior. Rely on ContextFlags being set if it
14465 has already been retrieved. Only suspend the inferior thread if
14466 we haven't already. Warn if that fails.
14467 (continue_one_thread): s/suspend_count/suspended/. Only call
14468 ResumeThread once. Warn if that fails.
14469
14470 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14471
14472 * win32-low.c (win32_wait): Don't read from the inferior when it
14473 has already exited.
14474
14475 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14476
14477 * Makefile.in (win32_low_h): New variable.
14478 (win32-low.o): Add dependency on $(win32_low_h).
14479 (win32-arm-low.o, win32-i386-low.o): New rules.
14480
14481 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14482
14483 * hostio.c: Correct copyright year.
14484
14485 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14486
14487 * Makefile.in (OBS): Add hostio.o.
14488 (hostio.o): New rule.
14489 * server.h (handle_vFile): Declare.
14490 * hostio.c: New file.
14491 * server.c (handle_v_requests): Take packet_len and new_packet_len
14492 for binary packets. Call handle_vFile.
14493 (main): Update call to handle_v_requests.
14494
14495 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14496
14497 * linux-low.c: Include <sched.h>.
14498
14499 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14500
14501 * linux-low.c (linux_tracefork_grandchild): New.
14502 (linux_tracefork_child): Use clone.
14503 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14504
14505 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14506
14507 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14508
14509 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14512
14513 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14514
14515 * inferiors.c (change_inferior_id): Delete.
14516 (add_pid_to_list, pull_pid_from_list): New.
14517 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14518 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14519 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14520 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14521 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14522 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14523 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14524 (using_threads): Always set to 1.
14525 (handle_extended_wait): New.
14526 (add_process): Do not set TID.
14527 (linux_create_inferior): Set must_set_ptrace_flags.
14528 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14529 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14530 (linux_thread_alive): Rename TID argument to LWPID.
14531 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14532 (linux_wait_for_event): Do not use TID or check using_threads. Update
14533 call to dead_thread_notify. Call handle_extended_wait.
14534 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14535 (send_sigstop): Delete sigstop_sent.
14536 (wait_for_sigstop): Avoid TID.
14537 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14538 (linux_test_for_tracefork): New.
14539 (linux_lookup_signals): Use thread_db_active and
14540 linux_supports_tracefork_flag.
14541 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14542 * linux-low.h (get_process_thread): Avoid TID.
14543 (struct process_ifo): Move thread_known and tid to the end. Remove
14544 sigstop_sent.
14545 (linux_attach_lwp, thread_db_init): Update prototypes.
14546 * server.h (change_inferior_id): Delete prototype.
14547 (add_pid_to_list, pull_pid_from_list): New prototypes.
14548 * thread-db.c (thread_db_use_events): New.
14549 (find_first_thread): Rename to...
14550 (find_one_thread): ...this. Update callers and messages. Do not
14551 call fatal. Check thread_db_use_events. Do not call
14552 change_inferior_id or new_thread_notify.
14553 (maybe_attach_thread): Update. Do not call new_thread_notify.
14554 (thread_db_init): Set thread_db_use_events. Check use_events.
14555 * utils.c (fatal, warning): Correct message prefix.
14556
14557 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14558
14559 * Makefile.in (clean): Remove new files.
14560 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14561 (powerpc-64.o, powerpc-64.c): New rules.
14562 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14563 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14564 with SPE.
14565 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14566 SPE targets.
14567 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14568 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14569 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14570 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14571 (target_regsets): Add AltiVec and SPE register sets.
14572 * configure.ac: Check for AltiVec and SPE.
14573 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14574 (ppc_fill_vrregset, ppc_store_vrregset): New.
14575 (target_regsets): Add AltiVec register set.
14576 * configure: Regenerated.
14577
14578 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14579
14580 * linux-low.c (O_LARGEFILE): Define.
14581 (linux_read_memory): Use /proc/PID/mem.
14582 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14583 * configure, config.in: Regenerated.
14584
14585 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14586
14587 * linux-low.c (linux_wait_for_event): Do not pass signals while
14588 single-stepping.
14589
14590 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14591
14592 * win32-low.c (create_process): New.
14593 (win32_create_inferior): Use create_process instead of
14594 CreateProcess. If create_process failed retry appending an ".exe"
14595 suffix. Store the GetLastError result immediatelly after
14596 create_process calls and use it on the call to error.
14597
14598 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14599
14600 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14601
14602 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14603
14604 * configure.ac: Switch license to GPLv3.
14605
14606 2007-08-01 Michael Snyder <msnyder@access-company.com>
14607
14608 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14609
14610 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14611
14612 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14613 typedef.
14614 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14615 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14616 CloseToolhelp32Snapshot.
14617 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14618 CloseToolhelp32Snapshot.
14619
14620 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14621
14622 * server.c (main): Check for inferior exit before main loop.
14623
14624 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14625
14626 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14627 instead of on tmp_desc.
14628
14629 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14630 Daniel Jacobowitz <dan@codesourcery.com>
14631
14632 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14633 (add_thread): Minor cleanups.
14634 (clear_inferiors): Move lower in the file. Clear the DLL
14635 list.
14636 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14637 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14638 (xml_escape_text): New.
14639 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14640 for qSupported.
14641 (handle_v_cont): Report errors.
14642 (gdbserver_version): Update.
14643 (main): Correct size of own_buf. Do not report initial DLL events.
14644 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14645 (unloaded_dll, xml_escape_text): New.
14646 * win32-low.c (enum target_waitkind): Update comments.
14647 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14648 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14649 (win32_EnumProcessModules, win32_GetModuleInformation)
14650 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14651 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14652 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14653 (win32_Module32First, win32_Module32Next, load_toolhelp)
14654 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14655 (get_child_debug_event): Handle DLL events.
14656 (win32_wait): Likewise.
14657
14658 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14659
14660 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14661 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14662
14663 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14664
14665 * win32-low.c (handle_output_debug_string): Ignore event if not
14666 waiting.
14667
14668 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14669
14670 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14671
14672 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14675
14676 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14677
14678 * inferiors.c (change_inferior_id): Add comment.
14679 * linux-low.c (check_removed_breakpoint): Add an early
14680 prototype. Improve debug output.
14681 (linux_attach): Doc update.
14682 (linux_detach_one_process, linux_detach): Clean up before releasing
14683 each process.
14684 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14685 * linux-low.h (struct process_info): Doc improvement.
14686 * mem-break.c (delete_all_breakpoints): New.
14687 * mem-break.h (delete_all_breakpoints): New prototype.
14688 * thread-db.c (find_first_thread): New.
14689 (thread_db_create_event): Call it instead of
14690 thread_db_find_new_threads. Clean up unused variables.
14691 (maybe_attach_thread): Remove first thread handling.
14692 (thread_db_find_new_threads): Use find_first_thread.
14693 (thread_db_get_tls_address): Likewise.
14694
14695 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14696
14697 * thread-db.c (thread_db_find_new_threads): Add prototype.
14698 (thread_db_create_event): Check for the main thread before adding
14699 a new thread.
14700 (maybe_attach_thread): Only enable event reporting if TID == 0.
14701 (thread_db_get_tls_address): Check for new threads.
14702
14703 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14704
14705 * linux-low.c (linux_create_inferior): Try execv before execvp.
14706 * spu-low.c (spu_create_inferior): Likewise.
14707
14708 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14709
14710 * linux-low.c (linux_create_inferior): Change execv to execvp.
14711 * spu-low.c (spu_create_inferior): Likewies.
14712
14713 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14714
14715 * Makefile.in (clean): Clean new files instead of deleted ones.
14716 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14717 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14718 rules.
14719 * configure.srv: Specify XML files and new regformats for MIPS and
14720 MIPS64 GNU/Linux.
14721 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14722 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14723 an entry for the restart register.
14724 (mips_cannot_fetch_register, mips_cannot_store_register)
14725 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14726 register names to match the XML descriptions.
14727 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14728 restart register instead of $0.
14729
14730 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14731 Markus Deuling <deuling@de.ibm.com>
14732
14733 * remote-utils.c (decode_xfer_write): New function.
14734 * server.h (decode_xfer_write): Add prototype.
14735 * server.c (handle_query): Add PACKET_LEN argument. Support
14736 qXfer:spu:read and qXfer:spu:write packets.
14737 (main): Pass packet_len to handle_query.
14738 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14739 * target.h (target_ops): Add qxfer_spu.
14740
14741 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14742
14743 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14744 accessing non-seekable spufs files.
14745
14746 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14747
14748 * server.c (handle_query): Add reply for qC packet.
14749
14750 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14751 Leo Zayas <lerele@champenstudios@com>
14752
14753 * server.h (check_remote_input_interrupt_request): New function.
14754 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14755 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14756 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14757 (check_remote_input_interrupt_request): New function.
14758 * server.h (check_remote_input_interrupt_request): Declare.
14759 * win32-low.c (winapi_DebugBreakProcess,
14760 winapi_GenerateConsoleCtrlEvent): New typedefs.
14761 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14762 to 250 ms.
14763 (win32_wait): Check for remote interrupt request
14764 with check_remote_input_interrupt_request.
14765 (win32_request_interrupt): New function.
14766 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14767
14768 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14769
14770 * win32-low.c (debug_registers_changed,
14771 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14772 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14773 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14774 (thread_rec): Get context using the low target.
14775 (child_add_thread): Call thread_added on the low target,
14776 which does the same thing.
14777 (regptr): Delete.
14778 (do_initial_child_stuff): Remove debug registers references.
14779 Set context using the low target. Resume threads after
14780 setting the contexts.
14781 (child_continue): Remove dead variable. Remove debug
14782 registers references.
14783 (child_fetch_inferior_registers): Go through the low target.
14784 (do_child_store_inferior_registers): Remove.
14785 (child_store_inferior_registers): Go through the low target.
14786 (win32_resume): Remove debug registers references.
14787 Set context using the low target.
14788 (handle_exception): Change return type to void. Don't record
14789 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14790 first chance exception.
14791 (get_child_debug_event): Change return type to void. Remove
14792 goto loop. Always return after waiting for debug event.
14793 (win32_wait): Convert to switch statement. Handle spurious
14794 events.
14795
14796 * win32-i386-low.c (debug_registers_changed,
14797 debug_registers_used): New.
14798 (initial_stuff): Rename to ...
14799 (i386_initial_stuff): ... this. Clear debug registers
14800 state variables.
14801 (store_debug_registers): Delete.
14802 (i386_get_thread_context): New.
14803 (load_debug_registers): Delete.
14804 (i386_set_thread_context): New.
14805 (i386_thread_added): New.
14806 (single_step): Rename to ...
14807 (i386_single_step): ... this.
14808 (do_fetch_inferior_registers): Rename to ...
14809 (i386_fetch_inferior_register): ... this.
14810 (i386_store_inferior_register): New.
14811 (the_low_target): Adapt to new interface.
14812
14813 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14814 (arm_get_thread_context): New.
14815 (arm_set_thread_context): New.
14816 (regptr): New.
14817 (do_fetch_inferior_registers): Rename to ...
14818 (arm_fetch_inferior_register): ... this.
14819 (arm_store_inferior_register): New.
14820 (arm_wince_breakpoint): Reimplement as unsigned long.
14821 (arm_wince_breakpoint_len): Define.
14822 (the_low_target): Adapt to new interface.
14823
14824 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14825 load_debug_registers. Add get_thread_context, set_thread_context,
14826 thread_added and store_inferior_register. Rename
14827 fetch_inferior_registers to fetch_inferior_register.
14828 (regptr): Remove declaration.
14829
14830 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14831
14832 * linux-low.c (linux_detach): Change return type to int. Return 0.
14833 * spu-low.c (spu_detach): Likewise.
14834
14835 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14836
14837 * target.h (target_ops): Change return type of detach to int.
14838 Add join.
14839 (join_inferior): New.
14840 * server.c (main): Don't skip detach support on mingw32.
14841 If the inferior doesn't support detaching return error.
14842 Call join_inferior instead of using waitpid.
14843 * linux-low.c (linux_join): New.
14844 (linux_target_op): Add linux_join.
14845 * spu-low.c (spu_join): New.
14846 (spu_target_ops): Add spu_join.
14847 * win32-low.c (win32_detach): Adapt to new interface.
14848 Reopen current_process_handle before detaching. Issue a child
14849 resume before detaching.
14850 (win32_join): New.
14851 (win32_target_op): Add win32_join.
14852
14853 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14854
14855 * win32-low.c (win32-attach): Fix return value.
14856 * target.h (target_ops): Describe ATTACH return values.
14857
14858 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14859
14860 * win32-low.c (GETPROCADDRESS): Define.
14861 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14862 (winapi_DebugSetProcessKillOnExit): Likewise.
14863 (win32_create_inferior): Force usage of ansi CreateProcessA.
14864 (win32_attach): Use GETPROCADDRESS.
14865 (win32_detach): Likewise.
14866
14867 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14868
14869 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14870
14871 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14872
14873 * win32-low.c: Commit leftover changes from 2007-03-29.
14874
14875 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14876
14877 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14878 fields short instead of int. Add explicit padding.
14879 (i387_cache_to_fsave): Remove unnecessary casts.
14880 (i387_fsave_to_cache): Doc fix.
14881 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14882
14883 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14884
14885 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14886 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14887
14888 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14889
14890 * configure.srv (arm*-*-mingw32ce*): Move near the other
14891 arm targets.
14892
14893 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14894
14895 * configure.ac: Add errno checking.
14896 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14897 sys/file.h and malloc.h.
14898 (AC_CHECK_DECLS): Add perror.
14899 (srv_mingwce): Handle.
14900 * configure.srv (i[34567]86-*-cygwin*): Add
14901 win32-i386-low.o to srv_tgtobj.
14902 (i[34567]86-*-mingw*): Likewise.
14903 (arm*-*-mingw32ce*): Add case.
14904 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14905 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14906 [__MINGW32CE__] (strerror): New function.
14907 [__MINGW32CE__] (errno): Define to GetLastError.
14908 [__MINGW32CE__] (COUNTOF): New macro.
14909 (remote_open): Remove extra close call.
14910 * mem-break.c (delete_breakpoint_at): New function.
14911 * mem-break.h (delete_breakpoint_at): Declare.
14912 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14913 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14914 [USE_WIN32API] (read, write): Add char* casts.
14915 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14916 * server.h: Include wincecompat.h on Windows CE.
14917 [HAVE_ERRNO_H]: Check.
14918 (perror): Declare if not declared.
14919 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14920 (perror_with_name): Remove errno declaration.
14921 * wincecompat.h: New.
14922 * wincecompat.c: New.
14923 * win32-low.h: New.
14924 * win32-arm-low.c: New.
14925 * win32-i386-low.c: New.
14926 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14927 (OUTMSG2): Make it safe.
14928 (_T): New macro.
14929 (COUNTOF): New macro.
14930 (NUM_REGS): Get it from the low target.
14931 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14932 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14933 (thread_rec): Let low target handle debug registers.
14934 (child_add_thread): Likewise.
14935 (child_init_thread_list): Likewise.
14936 (continue_one_thread): Likewise.
14937 (regptr): New.
14938 (do_child_fetch_inferior_registers): Move to ...
14939 * win32-i386-low.c: ... here, and rename to ...
14940 (do_fetch_inferior_registers): ... this.
14941 * win32-low.c (child_fetch_inferior_registers):
14942 Go through the low target.
14943 (do_child_store_inferior_registers): Use regptr.
14944 (strwinerror): New function.
14945 (win32_create_inferior): Handle Windows CE.
14946 Use strwinerror instead of strerror on Windows error
14947 codes. Add program to the error output.
14948 Don't close the main thread handle on Windows CE.
14949 (win32_attach): Use coredll.dll on Windows CE.
14950 (win32_kill): Close current process and current
14951 thread handles.
14952 (win32_detach): Use coredll.dll on Windows CE.
14953 (win32_resume): Let low target handle debug registers, and
14954 step request.
14955 (handle_exception): Add/Remove initial breakpoint. Avoid
14956 non-existant WSTOPSIG on Windows CE.
14957 (win32_read_inferior_memory): Cast to remove warning.
14958 (win32_arch_string): Go through the low target.
14959 (initialize_low): Call set_breakpoint_data with the low
14960 target's breakpoint.
14961 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14962 FOP_REGNUM, mappings): Move to ...
14963 * win32-i386-low.c: ... here.
14964 * win32-low.c (win32_thread_info): Move to ...
14965 * win32-low.h: ... here.
14966 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14967 win32-arm-low.c and wincecompat.c.
14968 (all:): Add $EXEEXT.
14969 (install-only:): Likewise.
14970 (gdbserver:): Likewise.
14971 (gdbreplay:): Likewise.
14972 * config.in: Regenerate.
14973 * configure: Regenerate.
14974
14975 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14976
14977 * win32-low.c: Rename typedef thread_info to
14978 win32_thread_info throughout.
14979
14980 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14981
14982 * win32-i386-low.c: Rename to ...
14983 * win32-low.c: ... this.
14984 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14985 * Makefile.in: Likewise.
14986
14987 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14988
14989 * remote-utils.c (monitor_output): Constify msg parameter.
14990 * server.h (monitor_output): Likewise.
14991 * win32-i386-low.c (handle_output_debug_string): New.
14992 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14993 handle_output_debug_string.
14994 (get_child_debug_event): Likewise.
14995
14996 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14997
14998 * server.c (main): Correct strtoul check.
14999
15000 2007-03-27 Jon Ringle <jon@ringle.org>
15001
15002 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15003
15004 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15005
15006 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15007
15008 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15009
15010 * terminal.h: Check HAVE_SGTTY_H.
15011
15012 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15013
15014 * remote-utils.c (remote_open): Print out the assigned port number.
15015
15016 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15017
15018 * remote-utils.c (monitor_output): New function.
15019 * server.c (debug_threads): Define here.
15020 (monitor_show_help): New function.
15021 (handle_query): Handle qRcmd.
15022 (main): Do not handle 'd' packet.
15023 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15024 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15025 of debug_threads.
15026
15027 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15028
15029 * Makefile.in (EXEEXT): New.
15030 (clean): Use $(EXEEXT).
15031
15032 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15033
15034 * target.h (target_ops): Rename send_signal to request_interrupt,
15035 and remove enum target_signal parameter.
15036 * linux-low.c (linux_request_interrupt): Rename from
15037 linux_send_signal, and always send SIGINT.
15038 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15039 and always send SIGINT.
15040 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15041 of send_signal.
15042 (input_interrupt): Likewise.
15043
15044 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15045
15046 * server.c (get_features_xml): Check if target implemented
15047 arch_string.
15048 * win32-i386-low.c (win32_arch_string): New.
15049 (win32_target_ops): Add win32_arch_string as arch_string member.
15050
15051 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15052
15053 * spu-low.c (spu_arch_string): New.
15054 (spu_target_ops): Add spu_arch_string.
15055
15056 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15057
15058 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15059 * configure.ac: Do not check for terminal.h.
15060 * configure, config.in: Regenerated.
15061
15062 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15063
15064 * Makefile.in (OBS): Add $(XML_BUILTIN).
15065 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15066 (clean): Update.
15067 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15068 (arm-with-iwmmxt.c): New.
15069 * config.in, configure: Regenerate.
15070 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15071 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15072 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15073 (arm*-*-linux*): Add iWMMXt and regset support.
15074 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15075 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15076 (arm_store_wmmxregset, target_regsets): New.
15077 * server.c (get_features_xml): Take annex argument. Check builtin
15078 XML documents.
15079 (handle_query): Handle multiple annexes.
15080
15081 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15082
15083 * remote-utils.c [USE_WIN32API] (read, write): Define.
15084 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15085 write.
15086
15087 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * linux-i386-low.c (the_low_target): Set arch_string.
15090 * linux-x86-64-low.c (the_low_target): Likewise.
15091 * linux-low.c (linux_arch_string): New.
15092 (linux_target_ops): Add it.
15093 * linux-low.h (struct linux_target_ops): Add arch_string.
15094 * server.c (write_qxfer_response): Use const void * for DATA.
15095 (get_features_xml): New.
15096 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15097 * target.h (struct target_ops): Add arch_string method.
15098
15099 2007-01-03 Denis Pilat <denis.pilat@st.com>
15100 Daniel Jacobowitz <dan@codesourcery.com>
15101
15102 * linux-low.c (linux_kill): Handle being called with no threads.
15103 * win32-i386-low.c (win32_kill): Likewise.
15104 (get_child_debug_event): Clear current_process_handle.
15105
15106 2006-12-30 Denis PILAT <denis.pilat@st.com>
15107 Daniel Jacobowitz <dan@codesourcery.com>
15108
15109 * remote-utils.c (remote_open): Check the type of specified
15110 serial port devices before opening them.
15111 * server.c (main): Kill the inferior if an error occurs during
15112 the first remote_open.
15113
15114 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15115
15116 * README: Update supported targets.
15117
15118 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15119
15120 * Makefile.in (clean): Remove reg-mips64.c.
15121 (reg-mips64.c, reg-mips64.o): New rules.
15122 * configure.srv: Handle mips64. Include regset support for mips.
15123 * linux-mips-low.c (union mips_register): New.
15124 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15125 (mips_breakpoint, mips_breakpoint_at): Use int.
15126 (mips_collect_register, mips_supply_register)
15127 (mips_collect_register_32bit, mips_supply_register_32bit)
15128 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15129 (mips_store_fpregset, target_regsets): New.
15130 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15131
15132 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15133
15134 * configure.srv: Add target "spu*-*-*".
15135 * Makefile.in (clean): Remove reg-spu.c.
15136 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15137 * spu-low.c: New file.
15138
15139 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15140
15141 * configure.ac: Correct td_thr_tls_get_addr test.
15142 * configure: Regenerated.
15143
15144 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15145
15146 * linux-low.c (linux_wait_for_event): Reformat. Use the
15147 pass_signals array.
15148 * remote-utils.c (decode_address_to_semicolon): New.
15149 * server.c (pass_signals, handle_general_set): New.
15150 (handle_query): Mention QPassSignals for qSupported.
15151 (main): Call handle_general_set.
15152 * server.h (pass_signals, decode_address_to_semicolon): New.
15153
15154 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * server.c (handle_query): Correct error handling for read_auxv.
15157
15158 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15159
15160 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15161 and srv_linux_thread_db to yes.
15162 * linux-s390-low.c (s390_fill_gregset): New function.
15163 (target_regsets): Define data structure.
15164
15165 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15166
15167 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15168 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15169 * config.in, configure: Regenerated.
15170 * inferiors.c (gdb_id_to_thread): New function.
15171 (gdb_id_to_thread_id): Use it.
15172 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15173 * linux-low.h (struct process_info): Add th member.
15174 (thread_db_get_tls_address): New prototype.
15175 * remote-utils.c (decode_address): Make non-static.
15176 * server.c (handle_query): Handle qGetTLSAddr.
15177 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15178 * target.h (struct target_ops): Add get_tls_address.
15179 * thread-db.c (maybe_attach_thread): Save the thread handle.
15180 (thread_db_get_tls_address): New.
15181
15182 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15183
15184 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15185 (linux_resume_one_process): Take a siginfo_t *. Update all
15186 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15187 (struct pending_signals): Add a siginfo_t.
15188 (linux_wait_for_process): Always set last_status.
15189 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15190 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15191 * linux-low.h (struct process_info): Add last_status.
15192
15193 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15194
15195 * remote-utils.c (try_rle): New function.
15196 (putpkt_binary): Use it.
15197
15198 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15199
15200 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15201 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15202 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15203 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15204 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15205 point registers.
15206
15207 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15208
15209 * server.c (terminal_fd): New variable.
15210 (old_foreground_pgrp): Likewise.
15211 (restore_old_foreground_pgrp): New function.
15212 (start_inferior): Record the terminal file descriptor in terminal_fd
15213 and its original foreground group in old_foreground_pgrp. Register
15214 restore_old_foreground_pgrp with atexit().
15215
15216 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15217
15218 * server.c (handle_query): Correct qPart to qXfer.
15219
15220 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15221
15222 * configure.ac: Check for more headers which are missing on
15223 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15224 * configure.srv: Add Cygwin and mingw32.
15225 * remote-utils.c: Don't include headers unconditionally which
15226 are missing on mingw32. Include <winsock.h> for mingw32.
15227 (remote_open): Adjust for mingw32 support. Flush
15228 standard error after writing to it.
15229 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15230 (unblock_async_io, enable_async_io, disable_async_io)
15231 (readchar, getpkt): Update for Winsock support.
15232 (prepare_resume_reply): Expect a protocol signal number.
15233 * server.c: Disable <sys/wait.h> on mingw32.
15234 (start_inferior): Adjust for mingw32 support. Flush
15235 standard error after writing to it.
15236 (attach_inferior): Likewise. Use protocol signal
15237 numbers.
15238 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15239 and names.
15240 * win32-i386-low.c: New file.
15241 * Makefile.in (XM_CLIBS): Set.
15242 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15243 (win32-i386-low.o): New dependency rule.
15244 * linux-low.c (linux_wait): Use target signal numbers.
15245 * target.h (struct target_ops): Doc fix.
15246 * server.h (target_signal_to_name): New prototype.
15247 * gdbreplay.c: Don't include headers unconditionally which
15248 are missing on mingw32. Include <winsock.h> for mingw32.
15249 (remote_close, remote_open): Adjust for Winsock support.
15250 * configure, config.in: Regenerated.
15251
15252 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15253
15254 * server.c (decode_xfer_read, write_qxfer_response): New.
15255 (handle_query): Take a packet length argument. Handle
15256 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15257 the qSupported response.
15258 (main): Update call to handle_query.
15259
15260 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15263 (putpkt_binary): Renamed from putpkt and adjusted for binary
15264 data.
15265 (putpkt): New wrapper for putpkt_binary.
15266 (readchar): Don't mask off the high bit.
15267 (decode_X_packet): New function.
15268 * server.c (main): Call putpkt_binary if a handler sets the packet
15269 length. Save the length of the incoming packet. Handle 'X'.
15270 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15271
15272 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * server.c (handle_query): Handle qSupported.
15275
15276 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15277
15278 * remote-utils.c (all_symbols_looked_up): New variable.
15279 (look_up_one_symbol): Check it.
15280 * server.h (look_up_one_symbol): New declaration.
15281 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15282
15283 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15284
15285 * Makefile.in (linux-arm-low.o): Update dependencies.
15286 * linux-arm-low.c: Include "gdb_proc_service.h".
15287 (PTRACE_GET_THREAD_AREA): Define.
15288 (ps_get_thread_area): New function.
15289
15290 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15291
15292 * configure.srv (m68k*-*-uclinux*): New target.
15293 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15294 (linux_resume_one_process): Remove extraneous cast.
15295 (linux_read_offsets): New.
15296 (linux_target_op): Add linux_read_offsets on mmuless systems.
15297 * server.c (handle_query): Add qOffsets logic.
15298 * target.h (struct target_ops): Add read_offsets.
15299
15300 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15301
15302 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15303 (PTRACE_GET_THREAD_AREA): Define.
15304 (ps_get_thread_area): New function.
15305 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15306 (linux-x86-64-low.o): Update.
15307
15308 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15309
15310 * configure.ac: Remove checks for prfpregset_t.
15311 * gdb_proc_service.h: New file.
15312 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15313 new "gdb_proc_service.h".
15314 * proc-service.c: Likewise.
15315 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15316 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15317 * Makefile.in (gdb_proc_service_h): Updated.
15318 * configure, config.in: Regenerated.
15319
15320 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15321
15322 * remote-utils.c (prepare_resume_reply): Move declaration
15323 of gdb_id_from_wait to the top of the block.
15324
15325 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15326
15327 * linux-low.c (regsets_store_inferior_registers): Read the regset
15328 from the target before filling it.
15329
15330 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15331
15332 * server.c (attach_inferior): Return SIGTRAP for a successful
15333 attach.
15334
15335 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15336
15337 * Makefile.in (OBS): Add version.o.
15338 (STAGESTUFF): Delete.
15339 (version.o): Add dependencies.
15340 (version.c): Replace rule.
15341 (clean): Remove version.c.
15342 * server.c (gdbserver_version): New.
15343 (gdbserver_usage): Use printf.
15344 (main): Handle --version and --help.
15345 * server.h (version, host_name): Add declarations.
15346
15347 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15348
15349 * linux-arm-low.c:
15350 * linux-arm-low.c:
15351 * inferiors.c:
15352 * i387-fp.h:
15353 * i387-fp.c:
15354 * gdbreplay.c:
15355 * regcache.c:
15356 * proc-service.c:
15357 * mem-break.h:
15358 * mem-break.c:
15359 * linux-x86-64-low.c:
15360 * linux-sh-low.c:
15361 * linux-s390-low.c:
15362 * linux-ppc64-low.c:
15363 * linux-ppc-low.c:
15364 * linux-mips-low.c:
15365 * linux-m68k-low.c:
15366 * linux-m32r-low.c:
15367 * linux-low.h:
15368 * linux-low.c:
15369 * linux-ia64-low.c:
15370 * linux-i386-low.c:
15371 * linux-crisv32-low.c:
15372 * thread-db.c:
15373 * terminal.h:
15374 * target.h:
15375 * target.c:
15376 * server.h:
15377 * server.c:
15378 * remote-utils.c:
15379 * regcache.h:
15380 * utils.c:
15381 * Makefile.in:
15382 * configure.ac:
15383 * gdbserver.1: Add (C) after Copyright. Update the FSF
15384 address.
15385
15386 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15387
15388 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15389 (arm_breakpoint_at): Recognize both breakpoints.
15390 (the_low_target): Use the correct breakpoint instruction.
15391
15392 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15393
15394 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15395 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15396 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15397 (the_low_target): Update.
15398
15399 2005-10-25 Andreas Schwab <schwab@suse.de>
15400
15401 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15402
15403 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15404 (ia64_num_regs): Reduce to 462.
15405
15406 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15407
15408 * acinclude.m4: Correct quoting.
15409 * aclocal.m4: Regenerated.
15410
15411 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15412 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15413 (thread_db_init): Call thread_db_err_str.
15414 * configure.ac: Check for TD_VERSION.
15415 * config.in, configure: Regenerated.
15416
15417 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15418
15419 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15420
15421 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15422
15423 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15424 is not available. Define HAVE_PTRACE_GETREGS if it is.
15425 * config.in, configure: Regenerated.
15426 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15427 * linux-i386-low.c, linux-m68k-low.c: Update to use
15428 HAVE_PTRACE_GETREGS.
15429 * linux-low.c (regsets_fetch_inferior_registers)
15430 (regsets_store_inferior_registers): Only return 0 if we processed
15431 GENERAL_REGS.
15432 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15433 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15434
15435 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15436
15437 * inferiors.c (struct thread_info): Add gdb_id.
15438 (add_thread): Add gdb_id argument.
15439 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15440 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15441 calls to add_thread.
15442 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15443 * server.c (handle_query): Use thread_to_gdb_id.
15444 (handle_v_cont, main): Use gdb_id_to_thread_id.
15445 * server.h (add_thread): Update prototype.
15446 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15447 prototypes.
15448
15449 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15450
15451 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15452 left-padded registers.
15453 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15454 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15455
15456 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15457
15458 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15459 * configure: Regenerate.
15460 * config.in: Regenerate.
15461 * server.h (NEED_DECLARATION_STRERROR):
15462 Replace with !HAVE_DECL_STRERROR.
15463
15464 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15465
15466 * linux-low.c (linux_wait, linux_send_signal): Don't test
15467 an unsigned long variable for > 0 if it could be MAX_ULONG.
15468 * server.c (myresume): Likewise.
15469 * target.c (set_desired_inferior): Likewise.
15470
15471 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15472
15473 * configure.ac: Simplify and improve check for socklen_t.
15474 * configure, config.in: Regenerate.
15475
15476 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15477
15478 * acconfig.h: Remove.
15479 * configure.ac: Add a test for socklen_t. Use three-argument
15480 AC_DEFINE throughout.
15481 * config.in: Regenerated using autoheader 2.59.
15482 * configure: Regenerated.
15483
15484 * gdbreplay.c (socklen_t): Provide a default.
15485 (remote_open): Use socklen_t.
15486 * remote-utils.c (socklen_t): Provide a default.
15487 (remote_open): Use socklen_t.
15488 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15489 unsigned char.
15490
15491 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15492 char for buffers.
15493 * linux-low.c (linux_read_memory, linux_write_memory)
15494 (linux_read_auxv): Likewise.
15495 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15496 (check_mem_write): Likewise.
15497 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15498 Likewise.
15499 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15500 (registers_from_string, register_data): Likewise.
15501 * server.c (handle_query, main): Likewise.
15502 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15503 (decode_M_packet): Likewise.
15504 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15505 * target.h (struct target_ops): Update read_memory, write_memory,
15506 and read_auxv.
15507 (read_inferior_memory, write_inferior_memory): Update.
15508 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15509 to unsigned char *.
15510 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15511 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15512 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15513 linux-s390-low.c, linux-sh-low.c: Update for changes in
15514 read_inferior_memory and the_low_target->breakpoint.
15515
15516 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15517
15518 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15519 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15520 * configure.srv: Add powerpc64-*-linux*.
15521 * linux-ppc64-low.c: New file.
15522
15523 2005-05-23 Orjan Friberg <orjanf@axis.com>
15524
15525 * linux-cris-low.c: New file with support for CRIS.
15526 * linux-crisv32-low.c: Ditto for CRISv32.
15527 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15528 (clean): Add reg-cris.c and reg-crisv32.c.
15529 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15530 reg-crisv32.o, and reg-crisv32.c to make rules.
15531 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15532 recognized targets.
15533
15534 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15535
15536 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15537 of sizeof (PTRACE_XFER_TYPE).
15538 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15539
15540 2005-05-12 Orjan Friberg <orjanf@axis.com>
15541
15542 * target.h (struct target_ops): Add insert_watchpoint,
15543 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15544 pointers for hardware watchpoint support.
15545 * linux-low.h (struct linux_target_ops): Ditto.
15546 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15547 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15548 to linux_target_ops.
15549 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15550 reply packet.
15551 * server.c (main): Recognize 'Z' and 'z' packets.
15552
15553 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15554
15555 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15556 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15557 (the_low_target): Add new members.
15558
15559 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * proc-service.c (ps_lgetregs): Search all_processes instead of
15562 all_threads.
15563
15564 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * server.c (start_inferior): Change return type to int.
15567 (attach_inferior): Change sigptr to int *.
15568 (handle_v_cont, handle_v_requests): Change signal to int *.
15569 (main): Change signal to int.
15570
15571 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15572
15573 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15574 * configure.srv: Add m32r*-*-linux*.
15575 * linux-m32r-low.c: New file.
15576
15577 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15578
15579 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15580
15581 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15582
15583 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15584 Take unsigned long arguments for PIDs.
15585 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15586 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15587 (wait_for_sigstop, linux_resume_one_process)
15588 (regsets_fetch_inferior_registers, linux_send_signal)
15589 (linux_read_auxv): Likewise. Update the types of variables holding
15590 PIDs. Update format string specifiers.
15591 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15592 * remote-utils.c (prepare_resume_reply): Likewise.
15593 * server.c (cont_thread, general_thread, step_thread)
15594 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15595 unsigned long.
15596 (handle_query): Update format specifiers.
15597 (handle_v_cont, main): Use strtoul for thread IDs.
15598 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15599 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15600 (general_thread, step_thread, thread_from_wait)
15601 (old_thread_from_wait): Update.
15602 * target.h (struct thread_resume): Use unsigned long for THREAD.
15603 (struct target_ops): Use unsigned long for arguments to attach and
15604 thread_alive.
15605
15606 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15607
15608 * acinclude.m4: Include bfd/bfd.m4 directly.
15609 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15610 <agriffis@toolchain.org>.
15611 * aclocal.m4, configure: Regenerated.
15612
15613 2005-01-07 Andrew Cagney <cagney@gnu.org>
15614
15615 * configure.ac: Rename configure.in, require autoconf 2.59.
15616 * configure: Re-generate.
15617
15618 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15619
15620 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15621 LIBS when finished.
15622 * aclocal.m4: Regenerated.
15623 * configure: Regenerated.
15624
15625 2004-11-21 Andreas Schwab <schwab@suse.de>
15626
15627 * linux-m68k-low.c (m68k_num_gregs): Define.
15628 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15629 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15630 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15631 (m68k_breakpoint_at): New. Add to the_low_target.
15632
15633 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15634 srv_linux_thread_db to yes.
15635
15636 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15637
15638 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15639 (ARCH_SET_FS): Likewise.
15640 (ARCH_GET_FS): Likewise.
15641 (ARCH_GET_GS): Likewise.
15642
15643 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15644
15645 * linux-i386-low.c (ps_get_thread_area): New.
15646 * linux-x86-64-low.c (ps_get_thread_area): New.
15647 * linux-low.c: Include <sys/syscall.h>.
15648 (linux_kill_one_process): Don't kill the first thread here.
15649 (linux_kill): Kill the first thread here.
15650 (kill_lwp): New function.
15651 (send_sigstop, linux_send_signal): Use it.
15652 * proc-service.c: Clean up #ifdefs.
15653 (fpregset_info): Delete.
15654 (ps_lgetregs): Update and enable implementation.
15655 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15656 implementations.
15657 * remote-utils.c (struct sym_cache, symbol_cache): New.
15658 (input_interrupt): Print a clearer message.
15659 (async_io_enabled): New variable.
15660 (enable_async_io, disable_async_io): Use it. Update comments.
15661 (look_up_one_symbol): Use the symbol cache.
15662 * thread-db.c (thread_db_look_up_symbols): New function.
15663 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15664
15665 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15666
15667 * configure.in: Test for -rdynamic.
15668 * configure: Regenerated.
15669 * Makefile (INTERNAL_LDFLAGS): New.
15670 (gdbserver, gdbreplay): Use it.
15671
15672 2004-09-02 Andrew Cagney <cagney@gnu.org>
15673
15674 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15675
15676 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15677
15678 * linux-low.c (linux_wait): Clear all_processes list also.
15679
15680 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15681
15682 * linux-low.c: Include <errno.h>. Remove extern declaration of
15683 errno.
15684
15685 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15686
15687 * gdbreplay.c, server.h, utils.c: Update copyright years.
15688
15689 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15690
15691 * server.c (main): Print child status or termination signal from
15692 variable 'signal', not 'sig'.
15693
15694 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15695
15696 * linux-low.c (linux_read_memory): Change return type to
15697 int. Check for and return error from ptrace().
15698 * target.c (read_inferior_memory): Change return type to int. Pass
15699 back return status from the_target->read_memory().
15700 * target.h (struct target_ops): Adapt *read_memory() prototype.
15701 Update comment.
15702 (read_inferior_memory): Adapt prototype.
15703 * server.c (main): Return an error packet if
15704 read_inferior_memory() returns an error.
15705
15706 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15707
15708 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15709 Unify with other clean targets.
15710
15711 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15712
15713 * server.c (handle_v_cont): Call set_desired_inferior.
15714
15715 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15716
15717 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15718
15719 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15720
15721 * linux-low.c (linux_wait): Unblock async I/O.
15722 (linux_resume): Block and enable async I/O.
15723 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15724 * server.h (block_async_io, unblock_async_io): Add prototypes.
15725
15726 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15727
15728 * remote-utils.c (remote_open): Print a status notice after
15729 opening a TCP port.
15730 * server.c (attach_inferior): Print a status notice after
15731 attaching.
15732
15733 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15734
15735 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15736
15737 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15738
15739 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15740 error packet.
15741 * server.c, target.h: Update copyright years.
15742
15743 2004-02-25 Roland McGrath <roland@redhat.com>
15744
15745 * target.h (struct target_ops): New member `read_auxv'.
15746 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15747 * linux-low.c (linux_read_auxv): New function.
15748 (linux_target_ops): Initialize `read_auxv' member to that.
15749
15750 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15751
15752 Committed by Jim Blandy <jimb@redhat.com>.
15753
15754 * linux-s390-low.c (s390_num_regs): Update.
15755 (s390_regmap): Remove control registers. Use __s390x__ predefine
15756 instead of GPR_SIZE to distiguish s390 and s390x targets.
15757
15758 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15759
15760 * linux-low.c: Update copyright year.
15761 (check_removed_breakpoint): Clear pending_is_breakpoint.
15762 (linux_set_resume_request, linux_queue_one_thread)
15763 (resume_status_pending_p): New functions.
15764 (linux_continue_one_thread): Use process->resume.
15765 (linux_resume): Only resume threads if there are no pending events.
15766 * linux-low.h (struct process_info): Add resume request
15767 pointer.
15768
15769 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15770
15771 * regcache.c (new_register_cache): Clear the allocated register
15772 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15773
15774 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15775
15776 * linux-low.c (linux_resume): Take a struct thread_resume *
15777 argument.
15778 (linux_wait): Update call.
15779 (resume_ptr): New static variable.
15780 (linux_continue_one_thread): Renamed from
15781 linux_continue_one_process. Use resume_ptr.
15782 (linux_resume): Use linux_continue_one_thread.
15783 * server.c (handle_v_cont, handle_v_requests): New functions.
15784 (myresume): New function.
15785 (main): Handle 'v' case.
15786 * target.h (struct thread_resume): New type.
15787 (struct target_ops): Change argument of "resume" to struct
15788 thread_resume *.
15789 (myresume): Delete macro.
15790
15791 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15792
15793 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15794 (uninstall): Support DESTDIR.
15795
15796 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15797
15798 * configure.srv: Add xscale*linux copy of arm*linux entry.
15799
15800 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15801
15802 * linux-arm-low.c (arm_reinsert_addr): New function.
15803 (the_low_target): Add arm_reinsert_addr.
15804
15805 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15806
15807 * mem-break.c: Remove whitespace at end of file.
15808
15809 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15810
15811 * configure.in: Check whether we need to prototype strerror.
15812 * server.h: Optionally prototype strerror.
15813 * gdbreplay.c (perror_with_name): Use strerror.
15814 * linux-low.c (linux_attach_lwp): Use strerror.
15815 * utils.c (perror_with_name): Use strerror.
15816 * config.in, configure: Regenerated.
15817
15818 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15819
15820 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15821 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15822
15823 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15824
15825 * Makefile.in (SFILES): Update.
15826 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15827 low-sun3.c: Remove files.
15828
15829 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15830
15831 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15832 (linux_detach_one_process, linux_detach): New functions.
15833 (linux_target_ops): Add linux_detach.
15834 * server.c (main): Handle 'D' packet.
15835 * target.h (struct target_ops): Add "detach" member.
15836 (detach_inferior): Define.
15837
15838 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15839
15840 From Kelley Cook <kelleycook@wideopenwest.com>:
15841 * configure.srv: Accept i[34567]86 variants.
15842
15843 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15844
15845 * linux-low.c (linux_wait_for_event): Correct comment typos.
15846 (linux_resume_one_process): Call check_removed_breakpoint.
15847 (linux_send_signal): New function.
15848 (linux_target_ops): Add linux_send_signal.
15849 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15850 of kill.
15851 * target.h (struct target_ops): Add send_signal.
15852
15853 2003-05-29 Jim Blandy <jimb@redhat.com>
15854
15855 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15856 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15857 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15858 away part of the register's value.
15859
15860 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15861
15862 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15863 (linux_wait_for_event, linux_init_signals): Likewise.
15864
15865 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15866
15867 * configure.in: Check for stdlib.h.
15868 * configure: Regenerated.
15869 * config.in: Regenerated.
15870
15871 2003-01-04 Andreas Schwab <schwab@suse.de>
15872
15873 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15874
15875 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15876
15877 * Makefile.in: Remove obsolete code.
15878
15879 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15880
15881 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15882 defined(PT_FPR0_HI).
15883
15884 2002-11-17 Stuart Hughes <seh@zee2.com>
15885
15886 * linux-arm-low.c (arm_num_regs): Increase.
15887 (arm_regmap): Include status register.
15888
15889 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15890
15891 * linux-low.c (register_addr): Remove incorrect -1 check.
15892
15893 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15894
15895 * linux-low.c (linux_create_inferior): Call setpgid. Return
15896 the new PID.
15897 (unstopped_p, linux_signal_pid): Remove.
15898 (linux_target_ops): Remove linux_signal_pid.
15899 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15900 global instead of target method.
15901 * target.h (struct target_ops): Remove signal_pid. Update comment
15902 for create_inferior.
15903 * server.c (signal_pid): New variable.
15904 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15905 gdbserver. Set the child to be the foreground process group.
15906 (attach_inferior): Set signal_pid.
15907
15908 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15909
15910 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15911
15912 2002-08-20 Jim Blandy <jimb@redhat.com>
15913
15914 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15915 default for this.
15916
15917 2002-08-01 Andrew Cagney <cagney@redhat.com>
15918
15919 * Makefile.in: Make chill references obsolete.
15920
15921 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15922
15923 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15924 * configure: Regenerate.
15925 * config.in: Regenerate.
15926
15927 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15928
15929 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15930 (perror_with_name, remote_close, remote_open, expect, play): Static.
15931
15932 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15933
15934 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15935 byte offsets instead of an array of indexes.
15936 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15937
15938 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15939
15940 * regcache.c: Add comment.
15941
15942 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15943
15944 * thread-db.c: New file.
15945 * proc-service.c: New file.
15946 * acinclude.m4: New file.
15947 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15948 proc-service.o, and thread-db.o.
15949 (linux-low.o): Add USE_THREAD_DB.
15950 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15951 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15952 * aclocal.m4: Regenerated.
15953 * config.in: Regenerated.
15954 * configure: Regenerated.
15955 * configure.in: Check for proc_service.h, sys/procfs.h,
15956 thread_db.h, and linux/elf.h headrs.
15957 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15958 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15959 Check for -lthread_db and thread support.
15960 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15961 PowerPC, and SuperH.
15962 * i387-fp.c: Constify arguments.
15963 * i387-fp.h: Likewise.
15964 * inferiors.c: (struct thread_info): Renamed from
15965 `struct inferior_info'. Remove PID member. Use generic inferior
15966 list header. All uses updated.
15967 (inferiors, signal_pid): Removed.
15968 (all_threads): New variable.
15969 (get_thread): Define.
15970 (add_inferior_to_list): New function.
15971 (for_each_inferior): New function.
15972 (change_inferior_id): New function.
15973 (add_inferior): Removed.
15974 (remove_inferior): New function.
15975 (add_thread): New function.
15976 (free_one_thread): New function.
15977 (remove_thread): New function.
15978 (clear_inferiors): Use for_each_inferior and free_one_thread.
15979 (find_inferior): New function.
15980 (find_inferior_id): New function.
15981 (inferior_target_data): Update argument type.
15982 (set_inferior_target_data): Likewise.
15983 (inferior_regcache_data): Likewise.
15984 (set_inferior_regcache_data): Likewise.
15985 * linux-low.c (linux_bp_reinsert): Remove.
15986 (all_processes, stopping_threads, using_thrads)
15987 (struct pending_signals, debug_threads, pid_of): New.
15988 (inferior_pid): Replace with macro.
15989 (struct inferior_linux_data): Remove.
15990 (get_stop_pc, add_process): New functions.
15991 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15992 Use add_process and add_thread.
15993 (linux_attach_lwp): New function, based on old linux_attach. Use
15994 add_process and add_thread. Set stop_expected for new threads.
15995 (linux_attach): New function.
15996 (linux_kill_one_process): New function.
15997 (linux_kill): Kill all LWPs.
15998 (linux_thread_alive): Use find_inferior_id.
15999 (check_removed_breakpoints, status_pending_p): New functions.
16000 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16001 Update. Use WNOHANG. Wait for cloned processes also. Update process
16002 struct for the found process.
16003 (linux_wait_for_event): New function.
16004 (linux_wait): Use it. Support LWPs.
16005 (send_sigstop, wait_for_sigstop, stop_all_processes)
16006 (linux_resume_one_process, linux_continue_one_process): New functions.
16007 (linux_resume): Support LWPs.
16008 (REGISTER_RAW_SIZE): Remove.
16009 (fetch_register): Use register_size instead. Call supply_register.
16010 (usr_store_inferior_registers): Likewise. Call collect_register.
16011 Fix recursive case.
16012 (regsets_fetch_inferior_registers): Improve error message.
16013 (regsets_store_inferior_registers): Add debugging.
16014 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16015 (unstopped_p, linux_signal_pid): New functions.
16016 (linux_target_ops): Add linux_signal_pid.
16017 (linux_init_signals): New function.
16018 (initialize_low): Call it. Initialize using_threads.
16019 * regcache.c (inferior_regcache_data): Add valid
16020 flag.
16021 (get_regcache): Fetch registers lazily. Add fetch argument
16022 and update all callers.
16023 (regcache_invalidate_one, regcache_invalidate): New
16024 functions.
16025 (new_register_cache): Renamed from create_register_cache.
16026 Return the new regcache.
16027 (free_register_cache): Change argument to a void *.
16028 (registers_to_string, registers_from_string): Call get_regcache
16029 with fetch flag set.
16030 (register_data): Make static. Pass fetch flag to get_regcache.
16031 (supply_register): Call get_regcache with fetch flag clear.
16032 (collect_register): Call get_regcache with fetch flag set.
16033 (collect_register_as_string): New function.
16034 * regcache.h: Update.
16035 * remote-utils.c (putpkt): Flush after debug output and use
16036 stderr.
16037 Handle input interrupts while waiting for an ACK.
16038 (input_interrupt): Use signal_pid method.
16039 (getpkt): Flush after debug output and use stderr.
16040 (outreg): Use collect_register_as_string.
16041 (new_thread_notify, dead_thread_notify): New functions.
16042 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16043 and general_thread.
16044 (look_up_one_symbol): Flush after debug output.
16045 * server.c (step_thread, server_waiting): New variables.
16046 (start_inferior): Don't use signal_pid. Update call to mywait.
16047 (attach_inferior): Update call to mywait.
16048 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16049 (main): Don't fetch/store registers explicitly. Use
16050 set_desired_inferior. Support proposed ``Hs'' packet. Update
16051 calls to mywait.
16052 * server.h: Update.
16053 (struct inferior_list, struct_inferior_list_entry): New.
16054 * target.c (set_desired_inferior): New.
16055 (write_inferior_memory): Constify.
16056 (mywait): New function.
16057 * target.h: Update.
16058 (struct target_ops): New signal_pid method.
16059 (mywait): Removed macro, added prototype.
16060
16061 * linux-low.h (regset_func): Removed.
16062 (regset_fill_func, regset_store_func): New.
16063 (enum regset_type): New.
16064 (struct regset_info): Add type field. Use new operation types.
16065 (struct linux_target_ops): stop_pc renamed to get_pc.
16066 Add decr_pc_after_break and breakpoint_at.
16067 (get_process, get_thread_proess, get_process_thread)
16068 (strut process_info, all_processes, linux_attach_lwp)
16069 (thread_db_init): New.
16070
16071 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16072 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16073 (the_low_target): Add new members.
16074 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16075 (i386_store_fpxregset): Constify.
16076 (target_regsets): Add new kind identifier.
16077 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16078 (i386_set_pc): Add debugging.
16079 (i386_breakpoint_at): New function.
16080 (the_low_target): Add new members.
16081 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16082 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16083 (mips_breakpoint_at): New.
16084 (the_low_target): Add new members.
16085 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16086 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16087 (the_low_target): Add new members.
16088 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16089 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16090 (the_low_target): Add new members.
16091 * linux-x86-64-low.c (target_regsets): Add new kind
16092 identifier.
16093
16094 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16095
16096 From Martin Pool <mbp@samba.org>:
16097 * server.c (gdbserver_usage): New function.
16098 (main): Call it.
16099
16100 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16101
16102 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16103 stop_at -> stop_pc.
16104
16105 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16106
16107 * Makefile.in: Remove obsolete code.
16108
16109 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16110
16111 * linux-low.c (regsets_fetch_inferior_registers),
16112 (regsets_store_inferior_registers): Removed cast to int from
16113 ptrace() calls.
16114 * regcache.h: Added declaration of struct inferior_info.
16115
16116 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16117
16118 * inferiors.c (struct inferior_info): Add regcache_data.
16119 (add_inferior): Call create_register_cache.
16120 (clear_inferiors): Call free_register_cache.
16121 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16122 * regcache.c (struct inferior_regcache_data): New.
16123 (registers): Remove.
16124 (get_regcache): New function.
16125 (create_register_cache, free_register_cache): New functions.
16126 (set_register_cache): Don't initialize the register cache here.
16127 (registers_to_string, registers_from_string, register_data): Call
16128 get_regcache.
16129 * regcache.h: Add prototypes.
16130 * server.h: Likewise.
16131
16132 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16133
16134 * mem-break.c: New file.
16135 * mem-break.h: New file.
16136 * Makefile.in: Add mem-break.o rule; update server.h
16137 dependencies.
16138 * inferiors.c (struct inferior_info): Add target_data
16139 member.
16140 (clear_inferiors): Free target_data member if set.
16141 (inferior_target_data, set_inferior_target_data): New functions.
16142 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16143 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16144 * linux-low.c (linux_bp_reinsert): New variable.
16145 (struct inferior_linux_data): New.
16146 (linux_create_inferior): Use set_inferior_target_data.
16147 (linux_attach): Likewise. Call add_inferior.
16148 (linux_wait_for_one_inferior): New function.
16149 (linux_wait): Call it.
16150 (linux_write_memory): Add const.
16151 (initialize_low): Call set_breakpoint_data.
16152 * linux-low.h (struct linux_target_ops): Add breakpoint
16153 handling members.
16154 * server.c (attach_inferior): Remove extra add_inferior
16155 call.
16156 * server.h: Include mem-break.h. Update inferior.c
16157 prototypes.
16158 * target.c (read_inferior_memory)
16159 (write_inferior_memory): New functions.
16160 * target.h (read_inferior_memory)
16161 (write_inferior_memory): Change macros to prototypes.
16162 (struct target_ops): Update comments. Add const to write_memory
16163 definition.
16164
16165 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16166
16167 * linux-low.c (usr_store_inferior_registers): Support
16168 registers which are allowed to fail to store.
16169 * linux-low.h (linux_target_ops): Likewise.
16170 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16171 (ppc_cannot_store_register): FPSCR may not be storable.
16172
16173 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16174
16175 * server.h: Include <string.h> if HAVE_STRING_H.
16176 * ChangeLog: Correct paths in last ChangeLog entry.
16177
16178 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16179
16180 * linux-low.h: Remove obsolete prototypes.
16181 (struct linux_target_ops): New.
16182 (extern the_low_target): New.
16183 * linux-low.c (num_regs, regmap): Remove declarations.
16184 (register_addr): Use the_low_target explicitly.
16185 (fetch_register): Likewise.
16186 (usr_fetch_inferior_registers): Likewise.
16187 (usr_store_inferior_registers): Likewise.
16188 * linux-arm-low.c (num_regs): Remove.
16189 (arm_num_regs): Define.
16190 (arm_regmap): Renamed from regmap, made static.
16191 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16192 made static.
16193 (arm_cannot_store_register): Renamed from cannot_store_register,
16194 made static.
16195 (the_low_target): New.
16196 * linux-i386-low.c (num_regs): Remove.
16197 (i386_num_regs): Define.
16198 (i386_regmap): Renamed from regmap, made static.
16199 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16200 made static.
16201 (i386_cannot_store_register): Renamed from cannot_store_register,
16202 made static.
16203 (the_low_target): New.
16204 * linux-ia64-low.c (num_regs): Remove.
16205 (ia64_num_regs): Define.
16206 (ia64_regmap): Renamed from regmap, made static.
16207 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16208 made static.
16209 (ia64_cannot_store_register): Renamed from cannot_store_register,
16210 made static.
16211 (the_low_target): New.
16212 * linux-m68k-low.c (num_regs): Remove.
16213 (m68k_num_regs): Define.
16214 (m68k_regmap): Renamed from regmap, made static.
16215 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16216 made static.
16217 (m68k_cannot_store_register): Renamed from cannot_store_register,
16218 made static.
16219 (the_low_target): New.
16220 * linux-mips-low.c (num_regs): Remove.
16221 (mips_num_regs): Define.
16222 (mips_regmap): Renamed from regmap, made static.
16223 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16224 made static.
16225 (mips_cannot_store_register): Renamed from cannot_store_register,
16226 made static.
16227 (the_low_target): New.
16228 * linux-ppc-low.c (num_regs): Remove.
16229 (ppc_num_regs): Define.
16230 (ppc_regmap): Renamed from regmap, made static.
16231 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16232 made static.
16233 (ppc_cannot_store_register): Renamed from cannot_store_register,
16234 made static.
16235 (the_low_target): New.
16236 * linux-s390-low.c (num_regs): Remove.
16237 (s390_num_regs): Define.
16238 (s390_regmap): Renamed from regmap, made static.
16239 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16240 made static.
16241 (s390_cannot_store_register): Renamed from cannot_store_register,
16242 made static.
16243 (the_low_target): New.
16244 * linux-sh-low.c (num_regs): Remove.
16245 (sh_num_regs): Define.
16246 (sh_regmap): Renamed from regmap, made static.
16247 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16248 made static.
16249 (sh_cannot_store_register): Renamed from cannot_store_register,
16250 made static.
16251 (the_low_target): New.
16252 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16253 (the_low_target): New.
16254
16255 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16256
16257 * Makefile.in: Add stamp-h target.
16258 * configure.in: Create stamp-h.
16259 * configure: Regenerated.
16260
16261 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16262
16263 * inferiors.c: New file.
16264 * target.c: New file.
16265 * target.h: New file.
16266 * Makefile.in: Add target.o and inferiors.o. Update
16267 dependencies.
16268 * linux-low.c (inferior_pid): New static variable,
16269 moved from server.c.
16270 (linux_create_inferior): Renamed from create_inferior.
16271 Call add_inferior. Return 0 on success instead of a PID.
16272 (linux_attach): Renamed from myattach.
16273 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16274 (linux_thread_alive): Renamed from mythread_alive.
16275 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16276 child dies.
16277 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16278 (regsets_store_inferior_registers): Correct error message.
16279 Add missing ``return 0''.
16280 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16281 (linux_store_registers): Renamed from store_inferior_registers.
16282 (linux_read_memory): Renamed from read_inferior_memory.
16283 (linux_write_memory): Renamed from write_inferior_memory.
16284 (linux_target_ops): New structure.
16285 (initialize_low): Call set_target_ops ().
16286 * remote-utils.c (unhexify): New function.
16287 (hexify): New function.
16288 (input_interrupt): Send signals to ``signal_pid''.
16289 * server.c (inferior_pid): Remove.
16290 (start_inferior): Update create_inferior call.
16291 (attach_inferior): Call add_inferior.
16292 (handle_query): New function.
16293 (main): Call handle_query for `q' packets.
16294 * server.h: Include "target.h". Remove obsolete prototypes.
16295 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16296
16297 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16298
16299 * Makefile.in: Add WARN_CFLAGS. Update configury
16300 dependencies.
16301 * configure.in: Check for <string.h>
16302 * configure: Regenerate.
16303 * config.in: Regenerate.
16304 * gdbreplay.c: Include needed system headers.
16305 (remote_open): Remove strchr prototype.
16306 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16307 * regcache.c (supply_register): Change buf argument to const void *.
16308 (supply_register_by_name): Likewise.
16309 (collect_register): Change buf argument to void *.
16310 (collect_register_by_name): Likewise.
16311 * regcache.h: Add missing prototypes.
16312 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16313 * server.c (handle_query): New function.
16314 (attached): New static variable, moved out of main.
16315 (main): Quiet longjmp clobber warnings.
16316 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16317 * utils.c (error): Remove NORETURN.
16318 (fatal): Likewise.
This page took 0.36689 seconds and 5 git commands to generate.