093eec7ddb59dc927753b097a6a9c2c384ccde4f
[binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2
3 * tdesc.c (target_desc::~target_desc): Move to here.
4 (target_desc::operator==): Likewise.
5 * tdesc.h (target_desc::~target_desc): Move from here.
6 (target_desc::operator==): Likewise.
7
8 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9
10 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
11
12 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
13
14 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
15 S390_TDESC_GS.
16 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
17 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
18 and init_registers_s390_gs_linux64.
19
20 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
21
22 * linux-s390-low.c (s390_fill_gs): Remove function.
23 (s390_fill_gsbc): Remove function.
24 (s390_regsets): Set fill functions for the guarded storage regsets
25 to NULL.
26
27 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
28
29 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
30 the word size. Add comment.
31 (s390_get_wordsize): New function.
32 (s390_arch_setup): No longer select a temporary tdesc to fetch the
33 pswm with it. Instead, use s390_get_wordsize to determine the
34 word size first and derive the correct tdesc from that directly.
35
36 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
37
38 * Makefile.in: Include silent-rules.mk.
39 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
40 (COMPILE): Add ECHO_CXX.
41 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
42 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
43 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
44 (version-generated.c): Add ECHO_GEN.
45 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
46 (IPAGENT_COMPILE): Add ECHO_CXX.
47 (%-generated.c): Add ECHO_REGDAT.
48
49 2018-03-14 Tom Tromey <tom@tromey.com>
50
51 PR cli/14977:
52 * ax.c (ax_printf): Special case for NULL.
53
54 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
55
56 * linux-low.c (linux_qxfer_libraries_svr4): Use
57 xml_escape_text_append.
58
59 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
60
61 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
62
63 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
64
65 * server.c (handle_general_set): Remove unnecessary xstrdup.
66
67 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
68
69 * server.c (parse_debug_format_options): Adjust to
70 delim_string_to_char_ptr_vec changes.
71 * thread-db.c (thread_db_load_search): Adjust to
72 dirnames_to_char_ptr_vec changes.
73
74 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
75
76 * target.h (target_enable_btrace, target_disable_btrace)
77 (target_read_btrace, target_read_btrace_conf): Turn macro into
78 inline function. Throw error if target method is not defined.
79 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
80 check for btrace target method. Be prepared to handle exceptions
81 from btrace target methods.
82
83 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
84
85 * server.c (captured_main): Change order of error message printed
86 when the current working directory cannot be found.
87
88 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
89
90 * server.c: Include "filenames.h" and "pathstuff.h".
91 (program_name): Delete variable.
92 (program_path): New anonymous class.
93 (get_exec_wrapper): Use "program_path" instead of
94 "program_name".
95 (handle_v_run): Likewise.
96 (captured_main): Likewise.
97 (process_serial_event): Likewise.
98
99 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
100
101 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
102 (OBJS): Add "pathstuff.o".
103 * server.c (current_directory): New global variable.
104 (captured_main): Initialize "current_directory".
105
106 2018-02-26 Alan Hayward <alan.hayward@arm.com>
107
108 * tdesc.c: Use common/tdesc.h.
109 * tdesc.h: Likewise.
110
111 2018-02-20 Alan Hayward <alan.hayward@arm.com>
112 Simon Marchi <simon.marchi@ericsson.com>
113
114 * Makefile.in: Switch order of make rules.
115
116 2018-02-19 Alan Hayward <alan.hayward@arm.com>
117
118 * Makefile.in: Add common directory in build.
119 * configure.ac: Add common reference.
120 * configure: Regenerate.
121
122 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
123
124 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
125 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
126 * spu-low.c (spu_target_ops): Likewise.
127 * win32-low.c (win32_target_ops): Likewise.
128 * server.c (supported_btrace_packets): Report packets unconditionally.
129 * target.h (target_ops) <supports_btrace>: Remove.
130 (target_supports_btrace): Remove.
131
132 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
133
134 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
135 (handle_btrace_disable): Change return type to void. Use exceptions
136 to report errors.
137 (handle_btrace_general_set): Catch exception and copy message to
138 return message.
139
140 2018-02-08 Tom Tromey <tom@tromey.com>
141
142 * linux-low.c (install_software_single_step_breakpoints): Use
143 make_scoped_restore.
144 * inferiors.c (make_cleanup_restore_current_thread): Remove.
145 (do_restore_current_thread_cleanup): Remove.
146 * gdbthread.h (make_cleanup_restore_current_thread): Don't
147 declare.
148
149 2018-02-08 Tom Tromey <tom@tromey.com>
150
151 * mem-break.c (set_raw_breakpoint_at): Use
152 gdb::unique_xmalloc_ptr.
153
154 2018-01-30 Pedro Alves <palves@redhat.com>
155
156 PR gdb/13211
157 * target.c (target_terminal::terminal_state): Rename to ...
158 (target_terminal::m_terminal_state): ... this.
159
160 2018-01-19 James Clarke <jrtc27@jrtc27.com>
161
162 * linux-low.c (handle_extended_wait): Surround call to
163 thread_db_notice_clone with #ifdef USE_THREAD_DB.
164
165 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
166
167 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
168 linux_ptrace_attach_fail_reason_string now returning an
169 std::string.
170 (linux_attach): Likewise.
171 * thread-db.c (attach_thread): Likewise.
172
173 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
174
175 PR gdb/21559
176 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
177 checking for fs_base/gs_base fields in struct user_regs_struct.
178 * configure: Regenerate.
179
180 2018-01-16 Yao Qi <yao.qi@linaro.org>
181
182 PR gdb/18749
183 * linux-low.c (fetch_register): Call supply_register instead of
184 error.
185
186 2018-01-08 Yao Qi <yao.qi@linaro.org>
187 Simon Marchi <simon.marchi@ericsson.com>
188
189 * Makefile.in (OBS): Remove selftest.o.
190 * configure.ac: Set srv_selftest_objs if $development is true.
191 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
192 * configure: Re-generated.
193 * server.c (captured_main): Wrap variable selftest_filter with
194 GDB_SELF_TEST.
195
196 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
197
198 * server.c (parse_debug_format_options): Return std::string.
199 (handle_monitor_command, captured_main): Adjust.
200
201 2018-01-05 Pedro Alves <palves@redhat.com>
202
203 PR gdb/18653
204 * server.c (captured_main): Pass quiet=false to
205 save_original_signals_state.
206
207 2018-01-01 Joel Brobecker <brobecker@adacore.com>
208
209 * gdbreplay.c (gdbreplay_version): Update copyright year in
210 version message.
211 * server.c (gdbserver_version): Likewise.
212
213 2017-12-08 Tom Tromey <tom@tromey.com>
214
215 * ax.c (ax_printf): Update.
216
217 2017-12-07 Yao Qi <yao.qi@linaro.org>
218
219 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
220 aarch64_linux_read_description.
221 * linux-amd64-ipa.c (idx2mask): New array.
222 (get_ipa_tdesc): Move idx2mask out.
223 (initialize_low_tracepoint): Initialize target descriptions.
224 * linux-i386-ipa.c (idx2mask): New array.
225 (get_ipa_tdesc): Move idx2mask out.
226 (initialize_low_tracepoint): Initialize target descriptions.
227
228 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * tdesc.c (struct tdesc_type): Change return type.
231 (tdesc_add_flag): Change parameter type.
232 (tdesc_add_bitfield): Likewise.
233 (tdesc_add_field): Likewise.
234 (tdesc_set_struct_size): Likewise.
235
236 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
237
238 * regcache.c (registers_to_string): Remove unused variable.
239
240 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
241
242 * inferiors.c (for_each_inferior_with_data): Remove.
243 * inferiors.h (for_each_inferior_with_data): Remove.
244 * server.c (handle_qxfer_threads_worker): Change parameter type.
245 (handle_qxfer_threads_proper): Use for_each_thread.
246
247 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
248
249 * inferiors.c (for_each_inferior): Remove.
250 (clear_inferiors): Use for_each_thread.
251 * inferiors.h (for_each_inferior): Remove.
252 * linux-low.c (linux_wait_for_event_filtered): Use
253 for_each_thread.
254 (linux_stabilize_threads): Likewise.
255 * regcache.c (regcache_release): Likewise.
256 * server.c (gdb_wants_all_threads_stopped): Likewise.
257 (clear_pending_status_callback): Remove.
258 (handle_status): Use for_each_thread.
259 (captured_main): Likewise.
260 * win32-low.c (child_init_thread_list): Likewise.
261 (win32_clear_inferiors): Likewise.
262 (fake_breakpoint_event): Likewise.
263
264 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
265
266 * inferiors.h (find_inferior): Remove.
267 * inferiors.c (find_inferior): Remove.
268
269 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
270
271 * linux-low.c (resume_status_pending_p): Update comment.
272 (need_step_over_p): Update comment.
273
274 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
275
276 * linux-low.c (proceed_one_lwp): Return void, change parameter
277 type.
278 (unsuspend_and_proceed_one_lwp): Likewise.
279 (proceed_all_lwps): Use for_each_thread.
280 (unstop_all_lwps): Likewise.
281
282 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
283
284 * linux-low.c (linux_resume_one_thread): Return void, take
285 parameter directly.
286 (linux_resume): Use for_each_thread.
287
288 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
289
290 * linux-low.c (send_sigstop_callback): Return void, change
291 parameter type. Rename to...
292 (send_sigstop): ... this.
293 (suspend_and_send_sigstop_callback): Return void, change parameter
294 type. Rename to...
295 (suspend_and_send_sigstop): ... this.
296 (stop_all_lwps): Use for_each_thread.
297
298 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
299
300 * linux-low.c (lwp_running): Return bool, remove unused
301 argument.
302 (linux_stabilize_threads): Use find_thread.
303
304 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
305
306 * linux-low.c (select_singlestep_lwp_callback): Remove.
307 (count_events_callback): Remove.
308 (select_event_lwp_callback): Remove.
309 (select_event_lwp): Use find_thread/for_each_thread.
310
311 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
312
313 * linux-low.c (not_stopped_callback): Return bool, take filter
314 argument directly.
315 (linux_wait_for_event_filtered): Use find_thread.
316 (linux_wait_1): Likewise.
317
318 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
319
320 * linux-low.c (same_lwp): Remove.
321 (find_lwp_pid): Use find_thread.
322
323 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
324
325 * linux-low.c (delete_lwp_callback): Remove.
326 (linux_mourn): Use for_each_thread.
327
328 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
329
330 * linux-low.c (linux_detach_lwp_callback): Return void, remove
331 args parameter, don't check for pid.
332 (linux_detach): Use for_each_thread.
333
334 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
335
336 * linux-low.c (struct counter): Remove.
337 (second_thread_of_pid_p): Remove.
338 (last_thread_of_process_p): Use find_thread.
339
340 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
341
342 * inferiors.c (find_inferior_in_random): Remove.
343 * inferiors.h (find_inferior_in_random): Remove.
344 * linux-low.c (status_pending_p_callback): Return bool, accept
345 parameter ptid directly.
346 (linux_wait_for_event_filtered): Use find_thread_in_random.
347 (linux_wait_1): Likewise.
348
349 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
350
351 * inferiors.c (find_inferior_id): Remove.
352 (find_thread_ptid): Move implemention from find_inferior_id to
353 here.
354 * inferiors.h (find_inferior_id): Remove.
355 * server.c (handle_status): Use find_thread_ptid.
356 (process_serial_event): Likewise.
357 * thread-db.c (find_one_thread): Likewise.
358 (thread_db_thread_handle): Likewise.
359 * win32-low.c (thread_rec): Likewise.
360 (child_delete_thread): Likewise.
361 (win32_thread_alive): Likewise.
362 (get_child_debug_event): Likewise.
363
364 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
365
366 * linux-mips-low.c (update_watch_registers_callback): Return
367 void, remove pid_p parameter, don't check for pid.
368 (mips_insert_point, mips_remove_point): Use for_each_thread.
369
370 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
371
372 * lynx.low (lynx_delete_thread_callback): Remove.
373 (lynx_mourn): Use for_each_thread.
374
375 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
376
377 * regcache.c (regcache_invalidate_one): Remove.
378 (regcache_invalidate_pid): use for_each_thread.
379
380 2017-11-26 Tom Tromey <tom@tromey.com>
381
382 * linux-low.c (linux_create_inferior): Update.
383
384 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
385
386 * spu-low.c (spu_create_inferior): Fix typo in argument name.
387
388 2017-11-24 Alan Hayward <alan.hayward@arm.com>
389
390 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
391 * linux-aarch64-low.c (initialize_low_arch): Call init func.
392 * linux-aarch64-tdesc-selftest.c: New file.
393 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
394
395 2017-11-24 Alan Hayward <alan.hayward@arm.com>
396
397 * configure.srv: Add new file.
398 * linux-aarch64-low.c (initialize_low_arch): Call init func.
399 * linux-aarch64-tdesc-selftest.c: New file.
400 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
401
402 2017-11-24 Alan Hayward <alan.hayward@arm.com>
403
404 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
405 * linux-aarch64-low.c (initialize_low_arch): Remove init.
406 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
407
408 2017-11-24 Alan Hayward <alan.hayward@arm.com>
409
410 * configure.srv: Add new files.
411 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
412 aarch64_linux_read_description.
413 * linux-aarch64-low.c (aarch64_linux_read_description):
414 Merge with aarch64_arch_setup.
415 (aarch64_arch_setup): Call aarch64_linux_read_description.
416 * linux-aarch64-tdesc.c: New file.
417 * linux-aarch64-tdesc.h: New file.
418
419 2017-11-24 Yao Qi <yao.qi@linaro.org>
420
421 * configure.srv: Set $srv_regobj for tic6x-linux.
422 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
423 (tic6x_read_description): Move some code to tic6x_arch_setup.
424 (tic6x_tdesc_test): New function.
425 (initialize_low_arch): Call selftests::register_test.
426
427 2017-11-22 Yao Qi <yao.qi@linaro.org>
428
429 * remote-utils.c (prepare_resume_reply): Use memcpy.
430
431 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
432
433 * linux-low.c (kill_one_lwp_callback): Return void, take
434 argument directly, don't filter on pid.
435 (linux_kill): Use for_each_thread.
436
437 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
438
439 * linux-low.c (need_step_over_p): Return bool, remove dummy
440 argument.
441 (linux_resume, proceed_all_lwps): Use find_thread.
442
443 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
444
445 * linux-low.c (resume_status_pending_p): Return bool, remove
446 flag_p argument.
447 (linux_resume): Use find_thread.
448
449 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
450
451 * linux-low.c (struct thread_resume_array): Remove.
452 (linux_set_resume_request): Return void, take arguments
453 directly.
454 (linux_resume): Use for_each_thread.
455
456 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
457
458 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
459 return bool, remove data argument.
460 (linux_stabilize_threads): Use find_thread.
461
462 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
463
464 * linux-low.c (unsuspend_one_lwp): Remove.
465 (unsuspend_all_lwps): Use for_each_thread, inline code from
466 unsuspend_one_lwp.
467
468 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
469
470 * gdbthread.h (find_thread): Add overload with ptid_t filter.
471 * linux-low.c (struct iterate_over_lwps_args): Remove.
472 (iterate_over_lwps_filter): Remove.
473 (iterate_over_lwps): Use find_thread.
474
475 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
476
477 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
478 (linux_handle_new_gdb_connection): Use for_each_thread, inline
479 code from reset_lwp_ptrace_options_callback.
480
481 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
482
483 * linux-arm-low.c (struct update_registers_data): Remove.
484 (update_registers_callback): Return void, take arguments
485 directly, don't check thread's pid.
486 (arm_insert_point, arm_remove_point): Use for_each_thread.
487
488 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
489
490 * win32-low.c (continue_one_thread): Return void, take argument
491 directly.
492 (child_continue): Use for_each_thread.
493
494 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
495
496 * win32-i386-low.c (update_debug_registers_callback): Rename
497 to ...
498 (update_debug_registers): ... this, return void, remove pid_p arg.
499 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
500
501 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
502
503 * inferiors.h (struct process_info): Add constructor, initialize
504 fields..
505 <syscalls_to_catch>: Change type to std::vector<int>.
506 * inferiors.c (add_process): Allocate process_info with new.
507 (remove_process): Free process_info with delete.
508 * linux-low.c (handle_extended_wait): Adjust.
509 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
510 * server.c (handle_general_set): Adjust.
511
512 2017-11-16 Pedro Alves <palves@redhat.com>
513
514 * remote-utils.c (remote_close): Block SIGIO signals instead of
515 uninstalling the SIGIO handler.
516
517 2017-11-16 Alan Hayward <alan.hayward@arm.com>
518
519 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
520
521 2017-11-16 Yao Qi <yao.qi@linaro.org>
522
523 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
524 (tic6x_store_gregset): Likewise.
525 (tic6x_usrregs_info): Move it up.
526
527 2017-11-15 Alan Hayward <alan.hayward@arm.com>
528
529 * Makefile.in: Update arch rules.
530 * configure.srv: Explicitly mark arch/ files.
531
532 2017-11-13 Andreas Schwab <schwab@suse.de>
533
534 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
535 function.
536 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
537
538 2017-11-06 Pedro Alves <palves@redhat.com>
539
540 * config.in, configure: Regenerate.
541
542 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
543
544 * target.c (struct thread_search): Remove.
545 (thread_search_callback): Remove.
546 (prepare_to_access_memory): Use for_each_thread instead of
547 find_inferior. Inline code from thread_search_callback.
548
549 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
550
551 * server.c (struct visit_actioned_threads_data): Remove.
552 (visit_actioned_threads): Change prototype to take arguments
553 directly.
554 (resume): Use find_thread instead of find_inferior.
555
556 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
557
558 * server.c (queue_stop_reply_callback): Change prototype, return
559 void.
560 (find_status_pending_thread_callback): Remove.
561 (handle_status): Replace find_inferior with find_thread and
562 for_each_thread.
563
564 2017-10-25 Alan Hayward <alan.hayward@arm.com>
565
566 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
567 with REGNO.
568 (aarch64_store_gregset): Likewise.
569 (aarch64_fill_fpregset): Likewise.
570 (aarch64_store_fpregset): Likewise.
571
572 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
573
574 * gdbthread.h (find_thread, for_each_thread): New functions.
575 * inferiors.c (thread_of_pid): Remove.
576 (find_any_thread_of_pid): Use find_thread.
577 * linux-low.c (num_lwps): Use for_each_thread.
578
579 2017-10-17 Yao Qi <yao.qi@linaro.org>
580
581 * Makefile.in: Remove one rule.
582 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
583
584 2017-10-17 Yao Qi <yao.qi@linaro.org>
585
586 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
587 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
588
589 2017-10-17 Yao Qi <yao.qi@linaro.org>
590
591 * configure.srv: Rename arm.o with arch/arm.o.
592
593 2017-10-17 Yao Qi <yao.qi@linaro.org>
594
595 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
596 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
597 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
598 (arch-i386.o, arch-amd64.o): Remove rules.
599 (arch/%.o): New rule.
600 Update POSTCOMPILE and COMPILE.pre.
601 * configure.ac: Invoke AC_CONFIG_COMMANDS.
602 * configure: Re-generated.
603 * configure.srv: Replace arch-i386.o with arch/i386.o.
604 Replace arch-amd64.o with arch/amd64.o.
605
606 2017-10-16 Yao Qi <yao.qi@linaro.org>
607
608 * configure: Regenerated.
609
610 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
611
612 * inferiors.h: (struct inferior_list): Remove.
613 (struct inferior_list_entry); Remove.
614 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
615 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
616 get_first_inferior): Remove.
617 (for_each_inferior, for_each_inferior_with_data, find_inferior,
618 find_inferior_id, find_inferior_in_random): Change signature.
619 * inferiors.c (all_threads): Change type to
620 std::list<thread_info *>.
621 (get_thread): Remove macro.
622 (find_inferior, find_inferior_id): Change signature, implement
623 using find_thread.
624 (find_inferior_in_random): Change signature, implement using
625 find_thread_in_random.
626 (for_each_inferior, for_each_inferior_with_data): Change
627 signature, implement using for_each_thread.
628 (add_inferior_to_list, remove_inferior): Remove.
629 (add_thread, get_first_thread, thread_of_pid,
630 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
631 (get_first_inferior, one_inferior_p, clear_inferior_list):
632 Remove.
633 (clear_inferiors, get_thread_process): Update.
634 * gdbthread.h: Include <list>.
635 (struct thread_info) <entry>: Remove field.
636 <id>: New field.
637 (all_threads): Change type to std::list<thread_info *>.
638 (get_first_inferior): Add doc.
639 (find_thread, for_each_thread, find_thread_in_random): New
640 functions.
641 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
642 * linux-arm-low.c (update_registers_callback): Update.
643 * linux-low.c (second_thread_of_pid_p): Update.
644 (kill_one_lwp_callback, linux_detach_lwp_callback,
645 delete_lwp_callback, status_pending_p_callback, same_lwp,
646 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
647 iterate_over_lwps, not_stopped_callback,
648 resume_stopped_resumed_lwps, count_events_callback,
649 select_singlestep_lwp_callback, select_event_lwp_callback,
650 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
651 suspend_and_send_sigstop_callback, wait_for_sigstop,
652 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
653 lwp_running, linux_set_resume_request, resume_status_pending_p,
654 need_step_over_p, start_step_over, linux_resume_one_thread,
655 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
656 reset_lwp_ptrace_options_callback): Update.
657 * linux-mips-low.c (update_watch_registers_callback): Update.
658 * regcache.c (regcache_invalidate_one, regcache_invalidate):
659 Update.
660 (free_register_cache_thread_one): Remove.
661 (regcache_release): Update.
662 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
663 handle_qxfer_threads_worker): Update.
664 (handle_query): Update, use list iterator.
665 (visit_actioned_threads, handle_pending_status,
666 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
667 clear_pending_status_callback, set_pending_status_callback,
668 find_status_pending_thread_callback, handle_status,
669 process_serial_event): Update.
670 * target.c (thread_search_callback): Update.
671 * thread-db.c (thread_db_get_tls_address): Update.
672 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
673 Update.
674 * win32-i386-low.c (update_debug_registers_callback): Update.
675 * win32-low.c (delete_thread_info, child_delete_thread,
676 continue_one_thread, suspend_one_thread,
677 get_child_debug_event): Adjust.
678
679 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
682 * inferiors.h: Include <list>.
683 (struct process_info) <entry>: Remove field.
684 <pid>: New field.
685 (pid_of): Change macro to function.
686 (ptid_of, lwpid_of): Remove macro.
687 (all_processes): Change type to std::list<process_info *>.
688 (ALL_PROCESSES): Remove macro.
689 (for_each_process, find_process): New function.
690 * inferiors.c (all_processes): Change type to
691 std::list<process_info *>.
692 (find_thread_process): Adjust.
693 (add_process): Likewise.
694 (remove_process): Likewise.
695 (find_process_pid): Likewise.
696 (get_first_process): Likewise.
697 (started_inferior_callback): Remove.
698 (have_started_inferiors_p): Adjust.
699 (attached_inferior_callback): Remove.
700 (have_attached_inferiors_p): Adjust.
701 * linux-low.c (check_zombie_leaders): Likewise.
702 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
703 (x86_linux_update_xmltarget): Adjust.
704 * server.c (handle_query): Likewise.
705 (gdb_reattached_process): Remove.
706 (handle_status): Adjust.
707 (kill_inferior_callback): Likewise.
708 (detach_or_kill_inferior): Remove.
709 (print_started_pid): Likewise.
710 (print_attached_pid): Likewise.
711 (detach_or_kill_for_exit): Update.
712 (process_serial_event): Likewise.
713 * linux-arm-low.c (arm_new_fork): Likewise.
714
715 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
716
717 * dll.h: Include <list>.
718 (struct dll_info): Add constructor.
719 <entry>: Remove field.
720 (all_dlls): Change type to std::list<dll_info>.
721 * dll.c: Include <algorithm>.
722 (get_dll): Remove macro.
723 (all_dlls): Change type to std::list<dll_info *>.
724 (free_one_dll): Remove.
725 (match_dll): Likewise.
726 (loaded_dll): Adjust.
727 (unloaded_dll): Adjust to all_dlls type change, use
728 std::find_if. Inline code from match_dll.
729 (clear_dlls): Adjust to all_dlls type change.
730 * server.c (emit_dll_description): Remove.
731 (handle_qxfer_libraries): Adjust to all_dlls type change,
732 integrate emit_dll_description's functionality.
733
734 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
735
736 * linux-low.h (struct linux_target_ops) <delete_process>: New
737 field.
738 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
739 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
740 (struct linux_target_ops): Add delete_process callback.
741 * linux-arm-low.c (arm_delete_process): New.
742 (struct linux_target_ops): Add delete_process callback.
743 * linux-bfin-low.c (struct linux_target_ops): Likewise.
744 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
745 * linux-m32r-low.c (struct linux_target_ops): Likewise.
746 * linux-mips-low.c (mips_linux_delete_process): New.
747 (struct linux_target_ops): Add delete_process callback.
748 * linux-ppc-low.c (struct linux_target_ops): Likewise.
749 * linux-s390-low.c (struct linux_target_ops): Likewise.
750 * linux-sh-low.c (struct linux_target_ops): Likewise.
751 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
752 * linux-tile-low.c (struct linux_target_ops): Likewise.
753 * linux-x86-low.c (x86_linux_delete_process): New.
754 (struct linux_target_ops): Add delete_process callback.
755 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
756
757 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
758
759 * linux-aarch64-low.c (the_low_target): Add thread delete
760 callback.
761 * linux-arm-low.c (arm_delete_thread): New function.
762 (the_low_target): Add thread delete callback.
763 * linux-bfin-low.c (the_low_target): Likewise.
764 * linux-crisv32-low.c (the_low_target): Likewise.
765 * linux-low.c (delete_lwp): Invoke delete_thread callback if
766 set.
767 * linux-low.h (struct linux_target_ops) <delete_thread>: New
768 field.
769 * linux-m32r-low.c (the_low_target): Add thread delete callback.
770 * linux-mips-low.c (mips_linux_delete_thread): New function.
771 (the_low_target): Add thread delete callback.
772 * linux-ppc-low.c (the_low_target): Likewise.
773 * linux-s390-low.c (the_low_target): Likewise.
774 * linux-sh-low.c (the_low_target): Likewise.
775 * linux-tic6x-low.c (the_low_target): Likewise.
776 * linux-tile-low.c (the_low_target): Likewise.
777 * linux-x86-low.c (the_low_target): Likewise.
778 * linux-xtensa-low.c (the_low_target): Likewise.
779
780 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
781
782 * win32-low.c: Include "common-inferior.h".
783
784 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
785
786 * inferiors.c (set_inferior_cwd): New function.
787 * server.c (handle_general_set): Handle QSetWorkingDir packet.
788 (handle_query): Inform that QSetWorkingDir is supported.
789 * win32-low.c (create_process): Pass the inferior's cwd to
790 CreateProcess.
791
792 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
793
794 * inferiors.c (current_inferior_cwd): New global variable.
795 (get_inferior_cwd): New function.
796 * inferiors.h (struct process_info) <cwd>: New field.
797
798 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
799
800 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
801 (OBS): Add gdb_tilde_expand.o.
802
803 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
804
805 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
806 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
807
808 2017-09-29 Pedro Alves <palves@redhat.com>
809
810 * ax.c (gdb_parse_agent_expr): Constify.
811 * ax.h (gdb_parse_agent_expr): Constify.
812 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
813 Constify.
814 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
815 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
816 * remote-utils.h (read_ptid): Constify.
817 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
818 (process_point_options, process_serial_event): Constify.
819 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
820 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
821 (cmd_qtbuffer): Constify.
822
823 2017-09-29 Pedro Alves <palves@redhat.com>
824
825 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
826 fails.
827
828 2017-09-29 Pedro Alves <palves@redhat.com>
829
830 * linux-low.c (handle_extended_wait): Pass parent thread instead
831 of process to thread_db_notice_clone.
832 * linux-low.h (thread_db_notice_clone): Replace parent process
833 parameter with parent thread parameter.
834 * thread-db.c (find_one_thread): Add comment.
835 (thread_db_notice_clone): Replace parent process parameter with
836 parent thread parameter. Temporarily switch to the parent thread.
837
838 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
839
840 * gdbthread.h: Include "common-gdbthread.h".
841 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
842 "if" when validating the ptid.
843 * remote-utils.c: Include "gdbthread.h".
844 (prepare_resume_reply): Use "switch_to_thread".
845 * target.c (done_accessing_memory): Likewise.
846
847 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
848
849 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
850 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
851 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
852 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
853 s390x-gs-linux64-ipa.o to ipa_obj.
854 * linux-s390-low.c (HWCAP_S390_GS): New define.
855 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
856 New functions.
857 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
858 (s390_arch_setup): Check for guarded-storage support and choose
859 appropriate tdesc.
860 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
861 init_registers_s390x_gs_linux64.
862 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
863 enum value.
864 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
865 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
866
867 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
868
869 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
870
871 2017-09-21 Kevin Buettner <kevinb@redhat.com>
872
873 * linux-low.h (struct lwp_info): Add new field, thread_handle.
874 (thread_db_thread_handle): Declare.
875 * linux-low.c (linux_target_ops): Initialize thread_handle.
876 * server.c (handle_qxfer_threads_worker): Add support for
877 "handle" attribute.
878 * target.h (struct target_ops): Add new function pointer,
879 thread_handle.
880 (target_thread_handle): Define.
881 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
882 field in lwp.
883 (thread_db_thread_handle): New function.
884
885 2017-09-21 Kevin Buettner <kevinb@redhat.com>
886
887 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
888 * linux-low.h (thread_db_notice_clone): Declare.
889 * thread-db.c (thread_db_notice_clone): New function.
890
891 2017-09-21 Pedro Alves <palves@redhat.com>
892
893 * server.c (gdb_read_memory, handle_status, process_serial_event)
894 (handle_serial_event, handle_target_event): Adjust to
895 set_desired_thread prototype change.
896 * target.c (set_desired_thread): Remove 'use_general' parameter
897 and adjust.
898 * target.h (set_desired_thread): Remove 'use_general' parameter.
899
900 2017-09-20 Tom Tromey <tom@tromey.com>
901
902 * target.c (target_terminal::terminal_state): Define.
903 (target_terminal::init): Rename from target_terminal_init.
904 (target_terminal::inferior): Rename from
905 target_terminal_inferior.
906 (target_terminal::ours): Rename from target_terminal_ours.
907 (target_terminal::ours_for_output, target_terminal::info): New.
908
909 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
910
911 * server.c (accumulate_file_name_length): Remove.
912 (emit_dll_description): Adjust to std::string change.
913 (handle_qxfer_libraries): Use std::string to hold document.
914
915 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
916
917 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
918 return type of xml_escape_text.
919 * server.c (emit_dll_description): Likewise.
920
921 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
922
923 * server.c (captured_main): Accept argument for --selftest.
924 Update run_tests call.
925 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
926 when registering selftests.
927
928 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
929
930 * regcache.c (get_thread_regcache): Update code to use "std::vector"
931 instead of "VEC" for "target_desc.reg_defs".
932 (regcache_cpy): Likewise.
933 (registers_to_string): Likewise.
934 (registers_from_string): Likewise.
935 (find_regno): Likewise.
936 (supply_regblock): Likewise.
937 (regcache_raw_read_unsigned): Likewise.
938 * tdesc.c (init_target_desc): Likewise.
939 (tdesc_create_reg): Likewise.
940 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
941 (struct target_desc) <reg_defs>: Convert to "std::vector".
942 (target_desc): Do not initialize "reg_defs".
943 (~target_desc): Update code to use "std::vector" instead of "VEC"
944 for "target_desc.reg_defs".
945 (operator==): Likewise.
946
947 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
948
949 * inferiors.h (thread_to_gdb_id): Remove.
950 * inferiors.c (thread_to_gdb_id): Remove.
951 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
952 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
953 lynx_store_registers, lynx_read_memory, lynx_write_memory):
954 Likewise.
955 * nto-low.c (nto_fetch_registers, nto_store_registers,
956 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
957
958 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
959
960 * inferiors.h (gdb_id_to_thread_id): Remove.
961 * inferiors.c (gdb_id_to_thread_id): Remove.
962 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
963 removal. Move pid declaration closer to where it's used.
964
965 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
966
967 * server.c (handle_detach): New function.
968 (process_serial_event): Move code out, call handle_detach.
969
970 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
971
972 * server.c (require_running): Rename to ...
973 (require_running_or_return): ... this ...
974 (require_running_or_break): ... and this.
975 (handle_query, process_serial_event): Adjust.
976
977 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
978
979 * linux-low.c (linux_set_resume_request): Remove unused
980 variables.
981
982 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
983
984 * server.c (first_thread_of): Remove.
985 (process_serial_event): Replace usage of first_thread_of with
986 find_any_thread_of_pid.
987 * tracepoint.c (same_process_p): Remove.
988 (gdb_agent_about_to_close): Replace usage of same_process_p with
989 find_any_thread_of_pid.
990 * linux-x86-low.c (same_process_callback): Remove.
991 (x86_arch_setup_process_callback): Replace usage of
992 same_process_callback with find_any_thread_of_pid.
993 * thread-db.c (any_thread_of): Remove.
994 (switch_to_process): Replace usage of any_thread_of with
995 find_any_thread_of_pid.
996 * inferiors.c (thread_pid_matches_callback): Remove.
997 (find_thread_process): Adjust to use find_any_thread_of_pid.
998
999 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1000
1001 * regcache.c (get_thread_regcache): Guard calls to "memset"
1002 with "!VEC_empty".
1003
1004 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1005
1006 * linux-low.c (handle_extended_wait): Use
1007 "allocate_target_description" instead of "XNEW".
1008 * linux-x86-low.c (initialize_low_arch): Likewise.
1009
1010 2017-09-05 Yao Qi <yao.qi@linaro.org>
1011
1012 * configure.srv (srv_i386_regobj): Remove.
1013 (srv_amd64_regobj): Remove.
1014 (srv_regobj): Set it to "" for x86 non-linux targets.
1015 * linux-x86-tdesc.c (i386_linux_read_description):
1016 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1017 (init_registers_i386): Remove the declaration.
1018 (tdesc_i386): Remove the declaration.
1019 (lynx_i386_arch_setup): Call i386_create_target_description.
1020 * nto-x86-low.c: Likewise.
1021 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1022 [!__x86_64__]: include arch/i386.h.
1023 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1024
1025 2017-09-05 Yao Qi <yao.qi@linaro.org>
1026
1027 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1028 i386/amd64-XXX-linux from it.
1029
1030 2017-09-05 Yao Qi <yao.qi@linaro.org>
1031
1032 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1033 false.
1034 (ipa_amd64_linux_regobj): Remove.
1035 (ipa_x32_linux_regobj): Remove.
1036
1037 2017-09-05 Yao Qi <yao.qi@linaro.org>
1038
1039 * Makefile.in (arch-amd64.o): New rule.
1040 * configure.srv: Append arch-amd64.o.
1041 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1042 (get_ipa_tdesc): Call amd64_linux_read_description.
1043 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1044 and init_registers_amd64_XXX.
1045 * linux-x86-low.c (x86_linux_read_description): Call
1046 amd64_linux_read_description.
1047 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1048 (initialize_low_arch): Don't call init_registers_x32_XXX and
1049 init_registers_amd64_XXX.
1050 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1051 and tdesc_amd64_XXX.
1052 [__x86_64__] (amd64_tdesc_test): New function.
1053 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1054 and init_registers_amd64_XXX.
1055 * linux-x86-tdesc.c: Include arch/amd64.h.
1056 (xcr0_to_tdesc_idx): New function.
1057 (i386_linux_read_description): New function.
1058 (amd64_get_ipa_tdesc_idx): New function.
1059 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1060 (amd64_get_ipa_tdesc): Declare.
1061
1062 2017-09-05 Yao Qi <yao.qi@linaro.org>
1063
1064 * configure.srv (srv_i386_linux_xmlfiles): Remove
1065 i386/i386-XXX-linux.xml from it.
1066
1067 2017-09-05 Yao Qi <yao.qi@linaro.org>
1068
1069 * configure.srv: Set srv_i386_linux_regobj empty if $development
1070 is false.
1071 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1072 initialize_low_tdesc.
1073 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1074 with #if initialize_low_tdesc.
1075 * linux-x86-tdesc-selftest.c: New file.
1076 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1077
1078 2017-09-05 Yao Qi <yao.qi@linaro.org>
1079
1080 * Makefile.in (arch-i386.o): New rule.
1081 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1082 (x86_64-*-linux*): Likewise.
1083 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1084 include arch/i386.h.
1085 (i386_linux_read_description): Remove code and call
1086 i386_create_target_description.
1087 * tdesc.c (allocate_target_description): New function.
1088 * tdesc.h (set_tdesc_architecture): Remove declaration.
1089 (set_tdesc_osabi): Likewise.
1090
1091 2017-09-05 Yao Qi <yao.qi@linaro.org>
1092
1093 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1094 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1095 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1096 .xmltarget.
1097 * server.c (get_features_xml): Call tdesc_get_features_xml.
1098 * tdesc.c (set_tdesc_architecture): New function.
1099 (set_tdesc_osabi): New function.
1100 (tdesc_get_features_xml): New function.
1101 (tdesc_create_feature): Add an argument.
1102 * tdesc.h (struct target_desc) <features>: New field.
1103 <arch, osabi>: New field.
1104 (~target_desc): xfree features, arch, and osabi.
1105 (target_desc::oerator==): Don't compare .xmltarget.
1106 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1107 (set_tdesc_osabi): Likewise.
1108 (tdesc_get_features_xml): Likewise.
1109
1110 2017-09-05 Yao Qi <yao.qi@linaro.org>
1111
1112 * linux-x86-tdesc.c: Include selftest.h.
1113 (i386_tdesc_test): New function.
1114 (initialize_low_tdesc): Call selftests::register_test.
1115 * tdesc.h: Include regdef.h.
1116 (target_desc): Override operator == and !=.
1117
1118 2017-09-05 Yao Qi <yao.qi@linaro.org>
1119
1120 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1121 (ipa_obj): Likewise.
1122 * linux-i386-ipa.c: Include common/x86-xstate.h
1123 (get_ipa_tdesc): Call i386_linux_read_description.
1124 (initialize_low_tracepoint): Don't call init_registers_XXX
1125 functions, call initialize_low_tdesc instead.
1126 * linux-x86-low.c (x86_linux_read_description): Call
1127 i386_linux_read_description.
1128 (initialize_low_arch): Don't call init_registers_i386_XXX
1129 functions, call initialize_low_tdesc.
1130 * linux-x86-tdesc.c: New file.
1131 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1132 (i386_get_ipa_tdesc_idx): Declare.
1133 (i386_get_ipa_tdesc): Declare.
1134 (initialize_low_tdesc): Declare.
1135
1136 2017-09-05 Yao Qi <yao.qi@linaro.org>
1137
1138 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1139 instead of 0.
1140
1141 2017-09-05 Yao Qi <yao.qi@linaro.org>
1142
1143 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1144 * regcache.c (get_thread_regcache): Use VEC_length.
1145 (init_register_cache): Likewise.
1146 (regcache_cpy): Likewise.
1147 (registers_to_string): Iterate reg_defs via VEC_iterate.
1148 (find_regno): Likewise.
1149 (find_register_by_number): Use VEC_index.
1150 (register_size): Call find_register_by_number.
1151 (register_data): Call find_register_by_number.
1152 (supply_regblock): Use VEC_length.
1153 (regcache_raw_read_unsigned): Likewise.
1154 * tdesc.c (init_target_desc): Iterate reg_defs via
1155 VEC_iterate.
1156 (default_description): Update initializer.
1157 (copy_target_description): Don't update field num_registers.
1158 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1159 <num_registers>: Remove.
1160
1161 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1162
1163 * Makefile.in (.SECONDARY): Define target.
1164
1165 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1166
1167 * linux-low.c (linux_wait_1): Adjust.
1168 * server.c (queue_stop_reply_callback): Adjust.
1169
1170 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1171
1172 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1173 QEnvironmentUnset and QEnvironmentReset packets.
1174 (handle_query): Inform remote that QEnvironmentHexEncoded,
1175 QEnvironmentUnset and QEnvironmentReset are supported.
1176
1177 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1178
1179 * inferiors.h (inferior_target_data): Rename to ...
1180 (thread_target_data): ... this.
1181 (inferior_regcache_data): Rename to ...
1182 (thread_regcache_data): ... this.
1183 (set_inferior_regcache_data): Rename to ...
1184 (set_thread_regcache_data): ... this.
1185 * inferiors.c (inferior_target_data): Rename to ...
1186 (thread_target_data): ... this.
1187 (inferior_regcache_data): Rename to ...
1188 (thread_regcache_data): ... this.
1189 (set_inferior_regcache_data): Rename to ...
1190 (set_thread_regcache_data): ... this.
1191 (free_one_thread): Update.
1192 * linux-low.h (get_thread_lwp): Update.
1193 * regcache.c (get_thread_regcache): Update.
1194 (regcache_invalidate_thread): Update.
1195 (free_register_cache_thread): Update.
1196 * win32-i386-low.c (update_debug_registers_callback): Update.
1197 (win32_get_current_dr): Update.
1198 * win32-low.c (thread_rec): Update.
1199 (delete_thread_info): Update.
1200 (continue_one_thread): Update.
1201 (suspend_one_thread): Update.
1202
1203 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1204
1205 * inferiors.c (set_inferior_target_data): Remove.
1206 * inferiors.h (set_inferior_target_data): Remove.
1207
1208 2017-08-18 Yao Qi <yao.qi@linaro.org>
1209
1210 * Makefile.in (OBS): Add selftest.o.
1211 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1212 * configure, config.in: Re-generated.
1213 * server.c: Include common/sefltest.h.
1214 (captured_main): Handle option --selftest.
1215
1216 2017-08-09 Yao Qi <yao.qi@linaro.org>
1217
1218 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1219 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1220 i386-avx-mpx.o and i386-mmx.o.
1221 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1222 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1223 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1224 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1225 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1226 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1227 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1228 i386/amd64-avx-mpx.xml.
1229
1230 2017-08-09 Yao Qi <yao.qi@linaro.org>
1231
1232 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1233 and x32-avx-avx512.o.
1234 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1235 i386/x32-avx-avx512.xml.
1236
1237 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1238
1239 * tracepoint.h (enum class fast_tpoint_collect_result): New
1240 enumeration.
1241 (fast_tracepoint_collecting): Change return type to
1242 fast_tpoint_collect_result.
1243 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1244 * linux-low.h: Include tracepoint.h.
1245 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1246 fast_tpoint_collect_result.
1247 * linux-low.c (handle_tracepoints): Adjust.
1248 (linux_fast_tracepoint_collecting): Change return type to
1249 fast_tpoint_collect_result.
1250 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1251 linux_wait_1, stuck_in_jump_pad_callback,
1252 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1253 proceed_one_lwp): Adjust to type change.
1254
1255 2017-07-10 Yao Qi <yao.qi@linaro.org>
1256
1257 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1258
1259 2017-06-29 Yao Qi <yao.qi@linaro.org>
1260
1261 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1262 Remove.
1263 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1264
1265 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1266
1267 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1268
1269 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1270
1271 * linux-low.c (linux_create_inferior): Adjust code to access the
1272 environment information via 'gdb_environ' class.
1273 * lynx-low.c (lynx_create_inferior): Likewise.
1274 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1275 (get_environ): Return a pointer to 'our_environ'.
1276 (captured_main): Initialize 'our_environ'.
1277 * server.h (get_environ): Adjust prototype.
1278 * spu-low.c (spu_create_inferior): Adjust code to access the
1279 environment information via 'gdb_environ' class.
1280
1281 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1282
1283 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1284 usage of "register" keyword.
1285
1286 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1287
1288 * configure: Re-generate.
1289
1290 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1291
1292 * configure: Re-generate.
1293
1294 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * Makefile.in (COMPILE.pre): Add "-x c++".
1297
1298 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1299
1300 * fork-child.c: Conditionally include <signal.h>.
1301
1302 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1303
1304 * server.c (handle_general_set): Handle new packet
1305 "QStartupWithShell".
1306 (handle_query): Add "QStartupWithShell" to the list of supported
1307 packets.
1308 (gdbserver_usage): Add help text explaining the
1309 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1310 options.
1311 (captured_main): Recognize and act upon the presence of the new
1312 CLI options.
1313
1314 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1315 Pedro Alves <palves@redhat.com>
1316
1317 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1318 * configure: Regenerate.
1319 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1320 "fork-inferior.o".
1321 (i[34567]86-*-lynxos*): Likewise.
1322 (spu*-*-*): Likewise.
1323 * fork-child.c: New file.
1324 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1325 and "environ.h".
1326 (linux_ptrace_fun): New function.
1327 (linux_create_inferior): Adjust function prototype to reflect
1328 change on "target.h". Adjust function code to use
1329 "fork_inferior".
1330 (linux_request_interrupt): Delete "signal_pid".
1331 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1332 (lynx_ptrace_fun): New function.
1333 (lynx_create_inferior): Adjust function prototype to reflect
1334 change on "target.h". Adjust function code to use
1335 "fork_inferior".
1336 * nto-low.c (nto_create_inferior): Adjust function prototype and
1337 code to reflect change on "target.h". Update comments.
1338 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1339 "common-terminal.h" and "environ.h".
1340 (terminal_fd): Moved to fork-child.c.
1341 (old_foreground_pgrp): Likewise.
1342 (restore_old_foreground_pgrp): Likewise.
1343 (last_status): Make it global.
1344 (last_ptid): Likewise.
1345 (our_environ): New variable.
1346 (startup_with_shell): Likewise.
1347 (program_name): Likewise.
1348 (program_argv): Rename to...
1349 (program_args): ...this.
1350 (wrapper_argv): New variable.
1351 (start_inferior): Delete function.
1352 (get_exec_wrapper): New function.
1353 (get_exec_file): Likewise.
1354 (get_environ): Likewise.
1355 (prefork_hook): Likewise.
1356 (post_fork_inferior): Likewise.
1357 (postfork_hook): Likewise.
1358 (postfork_child_hook): Likewise.
1359 (handle_v_run): Update code to deal with arguments coming from the
1360 remote host. Update calls from "start_inferior" to
1361 "create_inferior".
1362 (captured_main): Likewise. Initialize environment variable. Call
1363 "have_job_control".
1364 * server.h (post_fork_inferior): New prototype.
1365 (get_environ): Likewise.
1366 (last_status): Declare.
1367 (last_ptid): Likewise.
1368 (signal_pid): Likewise.
1369 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1370 (spu_ptrace_fun): New function.
1371 (spu_create_inferior): Adjust function prototype to reflect change
1372 on "target.h". Adjust function code to use "fork_inferior".
1373 * target.c (target_terminal_init): New function.
1374 (target_terminal_inferior): Likewise.
1375 (target_terminal_ours): Likewise.
1376 * target.h: Include <vector>.
1377 (struct target_ops) <create_inferior>: Update prototype.
1378 (create_inferior): Update macro.
1379 * utils.c (gdb_flush_out_err): New function.
1380 * win32-low.c (win32_create_inferior): Adjust function prototype
1381 and code to reflect change on "target.h".
1382
1383 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1384
1385 * inferiors.c (switch_to_thread): New function.
1386
1387 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1388
1389 * Makefile.in (SFILE): Add "common/job-control.c".
1390 (OBS): Add "job-control.o".
1391
1392 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1393
1394 * Makefile: Remove "@host_makefile_frag@".
1395
1396 2017-05-05 Pedro Alves <palves@redhat.com>
1397
1398 * configure: Regenerate.
1399
1400 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1401
1402 * configure: Regenerate.
1403
1404 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1405
1406 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1407 software_single_step change of return type to
1408 std::vector<CORE_ADDR>.
1409 * linux-low.c (install_software_single_step_breakpoints):
1410 Likewise.
1411 * linux-low.h (install_software_single_step_breakpoints):
1412 Likewise.
1413
1414 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1415
1416 * remote-utils.c: Include "gdb_termios.h" instead of
1417 "terminal.h".
1418 * terminal.h: Delete file.
1419
1420 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1421
1422 * server.c: Include <vector>.
1423 <program_argv, wrapper_argv>: Convert to std::vector.
1424 (start_inferior): Rewrite function to use C++.
1425 (handle_v_run): Likewise. Update code that calculates the argv
1426 based on the vRun packet; use C++.
1427 (captured_main): Likewise.
1428
1429 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1430
1431 * server.c (handle_v_cont): Initialize thread_resume::thread
1432 with null_ptid.
1433
1434 2017-04-05 Pedro Alves <palves@redhat.com>
1435
1436 * configure: Regenerate.
1437
1438 2017-04-05 Pedro Alves <palves@redhat.com>
1439
1440 * gdbreplay.c (sync_error): Constify.
1441 * linux-x86-low.c (push_opcode): Constify.
1442
1443 2017-04-05 Pedro Alves <palves@redhat.com>
1444
1445 * win32-low.c (get_child_debug_event)
1446 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1447 Report TARGET_WAITKIND_SPURIOUS instead.
1448
1449 2017-04-05 Pedro Alves <palves@redhat.com>
1450
1451 * remote-utils.c (remote_prepare, remote_open): Constify.
1452 * remote-utils.h (remote_prepare, remote_open): Constify.
1453 * server.c (captured_main): Constify 'port' handling.
1454
1455 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * Makefile.in (clean): Clear .deps.
1458
1459 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1460
1461 * .gitignore: Remove generated files, replace with wildcard.
1462 * (clean): Replace removal of generated files with wildcard.
1463 (version.c): Replace with...
1464 (version-generated.c): ...this.
1465 (xml-builtin.c): Replace with...
1466 (xml-builtin-generated.c): ...this.
1467 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1468 (%.c: *regformats*): Replace with...
1469 (%-generated.c: *regformats*): ...this.
1470
1471 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1472
1473 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1474 (xtensa_fill_gregset): Call collect_register_by_name for
1475 threadptr register.
1476 (xtensa_store_gregset): Call supply_register_by_name for
1477 threadptr register.
1478
1479 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1480
1481 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1482 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1483 (xtensa_store_gregset): Call supply_register for all registers in
1484 a0_regnum..a0_regnum + C0_NREGS range.
1485
1486 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1487
1488 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1489 (ax-ipa.o: ax.c): Remove.
1490 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1491 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1492 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1493 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1494 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1495
1496 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1497
1498 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1499 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1500 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1501 (errors-ipa.o: ../common/errors.c): Remove.
1502 (format-ipa.o: ../common/format.c): Remove.
1503 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1504
1505 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1506
1507 * Makefile.in (%-ipa.o: %.c): New rule.
1508 (tracepoint-ipa.o: tracepoint.c): Remove.
1509 (utils-ipa.o: utils.c): Remove.
1510 (remote-utils-ipa.o: remote-utils.c): Remove.
1511 (regcache-ipa.o: regcache.c): Remove.
1512 (i386-linux-ipa.o: i386-linux.c): Remove.
1513 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1514 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1515 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1516 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1517 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1518 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1519 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1520 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1521 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1522 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1523 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1524 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1525 (aarch64-ipa.o: aarch64.c): Remove.
1526 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1527 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1528 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1529 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1530 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1531 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1532 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1533 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1534 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1535 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1536 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1537 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1538 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1539 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1540 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1541 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1542 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1543 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1544 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1545 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1546 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1547 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1548 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1549 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1550 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1551 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1552 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1553 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1554 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1555 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1556 (tdesc-ipa.o: tdesc.c): Remove.
1557 (x32-linux-ipa.o: x32-linux.c): Remove.
1558 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1559 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1560
1561 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1562
1563 * Makefile.in (%.o: ../arch/%.c): New rule.
1564 (arm.o: ../arch/arm.c): Remove.
1565 (arm-linux.o: ../arch/arm-linux.c): Remove.
1566 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1567 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1568
1569 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1570
1571 * Makefile.in (%.o: ../nat/%.c): New rule.
1572 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1573 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1574 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1575 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1576 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1577 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1578 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1579 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1580 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1581 (linux-personality.o: ../nat/linux-personality.c): Remove.
1582 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1583 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1584 (x86-linux.o: ../nat/x86-linux.c): Remove.
1585 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1586 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1587
1588 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1589
1590 * Makefile.in (%.o: ../common/%.c): New rule.
1591 (signals.o: ../common/signals.c): Remove.
1592 (print-utils.o: ../common/print-utils.c): Remove.
1593 (rsp-low.o: ../common/rsp-low.c): Remove.
1594 (common-utils.o: ../common/common-utils.c): Remove.
1595 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1596 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1597 (vec.o: ../common/vec.c): Remove.
1598 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1599 (xml-utils.o: ../common/xml-utils.c): Remove.
1600 (ptid.o: ../common/ptid.c): Remove.
1601 (buffer.o: ../common/buffer.c): Remove.
1602 (format.o: ../common/format.c): Remove.
1603 (filestuff.o: ../common/filestuff.c): Remove.
1604 (agent.o: ../common/agent.c): Remove.
1605 (errors.o: ../common/errors.c): Remove.
1606 (environ.o: ../common/environ.c): Remove.
1607 (common-debug.o: ../common/common-debug.c): Remove.
1608 (cleanups.o: ../common/cleanups.c): Remove.
1609 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1610 (fileio.o: ../common/fileio.c): Remove.
1611 (common-regcache.o: ../common/common-regcache.c): Remove.
1612 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1613 (new-op.o: ../common/new-op.c): Remove.
1614 (btrace-common.o: ../common/btrace-common.c): Remove.
1615
1616 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1617
1618 * Makefile.in (%.o: ../target/%.c): New rule.
1619 (waitstatus.o: ../target/waitstatus.c): Remove.
1620
1621 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1622
1623 * Makefile.in
1624 (%.c: ../regformats/%.dat,
1625 (%.c: ../regformats/arm/%.dat,
1626 (%.c: ../regformats/i386/%.dat,
1627 (%.c: ../regformats/rs6000/%.dat): New rules.
1628 (aarch64.c): Remove.
1629 (reg-arm.c): Remove.
1630 (arm-with-iwmmxt.c): Remove.
1631 (arm-with-vfpv2.c): Remove.
1632 (arm-with-vfpv3.c): Remove.
1633 (arm-with-neon.c): Remove.
1634 (reg-bfin.c): Remove.
1635 (reg-cris.c): Remove.
1636 (reg-crisv32.c): Remove.
1637 (i386.c): Remove.
1638 (i386-linux.c): Remove.
1639 (i386-avx.c): Remove.
1640 (i386-avx-linux.c): Remove.
1641 (i386-avx-avx512.c): Remove.
1642 (i386-avx-avx512-linux.c): Remove.
1643 (i386-mpx.c): Remove.
1644 (i386-mpx-linux.c): Remove.
1645 (i386-avx-mpx-avx512-pku.c): Remove.
1646 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1647 (i386-avx-mpx.c): Remove.
1648 (i386-avx-mpx-linux.c): Remove.
1649 (i386-mmx.c): Remove.
1650 (i386-mmx-linux.c): Remove.
1651 (reg-ia64.c): Remove.
1652 (reg-m32r.c): Remove.
1653 (reg-m68k.c): Remove.
1654 (reg-cf.c): Remove.
1655 (mips-linux.c): Remove.
1656 (mips-dsp-linux.c): Remove.
1657 (mips64-linux.c): Remove.
1658 (mips64-dsp-linux.c): Remove.
1659 (nios2-linux.c): Remove.
1660 (powerpc-32.c): Remove.
1661 (powerpc-32l.c): Remove.
1662 (powerpc-altivec32l.c): Remove.
1663 (powerpc-cell32l.c): Remove.
1664 (powerpc-vsx32l.c): Remove.
1665 (powerpc-isa205-32l.c): Remove.
1666 (powerpc-isa205-altivec32l.c): Remove.
1667 (powerpc-isa205-vsx32l.c): Remove.
1668 (powerpc-e500l.c): Remove.
1669 (powerpc-64l.c): Remove.
1670 (powerpc-altivec64l.c): Remove.
1671 (powerpc-cell64l.c): Remove.
1672 (powerpc-vsx64l.c): Remove.
1673 (powerpc-isa205-64l.c): Remove.
1674 (powerpc-isa205-altivec64l.c): Remove.
1675 (powerpc-isa205-vsx64l.c): Remove.
1676 (s390-linux32.c): Remove.
1677 (s390-linux32v1.c): Remove.
1678 (s390-linux32v2.c): Remove.
1679 (s390-linux64.c): Remove.
1680 (s390-linux64v1.c): Remove.
1681 (s390-linux64v2.c): Remove.
1682 (s390-te-linux64.c): Remove.
1683 (s390-vx-linux64.c): Remove.
1684 (s390-tevx-linux64.c): Remove.
1685 (s390x-linux64.c): Remove.
1686 (s390x-linux64v1.c): Remove.
1687 (s390x-linux64v2.c): Remove.
1688 (s390x-te-linux64.c): Remove.
1689 (s390x-vx-linux64.c): Remove.
1690 (s390x-tevx-linux64.c): Remove.
1691 (tic6x-c64xp-linux.c): Remove.
1692 (tic6x-c64x-linux.c): Remove.
1693 (tic6x-c62x-linux.c): Remove.
1694 (reg-sh.c): Remove.
1695 (reg-sparc64.c): Remove.
1696 (reg-spu.c): Remove.
1697 (amd64.c): Remove.
1698 (amd64-linux.c): Remove.
1699 (amd64-avx.c): Remove.
1700 (amd64-avx-linux.c): Remove.
1701 (amd64-avx-avx512.c): Remove.
1702 (amd64-avx-avx512-linux.c): Remove.
1703 (amd64-mpx.c): Remove.
1704 (amd64-mpx-linux.c): Remove.
1705 (amd64-avx-mpx-avx512-pku.c): Remove.
1706 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1707 (amd64-avx-mpx.c): Remove.
1708 (amd64-avx-mpx-linux.c): Remove.
1709 (x32.c): Remove.
1710 (x32-linux.c): Remove.
1711 (x32-avx.c): Remove.
1712 (x32-avx-linux.c): Remove.
1713 (x32-avx-avx512.c): Remove.
1714 (x32-avx-avx512-linux.c): Remove.
1715 (reg-xtensa.c): Remove.
1716 (reg-tilegx.c): Remove.
1717 (reg-tilegx32.c): Remove.
1718
1719 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1720
1721 * Makefile.in (SFILES): Add "common/environ.c".
1722 (OBJS): Add "common/environ.h".
1723
1724 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1725
1726 * configure.ac: Check if the fs_base and gs_base members of
1727 `struct user_regs_struct' exist.
1728 * config.in: Regenerated.
1729 * configure: Likewise.
1730
1731 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1732
1733 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1734 target_read_memory.
1735 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1736 (get_next_pcs_syscall_next_pc): Likewise.
1737
1738 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1739
1740 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1741 * nto-x86-low.c: Likewise.
1742
1743 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * Makefile.in: Include disable-implicit-rules.mk.
1746
1747 2016-11-23 Pedro Alves <palves@redhat.com>
1748
1749 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1750 (debug_vprintf): Use std::chrono::steady_clock instead of
1751 gettimeofday. Use '.' instead of ':'.
1752 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1753 (get_timestamp): Use std::chrono::steady_clock instead of
1754 gettimeofday.
1755
1756 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1757
1758 * Makefile.in: Fix whitespace formatting.
1759
1760 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1761
1762 * Makefile.in (SFILES, OBS): Flatten list and order
1763 alphabetically.
1764
1765 2016-11-23 Pedro Alves <palves@redhat.com>
1766
1767 * event-loop.c (handle_file_event): Use warning.
1768 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1769 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1770 Use warning.
1771
1772 2016-11-23 Pedro Alves <palves@redhat.com>
1773
1774 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1775 output.
1776 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1777 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1778 debug_printf and debug_flush for debug output.
1779 * server.c (handle_general_set): Likewise.
1780 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1781 output.
1782
1783 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1784
1785 * Makefile.in (.c.o): Replace rule with ...
1786 (%.o: %.c): ... this one.
1787
1788 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1789
1790 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1791 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1792 make.
1793 * configure.ac: Remove checks for the make program.
1794 * configure: Re-generate.
1795
1796 2016-10-28 Pedro Alves <palves@redhat.com>
1797
1798 * Makefile.in (CXX_DIALECT): Get from configure.
1799 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1800 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1801 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1802 * config.in: Regenerate.
1803 * configure: Regenerate.
1804
1805 2016-10-27 Yao Qi <yao.qi@linaro.org>
1806
1807 * linux-low.c (linux_supports_range_stepping): Return true if
1808 can_software_single_step return true.
1809
1810 2016-10-27 Yao Qi <yao.qi@linaro.org>
1811
1812 * inferiors.c (find_inferior_in_random): New function.
1813 * inferiors.h (find_inferior_in_random): Declare.
1814 * linux-low.c (linux_wait_for_event_filtered): Call
1815 find_inferior_in_random instead of find_inferior.
1816
1817 2016-10-27 Yao Qi <yao.qi@linaro.org>
1818
1819 * linux-low.c (linux_wait_1): If single-step breakpoints are
1820 inserted, remove them.
1821
1822 2016-10-26 Pedro Alves <palves@redhat.com>
1823
1824 * linux-low.c (handle_extended_wait): Link parent/child fork
1825 threads.
1826 (linux_wait_1): Unlink them.
1827 (linux_set_resume_request): Ignore resume requests for
1828 already-resumed and unhandled fork child threads.
1829 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1830 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1831 New functions.
1832 (handle_v_requests) <vCont>: Don't call require_running.
1833 * server.h (in_queued_stop_replies): New declaration.
1834
1835 2016-10-24 Yao Qi <yao.qi@linaro.org>
1836
1837 PR server/20733
1838 * linux-aarch64-low.c (append_insns): Cast the return value to
1839 'uint32_t *'.
1840
1841 2016-10-10 Yao Qi <yao.qi@linaro.org>
1842
1843 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1844
1845 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1846
1847 * target.c (target_supports_multi_process): New function, moved
1848 from...
1849 * target.h (target_supports_multi_process): ... here. Remove
1850 macro.
1851
1852 2016-10-05 Tom Tromey <tom@tromey.com>
1853
1854 PR remote/20655:
1855 * tracepoint.c (handle_tracepoint_bkpts): Check
1856 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1857
1858 2016-10-05 Yao Qi <yao.qi@linaro.org>
1859
1860 * configure.srv: Update the path of arm-*.xml files.
1861
1862 2016-10-05 Terry Guo <terry.guo@arm.com>
1863 Yao Qi <yao.qi@linaro.org>
1864
1865 * Makefile.in: Adjust the path of rules.
1866 * configure.srv: Update the path of xml files.
1867 * regformats/arm-with-iwmmxt.dat: Regenerated.
1868 * regformats/arm-with-neon.dat: Likewise.
1869 * regformats/arm-with-vfpv2.dat: Likewise.
1870 * regformats/arm-with-vfpv3.dat Likewise.
1871
1872 2016-09-30 Yao Qi <yao.qi@linaro.org>
1873
1874 PR gdbserver/20627
1875 * target.c (target_stop_and_wait): Don't call
1876 target_continue_no_signal, use resume_stop instead.
1877
1878 2016-09-26 Yao Qi <yao.qi@linaro.org>
1879
1880 * linux-low.c (linux_wait_1): Call debug_exit.
1881
1882 2016-09-23 Pedro Alves <palves@redhat.com>
1883
1884 * Makefile.in (SFILES): Add common/new-op.c.
1885 (OBS): Add common/new-op.o.
1886 (new-op.o): New rule.
1887
1888 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1889
1890 * .gitinore: Ignore more files.
1891
1892 2016-09-21 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1895 23.
1896
1897 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1898
1899 * server.c (start_inferior): Call target_mourn_inferior instead of
1900 mourn_inferior; pass ptid_t argument to it.
1901 (resume): Likewise.
1902 (handle_target_event): Likewise.
1903 * target.c (target_mourn_inferior): New function.
1904 * target.h (mourn_inferior): Delete macro.
1905
1906 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1907
1908 * linux-low.c (lwp_is_stepping): New function.
1909
1910 2016-09-06 Carl Love <cel@us.ibm.com>
1911
1912 * server.c (start_inferior): Fixed comment, requested comment change
1913 didn't get updated correctly. Removed reference to ptrace () call as
1914 it is only true on Linux systems.
1915
1916 2016-09-06 Carl Love <cel@us.ibm.com>
1917
1918 * server.c (start_inferior): Do not call
1919 function target_post_create_inferior () if the
1920 inferior process has already exited.
1921
1922 2016-09-05 Pedro Alves <palves@redhat.com>
1923
1924 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1925 (COMPILE.pre, CC_LD): Use CXX directly.
1926 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1927 * acinclude.m4: Don't include build-with-cxx.m4.
1928 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1929 * configure: Regenerate.
1930
1931 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1932
1933 PR gdb/19495
1934 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1935 call writing data to own_buf.
1936
1937 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1938
1939 * target.c (mywait): Call target_wait instead of
1940 the_target->wait.
1941 (target_wait): New function.
1942
1943 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1944
1945 * server.c (start_inferior): New variable 'ptid'. Replace calls
1946 to the_target->resume by target_continue{,_no_signal}, depending
1947 on the case.
1948 * target.c (target_stop_and_wait): Call target_continue_no_signal
1949 instead of the_target->resume.
1950 (target_continue): New function.
1951
1952 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1953
1954 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1955
1956 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1957
1958 PR server/20491
1959 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1960 ps_prochandle.
1961 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1962 * linux-arm-low.c (ps_get_thread_area): Likewise.
1963 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1964 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1965 * linux-mips-low.c (ps_get_thread_area): Likewise.
1966 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1967 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1968 * linux-x86-low.c (ps_get_thread_area): Likewise.
1969 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1970
1971 2016-08-19 Pedro Alves <palves@redhat.com>
1972
1973 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1974
1975 2016-08-19 Pedro Alves <palves@redhat.com>
1976
1977 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1978 comment. Use memcpy instead of casting through unsigned long.
1979
1980 2016-08-19 Pedro Alves <palves@redhat.com>
1981
1982 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1983 allocating around 0x80000000.
1984
1985 2016-08-19 Pedro Alves <palves@redhat.com>
1986
1987 PR gdb/20415
1988 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1989 (x32-avx512-linux-ipa.o): New rules.
1990 * configure.ac (x86_64-*-linux*): New x32 check.
1991 * configure.srv (ipa_x32_linux_regobj): New.
1992 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1993 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1994 descriptions.
1995 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1996 descriptions.
1997 * configure: Regenerate.
1998
1999 2016-08-09 Pedro Alves <palves@redhat.com>
2000
2001 PR gdb/18653
2002 * Makefile.in (OBS): Add signals-state-save-restore.o.
2003 (signals-state-save-restore.o): New rule.
2004 * config.in: Regenerate.
2005 * configure: Regenerate.
2006 * linux-low.c: Include "signals-state-save-restore.h".
2007 (linux_create_inferior): Call
2008 restore_original_signals_state.
2009 * server.c: Include "dispositions-save-restore.h".
2010 (captured_main): Call save_original_signals_state.
2011
2012 2016-08-05 Pedro Alves <palves@redhat.com>
2013
2014 * configure: Regenerate.
2015
2016 2016-08-04 Yao Qi <yao.qi@linaro.org>
2017
2018 * linux-low.c (regsets_fetch_inferior_registers): Check
2019 errno is ESRCH or not.
2020
2021 2016-08-02 Yao Qi <yao.qi@linaro.org>
2022
2023 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2024 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2025 (thread_db_load_search): Update.
2026 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2027 td_ta_set_event and td_ta_event_getmsg.
2028
2029 2016-07-26 Pedro Alves <palves@redhat.com>
2030
2031 PR server/20414
2032 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2033 of unsigned long for 64-bit registers and use uint32_t instead of
2034 unsigned int for 32-bit registers.
2035
2036 2016-07-26 Pedro Alves <palves@redhat.com>
2037
2038 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2039 to 'ptrace'.
2040
2041 2016-07-21 Tom Tromey <tom@tromey.com>
2042
2043 * configure: Rebuild.
2044
2045 2016-07-21 Yao Qi <yao.qi@linaro.org>
2046
2047 * mem-break.c (find_gdb_breakpoint): Cast bp to
2048 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2049
2050 2016-07-21 Yao Qi <yao.qi@linaro.org>
2051
2052 * server.c (handle_v_requests): Support s and S actions
2053 if target_supports_software_single_step return true.
2054
2055 2016-07-21 Yao Qi <yao.qi@linaro.org>
2056
2057 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2058 is resume_step, call maybe_hw_step.
2059 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2060 and unstop them.
2061 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2062 breakpoints or not.
2063 (proceed_one_lwp): If resume request is resume_step, install
2064 reinsert breakpoints and call maybe_hw_step.
2065
2066 2016-07-21 Yao Qi <yao.qi@linaro.org>
2067
2068 * linux-low.c (proceed_one_lwp): Declare.
2069 (linux_resume_one_thread): Remove local variable 'step'.
2070 Lift code enqueue signal. Call proceed_one_lwp instead of
2071 linux_resume_one_lwp.
2072
2073 2016-07-21 Yao Qi <yao.qi@linaro.org>
2074
2075 * linux-low.c (linux_resume_one_thread): Call
2076 enqueue_pending_signal.
2077
2078 2016-07-21 Yao Qi <yao.qi@linaro.org>
2079
2080 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2081 * inferiors.c (do_restore_current_thread_cleanup): New function.
2082 (make_cleanup_restore_current_thread): Likewise.
2083 * linux-low.c (install_software_single_step_breakpoints): Call
2084 make_cleanup_restore_current_thread. Switch current_thread to
2085 thread.
2086
2087 2016-07-21 Yao Qi <yao.qi@linaro.org>
2088
2089 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2090 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2091 (clone_one_breakpoint): Likewise.
2092 (delete_reinsert_breakpoints): Change parameter to thread.
2093 Callers updated.
2094 (has_reinsert_breakpoints): Likewise.
2095 (uninsert_reinsert_breakpoints): Likewise.
2096 (reinsert_reinsert_breakpoints): Likewise.
2097 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2098 (delete_reinsert_breakpoints): Likewise.
2099 (reinsert_reinsert_breakpoints): Likewise.
2100 (uninsert_reinsert_breakpoints): Likewise.
2101 (has_reinsert_breakpoints): Likewise.
2102
2103 2016-07-21 Yao Qi <yao.qi@linaro.org>
2104
2105 * inferiors.c (get_thread_process): Make parameter const.
2106 * inferiors.h (get_thread_process): Update declaration.
2107 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2108 Add new parameters child_thread and parent_thread. Callers
2109 updated.
2110 * mem-break.h (clone_all_breakpoints): Update declaration.
2111
2112 2016-07-21 Yao Qi <yao.qi@linaro.org>
2113
2114 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2115 <command_list, handler>: Remove.
2116 (struct gdb_breakpoint): New.
2117 (struct other_breakpoint): New.
2118 (struct reinsert_breakpoint): New.
2119 (is_gdb_breakpoint): New function.
2120 (any_persistent_commands): Update command_list if
2121 is_gdb_breakpoint returns true.
2122 (set_breakpoint): Create breakpoints according to their types.
2123 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2124 (set_gdb_breakpoint_1): Likewise.
2125 (set_gdb_breakpoint): Likewise.
2126 (clear_breakpoint_conditions): Change parameter type to
2127 'struct gdb_breakpoint *'.
2128 (clear_breakpoint_commands): Likewise.
2129 (clear_breakpoint_conditions_and_commands): Likewise.
2130 (add_condition_to_breakpoint): Likewise.
2131 (add_breakpoint_condition): Likewise.
2132 (add_commands_to_breakpoint): Likewise.
2133 (check_breakpoints): Check other_breakpoint.
2134 (clone_one_breakpoint): Clone breakpopint according to its type.
2135 * mem-break.h (struct gdb_breakpoint): Declare.
2136 (set_gdb_breakpoint): Update declaration.
2137 (clear_breakpoint_conditions_and_commands): Likewise.
2138 (add_breakpoint_condition): Likewise.
2139 (add_breakpoint_commands): Likewise.
2140 * server.c (process_point_options): Change parameter type to
2141 'struct gdb_breakpoint *'.
2142
2143 2016-07-21 Yao Qi <yao.qi@linaro.org>
2144
2145 * mem-break.c (set_breakpoint_at): Rename it to ...
2146 (set_breakpoint_type_at): ... it.
2147 (set_breakpoint_at): Call set_breakpoint_type_at.
2148 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2149 * mem-break.h (set_breakpoint_at): Update comments.
2150
2151 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2152
2153 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2154 to buf parameter.
2155 (nios2_store_gregset): Likewise.
2156
2157 2016-07-01 Pedro Alves <palves@redhat.com>
2158 Antoine Tremblay <antoine.tremblay@ericsson.com>
2159
2160 * linux-low.c: Change interface to take the target lwp_info
2161 pointer directly and return void. Handle detaching from a zombie
2162 thread.
2163 (linux_detach_lwp_callback): New function.
2164 (linux_detach): Detach from the leader thread after detaching from
2165 the clone threads.
2166
2167 2016-06-28 Yao Qi <yao.qi@linaro.org>
2168
2169 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2170 for variable new_offset.
2171 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2172 (aarch64_ftrace_insn_reloc_cb): Likewise.
2173 (aarch64_ftrace_insn_reloc_tb): Likewise.
2174 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2175 PRIx64 instead of PRIx32.
2176
2177 2016-06-28 Yao Qi <yao.qi@linaro.org>
2178
2179 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2180 (the_low_target): Install arm_get_syscall_trapinfo.
2181
2182 2016-06-28 Yao Qi <yao.qi@linaro.org>
2183
2184 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2185 function.
2186 (the_low_target): Install aarch64_get_syscall_trapinfo.
2187
2188 2016-06-28 Yao Qi <yao.qi@linaro.org>
2189
2190 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2191 Callers updated.
2192 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2193 Remove parameter sysno.
2194 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2195 sysret.
2196
2197 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2198
2199 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2200 (s390_emit_ne_goto): Likewise.
2201 (s390_emit_lt_goto): Likewise.
2202 (s390_emit_le_goto): Likewise.
2203 (s390_emit_gt_goto): Likewise.
2204 (s390_emit_ge_goto): Likewise.
2205 (s390x_emit_eq_goto): Likewise.
2206 (s390x_emit_ne_goto): Likewise.
2207 (s390x_emit_lt_goto): Likewise.
2208 (s390x_emit_le_goto): Likewise.
2209 (s390x_emit_gt_goto): Likewise.
2210 (s390x_emit_ge_goto): Likewise.
2211 (s390_emit_ops_impl): Mark variable static.
2212 (s390x_emit_ops): Likewise.
2213
2214 2016-06-17 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-low.c (handle_extended_wait): Call
2217 uninsert_reinsert_breakpoints for the parent process. Remove
2218 reinsert breakpoints from the child process. Reinsert them to
2219 the parent process when vfork is done.
2220 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2221 (reinsert_reinsert_breakpoints): New function.
2222 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2223 (reinsert_reinsert_breakpoints): Declare.
2224
2225 2016-06-17 Yao Qi <yao.qi@linaro.org>
2226
2227 * linux-low.c (handle_extended_wait): If the parent is doing
2228 step-over, remove the reinsert breakpoints from the forked child.
2229
2230 2016-06-17 Yao Qi <yao.qi@linaro.org>
2231
2232 * linux-low.c (unsuspend_all_lwps): Declare.
2233 (linux_low_filter_event): If thread exited, call finish_step_over.
2234 If step-over is finished, unsuspend other threads.
2235
2236 2016-06-17 Yao Qi <yao.qi@linaro.org>
2237
2238 * linux-low.c (linux_resume_one_lwp_throw): Assert
2239 has_reinsert_breakpoints returns false.
2240 * mem-break.c (delete_disabled_breakpoints): Assert
2241 bp type isn't reinsert_breakpoint.
2242
2243 2016-06-17 Yao Qi <yao.qi@linaro.org>
2244
2245 * linux-low.c (maybe_hw_step): New function.
2246 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2247 (finish_step_over): Switch current_thread to lwp temporarily,
2248 and assert has_reinsert_breakpoints returns true.
2249 (proceed_one_lwp): Call maybe_hw_step.
2250 * mem-break.c (has_reinsert_breakpoints): New function.
2251 * mem-break.h (has_reinsert_breakpoints): Declare.
2252
2253 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2254
2255 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2256
2257 2016-05-17 Yao Qi <yao.qi@linaro.org>
2258
2259 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2260 instead of find_inferior.
2261
2262 2016-05-05 Yao Qi <yao.qi@linaro.org>
2263
2264 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2265 Initialize res to zero.
2266
2267 2016-05-05 Yao Qi <yao.qi@linaro.org>
2268
2269 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2270 to uint32_t.
2271
2272 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2273
2274 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2275 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2276 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2277
2278 2016-04-28 Par Olsson <par.olsson@windriver.com>
2279 Simon Marchi <simon.marchi@ericsson.com>
2280
2281 * tracepoint.c (write_inferior_int8): New function.
2282 (cmd_qtenable_disable): Write enable flag using
2283 write_inferior_int8.
2284
2285 2016-04-25 Yao Qi <yao.qi@linaro.org>
2286
2287 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2288 (need_step_over_p): Return zero if the LWP has pending signals
2289 can be delivered on software single step target.
2290
2291 2016-04-25 Yao Qi <yao.qi@linaro.org>
2292
2293 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2294 return instead of error.
2295
2296 2016-04-22 Yao Qi <yao.qi@linaro.org>
2297
2298 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2299 to 23.
2300
2301 2016-04-22 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2304 signal when stepping over breakpoint with software single
2305 step.
2306
2307 2016-04-21 Pedro Alves <palves@redhat.com>
2308
2309 * linux-s390-low.c (s390_collect_ptrace_register)
2310 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2311 add casts.
2312 (s390_check_regset): Use void * instead of gdb_byte *.
2313
2314 2016-04-20 Pedro Alves <palves@redhat.com>
2315
2316 * configure: Renegerate.
2317
2318 2016-04-20 Yao Qi <yao.qi@linaro.org>
2319
2320 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2321 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2322 number 16.
2323 (arm_store_gregset): Likewise.
2324
2325 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2326
2327 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2328 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2329 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2330 (amd64-avx-mpx-linux.c): New rules.
2331 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2332 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2333 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2334 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2335 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2336 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2337 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2338 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2339 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2340 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2341 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2342 * linux-x86-low.c (x86_linux_read_description): Add case for
2343 X86_XSTATE_AVX_MPX_MASK.
2344 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2345 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2346 init_registers_i386_avx_mpx_linux.
2347 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2348 (initialize_low_tracepoint): Call
2349 init_registers_i386_avx_mpx_linux.
2350 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2351 (initialize_low_tracepoint): Call
2352 init_registers_amd64_avx_mpx_linux.
2353 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2354 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2355 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2356 declarations.
2357
2358 2016-04-18 Pedro Alves <palves@redhat.com>
2359
2360 * configure: Regenerate.
2361
2362 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2363
2364 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2365 (aarch64_emit_sub): Likewise.
2366
2367 2016-04-12 Pedro Alves <palves@redhat.com>
2368
2369 * utils.c (prepare_to_throw_exception): Delete.
2370
2371 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2372
2373 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2374
2375 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2376
2377 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2378
2379 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2380
2381 * linux-aarch64-ipa.c: Add <elf.h> include.
2382 * linux-ppc-ipa.c: Add <elf.h> include.
2383 * linux-s390-ipa.c: Add <elf.h> include.
2384
2385 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2386
2387 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2388 (get_raw_reg_ptr): Likewise.
2389 (get_trace_state_variable_value_ptr): Likewise.
2390 (set_trace_state_variable_value_ptr): Likewise.
2391 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2392 char *.
2393
2394 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2395 Marcin Kościelnicki <koriakin@0x04.net>
2396
2397 PR/17221
2398 * linux-ppc-low.c (emit_insns): New function.
2399 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2400 (ppc_emit_prologue): New function.
2401 (ppc_emit_epilogue): New function.
2402 (ppc_emit_add): New function.
2403 (ppc_emit_sub): New function.
2404 (ppc_emit_mul): New function.
2405 (ppc_emit_lsh): New function.
2406 (ppc_emit_rsh_signed): New function.
2407 (ppc_emit_rsh_unsigned): New function.
2408 (ppc_emit_ext): New function.
2409 (ppc_emit_zero_ext): New function.
2410 (ppc_emit_log_not): New function.
2411 (ppc_emit_bit_and): New function.
2412 (ppc_emit_bit_or): New function.
2413 (ppc_emit_bit_xor): New function.
2414 (ppc_emit_bit_not): New function.
2415 (ppc_emit_equal): New function.
2416 (ppc_emit_less_signed): New function.
2417 (ppc_emit_less_unsigned): New function.
2418 (ppc_emit_ref): New function.
2419 (ppc_emit_const): New function.
2420 (ppc_emit_reg): New function.
2421 (ppc_emit_pop): New function.
2422 (ppc_emit_stack_flush): New function.
2423 (ppc_emit_swap): New function.
2424 (ppc_emit_stack_adjust): New function.
2425 (ppc_emit_call): New function.
2426 (ppc_emit_int_call_1): New function.
2427 (ppc_emit_void_call_2): New function.
2428 (ppc_emit_if_goto): New function.
2429 (ppc_emit_goto): New function.
2430 (ppc_emit_eq_goto): New function.
2431 (ppc_emit_ne_goto): New function.
2432 (ppc_emit_lt_goto): New function.
2433 (ppc_emit_le_goto): New function.
2434 (ppc_emit_gt_goto): New function.
2435 (ppc_emit_ge_goto): New function.
2436 (ppc_write_goto_address): New function.
2437 (ppc_emit_ops_impl): New static variable.
2438 (ppc64v1_emit_prologue): New function.
2439 (ppc64v2_emit_prologue): New function.
2440 (ppc64_emit_epilogue): New function.
2441 (ppc64_emit_add): New function.
2442 (ppc64_emit_sub): New function.
2443 (ppc64_emit_mul): New function.
2444 (ppc64_emit_lsh): New function.
2445 (ppc64_emit_rsh_signed): New function.
2446 (ppc64_emit_rsh_unsigned): New function.
2447 (ppc64_emit_ext): New function.
2448 (ppc64_emit_zero_ext): New function.
2449 (ppc64_emit_log_not): New function.
2450 (ppc64_emit_bit_and): New function.
2451 (ppc64_emit_bit_or): New function.
2452 (ppc64_emit_bit_xor): New function.
2453 (ppc64_emit_bit_not): New function.
2454 (ppc64_emit_equal): New function.
2455 (ppc64_emit_less_signed): New function.
2456 (ppc64_emit_less_unsigned): New function.
2457 (ppc64_emit_ref): New function.
2458 (ppc64_emit_const): New function.
2459 (ppc64v1_emit_reg): New function.
2460 (ppc64v2_emit_reg): New function.
2461 (ppc64_emit_pop): New function.
2462 (ppc64_emit_stack_flush): New function.
2463 (ppc64_emit_swap): New function.
2464 (ppc64v1_emit_call): New function.
2465 (ppc64v2_emit_call): New function.
2466 (ppc64v1_emit_int_call_1): New function.
2467 (ppc64v2_emit_int_call_1): New function.
2468 (ppc64v1_emit_void_call_2): New function.
2469 (ppc64v2_emit_void_call_2): New function.
2470 (ppc64_emit_if_goto): New function.
2471 (ppc64_emit_eq_goto): New function.
2472 (ppc64_emit_ne_goto): New function.
2473 (ppc64_emit_lt_goto): New function.
2474 (ppc64_emit_le_goto): New function.
2475 (ppc64_emit_gt_goto): New function.
2476 (ppc64_emit_ge_goto): New function.
2477 (ppc64v1_emit_ops_impl): New static variable.
2478 (ppc64v2_emit_ops_impl): New static variable.
2479 (ppc_emit_ops): New function.
2480 (linux_low_target): Wire in ppc_emit_ops.
2481
2482 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2483 Marcin Kościelnicki <koriakin@0x04.net>
2484
2485 PR/17221
2486 * Makefile.in: Add powerpc-*-ipa.o
2487 * configure.srv: Add ipa_obj for powerpc*-linux.
2488 * linux-ppc-ipa.c: New file.
2489 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2490 includes.
2491 (PPC_FIELD): New macro.
2492 (PPC_SEXT): New macro.
2493 (PPC_OP6): New macro.
2494 (PPC_BO): New macro.
2495 (PPC_LI): New macro.
2496 (PPC_BD): New macro.
2497 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2498 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2499 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2500 (ppc_get_thread_area): New function.
2501 (is_elfv2_inferior): New function.
2502 (gen_ds_form): New function.
2503 (GEN_STD): New macro.
2504 (GEN_STDU): New macro.
2505 (GEN_LD): New macro.
2506 (GEN_LDU): New macro.
2507 (gen_d_form): New function.
2508 (GEN_ADDI): New macro.
2509 (GEN_ADDIS): New macro.
2510 (GEN_LI): New macro.
2511 (GEN_LIS): New macro.
2512 (GEN_ORI): New macro.
2513 (GEN_ORIS): New macro.
2514 (GEN_LWZ): New macro.
2515 (GEN_STW): New macro.
2516 (GEN_STWU): New macro.
2517 (gen_xfx_form): New function.
2518 (GEN_MFSPR): New macro.
2519 (GEN_MTSPR): New macro.
2520 (GEN_MFCR): New macro.
2521 (GEN_MTCR): New macro.
2522 (GEN_SYNC): New macro.
2523 (GEN_LWSYNC): New macro.
2524 (gen_x_form): New function.
2525 (GEN_OR): New macro.
2526 (GEN_MR): New macro.
2527 (GEN_LWARX): New macro.
2528 (GEN_STWCX): New macro.
2529 (GEN_CMPW): New macro.
2530 (gen_md_form): New function.
2531 (GEN_RLDICL): New macro.
2532 (GEN_RLDICR): New macro.
2533 (gen_i_form): New function.
2534 (GEN_B): New macro.
2535 (GEN_BL): New macro.
2536 (gen_b_form): New function.
2537 (GEN_BNE): New macro.
2538 (GEN_LOAD): New macro.
2539 (GEN_STORE): New macro.
2540 (gen_limm): New function.
2541 (gen_atomic_xchg): New function.
2542 (gen_call): New function.
2543 (ppc_relocate_instruction): New function.
2544 (ppc_install_fast_tracepoint_jump_pad): New function.
2545 (ppc_get_min_fast_tracepoint_insn_len): New function.
2546 (ppc_get_ipa_tdesc_idx): New function.
2547 (the_low_target): Wire in the new functions.
2548 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2549 tdescs.
2550 * linux-ppc-tdesc.h: New file.
2551
2552 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2553
2554 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2555 (alloc_jump_pad_buffer): New function.
2556 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2557 (alloc_jump_pad_buffer): New function.
2558 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2559 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2560 (alloc_jump_pad_buffer): New function.
2561 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2562 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2563 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2564 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2565
2566 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2567
2568 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2569 * linux-amd64-ipa.c: Likewise.
2570 * linux-i386-ipa.c: Likewise.
2571 * linux-s390-ipa.c: Likewise.
2572 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2573 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2574 set_trace_state_variable_value_ptr.
2575 (struct ipa_sym_addresses): Likewise.
2576 (symbol_list): Likewise.
2577 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2578 accessing gdb_collect directly.
2579 (gdb_collect_ptr_type): New typedef.
2580 (get_raw_reg_ptr_type): New typedef.
2581 (get_trace_state_variable_value_ptr_type): New typedef.
2582 (set_trace_state_variable_value_ptr_type): New typedef.
2583 (gdb_collect_ptr): New global.
2584 (get_raw_reg_ptr): New global.
2585 (get_trace_state_variable_value_ptr): New global.
2586 (set_trace_state_variable_value_ptr): New global.
2587 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2588 accessing get_raw_reg directly.
2589 (get_get_tsv_func_addr): Likewise for
2590 get_trace_state_variable_value_ptr.
2591 (get_set_tsv_func_addr): Likewise for
2592 set_trace_state_variable_value_ptr.
2593 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2594
2595 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2596
2597 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2598
2599 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2600
2601 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2602 packets.
2603 (relocate_instruction): Remove own_buf.
2604 * server.c (own_buf): Make global.
2605 (handle_v_requests): Make global.
2606 * server.h (own_buf): New declaration.
2607 (handle_v_requests): New prototype.
2608
2609 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2610
2611 PR 18377
2612 * linux-s390-low.c (add_insns): New function.
2613 (s390_emit_prologue): New function.
2614 (s390_emit_epilogue): New function.
2615 (s390_emit_add): New function.
2616 (s390_emit_sub): New function.
2617 (s390_emit_mul): New function.
2618 (s390_emit_lsh): New function.
2619 (s390_emit_rsh_signed): New function.
2620 (s390_emit_rsh_unsigned): New function.
2621 (s390_emit_ext): New function.
2622 (s390_emit_log_not): New function.
2623 (s390_emit_bit_and): New function.
2624 (s390_emit_bit_or): New function.
2625 (s390_emit_bit_xor): New function.
2626 (s390_emit_bit_not): New function.
2627 (s390_emit_equal): New function.
2628 (s390_emit_less_signed): New function.
2629 (s390_emit_less_unsigned): New function.
2630 (s390_emit_ref): New function.
2631 (s390_emit_if_goto): New function.
2632 (s390_emit_goto): New function.
2633 (s390_write_goto_address): New function.
2634 (s390_emit_litpool): New function.
2635 (s390_emit_const): New function.
2636 (s390_emit_call): New function.
2637 (s390_emit_reg): New function.
2638 (s390_emit_pop): New function.
2639 (s390_emit_stack_flush): New function.
2640 (s390_emit_zero_ext): New function.
2641 (s390_emit_swap): New function.
2642 (s390_emit_stack_adjust): New function.
2643 (s390_emit_set_r2): New function.
2644 (s390_emit_int_call_1): New function.
2645 (s390_emit_void_call_2): New function.
2646 (s390_emit_eq_goto): New function.
2647 (s390_emit_ne_goto): New function.
2648 (s390_emit_lt_goto): New function.
2649 (s390_emit_le_goto): New function.
2650 (s390_emit_gt_goto): New function.
2651 (s390_emit_ge_goto): New function.
2652 (s390x_emit_prologue): New function.
2653 (s390x_emit_epilogue): New function.
2654 (s390x_emit_add): New function.
2655 (s390x_emit_sub): New function.
2656 (s390x_emit_mul): New function.
2657 (s390x_emit_lsh): New function.
2658 (s390x_emit_rsh_signed): New function.
2659 (s390x_emit_rsh_unsigned): New function.
2660 (s390x_emit_ext): New function.
2661 (s390x_emit_log_not): New function.
2662 (s390x_emit_bit_and): New function.
2663 (s390x_emit_bit_or): New function.
2664 (s390x_emit_bit_xor): New function.
2665 (s390x_emit_bit_not): New function.
2666 (s390x_emit_equal): New function.
2667 (s390x_emit_less_signed): New function.
2668 (s390x_emit_less_unsigned): New function.
2669 (s390x_emit_ref): New function.
2670 (s390x_emit_if_goto): New function.
2671 (s390x_emit_const): New function.
2672 (s390x_emit_call): New function.
2673 (s390x_emit_reg): New function.
2674 (s390x_emit_pop): New function.
2675 (s390x_emit_stack_flush): New function.
2676 (s390x_emit_zero_ext): New function.
2677 (s390x_emit_swap): New function.
2678 (s390x_emit_stack_adjust): New function.
2679 (s390x_emit_int_call_1): New function.
2680 (s390x_emit_void_call_2): New function.
2681 (s390x_emit_eq_goto): New function.
2682 (s390x_emit_ne_goto): New function.
2683 (s390x_emit_lt_goto): New function.
2684 (s390x_emit_le_goto): New function.
2685 (s390x_emit_gt_goto): New function.
2686 (s390x_emit_ge_goto): New function.
2687 (s390_emit_ops): New function.
2688 (struct linux_target_ops): Fill in emit_ops hook.
2689
2690 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2691
2692 PR 18377
2693 * Makefile.in: Add s390 IPA files.
2694 * configure.srv: Build IPA for s390.
2695 * linux-s390-ipa.c: New file.
2696 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2697 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2698 (tdesc_s390_linux32): Likewise.
2699 (init_registers_s390_linux32v1): Likewise.
2700 (tdesc_s390_linux32v1): Likewise.
2701 (init_registers_s390_linux32v2): Likewise.
2702 (tdesc_s390_linux32v2): Likewise.
2703 (init_registers_s390_linux64): Likewise.
2704 (tdesc_s390_linux64): Likewise.
2705 (init_registers_s390_linux64v1): Likewise.
2706 (tdesc_s390_linux64v1): Likewise.
2707 (init_registers_s390_linux64v2): Likewise.
2708 (tdesc_s390_linux64v2): Likewise.
2709 (init_registers_s390_te_linux64): Likewise.
2710 (tdesc_s390_te_linux64): Likewise.
2711 (init_registers_s390_vx_linux64): Likewise.
2712 (tdesc_s390_vx_linux64): Likewise.
2713 (init_registers_s390_tevx_linux64): Likewise.
2714 (tdesc_s390_tevx_linux64): Likewise.
2715 (init_registers_s390x_linux64): Likewise.
2716 (tdesc_s390x_linux64): Likewise.
2717 (init_registers_s390x_linux64v1): Likewise.
2718 (tdesc_s390x_linux64v1): Likewise.
2719 (init_registers_s390x_linux64v2): Likewise.
2720 (tdesc_s390x_linux64v2): Likewise.
2721 (init_registers_s390x_te_linux64): Likewise.
2722 (tdesc_s390x_te_linux64): Likewise.
2723 (init_registers_s390x_vx_linux64): Likewise.
2724 (tdesc_s390x_vx_linux64): Likewise.
2725 (init_registers_s390x_tevx_linux64): Likewise.
2726 (tdesc_s390x_tevx_linux64): Likewise.
2727 (have_hwcap_s390_vx): New static variable.
2728 (s390_arch_setup): Fill have_hwcap_s390_vx.
2729 (s390_get_thread_area): New function.
2730 (s390_ft_entry_gpr_esa): New const.
2731 (s390_ft_entry_gpr_zarch): New const.
2732 (s390_ft_entry_misc): New const.
2733 (s390_ft_entry_fr): New const.
2734 (s390_ft_entry_vr): New const.
2735 (s390_ft_main_31): New const.
2736 (s390_ft_main_64): New const.
2737 (s390_ft_exit_fr): New const.
2738 (s390_ft_exit_vr): New const.
2739 (s390_ft_exit_misc): New const.
2740 (s390_ft_exit_gpr_esa): New const.
2741 (s390_ft_exit_gpr_zarch): New const.
2742 (append_insns): New function.
2743 (s390_relocate_instruction): New function.
2744 (s390_install_fast_tracepoint_jump_pad): New function.
2745 (s390_get_min_fast_tracepoint_insn_len): New function.
2746 (s390_get_ipa_tdesc_idx): New function.
2747 (struct linux_target_ops): Wire in the above functions.
2748 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2749 * linux-s390-tdesc.h: New file.
2750
2751 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2752
2753 * linux-s390-low.c (s390_supports_tracepoints): New function.
2754 (struct linux_target_ops): Fill supports_tracepoints hook.
2755
2756 2016-03-18 Yao Qi <yao.qi@linaro.org>
2757
2758 * linux-low.c (lwp_signal_can_be_delivered): New function.
2759 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2760
2761 2016-03-18 Yao Qi <yao.qi@linaro.org>
2762
2763 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2764 0 if signal is enqueued. Remove 'signal' from one debugging
2765 message. Move one debugging message to some lines below.
2766 Remove code setting 'signal' to 0.
2767
2768 2016-03-18 Yao Qi <yao.qi@linaro.org>
2769
2770 * linux-low.c (linux_low_filter_event): Remove redundant
2771 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2772
2773 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2774
2775 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2776 (struct linux_target_ops): Wire in the above.
2777
2778 2016-03-03 Yao Qi <yao.qi@linaro.org>
2779
2780 * linux-low.c: Update comments to start_step_over.
2781
2782 2016-03-03 Yao Qi <yao.qi@linaro.org>
2783
2784 PR server/19736
2785 * linux-low.c (handle_extended_wait): Set child suspended
2786 if event_lwp->bp_reinsert isn't zero.
2787
2788 2016-03-02 Yao Qi <yao.qi@linaro.org>
2789
2790 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2791 enqueue_pending_signal.
2792
2793 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2794
2795 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2796 is actually loaded.
2797
2798 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2799
2800 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2801 (s390_regmap_3264) [!__s390x__]: New global.
2802 (s390_collect_ptrace_register): Skip map entries containing -1.
2803 (s390_supply_ptrace_register): Ditto.
2804 (s390_fill_gprs_high): New function.
2805 (s390_store_gprs_high): New function.
2806 (s390_regsets): Add NT_S390_HIGH_GPRS.
2807 (s390_get_hwcap): Enable on 31-bit.
2808 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2809 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2810 Detect NT_S390_HIGH_GPRS.
2811 (s390_usrregs_info_3264): Enable on 31-bit.
2812 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2813 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2814
2815 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2816
2817 PR gdb/13808
2818 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2819 * configure.srv: Ditto.
2820 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2821 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2822 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2823 (init_registers_amd64_linux): Remove prototype.
2824 (tdesc_amd64_linux): Remove declaration.
2825 (get_ipa_tdesc): New function.
2826 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2827 initialize remaining tdescs.
2828 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2829 (init_registers_i386_linux): Remove prototype.
2830 (tdesc_i386_linux): Remove declaration.
2831 (get_ipa_tdesc): New function.
2832 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2833 initialize remaining tdescs.
2834 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2835 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2836 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2837 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2838 (x86_get_ipa_tdesc_idx): New function.
2839 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2840 * linux-x86-tdesc.h: New file.
2841 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2842 (target_get_ipa_tdesc_idx): New macro.
2843 * tracepoint.c (ipa_tdesc_idx): New macro.
2844 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2845 (symbol_list): Add ipa_tdesc_idx.
2846 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2847 (ipa_tdesc): Remove.
2848 (ipa_tdesc_idx): New variable.
2849 (get_context_regcache): Use get_ipa_tdesc.
2850 (gdb_collect): Ditto.
2851 (gdb_probe): Ditto.
2852 * tracepoint.h (get_ipa_tdesc): New prototype.
2853 (ipa_tdesc): Remove.
2854
2855 2016-02-24 Pedro Alves <palves@redhat.com>
2856
2857 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2858 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2859 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2860 Factor out common code between the USE_SIGTRAP_SIGINFO and
2861 !USE_SIGTRAP_SIGINFO blocks.
2862 (linux_low_filter_event): Call save_stop_reason instead of
2863 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2864 Update comments.
2865 (linux_wait_1): Update comments.
2866
2867 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2868
2869 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2870 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2871 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2872 ppc_insert_point, ppc_remove_point.
2873
2874 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2875
2876 * linux-s390-low.c (s390_supports_z_point_type): New function.
2877 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2878
2879 2016-02-16 Yao Qi <yao.qi@linaro.org>
2880
2881 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2882 PC. Get pc from regcache_read_pc.
2883
2884 2016-02-12 Yao Qi <yao.qi@linaro.org>
2885
2886 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2887 or linux_get_pc_32bit.
2888 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2889
2890 2016-02-12 Yao Qi <yao.qi@linaro.org>
2891
2892 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2893 arm_linux_get_next_pcs_fixup.
2894
2895 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2896
2897 * tracepoint.c (x_tracepoint_action_download): Change
2898 write_inferior_data_ptr to write_inferior_data_pointer.
2899 (cmd_qtstart): Likewise.
2900 (write_inferior_data_ptr): Remove.
2901 (download_agent_expr): Change write_inferior_data_ptr to
2902 write_inferior_data_pointer.
2903 (download_tracepoint_1): Likewise.
2904 (download_tracepoint): Likewise.
2905 (download_trace_state_variables): Likewise.
2906
2907 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2908 Marcin Kościelnicki <koriakin@0x04.net>
2909
2910 * tracepoint.c (struct tracepoint_action_ops): Remove.
2911 (struct tracepoint_action): Remove ops.
2912 (m_tracepoint_action_download, r_tracepoint_action_download)
2913 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2914 size and offset accordingly.
2915 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2916 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2917 (tracepoint_action_send, tracepoint_action_download): New functions.
2918 Helpers for trace action handlers.
2919 (add_tracepoint_action): Remove setup actions ops.
2920 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2921
2922 2016-02-10 Yao Qi <yao.qi@linaro.org>
2923
2924 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2925
2926 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2927
2928 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2929 to AC_OUTPUT.
2930 * configure: Regenerate.
2931
2932 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2933
2934 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2935 void * to gdb_byte *.
2936 * linux-low.c (siginfo_fixup): Likewise.
2937 (linux_xfer_siginfo): Likewise.
2938 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2939 Likewise.
2940 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2941
2942 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2943
2944 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2945 to srv_tgtobj.
2946 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2947 to srv_tgtobj.
2948 * linux-x86-low.c [__x86_64__]: Include
2949 "nat/amd64-linux-siginfo.h".
2950 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2951 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2952 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2953 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2954 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2955 (cpt_si_fd, si_timerid, si_overrun): Move from
2956 nat/amd64-linux-siginfo.c.
2957 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2958
2959 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2960
2961 * server.c (skip_to_semicolon): Remove.
2962 (process_point_options): Use strchrnul instead of
2963 skip_to_semicolon.
2964
2965 2016-01-26 Yao Qi <yao.qi@linaro.org>
2966
2967 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2968 * linux-low.c (install_software_single_step_breakpoints): Don't
2969 call regcache_read_pc.
2970 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2971 argument pc.
2972
2973 2016-01-26 Yao Qi <yao.qi@linaro.org>
2974
2975 * linux-low.c (install_software_single_step_breakpoints): Call
2976 regcache_read_pc instead of get_pc.
2977
2978 2016-01-26 Yao Qi <yao.qi@linaro.org>
2979
2980 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2981 (unblock_async_io): Rename to ...
2982 (block_unblock_async_io): ... it. New function.
2983 (enable_async_io): Don't install SIGIO handler. Unblock it
2984 instead.
2985 (disable_async_io): Don't ignore SIGIO. Block it instead.
2986 (initialize_async_io): Install SIGIO handler. Don't call
2987 unblock_async_io.
2988
2989 2016-01-26 Yao Qi <yao.qi@linaro.org>
2990
2991 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2992 first character is '\003', call *the_target->request_interrupt.
2993
2994 2016-01-25 Yao Qi <yao.qi@linaro.org>
2995
2996 * remote-utils.c (new_thread_notify): Remove.
2997 (dead_thread_notify): Likewise.
2998 * remote-utils.h (new_thread_notify): Remove declaration.
2999 (dead_thread_notify): Likewise.
3000
3001 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3002
3003 * gdb.trace/pending.exp: Fix expected message on continue.
3004
3005 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3006
3007 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3008 it works properly on big-endian machines where sizeof (CORE_ADDR)
3009 != sizeof (void *).
3010
3011 2016-01-21 Pedro Alves <palves@redhat.com>
3012
3013 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3014 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3015 * configure: Regenerate.
3016
3017 2016-01-21 Yao Qi <yao.qi@linaro.org>
3018
3019 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3020 is_thumb and set it according to CPSR saved on the stack.
3021 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3022 arm_sigreturn_next_pc.
3023
3024 2016-01-18 Yao Qi <yao.qi@linaro.org>
3025
3026 * linux-low.c (linux_set_pc_64bit): New function.
3027 (linux_get_pc_64bit): New function.
3028 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3029 Declare.
3030 * linux-sparc-low.c (debug_threads): Remove declaration.
3031 (sparc_get_pc): Remove.
3032 (the_low_target): Use linux_get_pc_64bit instead of
3033 sparc_get_pc.
3034 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3035 (the_low_target): Use linux_get_pc_64bit and
3036 linux_set_pc_64bit.
3037
3038 2016-01-18 Yao Qi <yao.qi@linaro.org>
3039
3040 * linux-arm-low.c (debug_threads): Remove declaration.
3041 (arm_get_pc, arm_set_pc): Remove.
3042 (the_low_target): Use linux_get_pc_32bit and
3043 linux_set_pc_32bit.
3044 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3045 (the_low_target): Use linux_get_pc_32bit and
3046 linux_set_pc_32bit.
3047 * linux-cris-low.c (debug_threads): Remove declaration.
3048 (cris_get_pc, cris_set_pc,): Remove.
3049 (the_low_target): Use linux_get_pc_32bit and
3050 linux_set_pc_32bit.
3051 * linux-crisv32-low.c (debug_threads): Remove declaration.
3052 (cris_get_pc, cris_set_pc): Remove.
3053 (the_low_target): Use linux_get_pc_32bit and
3054 linux_set_pc_32bit.
3055 * linux-low.c: Include inttypes.h.
3056 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3057 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3058 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3059 (the_low_target): Use linux_get_pc_32bit and
3060 linux_set_pc_32bit.
3061 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3062 (the_low_target): Use linux_get_pc_32bit and
3063 linux_set_pc_32bit.
3064 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3065 (the_low_target): Use linux_get_pc_32bit and
3066 linux_set_pc_32bit.
3067 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3068 (the_low_target): Use linux_get_pc_32bit and
3069 linux_set_pc_32bit.
3070 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3071 (the_low_target): Use linux_get_pc_32bit and
3072 linux_set_pc_32bit.
3073
3074 2016-01-18 Gary Benson <gbenson@redhat.com>
3075
3076 * configure.ac (AC_FUNC_FORK): New check.
3077 * config.in: Regenerate.
3078 * configure: Likewise.
3079
3080 2016-01-14 Yao Qi <yao.qi@linaro.org>
3081
3082 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3083 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3084 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3085 arm_get_next_pcs_ctor.
3086
3087 2016-01-12 Josh Stone <jistone@redhat.com>
3088 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3089
3090 * inferiors.h: Include "gdb_vecs.h".
3091 (struct process_info): Add syscalls_to_catch.
3092 * inferiors.c (remove_process): Free syscalls_to_catch.
3093 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3094 syscall_return stops.
3095 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3096 * server.c (handle_general_set): Handle QCatchSyscalls.
3097 (handle_query): Report support for QCatchSyscalls.
3098 * target.h (struct target_ops): Add supports_catch_syscall.
3099 (target_supports_catch_syscall): New macro.
3100 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3101 (struct lwp_info): Add syscall_state.
3102 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3103 Maintain syscall_state and syscalls_to_catch across exec.
3104 (get_syscall_trapinfo): New function, proxy to the_low_target.
3105 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3106 (linux_low_filter_event): Toggle syscall_state entry/return for
3107 syscall traps, and set it ignored for all others.
3108 (gdb_catching_syscalls_p): New function.
3109 (gdb_catch_this_syscall_p): New function.
3110 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3111 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3112 (linux_supports_catch_syscall): New function.
3113 (linux_target_ops): Install it.
3114 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3115 (the_low_target): Install it.
3116
3117 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3118
3119 * acinclude.m4: Include new ../warning.m4 file.
3120 * configure: Regenerated.
3121 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3122
3123 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3124
3125 * ax.c (is_goto_target): Mark static.
3126 * linux-low.c (register_addr): Likewise.
3127 (linux_fetch_registers, linux_store_registers): Likewise.
3128 * mem-break.c (any_persistent_commands): Fix old prototype.
3129 (add_commands_to_breakpoint): Mark static.
3130 * regcache.c (find_register_by_name): Delete unused func.
3131 * remote-utils.c (hex_or_minus_one): Mark static.
3132 * server.c (monitor_show_help): Mark static.
3133 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3134 handle_v_requests): Likewise.
3135
3136 2016-01-12 Pedro Alves <palves@redhat.com>
3137
3138 Remove use of the registered trademark symbol throughout.
3139
3140 2016-01-08 Yao Qi <yao.qi@linaro.org>
3141
3142 * remote-utils.c (getpkt): If c is '\003', call target hook
3143 request_interrupt.
3144
3145 2016-01-06 Yao Qi <yao.qi@linaro.org>
3146
3147 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3148 linux-aarch32-low.c.
3149 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3150 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3151 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3152 (thumb2_breakpoint): Declare.
3153 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3154 linux-aarch32-low.h.
3155 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3156 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3157 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3158
3159 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3160
3161 * gdbreplay.c (gdbreplay_version): Change copyright year in
3162 version message.
3163 * server.c (gdbserver_version): Likewise.
3164
3165 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3166
3167 * server.c (crc32_table): Delete.
3168 (crc32): Use libiberty's xcrc32 function.
3169
3170 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3171
3172 * lynx-low.c (lynx_delete_thread_callback): New function.
3173 (lynx_mourn): Properly delete our process and all of its
3174 threads. Remove call to clear_inferiors.
3175
3176 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3177
3178 * target.c (thread_search_callback): Add check that
3179 the thread_stopped target callback is not NULL before
3180 calling it.
3181
3182 2015-12-21 Yao Qi <yao.qi@linaro.org>
3183
3184 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3185 arm breakpoint.
3186
3187 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3188
3189 * server.c (handle_query): Call target_supports_software_single_step.
3190
3191 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3192
3193 * linux-low.c (single_step): New function.
3194 (linux_resume_one_lwp_throw): Call single_step.
3195 (start_step_over): Likewise.
3196
3197 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3198
3199 * Makefile.in (SFILES): Append arch/arm-linux.c,
3200 arch/arm-get-next-pcs.c.
3201 (arm-linux.o): New rule.
3202 (arm-get-next-pcs.o): New rule.
3203 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3204 arm-linux.o.
3205 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3206 to linux-aarch32-low.c.
3207 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3208 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3209 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3210 (thumb2_breakpoint_len): Likewise.
3211 (arm_is_thumb_mode): Make non-static.
3212 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3213 from linux-aarch32-low.c.
3214 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3215 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3216 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3217 (thumb2_breakpoint_len): Likewise.
3218 (arm_is_thumb_mode): New declaration.
3219 * linux-arm-low.c: Include arch/arm-linux.h
3220 aarch/arm-get-next-pcs.h, sys/syscall.h.
3221 (get_next_pcs_ops): New struct.
3222 (get_next_pcs_addr_bits_remove): New function.
3223 (get_next_pcs_is_thumb): New function.
3224 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3225 (arm_sigreturn_next_pc): Likewise.
3226 (get_next_pcs_syscall_next_pc): Likewise.
3227 (arm_gdbserver_get_next_pcs): Likewise.
3228 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3229 Initialize.
3230 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3231 * server.h: Include gdb_vecs.h.
3232
3233 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3234
3235 * Makefile.in (SFILES): Append common/common-regcache.c.
3236 (OBS): Append common-regcache.o.
3237 (common-regcache.o): New rule.
3238 * regcache.c (init_register_cache): Initialize cache to
3239 REG_UNAVAILABLE.
3240 (regcache_raw_read_unsigned): New function.
3241 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3242 register_status enum.
3243
3244 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3245
3246 * linux-aarch64-low.c (the_low_targets): Rename
3247 breakpoint_reinsert_addr to get_next_pcs.
3248 * linux-arm-low.c (the_low_targets): Likewise.
3249 * linux-bfin-low.c (the_low_targets): Likewise.
3250 * linux-cris-low.c (the_low_targets): Likewise.
3251 * linux-crisv32-low.c (the_low_targets): Likewise.
3252 * linux-low.c (can_software_single_step): Likewise.
3253 (install_software_single_step_breakpoints): New function.
3254 (start_step_over): Use install_software_single_step_breakpoints.
3255 * linux-low.h: New CORE_ADDR vector.
3256 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3257 get_next_pcs.
3258 * linux-mips-low.c (the_low_targets): Likewise.
3259 * linux-nios2-low.c (the_low_targets): Likewise.
3260 * linux-sparc-low.c (the_low_targets): Likewise.
3261
3262 2015-12-17 Pedro Alves <palves@redhat.com>
3263
3264 * linux-low.c (linux_kill_one_lwp): Remove references to
3265 LinuxThreads.
3266 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3267 to 'kill'.
3268 (linux_init_signals): Delete.
3269 (initialize_low): Adjust.
3270 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3271
3272 2015-12-16 Pedro Alves <palves@redhat.com>
3273
3274 * configure.ac (compiler warning flags): When testing a
3275 -Wno-foo option, check whether -Wfoo works instead.
3276 * configure: Regenerate.
3277
3278 2015-12-11 Don Breazeal <donb@codesourcery.com>
3279
3280 * server.c (process_serial_event): Don't exit from gdbserver
3281 in remote mode if there are still active inferiors.
3282
3283 2015-12-11 Yao Qi <yao.qi@linaro.org>
3284
3285 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3286 arm_breakpoint_at if the process is 32-bit.
3287
3288 2015-12-11 Yao Qi <yao.qi@linaro.org>
3289
3290 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3291 arm breakpoint.
3292
3293 2015-12-07 Yao Qi <yao.qi@linaro.org>
3294
3295 * configure.srv: Append arm.o to srv_tgtobj for
3296 aarch64*-*-linux* target.
3297 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3298 from linux-arm-low.c.
3299 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3300 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3301 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3302 (thumb2_breakpoint_len): Likewise.
3303 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3304 (arm_breakpoint_kinds): Likewise.
3305 (arm_breakpoint_kind_from_pc): Likewise.
3306 (arm_sw_breakpoint_from_kind): Likewise.
3307 (arm_breakpoint_kind_from_current_state): Likewise.
3308 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3309 (arm_sw_breakpoint_from_kind): Declare.
3310 (arm_breakpoint_kind_from_current_state): Declare.
3311 (arm_breakpoint_at): Declare.
3312 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3313 arm_sw_breakpoint_from_kind if process is 32-bit.
3314 (aarch64_breakpoint_kind_from_pc): New function.
3315 (aarch64_breakpoint_kind_from_current_state): New function.
3316 (the_low_target): Initialize fields breakpoint_kind_from_pc
3317 and breakpoint_kind_from_current_state.
3318 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3319 linux-aarch32-low.c.
3320 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3321 (arm_breakpoint, arm_breakpoint_len): Likewise.
3322 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3323 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3324 (arm_is_thumb_mode): Likewise.
3325 (arm_breakpoint_at): Likewise.
3326 (arm_breakpoint_kind_from_pc): Likewise.
3327 (arm_sw_breakpoint_from_kind): Likewise.
3328 (arm_breakpoint_kind_from_current_state): Likewise.
3329
3330 Revert:
3331 2015-08-04 Yao Qi <yao.qi@linaro.org>
3332
3333 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3334 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3335 * server.c (extended_protocol): Remove "static".
3336 * server.h (extended_protocol): Declare it.
3337
3338 2015-12-04 Josh Stone <jistone@redhat.com>
3339
3340 * target.h (struct target_ops) <arch_setup>: Rename to ...
3341 (struct target_ops) <post_create_inferior>: ... this.
3342 (target_arch_setup): Rename to ...
3343 (target_post_create_inferior): ... this, calling post_create_inferior.
3344 * server.c (start_inferior): Update target_arch_setup calls to
3345 target_post_create_inferior.
3346 * linux-low.c (linux_low_ptrace_options): Forward declare.
3347 (linux_arch_setup): Update its comment for general use.
3348 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3349 (struct linux_target_ops): Use linux_post_create_inferior.
3350 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3351 to post_create_inferior.
3352 * nto-low.c (struct nto_target_ops): Likewise.
3353 * spu-low.c (struct spu_target_ops): Likewise.
3354 * win32-low.c (struct win32_target_ops): Likewise.
3355
3356 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3357
3358 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3359
3360 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3361
3362 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3363 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3364 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3365 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3366 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3367 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3368 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3369 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3370 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3371 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3372 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3373 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3374
3375 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3376
3377 * linux-low.c (linux_look_up_symbols): Don't call
3378 linux_supports_traceclone.
3379 * linux-low.h (thread_db_init): Remove use_events argument.
3380 * thread-db.c (thread_db_use_event): Remove global variable.
3381 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3382 (struct thread_db) <td_create_bp>: Remove field.
3383 (thread_db_create_event): Remove function.
3384 (thread_db_enable_reporting): Likewise.
3385 (find_one_thread): Don't check for thread_db_use_events.
3386 (attach_thread): Likewise.
3387 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3388 (try_thread_db_load_1): Don't check for thread_db_use_events.
3389 (thread_db_init): Remove use_events argument and thread events
3390 handling.
3391 (remove_thread_event_breakpoints): Remove function.
3392 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3393
3394 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3395
3396 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3397 New function.
3398 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3399 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3400 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3401 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3402 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3403 Initialize.
3404 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3405 New function.
3406 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3407 * linux-low.c (can_hardware_single_step): Use
3408 supports_hardware_single_step.
3409 (can_software_single_step): New function.
3410 (start_step_over): Call can_software_single_step.
3411 (linux_supports_hardware_single_step): New function.
3412 (struct target_ops) <supports_software_single_step>: Initialize.
3413 * linux-low.h (struct linux_target_ops)
3414 <supports_hardware_single_step>: Initialize.
3415 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3416 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3417 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3418 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3419 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3420 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3421 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3422 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3423 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3424 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3425 Initialize.
3426 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3427 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3428 Initialize.
3429 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3430 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3431 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3432 New function.
3433 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3434 * target.h (struct target_ops): <supports_software_single_step>:
3435 New field.
3436 (target_supports_software_single_step): New macro.
3437
3438 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3439
3440 * linux-low.c (linux_wait_1): Fix pc advance condition.
3441 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3442 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3443
3444 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3445
3446 * linux-arm-low.c (arm_is_thumb_mode): New function.
3447 (arm_breakpoint_at): Use arm_is_thumb_mode.
3448 (arm_breakpoint_kind_from_current_state): New function.
3449 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3450 Initialize.
3451 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3452 (linux_breakpoint_kind_from_current_state): New function.
3453 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3454 * linux-low.h (struct linux_target_ops)
3455 <breakpoint_kind_from_current_state>: New field.
3456 * target.h (struct target_ops): Likewise.
3457 (target_breakpoint_kind_from_current_state): New macro.
3458
3459 2015-11-30 Pedro Alves <palves@redhat.com>
3460
3461 * linux-low.c (linux_resume): Wake up the event loop before
3462 returning.
3463
3464 2015-11-30 Pedro Alves <palves@redhat.com>
3465
3466 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3467 check.
3468 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3469 to -1.
3470 * target.c (struct thread_search): New structure.
3471 (thread_search_callback): New function.
3472 (prev_general_thread): New global.
3473 (prepare_to_access_memory, done_accessing_memory): New functions.
3474 * target.h (prepare_to_access_memory, done_accessing_memory):
3475 Replace macros with function declarations.
3476
3477 2015-11-30 Pedro Alves <palves@redhat.com>
3478
3479 PR 14618
3480 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3481 report TARGET_WAITKIND_NO_RESUMED.
3482 * remote-utils.c (prepare_resume_reply): Handle
3483 TARGET_WAITKIND_NO_RESUMED.
3484 * server.c (report_no_resumed): New global.
3485 (handle_query) <qSupported>: Handle "no-resumed+". Report
3486 "no-resumed+" support.
3487 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3488 return error if the client doesn't support no-resumed events.
3489 (push_stop_notification): New function.
3490 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3491 events if the client supports them.
3492
3493 2015-11-30 Pedro Alves <palves@redhat.com>
3494
3495 * linux-low.c (thread_still_has_status_pending_p): Don't check
3496 vCont;t here.
3497 (lwp_resumed): New function.
3498 (status_pending_p_callback): Return early if the LWP is not
3499 supposed to be resumed.
3500
3501 2015-11-30 Pedro Alves <palves@redhat.com>
3502
3503 * linux-low.c (handle_extended_wait): Assert that the LWP's
3504 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3505 thread create events, leave the new child's status pending.
3506 (linux_low_filter_event): If GDB wants to hear about thread exit
3507 events, leave the LWP marked dead and don't delete it.
3508 (linux_wait_for_event_filtered): Don't check for thread exit.
3509 (filter_exit_event): New function.
3510 (linux_wait_1): Use it, when returning an exit event.
3511 (linux_resume_one_lwp_throw): Assert that the LWP's
3512 waitstatus is TARGET_WAITKIND_IGNORE.
3513 * remote-utils.c (prepare_resume_reply): Handle
3514 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3515 * server.c (report_thread_events): New global.
3516 (handle_general_set): Handle QThreadEvents.
3517 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3518 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3519 TARGET_WAITKIND_THREAD_EXITED.
3520 * server.h (report_thread_events): Declare.
3521
3522 2015-11-30 Pedro Alves <palves@redhat.com>
3523
3524 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3525 the thread's last_resume_kind was resume_stop.
3526
3527 2015-11-30 Pedro Alves <palves@redhat.com>
3528
3529 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3530 before returning.
3531
3532 2015-11-30 Pedro Alves <palves@redhat.com>
3533
3534 * server.c (handle_v_requests): Handle vCtrlC.
3535
3536 2015-11-30 Pedro Alves <palves@redhat.com>
3537
3538 * gdbthread.h (find_any_thread_of_pid): Declare.
3539 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3540 functions.
3541 * server.c (handle_query): If current_thread is NULL, look for
3542 another thread of the selected process.
3543
3544 2015-11-26 Daniel Colascione <dancol@dancol.org>
3545 Simon Marchi <simon.marchi@ericsson.com>
3546
3547 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3548 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3549 name in reply.
3550 * target.h (struct target_ops) <thread_name>: New field.
3551 (target_thread_name): New macro.
3552
3553 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3554
3555 * regcache.h (regcache_invalidate_pid): Add declaration.
3556 * regcache.c (regcache_invalidate_pid): New function, extracted
3557 from regcache_invalidate.
3558 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3559 Add trivial documentation comment.
3560 * lynx-low.c: Use regcache_invalidate_pid instead of
3561 regcache_invalidate.
3562
3563 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3564
3565 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3566 and Elf64_auxv_t if the target is Android.
3567
3568 2015-11-22 Doug Evans <xdje42@gmail.com>
3569
3570 * target.h: #include <sys/types.h>.
3571
3572 2015-11-19 Pedro Alves <palves@redhat.com>
3573
3574 * linux-low.c (linux_process_qsupported): Change prototype.
3575 Adjust.
3576 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3577 Change prototype.
3578 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3579 and adjust to loop over all features.
3580 * server.c (handle_query) <qSupported>: Adjust to call
3581 target_process_qsupported once, passing it a vector of unprocessed
3582 features.
3583 * target.h (struct target_ops) <process_qsupported>: Change
3584 prototype.
3585 (target_process_qsupported): Adjust.
3586
3587 2015-11-19 Pedro Alves <palves@redhat.com>
3588
3589 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3590 mode.
3591 * configure: Regenerate.
3592
3593 2015-11-19 Pedro Alves <palves@redhat.com>
3594
3595 * configure: Regenerate.
3596
3597 2015-11-19 Yao Qi <yao.qi@linaro.org>
3598
3599 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3600 type to uint32_t.
3601
3602 2015-11-19 Yao Qi <yao.qi@linaro.org>
3603
3604 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3605 (struct aarch64_operand): Move enum out.
3606
3607 2015-11-19 Yao Qi <yao.qi@linaro.org>
3608
3609 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3610 struct user_fpsimd_state *.
3611 (aarch64_store_fpregset): Likewise.
3612
3613 2015-11-19 Yao Qi <yao.qi@linaro.org>
3614
3615 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3616 struct user_pt_regs *.
3617 (aarch64_store_gregset): Likewise.
3618
3619 2015-11-18 Pedro Alves <palves@redhat.com>
3620
3621 * Makefile.in (all_object_files): Add $IPA_OBJS.
3622
3623 2015-11-17 Pedro Alves <palves@redhat.com>
3624
3625 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3626 GDB_SIGNAL_0 and gdb_signal_to_string.
3627
3628 2015-11-17 Pedro Alves <palves@redhat.com>
3629
3630 * win32-low.c (handle_output_debug_string): Remove parameter.
3631 (win32_kill): Remove our_status local and adjust call to
3632 handle_output_debug_string.
3633 (get_child_debug_event): Adjust call to
3634 handle_output_debug_string.
3635
3636 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3637
3638 * linux-mips-low.c (mips_fill_gregset): Add cast.
3639 (mips_store_gregset): Likewise.
3640 (mips_fill_fpregset): Likewise.
3641 (mips_store_fpregset): Likewise.
3642
3643 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3644
3645 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3646 priv.
3647
3648 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3649
3650 * linux-mips-low.c (mips_linux_new_thread): Change type of
3651 watch_type to enum target_hw_bp_type.
3652
3653 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3654
3655 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3656 Change return type to arm_hwbp_type.
3657
3658 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3659
3660 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3661 (arm_store_gregset): Likewise.
3662 * linux-arm-low.c (arm_get_hwcap): Likewise.
3663 (arm_read_description): Likewise.
3664
3665 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3666
3667 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3668
3669 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3670
3671 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3672 (ppc_fill_vsxregset): Likewise.
3673 (ppc_store_vsxregset): Likewise.
3674 (ppc_fill_vrregset): Likewise.
3675 (ppc_store_vrregset): Likewise.
3676 (ppc_fill_evrregset): Likewise.
3677 (ppc_store_evrregset): Likewise.
3678
3679 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3680
3681 * linux-ppc-low.c (ppc_usrregs_info): Remove
3682 forward-declaration.
3683 (ppc_arch_setup): Move lower in file.
3684
3685 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3686
3687 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3688 (ps_pdwrite): Likewise.
3689
3690 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3691
3692 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3693 to after assert checks.
3694
3695 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3696
3697 * proc-service.c (ps_pdread): Add/adjust casts.
3698 (ps_pdwrite): Add/adjust casts.
3699
3700 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3701
3702 * server.c (handle_search_memory_1): Cast return value of
3703 memmem.
3704
3705 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3706
3707 * server.c (write_qxfer_response): Change type of data to
3708 gdb_byte *.
3709
3710 2015-10-29 Pedro Alves <palves@redhat.com>
3711
3712 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3713
3714 2015-10-29 Pedro Alves <palves@redhat.com>
3715
3716 * tracepoint.c (clear_installed_tracepoints): Add casts.
3717
3718 2015-10-29 Pedro Alves <palves@redhat.com>
3719
3720 * server.c (handle_v_cont, process_serial_event): Add enum
3721 gdb_signal casts to signal parsing code.
3722
3723 2015-10-29 Pedro Alves <palves@redhat.com>
3724
3725 * linux-low.h (NULL_REGSET): Define.
3726 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3727 * linux-arm-low.c (arm_regsets): Likewise.
3728 * linux-crisv32-low.c (cris_regsets): Likewise.
3729 * linux-m68k-low.c (m68k_regsets): Likewise.
3730 * linux-mips-low.c (mips_regsets): Likewise.
3731 * linux-nios2-low.c (nios2_regsets): Likewise.
3732 * linux-ppc-low.c (ppc_regsets): Likewise.
3733 * linux-s390-low.c (s390_regsets): Likewise.
3734 * linux-sh-low.c (sh_regsets): Likewise.
3735 * linux-sparc-low.c (sparc_regsets): Likewise.
3736 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3737 * linux-tile-low.c (tile_regsets): Likewise.
3738 * linux-x86-low.c (x86_regsets): Likewise.
3739 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3740
3741 2015-10-29 Pedro Alves <palves@redhat.com>
3742
3743 * linux-low.h (NULL_REGSET): Define.
3744 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3745 * linux-arm-low.c (arm_regsets): Likewise.
3746 * linux-crisv32-low.c (cris_regsets): Likewise.
3747 * linux-m68k-low.c (m68k_regsets): Likewise.
3748 * linux-mips-low.c (mips_regsets): Likewise.
3749 * linux-nios2-low.c (nios2_regsets): Likewise.
3750 * linux-ppc-low.c (ppc_regsets): Likewise.
3751 * linux-s390-low.c (s390_regsets): Likewise.
3752 * linux-sh-low.c (sh_regsets): Likewise.
3753 * linux-sparc-low.c (sparc_regsets): Likewise.
3754 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3755 * linux-tile-low.c (tile_regsets): Likewise.
3756 * linux-x86-low.c (x86_regsets): Likewise.
3757 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3758
3759 2015-10-26 Doug Evans <dje@google.com>
3760
3761 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3762
3763 2015-10-26 Doug Evans <dje@google.com>
3764
3765 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3766
3767 2015-10-26 Doug Evans <dje@google.com>
3768
3769 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3770 for debug_printf.
3771 (attach_thread, find_new_threads_callback): Ditto.
3772
3773 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3774
3775 * mem-break.h (set_breakpoint_data): Remove.
3776
3777 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3778
3779 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3780 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3781 (initialize_low): Remove set_breakpoint_data call.
3782 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3783 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3784 (initialize_low): Remove set_breakpoint_data call.
3785 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3786 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3787 (initialize_low): Remove set_breakpoint_data call.
3788
3789 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3790
3791 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3792 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3793 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3794 * target.h (target_breakpoint_kind_from_pc): New macro.
3795
3796 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3797
3798 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3799 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3800 the default breakpoint kind.
3801
3802 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3803
3804 * linux-arm-low.c (arm_supports_z_point_type): Add software
3805 breakpoint support.
3806
3807 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3808
3809 * linux-arm-low.c: Refactor breakpoint definitions.
3810 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3811 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3812
3813 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3814
3815 * Makefile.in: Add arm.c/o.
3816 * configure.srv: Likewise.
3817 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3818 (arm_breakpoint_kind_from_pc): New function.
3819 (arm_sw_breakpoint_from_kind): Return proper kind.
3820 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3821
3822 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3823
3824 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3825 removal.
3826 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3827 (struct raw_breakpoint) <size>: Remove.
3828 (struct raw_breakpoint) <kind>: Add.
3829 (bp_size): New function.
3830 (bp_opcode): Likewise.
3831 (find_raw_breakpoint_at): Adjust for kind.
3832 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3833 (remove_memory_breakpoint): Adjust for kind call bp_size.
3834 (set_raw_breakpoint_at): Adjust for kind.
3835 (set_breakpoint): Likewise.
3836 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3837 (delete_raw_breakpoint): Adjust for kind.
3838 (delete_breakpoint): Likewise.
3839 (find_gdb_breakpoint): Likewise.
3840 (set_gdb_breakpoint_1): Likewise.
3841 (set_gdb_breakpoint): Likewise.
3842 (delete_gdb_breakpoint_1): Likewise.
3843 (delete_gdb_breakpoint): Likewise.
3844 (uninsert_raw_breakpoint): Likewise.
3845 (reinsert_raw_breakpoint): Likewise.
3846 (set_breakpoint_data): Remove.
3847 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3848 (check_mem_read): Adjust for kind call bp_size.
3849 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3850 (clone_one_breakpoint): Adjust for kind.
3851 * mem-break.h (set_gdb_breakpoint): Likewise.
3852 (delete_gdb_breakpoint): Likewise.
3853 * server.c (process_serial_event): Likewise.
3854
3855 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3856
3857 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3858 (struct linux_target_ops) <breakpoint>: Remove.
3859 (struct linux_target_ops) <breakpoint_len>: Remove.
3860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3862 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3863 (arm_sw_breakpoint_from_kind): New function.
3864 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3880 and sw_breakpoint_from_kind to increment the pc.
3881 (linux_breakpoint_kind_from_pc): New function.
3882 (linux_sw_breakpoint_from_kind): New function.
3883 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3884 (initialize_low): Call breakpoint_kind_from_pc and
3885 sw_breakpoint_from_kind to replace breakpoint_data/len.
3886 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3887 New field.
3888 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3889 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3900 (struct linux_target_ops) <breakpoint>: Remove.
3901 (struct linux_target_ops) <breakpoint_len>: Remove.
3902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3904 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3905 (struct linux_target_ops) <breakpoint>: Remove.
3906 (struct linux_target_ops) <breakpoint_len>: Remove.
3907 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3908 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3909 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3910 (struct linux_target_ops) <breakpoint>: Remove.
3911 (struct linux_target_ops) <breakpoint_len>: Remove.
3912 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3913 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3914 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3915 (struct linux_target_ops) <breakpoint>: Remove.
3916 (struct linux_target_ops) <breakpoint_len>: Remove.
3917 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3918 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3919 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3920 (struct linux_target_ops) <breakpoint>: Remove.
3921 (struct linux_target_ops) <breakpoint_len>: Remove.
3922 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3923 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3924 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3925 (struct linux_target_ops) <breakpoint>: Remove.
3926 (struct linux_target_ops) <breakpoint_len>: Remove.
3927 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3928 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3929 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3930 (struct linux_target_ops) <breakpoint>: Remove.
3931 (struct linux_target_ops) <breakpoint_len>: Remove.
3932 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3933 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3934 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3935 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3936 (struct linux_target_ops) <breakpoint>: Remove.
3937 (struct linux_target_ops) <breakpoint_len>: Remove.
3938 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3939 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3940 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3941 (struct linux_target_ops) <breakpoint>: Remove.
3942 (struct linux_target_ops) <breakpoint_len>: Remove.
3943 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3944 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3945
3946 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3947
3948 * linux-cris-low.c (cris_get_pc): Remove void arg.
3949
3950 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3951
3952 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3953 variable name.
3954
3955 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3956
3957 * inferiors.c (thread_pid_matches_callback): New function.
3958 (find_thread_process): New function.
3959 (remove_thread): Reset current_thread.
3960 (remove_process): Assert threads have been removed first.
3961
3962 2015-10-15 Yao Qi <yao.qi@linaro.org>
3963
3964 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3965 if it is 3.
3966 (aarch64_remove_point): Likewise.
3967 * regcache.c (regcache_register_size): New function.
3968
3969 2015-10-12 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-aarch64-low.c: Update all callers as emit_load_store
3972 is renamed to aarch64_emit_load_store.
3973
3974 2015-10-12 Yao Qi <yao.qi@linaro.org>
3975
3976 * linux-aarch64-low.c: Update all callers of function renaming
3977 from emit_insn to aarch64_emit_insn.
3978
3979 2015-10-12 Yao Qi <yao.qi@linaro.org>
3980
3981 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3982 arch/aarch64-insn.h.
3983 (struct aarch64_memory_operand): Likewise.
3984 (ENCODE): Likewise.
3985 (emit_insn): Move to arch/aarch64-insn.c.
3986 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3987 (emit_load_store): Move to arch/aarch64-insn.c.
3988 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3989 (can_encode_int32): Remove.
3990
3991 2015-10-12 Yao Qi <yao.qi@linaro.org>
3992
3993 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3994 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3995 (aarch64_relocate_instruction): Likewise.
3996 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3997 (struct aarch64_insn_visitor): Likewise.
3998
3999 2015-10-12 Yao Qi <yao.qi@linaro.org>
4000
4001 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4002 (struct aarch64_insn_visitor): New.
4003 (struct aarch64_insn_relocation_data): New.
4004 (aarch64_ftrace_insn_reloc_b): New function.
4005 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4006 (aarch64_ftrace_insn_reloc_cb): Likewise.
4007 (aarch64_ftrace_insn_reloc_tb): Likewise.
4008 (aarch64_ftrace_insn_reloc_adr): Likewise.
4009 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4010 (aarch64_ftrace_insn_reloc_others): Likewise.
4011 (visitor): New.
4012 (aarch64_relocate_instruction): Use visitor.
4013
4014 2015-10-12 Yao Qi <yao.qi@linaro.org>
4015
4016 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4017 int. Add argument buf.
4018 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4019 aarch64_relocate_instruction.
4020
4021 2015-10-12 Yao Qi <yao.qi@linaro.org>
4022
4023 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4024 argument insn. Remove local variable insn. Don't call
4025 target_read_uint32.
4026 (aarch64_install_fast_tracepoint_jump_pad): Call
4027 target_read_uint32.
4028
4029 2015-09-30 Yao Qi <yao.qi@linaro.org>
4030
4031 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4032 (emit_load_store_pair): Likewise.
4033
4034 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4035
4036 * dll.c (match_dll): Add cast(s).
4037 (unloaded_dll): Likewise.
4038 * linux-low.c (second_thread_of_pid_p): Likewise.
4039 (delete_lwp_callback): Likewise.
4040 (count_events_callback): Likewise.
4041 (select_event_lwp_callback): Likewise.
4042 (linux_set_resume_request): Likewise.
4043 * server.c (accumulate_file_name_length): Likewise.
4044 (emit_dll_description): Likewise.
4045 (handle_qxfer_threads_worker): Likewise.
4046 (visit_actioned_threads): Likewise.
4047 * thread-db.c (any_thread_of): Likewise.
4048 * tracepoint.c (same_process_p): Likewise.
4049 (match_blocktype): Likewise.
4050 (build_traceframe_info_xml): Likewise.
4051
4052 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4053
4054 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4055 assignment.
4056 (gdb_unparse_agent_expr): Likewise.
4057 * hostio.c (require_data): Likewise.
4058 (handle_pread): Likewise.
4059 * linux-low.c (disable_regset): Likewise.
4060 (fetch_register): Likewise.
4061 (store_register): Likewise.
4062 (get_dynamic): Likewise.
4063 (linux_qxfer_libraries_svr4): Likewise.
4064 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4065 (set_fast_tracepoint_jump): Likewise.
4066 (uninsert_fast_tracepoint_jumps_at): Likewise.
4067 (reinsert_fast_tracepoint_jumps_at): Likewise.
4068 (validate_inserted_breakpoint): Likewise.
4069 (clone_agent_expr): Likewise.
4070 * regcache.c (init_register_cache): Likewise.
4071 * remote-utils.c (putpkt_binary_1): Likewise.
4072 (decode_M_packet): Likewise.
4073 (decode_X_packet): Likewise.
4074 (look_up_one_symbol): Likewise.
4075 (relocate_instruction): Likewise.
4076 (monitor_output): Likewise.
4077 * server.c (handle_search_memory): Likewise.
4078 (handle_qxfer_exec_file): Likewise.
4079 (handle_qxfer_libraries): Likewise.
4080 (handle_qxfer): Likewise.
4081 (handle_query): Likewise.
4082 (handle_v_cont): Likewise.
4083 (handle_v_run): Likewise.
4084 (captured_main): Likewise.
4085 * target.c (write_inferior_memory): Likewise.
4086 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4087 * tracepoint.c (init_trace_buffer): Likewise.
4088 (add_tracepoint_action): Likewise.
4089 (add_traceframe): Likewise.
4090 (add_traceframe_block): Likewise.
4091 (cmd_qtdpsrc): Likewise.
4092 (cmd_qtdv): Likewise.
4093 (cmd_qtstatus): Likewise.
4094 (response_source): Likewise.
4095 (response_tsv): Likewise.
4096 (cmd_qtnotes): Likewise.
4097 (gdb_collect): Likewise.
4098 (initialize_tracepoint): Likewise.
4099
4100 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4101
4102 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4103 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4104 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4105 <NOP>: New.
4106 (enum aarch64_condition_codes): New enum.
4107 (w0): New static global.
4108 (fp): Likewise.
4109 (lr): Likewise.
4110 (struct aarch64_memory_operand) <type>: New
4111 MEMORY_OPERAND_POSTINDEX type.
4112 (postindex_memory_operand): New helper function.
4113 (emit_ret): New function.
4114 (emit_load_store_pair): New function, factored out of emit_stp
4115 with support for MEMORY_OPERAND_POSTINDEX.
4116 (emit_stp): Rewrite using emit_load_store_pair.
4117 (emit_ldp): New function.
4118 (emit_load_store): Likewise.
4119 (emit_ldr): Mention post-index instruction in comment.
4120 (emit_ldrh): New function.
4121 (emit_ldrb): New function.
4122 (emit_ldrsw): Mention post-index instruction in comment.
4123 (emit_str): Likewise.
4124 (emit_subs): New function.
4125 (emit_cmp): Likewise.
4126 (emit_and): Likewise.
4127 (emit_orr): Likewise.
4128 (emit_orn): Likewise.
4129 (emit_eor): Likewise.
4130 (emit_mvn): Likewise.
4131 (emit_lslv): Likewise.
4132 (emit_lsrv): Likewise.
4133 (emit_asrv): Likewise.
4134 (emit_mul): Likewise.
4135 (emit_sbfm): Likewise.
4136 (emit_sbfx): Likewise.
4137 (emit_ubfm): Likewise.
4138 (emit_ubfx): Likewise.
4139 (emit_csinc): Likewise.
4140 (emit_cset): Likewise.
4141 (emit_nop): Likewise.
4142 (emit_ops_insns): New helper function.
4143 (emit_pop): Likewise.
4144 (emit_push): Likewise.
4145 (aarch64_emit_prologue): New function.
4146 (aarch64_emit_epilogue): Likewise.
4147 (aarch64_emit_add): Likewise.
4148 (aarch64_emit_sub): Likewise.
4149 (aarch64_emit_mul): Likewise.
4150 (aarch64_emit_lsh): Likewise.
4151 (aarch64_emit_rsh_signed): Likewise.
4152 (aarch64_emit_rsh_unsigned): Likewise.
4153 (aarch64_emit_ext): Likewise.
4154 (aarch64_emit_log_not): Likewise.
4155 (aarch64_emit_bit_and): Likewise.
4156 (aarch64_emit_bit_or): Likewise.
4157 (aarch64_emit_bit_xor): Likewise.
4158 (aarch64_emit_bit_not): Likewise.
4159 (aarch64_emit_equal): Likewise.
4160 (aarch64_emit_less_signed): Likewise.
4161 (aarch64_emit_less_unsigned): Likewise.
4162 (aarch64_emit_ref): Likewise.
4163 (aarch64_emit_if_goto): Likewise.
4164 (aarch64_emit_goto): Likewise.
4165 (aarch64_write_goto_address): Likewise.
4166 (aarch64_emit_const): Likewise.
4167 (aarch64_emit_call): Likewise.
4168 (aarch64_emit_reg): Likewise.
4169 (aarch64_emit_pop): Likewise.
4170 (aarch64_emit_stack_flush): Likewise.
4171 (aarch64_emit_zero_ext): Likewise.
4172 (aarch64_emit_swap): Likewise.
4173 (aarch64_emit_stack_adjust): Likewise.
4174 (aarch64_emit_int_call_1): Likewise.
4175 (aarch64_emit_void_call_2): Likewise.
4176 (aarch64_emit_eq_goto): Likewise.
4177 (aarch64_emit_ne_goto): Likewise.
4178 (aarch64_emit_lt_goto): Likewise.
4179 (aarch64_emit_le_goto): Likewise.
4180 (aarch64_emit_gt_goto): Likewise.
4181 (aarch64_emit_ge_got): Likewise.
4182 (aarch64_emit_ops_impl): New static global variable.
4183 (aarch64_emit_ops): New target function, return
4184 &aarch64_emit_ops_impl.
4185 (struct linux_target_ops): Install it.
4186
4187 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4188
4189 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4190 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4191 aarch64-ipa.o.
4192 * linux-aarch64-ipa.c: New file.
4193 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4194 and endian.h.
4195 (aarch64_get_thread_area): New target method.
4196 (extract_signed_bitfield): New helper function.
4197 (aarch64_decode_ldr_literal): New function.
4198 (enum aarch64_opcodes): New enum.
4199 (struct aarch64_register): New struct.
4200 (struct aarch64_operand): New struct.
4201 (x0): New static global.
4202 (x1): Likewise.
4203 (x2): Likewise.
4204 (x3): Likewise.
4205 (x4): Likewise.
4206 (w2): Likewise.
4207 (ip0): Likewise.
4208 (sp): Likewise.
4209 (xzr): Likewise.
4210 (aarch64_register): New helper function.
4211 (register_operand): Likewise.
4212 (immediate_operand): Likewise.
4213 (struct aarch64_memory_operand): New struct.
4214 (offset_memory_operand): New helper function.
4215 (preindex_memory_operand): Likewise.
4216 (enum aarch64_system_control_registers): New enum.
4217 (ENCODE): New macro.
4218 (emit_insn): New helper function.
4219 (emit_b): New function.
4220 (emit_bcond): Likewise.
4221 (emit_cb): Likewise.
4222 (emit_tb): Likewise.
4223 (emit_blr): Likewise.
4224 (emit_stp): Likewise.
4225 (emit_ldp_q_offset): Likewise.
4226 (emit_stp_q_offset): Likewise.
4227 (emit_load_store): Likewise.
4228 (emit_ldr): Likewise.
4229 (emit_ldrsw): Likewise.
4230 (emit_str): Likewise.
4231 (emit_ldaxr): Likewise.
4232 (emit_stxr): Likewise.
4233 (emit_stlr): Likewise.
4234 (emit_data_processing_reg): Likewise.
4235 (emit_data_processing): Likewise.
4236 (emit_add): Likewise.
4237 (emit_sub): Likewise.
4238 (emit_mov): Likewise.
4239 (emit_movk): Likewise.
4240 (emit_mov_addr): Likewise.
4241 (emit_mrs): Likewise.
4242 (emit_msr): Likewise.
4243 (emit_sevl): Likewise.
4244 (emit_wfe): Likewise.
4245 (append_insns): Likewise.
4246 (can_encode_int32_in): New helper function.
4247 (aarch64_relocate_instruction): New function.
4248 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4249 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4250 (struct linux_target_ops): Install aarch64_get_thread_area,
4251 aarch64_install_fast_tracepoint_jump_pad and
4252 aarch64_get_min_fast_tracepoint_insn_len.
4253
4254 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4255
4256 * Makefile.in (aarch64-insn.o): New rule.
4257 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4258
4259 2015-09-21 Yao Qi <yao.qi@linaro.org>
4260
4261 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4262
4263 2015-09-21 Yao Qi <yao.qi@linaro.org>
4264
4265 * tracepoint.c (max_jump_pad_size): Remove.
4266
4267 2015-09-18 Yao Qi <yao.qi@linaro.org>
4268
4269 * linux-aarch64-low.c: Don't include sys/uio.h.
4270 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4271
4272 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4273
4274 * tracepoint.c (eval_result_type): Change prototype.
4275 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4276
4277 2015-09-15 Pedro Alves <palves@redhat.com>
4278
4279 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4280 Check whether to report exec events instead of checking whether
4281 multiprocess is enabled.
4282
4283 2015-09-15 Pedro Alves <palves@redhat.com>
4284
4285 PR remote/18965
4286 * remote-utils.c (prepare_resume_reply): Merge
4287 TARGET_WAITKIND_VFORK_DONE switch case with the
4288 TARGET_WAITKIND_FORKED case.
4289
4290 2015-09-15 Yao Qi <yao.qi@linaro.org>
4291
4292 * server.c (handle_query): Check string comparison using
4293 "else if" instead of "if".
4294
4295 2015-09-15 Yao Qi <yao.qi@linaro.org>
4296
4297 * server.c (vCont_supported): New global variable.
4298 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4299 matches. Append ";vContSupported+" to own_buf.
4300 (handle_v_requests): Append ";s;S" to own_buf if target supports
4301 hardware single step or vCont_supported is false.
4302 (capture_main): Set vCont_supported to zero.
4303
4304 2015-09-15 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4307 it to ...
4308 (linux_supports_hardware_single_step): ... New function.
4309 (linux_target_ops): Update.
4310 * lynx-low.c (lynx_target_ops): Set field
4311 supports_hardware_single_step to target_can_do_hardware_single_step.
4312 * nto-low.c (nto_target_ops): Likewise.
4313 * spu-low.c (spu_target_ops): Likewise.
4314 * win32-low.c (win32_target_ops): Likewise.
4315 * target.c (target_can_do_hardware_single_step): New function.
4316 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4317 Remove. <supports_hardware_single_step>: New field.
4318 (target_supports_conditional_breakpoints): Remove.
4319 (target_supports_hardware_single_step): New macro.
4320 (target_can_do_hardware_single_step): Declare.
4321 * server.c (handle_query): Use target_supports_hardware_single_step
4322 instead of target_supports_conditional_breakpoints.
4323
4324 2015-09-15 Yao Qi <yao.qi@linaro.org>
4325
4326 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4327 function.
4328 (struct linux_target_ops the_low_target): Install
4329 aarch64_linux_siginfo_fixup.
4330
4331 2015-09-11 Don Breazeal <donb@codesourcery.com>
4332 Luis Machado <lgustavo@codesourcery.com>
4333
4334 * linux-low.c (linux_mourn): Static declaration.
4335 (linux_arch_setup): Move in front of
4336 handle_extended_wait.
4337 (linux_arch_setup_thread): New function.
4338 (handle_extended_wait): Handle exec events. Call
4339 linux_arch_setup_thread. Make event_lwp argument a
4340 pointer-to-a-pointer.
4341 (check_zombie_leaders): Do not check stopped threads.
4342 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4343 (linux_low_filter_event): Add lwp and thread for exec'ing
4344 non-leader thread if leader thread has been deleted.
4345 Refactor code into linux_arch_setup_thread and call it.
4346 Pass child lwp pointer by reference to handle_extended_wait.
4347 (linux_wait_for_event_filtered): Update comment.
4348 (linux_wait_1): Prevent clobbering exec event status.
4349 (linux_supports_exec_events): New function.
4350 (linux_target_ops) <supports_exec_events>: Initialize new member.
4351 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4352 new member.
4353 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4354 * server.c (report_exec_events): New global variable.
4355 (handle_query): Handle qSupported query for exec-events feature.
4356 (captured_main): Initialize report_exec_events.
4357 * server.h (report_exec_events): Declare new global variable.
4358 * target.h (struct target_ops) <supports_exec_events>: New
4359 member.
4360 (target_supports_exec_events): New macro.
4361 * win32-low.c (win32_target_ops) <supports_exec_events>:
4362 Initialize new member.
4363
4364 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4365
4366 * linux-low.c (linux_low_enable_btrace): Remove.
4367 (linux_target_ops): Replace linux_low_enable_btrace with
4368 linux_enable_btrace.
4369
4370 2015-09-03 Yao Qi <yao.qi@linaro.org>
4371
4372 * linux-aarch64-low.c (aarch64_insert_point): Call
4373 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4374 returns true.
4375
4376 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4377
4378 * linux-low.c (check_stopped_by_breakpoint): Use
4379 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4380
4381 2015-08-27 Pedro Alves <palves@redhat.com>
4382
4383 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4384
4385 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4386
4387 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4388 the XNEW-family equivalent.
4389 (compile_bytecodes): Likewise.
4390 * dll.c (loaded_dll): Likewise.
4391 * event-loop.c (append_callback_event): Likewise.
4392 (create_file_handler): Likewise.
4393 (create_file_event): Likewise.
4394 * hostio.c (handle_open): Likewise.
4395 * inferiors.c (add_thread): Likewise.
4396 (add_process): Likewise.
4397 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4398 * linux-arm-low.c (arm_new_process): Likewise.
4399 (arm_new_thread): Likewise.
4400 * linux-low.c (add_to_pid_list): Likewise.
4401 (linux_add_process): Likewise.
4402 (handle_extended_wait): Likewise.
4403 (add_lwp): Likewise.
4404 (enqueue_one_deferred_signal): Likewise.
4405 (enqueue_pending_signal): Likewise.
4406 (linux_resume_one_lwp_throw): Likewise.
4407 (linux_resume_one_thread): Likewise.
4408 (linux_read_memory): Likewise.
4409 (linux_write_memory): Likewise.
4410 * linux-mips-low.c (mips_linux_new_process): Likewise.
4411 (mips_linux_new_thread): Likewise.
4412 (mips_add_watchpoint): Likewise.
4413 * linux-x86-low.c (initialize_low_arch): Likewise.
4414 * lynx-low.c (lynx_add_process): Likewise.
4415 * mem-break.c (set_raw_breakpoint_at): Likewise.
4416 (set_breakpoint): Likewise.
4417 (add_condition_to_breakpoint): Likewise.
4418 (add_commands_to_breakpoint): Likewise.
4419 (clone_agent_expr): Likewise.
4420 (clone_one_breakpoint): Likewise.
4421 * regcache.c (new_register_cache): Likewise.
4422 * remote-utils.c (look_up_one_symbol): Likewise.
4423 * server.c (queue_stop_reply): Likewise.
4424 (start_inferior): Likewise.
4425 (queue_stop_reply_callback): Likewise.
4426 (handle_target_event): Likewise.
4427 * spu-low.c (fetch_ppc_memory): Likewise.
4428 (store_ppc_memory): Likewise.
4429 * target.c (set_target_ops): Likewise.
4430 * thread-db.c (thread_db_load_search): Likewise.
4431 (try_thread_db_load_1): Likewise.
4432 * tracepoint.c (add_tracepoint): Likewise.
4433 (add_tracepoint_action): Likewise.
4434 (create_trace_state_variable): Likewise.
4435 (cmd_qtdpsrc): Likewise.
4436 (cmd_qtro): Likewise.
4437 (add_while_stepping_state): Likewise.
4438 * win32-low.c (child_add_thread): Likewise.
4439 (get_image_name): Likewise.
4440
4441 2015-08-25 Yao Qi <yao.qi@linaro.org>
4442
4443 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4444
4445 2015-08-25 Yao Qi <yao.qi@linaro.org>
4446
4447 * Makefile.in (aarch64-linux.o): New rule.
4448 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4449 srv_tgtobj.
4450 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4451 (aarch64_init_debug_reg_state): Make it extern.
4452 (aarch64_linux_prepare_to_resume): Remove.
4453
4454 2015-08-25 Yao Qi <yao.qi@linaro.org>
4455
4456 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4457 lwp_arch_private_info and ptid_of_lwp.
4458
4459 2015-08-25 Yao Qi <yao.qi@linaro.org>
4460
4461 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4462 Find proc_info by find_process_pid. All callers updated.
4463
4464 2015-08-25 Yao Qi <yao.qi@linaro.org>
4465
4466 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4467 Remove.
4468 (debug_reg_change_callback): Remove.
4469 (aarch64_notify_debug_reg_change): Remove.
4470
4471 2015-08-25 Yao Qi <yao.qi@linaro.org>
4472
4473 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4474 Call current_lwp_ptid.
4475
4476 2015-08-25 Yao Qi <yao.qi@linaro.org>
4477
4478 * linux-aarch64-low.c (debug_reg_change_callback): Use
4479 debug_printf.
4480
4481 2015-08-25 Yao Qi <yao.qi@linaro.org>
4482
4483 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4484
4485 2015-08-25 Yao Qi <yao.qi@linaro.org>
4486
4487 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4488
4489 2015-08-25 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4492 the code.
4493
4494 2015-08-25 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4497 Remove.
4498 (debug_reg_change_callback): Remove argument entry and add argument
4499 lwp. Remove local variable thread. Don't print thread id in the
4500 debugging output. Don't check whether pid of thread equals to pid.
4501 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4502 iterate_over_lwps instead find_inferior.
4503
4504 2015-08-24 Pedro Alves <palves@redhat.com>
4505
4506 * inferiors.c (get_first_process): New function.
4507 * inferiors.h (get_first_process): New declaration.
4508 * remote-utils.c (read_ptid): Default to the first process in the
4509 list, instead of to the current thread's process.
4510
4511 2015-08-24 Pedro Alves <palves@redhat.com>
4512
4513 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4514 * event-loop.c: Likewise.
4515 * remote-utils.c: Likewise.
4516 * tracepoint.c: Likewise.
4517
4518 2015-08-24 Pedro Alves <palves@redhat.com>
4519
4520 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4521 ptid_get_lwp.
4522
4523 2015-08-21 Pedro Alves <palves@redhat.com>
4524
4525 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4526 instead of literal 1.
4527
4528 2015-08-21 Pedro Alves <palves@redhat.com>
4529
4530 * tdesc.c (default_description): Explicitly zero-initialize.
4531
4532 2015-08-21 Pedro Alves <palves@redhat.com>
4533
4534 PR gdb/18749
4535 * inferiors.c (remove_thread): Discard any pending stop reply for
4536 this thread.
4537 * server.c (remove_all_on_match_pid): Rename to ...
4538 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4539 instead of a pid.
4540 (discard_queued_stop_replies): Change parameter to a ptid. Now
4541 extern.
4542 (handle_v_kill, kill_inferior_callback, captured_main)
4543 (process_serial_event): Adjust.
4544 * server.h (discard_queued_stop_replies): Declare.
4545
4546 2015-08-21 Pedro Alves <palves@redhat.com>
4547
4548 * linux-low.c (wait_for_sigstop): Always switch to no thread
4549 selected if the previously current thread dies.
4550 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4551 process instead of the current thread's.
4552 * remote-utils.c (input_interrupt): Don't check if there's no
4553 current thread.
4554 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4555 current thread to the general thread fails, error out.
4556 (handle_qxfer_auxv, handle_qxfer_libraries)
4557 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4558 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4559 (handle_query): Check if there's a thread selected instead of
4560 checking whether there's any thread in the thread list.
4561 (handle_qxfer_threads, handle_qxfer_btrace)
4562 (handle_qxfer_btrace_conf): Don't error out early if there's no
4563 thread in the thread list.
4564 (handle_v_cont, myresume): Don't set the current thread to the
4565 continue thread.
4566 (process_serial_event) <Hg handling>: Also set thread_id if the
4567 previous general thread is still alive.
4568 (process_serial_event) <g/G handling>: If setting the current
4569 thread to the general thread fails, error out.
4570 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4571 thread's lwp instead of the current thread's.
4572 * target.c (set_desired_thread): If the desired thread was not
4573 found, leave the current thread pointing to NULL. Return an int
4574 (boolean) indicating success.
4575 * target.h (set_desired_thread): Change return type to int.
4576
4577 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4578
4579 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4580 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4581 #includes.
4582 (ps_get_thread_area): New function.
4583
4584 2015-08-19 Gary Benson <gbenson@redhat.com>
4585
4586 * hostio.c (handle_pread): Do not attempt to read more data
4587 than hostio_reply_with_data can fit in a packet.
4588
4589 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4590
4591 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4592
4593 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4594
4595 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4596
4597 2015-08-06 Pedro Alves <palves@redhat.com>
4598
4599 * tracepoint.c (expr_eval_result): Now an int.
4600
4601 2015-08-06 Pedro Alves <palves@redhat.com>
4602
4603 * gdbthread.h (struct regcache): Forward declare.
4604 (struct thread_info) <regcache_data>: Now a struct regcache
4605 pointer.
4606 * inferiors.c (inferior_regcache_data)
4607 (set_inferior_regcache_data): Now work with struct regcache
4608 pointers.
4609 * inferiors.h (struct regcache): Forward declare.
4610 (inferior_regcache_data, set_inferior_regcache_data): Now work
4611 with struct regcache pointers.
4612 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4613 (free_register_cache_thread): Remove struct regcache pointer
4614 casts.
4615
4616 2015-08-06 Pedro Alves <palves@redhat.com>
4617
4618 * server.c (captured_main): On error, print the exception message
4619 to stderr, and if run_once is set, throw a quit.
4620
4621 2015-08-06 Pedro Alves <palves@redhat.com>
4622
4623 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4624 the current thread.
4625
4626 2015-08-06 Pedro Alves <palves@redhat.com>
4627
4628 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4629 reading beyond the passed in buffer length.
4630
4631 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4632
4633 * tracepoint.c (symbol_list) <required>: Remove.
4634
4635 2015-08-06 Pedro Alves <palves@redhat.com>
4636
4637 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4638 count if stopping and suspending threads.
4639 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4640 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4641 (linux_detach): Complete an ongoing step-over.
4642 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4643 throughout.
4644 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4645 (linux_wait_1): If passing a signal to the inferior after
4646 finishing a step-over, unsuspend and re-resume all lwps. If we
4647 see a single-step event but the thread should be continuing, don't
4648 pass the trap to gdb.
4649 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4650 internal_error instead of gdb_assert.
4651 (enqueue_pending_signal): New function.
4652 (check_ptrace_stopped_lwp_gone): Add debug output.
4653 (start_step_over): Use internal_error instead of gdb_assert.
4654 (complete_ongoing_step_over): New function.
4655 (linux_resume_one_thread): Don't resume a suspended thread.
4656 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4657 it stepping.
4658
4659 2015-08-06 Pedro Alves <palves@redhat.com>
4660
4661 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4662 (linux_thread_alive): Use lwp_is_marked_dead.
4663 (extended_event_reported): Delete.
4664 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4665 instead of extended_event_reported.
4666 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4667 as well.
4668 (lwp_is_marked_dead): New function.
4669 (lwp_running): Use lwp_is_marked_dead.
4670 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4671 comment.
4672
4673 2015-08-06 Pedro Alves <palves@redhat.com>
4674
4675 * linux-low.c (linux_wait_1): Move fork event output out of the
4676 !report_to_gdb check. Pass event_child->waitstatus to
4677 target_waitstatus_to_string instead of ourstatus.
4678
4679 2015-08-04 Yao Qi <yao.qi@linaro.org>
4680
4681 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4682 if current_thread is 32 bit.
4683
4684 2015-08-04 Yao Qi <yao.qi@linaro.org>
4685
4686 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4687 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4688 * server.c (extended_protocol): Remove "static".
4689 * server.h (extended_protocol): Declare it.
4690
4691 2015-08-04 Yao Qi <yao.qi@linaro.org>
4692
4693 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4694 both aarch64 and aarch32.
4695 (aarch64_set_pc): Likewise.
4696
4697 2015-08-04 Yao Qi <yao.qi@linaro.org>
4698
4699 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4700 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4701 arm-with-neon.xml to srv_xmlfiles.
4702 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4703 (is_64bit_tdesc): New function.
4704 (aarch64_linux_read_description): New function.
4705 (aarch64_arch_setup): Call aarch64_linux_read_description.
4706 (regs_info): Rename to regs_info_aarch64.
4707 (aarch64_regs_info): Return right regs_info.
4708 (initialize_low_arch): Call initialize_low_arch_aarch32.
4709
4710 2015-08-04 Yao Qi <yao.qi@linaro.org>
4711
4712 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4713 * linux-aarch32-low.c: New file.
4714 * linux-aarch32-low.h: New file.
4715 * linux-arm-low.c (arm_fill_gregset): Move it to
4716 linux-aarch32-low.c.
4717 (arm_store_gregset): Likewise.
4718 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4719 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4720 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4721 (regs_info): Rename to regs_info_arm.
4722 (arm_regs_info): Return regs_info_aarch32 if
4723 have_ptrace_getregset is 1 and target description is
4724 arm_with_neon or arm_with_vfpv3.
4725 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4726 Call initialize_low_arch_aarch32 instead.
4727
4728 2015-08-04 Yao Qi <yao.qi@linaro.org>
4729
4730 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4731 * linux-low.c: ... here.
4732 * linux-low.h (have_ptrace_getregset): Declare it.
4733
4734 2015-08-04 Pedro Alves <palves@redhat.com>
4735
4736 * thread-db.c (struct thread_db): Use new typedefs.
4737 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4738 CHK calls.
4739 (disable_thread_event_reporting): Cast result of dlsym to
4740 destination function pointer type.
4741 (thread_db_mourn): Use td_ta_delete_ftype.
4742
4743 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4744
4745 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4746 arch variant.
4747 (CDX_BREAKPOINT): Define for R2.
4748 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4749 (the_low_target): Add comments.
4750
4751 2015-07-30 Yao Qi <yao.qi@linaro.org>
4752
4753 * linux-arm-low.c (arm_hwcap): Remove it.
4754 (arm_read_description): New local variable arm_hwcap. Don't
4755 set arm_hwcap to zero.
4756
4757 2015-07-30 Yao Qi <yao.qi@linaro.org>
4758
4759 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4760 Use regcache->tdesc instead.
4761 (arm_store_wmmxregset): Likewise.
4762 (arm_fill_vfpregset): Likewise.
4763 (arm_store_vfpregset): Likewise.
4764
4765 2015-07-30 Yao Qi <yao.qi@linaro.org>
4766
4767 * linux-arm-low.c: Include arch/arm.h.
4768 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4769 (arm_store_gregset): Likewise.
4770
4771 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4772
4773 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4774 ptrace's 4th parameter.
4775
4776 2015-07-27 Yao Qi <yao.qi@linaro.org>
4777
4778 * configure.srv (case aarch64*-*-linux*): Don't set
4779 srv_linux_usrregs.
4780
4781 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4782
4783 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4784 sys/ptrace.h.
4785 * linux-arm-low.c: Likewise.
4786 * linux-cris-low.c: Likewise.
4787 * linux-crisv32-low.c: Likewise.
4788 * linux-low.c: Likewise.
4789 * linux-m68k-low.c: Likewise.
4790 * linux-mips-low.c: Likewise.
4791 * linux-nios2-low.c: Likewise.
4792 * linux-s390-low.c: Likewise.
4793 * linux-sparc-low.c: Likewise.
4794 * linux-tic6x-low.c: Likewise.
4795 * linux-tile-low.c: Likewise.
4796 * linux-x86-low.c: Likewise.
4797
4798 2015-07-24 Pedro Alves <palves@redhat.com>
4799
4800 * config.in: Regenerate.
4801 * configure: Regenerate.
4802
4803 2015-07-24 Pedro Alves <palves@redhat.com>
4804
4805 * acinclude.m4: Include ../ptrace.m4.
4806 * configure.ac: Call GDB_AC_PTRACE.
4807 * config.in, configure: Regenerate.
4808
4809 2015-07-24 Yao Qi <yao.qi@linaro.org>
4810
4811 * linux-low.c (linux_create_inferior): Remove setting to
4812 proc->priv->new_inferior.
4813 (linux_attach): Likewise.
4814 (linux_low_filter_event): Likewise.
4815 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4816
4817 2015-07-24 Yao Qi <yao.qi@linaro.org>
4818
4819 * linux-low.c (linux_arch_setup): New function.
4820 (linux_low_filter_event): If proc->tdesc is NULL and
4821 proc->attached is true, call the_low_target.arch_setup.
4822 Otherwise, keep status pending, and return.
4823 (linux_resume_one_lwp_throw): Don't call get_pc if
4824 thread->while_stepping isn't NULL. Don't call
4825 get_thread_regcache if proc->tdesc is NULL.
4826 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4827 (linux_target_ops): Install arch_setup.
4828 * server.c (start_inferior): Call the_target->arch_setup.
4829 * target.h (struct target_ops) <arch_setup>: New field.
4830 (target_arch_setup): New marco.
4831 * lynx-low.c (lynx_target_ops): Update.
4832 * nto-low.c (nto_target_ops): Update.
4833 * spu-low.c (spu_target_ops): Update.
4834 * win32-low.c (win32_target_ops): Update.
4835
4836 2015-07-24 Yao Qi <yao.qi@linaro.org>
4837
4838 * linux-low.c (linux_add_process): Don't set
4839 proc->priv->new_inferior.
4840 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4841 (linux_attach): Likewise.
4842
4843 2015-07-24 Yao Qi <yao.qi@linaro.org>
4844
4845 * server.c (start_inferior): Code refactor.
4846
4847 2015-07-24 Yao Qi <yao.qi@linaro.org>
4848
4849 * server.c (process_serial_event): Set general_thread.
4850
4851 2015-07-21 Yao Qi <yao.qi@linaro.org>
4852
4853 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4854 aarch64_linux_get_debug_reg_capacity.
4855
4856 2015-07-17 Yao Qi <yao.qi@linaro.org>
4857
4858 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4859 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4860 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4861 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4862 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4863 (AARCH64_HWP_ALIGNMENT): Likewise.
4864 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4865 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4866 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4867 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4868 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4869 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4870 (struct aarch64_debug_reg_state): Likewise.
4871 (struct arch_lwp_info): Likewise.
4872 (aarch64_align_watchpoint): Likewise.
4873 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4874 (aarch64_watchpoint_length): Likewise.
4875 (aarch64_point_encode_ctrl_reg): Likewise
4876 (aarch64_point_is_aligned): Likewise.
4877 (aarch64_align_watchpoint): Likewise.
4878 (aarch64_linux_set_debug_regs):
4879 (aarch64_dr_state_insert_one_point): Likewise.
4880 (aarch64_dr_state_remove_one_point): Likewise.
4881 (aarch64_handle_breakpoint): Likewise.
4882 (aarch64_handle_aligned_watchpoint): Likewise.
4883 (aarch64_handle_unaligned_watchpoint): Likewise.
4884 (aarch64_handle_watchpoint): Likewise.
4885
4886 2015-07-17 Yao Qi <yao.qi@linaro.org>
4887
4888 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4889 and don't aarch64_get_debug_reg_state. All callers update.
4890 (aarch64_handle_aligned_watchpoint): Likewise.
4891 (aarch64_handle_unaligned_watchpoint): Likewise.
4892 (aarch64_handle_watchpoint): Likewise.
4893 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4894 (aarch64_remove_point): Likewise.
4895
4896 2015-07-17 Yao Qi <yao.qi@linaro.org>
4897
4898 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4899 debug_printf.
4900 (aarch64_handle_unaligned_watchpoint): Likewise.
4901
4902 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4903
4904 Revert the previous 3 commits:
4905 Move gdb_regex* to common/
4906 Move linux_find_memory_regions_full & co.
4907 gdbserver build-id attribute generator
4908
4909 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4910 Jan Kratochvil <jan.kratochvil@redhat.com>
4911
4912 gdbserver build-id attribute generator.
4913 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4914 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4915 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4916 (find_phdr): New.
4917 (get_dynamic): Use find_pdhr to traverse program headers.
4918 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4919 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4920 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4921 (get_hex_build_id): New.
4922 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4923 to reply XML document.
4924
4925 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4926 Jan Kratochvil <jan.kratochvil@redhat.com>
4927
4928 * target.c: Include target/target-utils.h and fcntl.h.
4929 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4930 (target_fileio_read_stralloc): New functions.
4931
4932 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4933
4934 * Makefile.in (OBS): Add gdb_regex.o.
4935 (gdb_regex.o): New.
4936 * config.in: Rebuilt.
4937 * configure: Rebuilt.
4938
4939 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4940 Jan Kratochvil <jan.kratochvil@redhat.com>
4941
4942 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4943 * Makefile.in (OBS): Add target-utils.o.
4944 (linux-maps.o, target-utils.o): New.
4945 * configure.srv (srv_linux_obj): Add linux-maps.o.
4946
4947 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4948
4949 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4950 function, return 1.
4951 (the_low_target): Install it.
4952
4953 2015-07-14 Pedro Alves <palves@redhat.com>
4954
4955 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4956 Instead, ignore ECHILD, and throw an error for other errnos.
4957
4958 2015-07-10 Pedro Alves <palves@redhat.com>
4959
4960 * event-loop.c (struct callback_event) <data>: Change type to
4961 gdb_client_data instance instead of gdb_client_data pointer.
4962 (append_callback_event): Adjust.
4963
4964 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4965
4966 * linux-aarch64-low.c: Add comments for each linux_target_ops
4967 method. Remove comments already covered in target_ops and
4968 linux_target_ops definitions.
4969 (the_low_target): Add comments for each unimplemented method.
4970
4971 2015-07-09 Yao Qi <yao.qi@linaro.org>
4972
4973 * linux-aarch64-low.c (aarch64_regmap): Remove.
4974 (aarch64_usrregs_info): Remove.
4975 (regs_info): Set field usrregs to NULL.
4976
4977 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4978
4979 * linux-low.c: Include "rsp-low.h"
4980 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4981 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4982 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4983 (handle_btrace_enable_pt): New.
4984 (handle_btrace_general_set): Support "pt".
4985 (handle_btrace_conf_general_set): Support "pt:size".
4986
4987 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4988
4989 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4990 Z_PACKET_SW_BP.
4991
4992 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4993
4994 * linux-aarch64-low.c: Remove comment about endianness.
4995 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4996 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4997 memcmp.
4998
4999 2015-06-24 Gary Benson <gbenson@redhat.com>
5000
5001 * linux-i386-ipa.c (stdint.h): Do not include.
5002 * lynx-i386-low.c (stdint.h): Likewise.
5003 * lynx-ppc-low.c (stdint.h): Likewise.
5004 * mem-break.c (stdint.h): Likewise.
5005 * thread-db.c (stdint.h): Likewise.
5006 * tracepoint.c (stdint.h): Likewise.
5007 * win32-low.c (stdint.h): Likewise.
5008
5009 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5010
5011 * server.c (write_qxfer_response): Update call to
5012 remote_escape_output.
5013
5014 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5015 Jan Kratochvil <jan.kratochvil@redhat.com>
5016
5017 Merge multiple hex conversions.
5018 * gdbreplay.c (tohex): Rename to 'fromhex'.
5019 (logchar): Use fromhex.
5020
5021 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5022
5023 * server.c (handle_qxfer_libraries): Set `version' attribute for
5024 <library-list>.
5025
5026 2015-06-10 Gary Benson <gbenson@redhat.com>
5027
5028 * target.h (struct target_ops) <multifs_open>: New field.
5029 <multifs_unlink>: Likewise.
5030 <multifs_readlink>: Likewise.
5031 * linux-low.c (nat/linux-namespaces.h): New include.
5032 (linux_target_ops): Initialize the_target->multifs_open,
5033 the_target->multifs_unlink and the_target->multifs_readlink.
5034 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5035 * hostio.c (hostio_fs_pid): New static variable.
5036 (hostio_handle_new_gdb_connection): New function.
5037 (handle_setfs): Likewise.
5038 (handle_open): Use the_target->multifs_open as appropriate.
5039 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5040 (handle_readlink): Use the_target->multifs_readlink as
5041 appropriate.
5042 (handle_vFile): Handle vFile:setfs packets.
5043 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5044 after target_handle_new_gdb_connection.
5045
5046 2015-06-10 Gary Benson <gbenson@redhat.com>
5047
5048 * configure.ac (AC_CHECK_FUNCS): Add setns.
5049 * config.in: Regenerate.
5050 * configure: Likewise.
5051 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5052 (linux-namespaces.o): New rule.
5053 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5054
5055 2015-06-09 Gary Benson <gbenson@redhat.com>
5056
5057 * hostio.c (handle_open): Process mode argument with
5058 fileio_to_host_mode.
5059
5060 2015-06-01 Yao Qi <yao.qi@linaro.org>
5061
5062 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5063 * linux-x86-low.c: Likewise.
5064
5065 2015-05-28 Don Breazeal <donb@codesourcery.com>
5066
5067 * linux-low.c (handle_extended_wait): Initialize
5068 thread_info.last_resume_kind for new fork children.
5069
5070 2015-05-15 Pedro Alves <palves@redhat.com>
5071
5072 * target.h (target_handle_new_gdb_connection): Rewrite using if
5073 wrapped in do/while.
5074
5075 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5076
5077 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5078 * configure, config.in: Regenerate.
5079 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5080 Declare typedef.
5081
5082 2015-05-12 Don Breazeal <donb@codesourcery.com>
5083
5084 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5085 PTRACE_EVENT_VFORK_DONE.
5086 (linux_low_ptrace_options, extended_event_reported): Add vfork
5087 events.
5088 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5089 and "vforkdone" for RSP 'T' Stop Reply Packet.
5090 * server.h (report_vfork_events): Declare
5091 global variable.
5092
5093 2015-05-12 Don Breazeal <donb@codesourcery.com>
5094
5095 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5096 (the_low_target) <new_fork>: Initialize new member.
5097 * linux-arm-low.c (arm_new_fork): New function.
5098 (the_low_target) <new_fork>: Initialize new member.
5099 * linux-low.c (handle_extended_wait): Call new target function
5100 new_fork.
5101 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5102 * linux-mips-low.c (mips_add_watchpoint): New function
5103 extracted from mips_insert_point.
5104 (the_low_target) <new_fork>: Initialize new member.
5105 (mips_linux_new_fork): New function.
5106 (mips_insert_point): Call mips_add_watchpoint.
5107 * linux-x86-low.c (x86_linux_new_fork): New function.
5108 (the_low_target) <new_fork>: Initialize new member.
5109
5110 2015-05-12 Don Breazeal <donb@codesourcery.com>
5111
5112 * linux-low.c (handle_extended_wait): Implement return value,
5113 rename argument 'event_child' to 'event_lwp', handle
5114 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5115 (linux_low_ptrace_options): New function.
5116 (linux_low_filter_event): Call linux_low_ptrace_options,
5117 use different argument fo linux_enable_event_reporting,
5118 use return value from handle_extended_wait.
5119 (extended_event_reported): New function.
5120 (linux_wait_1): Call extended_event_reported and set
5121 status to report fork events.
5122 (linux_write_memory): Add pid to debug message.
5123 (reset_lwp_ptrace_options_callback): New function.
5124 (linux_handle_new_gdb_connection): New function.
5125 (linux_target_ops): Initialize new structure member.
5126 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5127 * lynx-low.c: Initialize new structure member.
5128 * remote-utils.c (prepare_resume_reply): Implement stop reason
5129 "fork" for "T" stop message.
5130 * server.c (handle_query): Call handle_new_gdb_connection.
5131 * server.h (report_fork_events): Declare global flag.
5132 * target.h (struct target_ops) <handle_new_gdb_connection>:
5133 New member.
5134 (target_handle_new_gdb_connection): New macro.
5135 * win32-low.c: Initialize new structure member.
5136
5137 2015-05-12 Don Breazeal <donb@codesourcery.com>
5138
5139 * mem-break.c (APPEND_TO_LIST): Define macro.
5140 (clone_agent_expr): New function.
5141 (clone_one_breakpoint): New function.
5142 (clone_all_breakpoints): New function.
5143 * mem-break.h: Declare new functions.
5144
5145 2015-05-12 Don Breazeal <donb@codesourcery.com>
5146
5147 * linux-low.c (linux_supports_fork_events): New function.
5148 (linux_supports_vfork_events): New function.
5149 (linux_target_ops): Initialize new structure members.
5150 (initialize_low): Call linux_check_ptrace_features.
5151 * lynx-low.c (lynx_target_ops): Initialize new structure
5152 members.
5153 * server.c (report_fork_events, report_vfork_events):
5154 New global flags.
5155 (handle_query): Add new features to qSupported packet and
5156 response.
5157 (captured_main): Initialize new global variables.
5158 * target.h (struct target_ops) <supports_fork_events>:
5159 New member.
5160 <supports_vfork_events>: New member.
5161 (target_supports_fork_events): New macro.
5162 (target_supports_vfork_events): New macro.
5163 * win32-low.c (win32_target_ops): Initialize new structure
5164 members.
5165
5166 2015-05-12 Gary Benson <gbenson@redhat.com>
5167
5168 * server.c (handle_qxfer_exec_file): Use current process
5169 if annex is empty.
5170
5171 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5172
5173 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5174 Remove HAVE_PTRACE_GETREGS conditionals.
5175 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5176 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5177
5178 2015-05-08 Yao Qi <yao.qi@linaro.org>
5179
5180 * linux-low.c (linux_supports_conditional_breakpoints): New
5181 function.
5182 (linux_target_ops): Install new target method.
5183 * lynx-low.c (lynx_target_ops): Install NULL hook for
5184 supports_conditional_breakpoints.
5185 * nto-low.c (nto_target_ops): Likewise.
5186 * spu-low.c (spu_target_ops): Likewise.
5187 * win32-low.c (win32_target_ops): Likewise.
5188 * server.c (handle_query): Check
5189 target_supports_conditional_breakpoints.
5190 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5191 New field.
5192 (target_supports_conditional_breakpoints): New macro.
5193
5194 2015-05-06 Pedro Alves <palves@redhat.com>
5195
5196 PR server/18081
5197 * server.c (start_inferior): If the process exits, mourn it.
5198
5199 2015-04-21 Gary Benson <gbenson@redhat.com>
5200
5201 * hostio.c (fileio_open_flags_to_host): Factored out to
5202 fileio_to_host_openflags in common/fileio.c. Single use
5203 updated.
5204
5205 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5206
5207 * linux-xtensa-low.c (xtensa_fill_gregset)
5208 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5209 XCHAL_HAVE_LOOP.
5210
5211 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5212
5213 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5214 (regs_info): Replace usrregs pointer with NULL.
5215
5216 2015-04-17 Gary Benson <gbenson@redhat.com>
5217
5218 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5219 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5220 * server.c (handle_qxfer_exec_file): New function.
5221 (qxfer_packets): Add exec-file entry.
5222 (handle_query): Report qXfer:exec-file:read as supported packet.
5223
5224 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5225
5226 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5227
5228 2015-04-09 Gary Benson <gbenson@redhat.com>
5229
5230 * hostio-errno.c (errno_to_fileio_error): Remove function.
5231 Update caller to use remote_fileio_to_fio_error.
5232
5233 2015-04-09 Yao Qi <yao.qi@linaro.org>
5234
5235 * linux-low.c (linux_insert_point): Call
5236 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5237 (linux_remove_point): Call remove_memory_breakpoint if type is
5238 raw_bkpt_type_sw.
5239 * linux-x86-low.c (x86_insert_point): Don't call
5240 insert_memory_breakpoint.
5241 (x86_remove_point): Don't call remove_memory_breakpoint.
5242
5243 2015-04-01 Pedro Alves <palves@redhat.com>
5244 Cleber Rosa <crosa@redhat.com>
5245
5246 * server.c (gdbserver_usage): Reorganize and extend the usage
5247 message.
5248
5249 2015-03-24 Pedro Alves <palves@redhat.com>
5250
5251 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5252 output. Also dump TRAP_TRACE.
5253 (linux_low_filter_event): In debug output, distinguish a
5254 resume_stop SIGSTOP from a delayed SIGSTOP.
5255
5256 2015-03-24 Gary Benson <gbenson@redhat.com>
5257
5258 * linux-x86-low.c (x86_linux_new_thread): Moved to
5259 nat/x86-linux.c.
5260 (x86_linux_prepare_to_resume): Likewise.
5261
5262 2015-03-24 Gary Benson <gbenson@redhat.com>
5263
5264 * Makefile.in (x86-linux-dregs.o): New rule.
5265 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5266 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5267 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5268 (x86_linux_dr_get): Likewise.
5269 (x86_linux_dr_set): Likewise.
5270 (update_debug_registers_callback): Likewise.
5271 (x86_linux_dr_set_addr): Likewise.
5272 (x86_linux_dr_get_addr): Likewise.
5273 (x86_linux_dr_set_control): Likewise.
5274 (x86_linux_dr_get_control): Likewise.
5275 (x86_linux_dr_get_status): Likewise.
5276 (x86_linux_update_debug_registers): Likewise.
5277
5278 2015-03-24 Gary Benson <gbenson@redhat.com>
5279
5280 * linux-x86-low.c (x86_linux_update_debug_registers):
5281 New function, factored out from...
5282 (x86_linux_prepare_to_resume): ...this.
5283
5284 2015-03-24 Gary Benson <gbenson@redhat.com>
5285
5286 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5287 (x86_linux_dr_set): Likewise.
5288 (update_debug_registers_callback): Likewise.
5289 (x86_linux_dr_set_addr): Likewise.
5290 (x86_linux_dr_get_addr): Likewise.
5291 (x86_linux_dr_set_control): Likewise.
5292 (x86_linux_dr_get_control): Likewise.
5293 (x86_linux_dr_get_status): Likewise.
5294 (x86_linux_prepare_to_resume): Likewise.
5295
5296 2015-03-24 Gary Benson <gbenson@redhat.com>
5297
5298 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5299 Use perror_with_name. Pass string through gettext.
5300 (x86_linux_dr_set): Likewise.
5301
5302 2015-03-24 Gary Benson <gbenson@redhat.com>
5303
5304 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5305 (x86_linux_dr_set_addr): ...this.
5306 (x86_dr_low_get_addr): Rename to...
5307 (x86_linux_dr_get_addr): ...this.
5308 (x86_dr_low_set_control): Rename to...
5309 (x86_linux_dr_set_control): ...this.
5310 (x86_dr_low_get_control): Rename to...
5311 (x86_linux_dr_get_control): ...this.
5312 (x86_dr_low_get_status): Rename to...
5313 (x86_linux_dr_get_status): ...this.
5314 (x86_dr_low): Update with new function names.
5315
5316 2015-03-24 Gary Benson <gbenson@redhat.com>
5317
5318 * Makefile.in (x86-linux.o): New rule.
5319 * configure.srv: Add x86-linux.o to relevant targets.
5320 * linux-low.c (lwp_set_arch_private_info): New function.
5321 (lwp_arch_private_info): Likewise.
5322 * linux-x86-low.c: Include nat/x86-linux.h.
5323 (arch_lwp_info): Removed structure.
5324 (update_debug_registers_callback):
5325 Use lwp_set_debug_registers_changed.
5326 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5327 and lwp_set_debug_registers_changed.
5328 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5329
5330 2015-03-24 Gary Benson <gbenson@redhat.com>
5331
5332 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5333 * linux-arm-low.c (arm_new_thread): Likewise.
5334 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5335 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5336 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5337 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5338
5339 2015-03-24 Gary Benson <gbenson@redhat.com>
5340
5341 * linux-low.c (ptid_of_lwp): New function.
5342 (lwp_is_stopped): Likewise.
5343 (lwp_stop_reason): Likewise.
5344 * linux-x86-low.c (update_debug_registers_callback):
5345 Use lwp_is_stopped.
5346 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5347 lwp_stop_reason.
5348
5349 2015-03-24 Gary Benson <gbenson@redhat.com>
5350
5351 * linux-low.h (linux_stop_lwp): Remove declaration.
5352
5353 2015-03-24 Gary Benson <gbenson@redhat.com>
5354
5355 * linux-low.h: Include nat/linux-nat.h.
5356 * linux-low.c (iterate_over_lwps_args): New structure.
5357 (iterate_over_lwps_filter): New function.
5358 (iterate_over_lwps): Likewise.
5359 * linux-x86-low.c (update_debug_registers_callback):
5360 Update signature to what iterate_over_lwps expects.
5361 Remove PID check that iterate_over_lwps now performs.
5362 (x86_dr_low_set_addr): Use iterate_over_lwps.
5363 (x86_dr_low_set_control): Likewise.
5364
5365 2015-03-24 Gary Benson <gbenson@redhat.com>
5366
5367 * linux-x86-low.c (x86_debug_reg_state): New function.
5368 (x86_linux_prepare_to_resume): Use the above.
5369
5370 2015-03-24 Gary Benson <gbenson@redhat.com>
5371
5372 * linux-low.c (current_lwp_ptid): New function.
5373 * linux-x86-low.c: Include nat/linux-nat.h.
5374 (x86_dr_low_get_addr): Use current_lwp_ptid.
5375 (x86_dr_low_get_control): Likewise.
5376 (x86_dr_low_get_status): Likewise.
5377
5378 2015-03-20 Pedro Alves <palves@redhat.com>
5379
5380 * tracepoint.c (cmd_qtstatus): Make "str" const.
5381
5382 2015-03-20 Pedro Alves <palves@redhat.com>
5383
5384 * server.c (handle_general_set): Make "req_str" const.
5385
5386 2015-03-19 Pedro Alves <palves@redhat.com>
5387
5388 * linux-low.c (linux_resume_one_lwp): Rename to ...
5389 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5390 instead call perror_with_name.
5391 (check_ptrace_stopped_lwp_gone): New function.
5392 (linux_resume_one_lwp): Reimplement as wrapper around
5393 linux_resume_one_lwp_throw that swallows errors if the LWP is
5394 gone.
5395
5396 2015-03-19 Pedro Alves <palves@redhat.com>
5397
5398 * linux-low.c (count_events_callback, select_event_lwp_callback):
5399 No longer check whether the thread has resume_stop as last resume
5400 kind.
5401
5402 2015-03-19 Pedro Alves <palves@redhat.com>
5403
5404 * linux-low.c (count_events_callback, select_event_lwp_callback):
5405 Use the lwp's status_pending_p field, not the thread's.
5406
5407 2015-03-19 Pedro Alves <palves@redhat.com>
5408
5409 * linux-low.c (select_event_lwp_callback): Update comments to
5410 no longer mention SIGTRAP.
5411
5412 2015-03-18 Gary Benson <gbenson@redhat.com>
5413
5414 * server.c (handle_query): Do not report vFile:fstat as supported.
5415
5416 2015-03-11 Gary Benson <gbenson@redhat.com>
5417
5418 * hostio.c (sys/types.h): New include.
5419 (sys/stat.h): Likewise.
5420 (common-remote-fileio.h): Likewise.
5421 (handle_fstat): New function.
5422 (handle_vFile): Handle vFile:fstat packets.
5423
5424 2015-03-11 Gary Benson <gbenson@redhat.com>
5425
5426 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5427 struct stat.st_blocks and struct stat.st_blksize.
5428 * configure: Regenerate.
5429 * config.in: Likewise.
5430 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5431 (OBS): Add common-remote-fileio.o.
5432 (common-remote-fileio.o): New rule.
5433
5434 2015-03-09 Pedro Alves <palves@redhat.com>
5435
5436 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5437 'struct sockaddr' pointer in 'accept' call.
5438
5439 2015-03-09 Pedro Alves <palves@redhat.com>
5440
5441 Revert:
5442 2015-03-07 Pedro Alves <palves@redhat.com>
5443 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5444 or <winsock2.h> here. Instead include "gdb_socket.h".
5445 (remote_open): Use union gdb_sockaddr_u.
5446 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5447 or <winsock2.h> here. Instead include "gdb_socket.h".
5448 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5449 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5450 or <sys/un.h>.
5451 (init_named_socket, gdb_agent_helper_thread): Use union
5452 gdb_sockaddr_u.
5453
5454 2015-03-07 Pedro Alves <palves@redhat.com>
5455
5456 * configure.ac (build_warnings): Move
5457 -Wdeclaration-after-statement to the C-specific set.
5458 * configure: Regenerate.
5459
5460 2015-03-07 Pedro Alves <palves@redhat.com>
5461
5462 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5463 or <winsock2.h> here. Instead include "gdb_socket.h".
5464 (remote_open): Use union gdb_sockaddr_u.
5465 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5466 or <winsock2.h> here. Instead include "gdb_socket.h".
5467 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5468 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5469 or <sys/un.h>.
5470 (init_named_socket, gdb_agent_helper_thread): Use union
5471 gdb_sockaddr_u.
5472
5473 2015-03-07 Pedro Alves <palves@redhat.com>
5474
5475 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5476 instead.
5477
5478 2015-03-06 Yao Qi <yao.qi@linaro.org>
5479
5480 * linux-aarch64-low.c (aarch64_insert_point): Use
5481 show_debug_regs as a boolean.
5482 (aarch64_remove_point): Likewise.
5483
5484 2015-03-05 Pedro Alves <palves@redhat.com>
5485
5486 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5487 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5488 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5489 * nto-low.c (nto_target_ops): Likewise.
5490 * spu-low.c (spu_target_ops): Likewise.
5491 * win32-low.c (win32_target_ops): Likewise.
5492
5493 2015-03-04 Pedro Alves <palves@redhat.com>
5494
5495 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5496 Decide whether a breakpoint triggered based on the SIGTRAP's
5497 siginfo.si_code.
5498 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5499 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5500 (linux_low_filter_event): Check for breakpoints before checking
5501 watchpoints.
5502 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5503 siginfo.si_code.
5504 (linux_stopped_by_sw_breakpoint)
5505 (linux_supports_stopped_by_sw_breakpoint)
5506 (linux_stopped_by_hw_breakpoint)
5507 (linux_supports_stopped_by_hw_breakpoint): New functions.
5508 (linux_target_ops): Install new target methods.
5509
5510 2015-03-04 Pedro Alves <palves@redhat.com>
5511
5512 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5513 * server.c (swbreak_feature, hwbreak_feature): New globals.
5514 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5515 (captured_main): Clear swbreak_feature and hwbreak_feature.
5516 * server.h (swbreak_feature, hwbreak_feature): Declare.
5517 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5518 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5519 supports_stopped_by_hw_breakpoint>: New fields.
5520 (target_supports_stopped_by_sw_breakpoint)
5521 (target_stopped_by_sw_breakpoint)
5522 (target_supports_stopped_by_hw_breakpoint)
5523 (target_stopped_by_hw_breakpoint): Declare.
5524
5525 2015-03-04 Pedro Alves <palves@redhat.com>
5526
5527 enum lwp_stop_reason -> enum target_stop_reason
5528 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5529 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5530 (linux_wait_1, stuck_in_jump_pad_callback)
5531 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5532 (linux_stopped_by_watchpoint):
5533 * linux-low.h (enum lwp_stop_reason): Delete.
5534 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5535 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5536
5537 2015-03-04 Yao Qi <yao.qi@linaro.org>
5538
5539 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5540
5541 2015-03-03 Gary Benson <gbenson@redhat.com>
5542
5543 * hostio.c (handle_vFile): Fix prefix lengths.
5544
5545 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5546
5547 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5548 ptr_bits.
5549
5550 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5551
5552 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5553 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5554 (clean): Add "rm -f" for above C files.
5555 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5556 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5557 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5558 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5559 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5560 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5561 (init_registers_s390x_vx_linux64)
5562 (init_registers_s390x_tevx_linux64)
5563 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5564 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5565 declarations.
5566 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5567 (s390_store_vxrs_high): New functions.
5568 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5569 NT_S390_VXRS_HIGH.
5570 (s390_arch_setup): Add logic for selecting one of the new target
5571 descriptions. Activate the new vector regsets if applicable.
5572 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5573 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5574 and init_registers_s390x_tevx_linux64.
5575
5576 2015-03-01 Pedro Alves <palves@redhat.com>
5577
5578 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5579 parameter.
5580
5581 2015-02-27 Pedro Alves <palves@redhat.com>
5582
5583 * linux-x86-low.c (u_debugreg_offset): New function.
5584 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5585
5586 2015-02-27 Pedro Alves <palves@redhat.com>
5587
5588 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5589 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5590 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5591 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5592 (ps_lsetfpregs, ps_getpid)
5593 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5594 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5595 (ps_lsetxregs, ps_plog): Declare.
5596
5597 2015-02-27 Pedro Alves <palves@redhat.com>
5598
5599 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5600 IP_AGENT_EXPORT_FUNC.
5601 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5602 IP_AGENT_EXPORT_FUNC.
5603 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5604 (IP_AGENT_EXPORT): Delete.
5605 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5606 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5607 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5608 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5609 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5610 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5611 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5612 (traceframe_read_count, traceframe_write_count)
5613 (traceframes_created, trace_state_variables, get_raw_reg)
5614 (get_trace_state_variable_value, set_trace_state_variable_value)
5615 (ust_loaded, helper_thread_id, cmd_buf): Use
5616 IPA_SYM_EXPORTED_NAME.
5617 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5618 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5619 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5620 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5621 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5622 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5623 EXTERN_C_PUSH/EXTERN_C_POP.
5624 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5625 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5626 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5627 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5628 (traceframe_write_count, traceframe_read_count)
5629 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5630 (about_to_request_buffer_space, get_trace_state_variable_value)
5631 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5632 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5633 EXTERN_C_PUSH/EXTERN_C_POP.
5634 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5635 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5636 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5637 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5638 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5639 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5640 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5641 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5642 Define.
5643 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5644 (IP_AGENT_EXPORT_VAR_DECL): Define.
5645 (tracing): Declare.
5646 (gdb_agent_get_raw_reg): Declare.
5647
5648 2015-02-27 Tom Tromey <tromey@redhat.com>
5649 Pedro Alves <palves@redhat.com>
5650
5651 Rename symbols whose names are reserved C++ keywords throughout.
5652
5653 2015-02-27 Pedro Alves <palves@redhat.com>
5654
5655 * Makefile.in (COMPILER): New, get it from autoconf.
5656 (CXX): Get from autoconf instead.
5657 (COMPILE.pre): Use COMPILER.
5658 (CC-LD): Rename to ...
5659 (CC_LD): ... this. Use COMPILER.
5660 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5661 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5662 * acinclude.m4: Include build-with-cxx.m4.
5663 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5664 Disable -Werror by default if building in C++ mode.
5665 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5666 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5667 the C++ compiler. Save/restore CXXFLAGS too.
5668 * configure: Regenerate.
5669
5670 2015-02-27 Pedro Alves <palves@redhat.com>
5671
5672 * acinclude.m4: Include libiberty.m4.
5673 * configure.ac: Call libiberty_INIT.
5674 * config.in, configure: Regenerate.
5675
5676 2015-02-26 Pedro Alves <palves@redhat.com>
5677
5678 * linux-low.c (linux_wait_1): When incrementing the PC past a
5679 program breakpoint always use the_low_target.breakpoint_len as
5680 increment, rather than the maximum between that and
5681 the_low_target.decr_pc_after_break.
5682
5683 2015-02-23 Pedro Alves <palves@redhat.com>
5684
5685 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5686 thread was doing a step-over; always adjust the PC if
5687 we stepped over a permanent breakpoint.
5688 (linux_wait_1): If we stepped over breakpoint that was on top of a
5689 permanent breakpoint, manually advance the PC past it.
5690
5691 2015-02-23 Pedro Alves <palves@redhat.com>
5692
5693 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5694 modes.
5695 (x86_fill_gregset, x86_store_gregset): Use it when handling
5696 $orig_eax.
5697
5698 2015-02-20 Pedro Alves <palves@redhat.com>
5699
5700 * thread-db.c: Include "nat/linux-procfs.h".
5701 (thread_db_init): Skip listing new threads if the kernel supports
5702 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5703
5704 2015-02-20 Pedro Alves <palves@redhat.com>
5705
5706 * linux-low.c (status_pending_p_callback): Use ptid_match.
5707
5708 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5709
5710 PR breakpoints/16812
5711 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5712 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5713 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5714
5715 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5716
5717 PR breakpoints/15956
5718 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5719
5720 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5721
5722 * linux-low.c (linux_low_btrace_conf): Print size.
5723 * server.c (handle_btrace_conf_general_set): New.
5724 (hanle_general_set): Call handle_btrace_conf_general_set.
5725 (handle_query): Report Qbtrace-conf:bts:size as supported.
5726
5727 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5728
5729 * linux-low.c (linux_low_enable_btrace): Update parameters.
5730 (linux_low_btrace_conf): New.
5731 (linux_target_ops)<to_btrace_conf>: Initialize.
5732 * server.c (current_btrace_conf): New.
5733 (handle_btrace_enable): Rename to ...
5734 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5735 to target_enable_btrace. Update comment. Update users.
5736 (handle_qxfer_btrace_conf): New.
5737 (qxfer_packets): Add btrace-conf entry.
5738 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5739 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5740 (target_ops)<read_btrace_conf>: New.
5741 (target_enable_btrace): Update parameters.
5742 (target_read_btrace_conf): New.
5743
5744 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5745
5746 * server.c (handle_btrace_general_set): Remove call to
5747 target_supports_btrace.
5748 (supported_btrace_packets): New.
5749 (handle_query): Call supported_btrace_packets.
5750 * target.h: include btrace-common.h.
5751 (btrace_target_info): Removed.
5752 (supports_btrace, target_supports_btrace): Update parameters.
5753
5754 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5755
5756 * Makefile.in (SFILES): Add common/btrace-common.c.
5757 (OBS): Add common/btrace-common.o.
5758 (btrace-common.o): Add build rules.
5759 * linux-low: Include btrace-common.h.
5760 (linux_low_read_btrace): Use struct btrace_data. Call
5761 btrace_data_init and btrace_data_fini.
5762
5763 2015-02-06 Pedro Alves <palves@redhat.com>
5764
5765 * thread-db.c (find_new_threads_callback): Add debug output.
5766
5767 2015-02-04 Pedro Alves <palves@redhat.com>
5768
5769 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5770 (resume_stopped_resumed_lwps): New function.
5771 (linux_wait_for_event_filtered): Use it.
5772
5773 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5774
5775 * Makefile.in (SFILES): Add linux-personality.c.
5776 (linux-personality.o): New rule.
5777 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5778 list of objects to be built.
5779 * linux-low.c: Include nat/linux-personality.h.
5780 (linux_create_inferior): Remove code to disable address space
5781 randomization (moved to ../nat/linux-personality.c). Create
5782 cleanup to disable address space randomization.
5783
5784 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5785
5786 * Makefile.in (posix-strerror.o): New rule.
5787 (mingw-strerror.o): Likewise.
5788 * configure: Regenerated.
5789 * configure.ac: Source file ../common/common.host. Initialize new
5790 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5791
5792 2015-01-14 Yao Qi <yao@codesourcery.com>
5793
5794 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5795 (ppc-linux.o): New rule.
5796 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5797 * configure.ac: AC_CHECK_FUNCS(getauxval).
5798 * config.in: Re-generated.
5799 * configure: Re-generated.
5800 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5801 ppc64_64bit_inferior_p
5802
5803 2015-01-14 Yao Qi <yao@codesourcery.com>
5804
5805 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5806 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5807 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5808 (PT_ORIG_R3, PT_TRAP): Likewise.
5809 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5810 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5811 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5812
5813 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5814
5815 * i387-fp.c (i387_cache_to_xsave): In look over
5816 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5817 zmmh_low_space field by use of zmmh_high_space.
5818
5819 2015-01-09 Pedro Alves <palves@redhat.com>
5820
5821 * linux-low.c (step_over_bkpt): Move higher up in the file.
5822 (handle_extended_wait): Don't store the stop_pc here.
5823 (get_stop_pc): Adjust comments and rename to ...
5824 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5825 stopped for a software breakpoint or hardware breakpoint.
5826 (thread_still_has_status_pending_p): New function.
5827 (status_pending_p_callback): Use
5828 thread_still_has_status_pending_p. If the event is no longer
5829 interesting, resume the LWP.
5830 (handle_tracepoints): Add assert.
5831 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5832 (wstatus_maybe_breakpoint): New function.
5833 (cancel_breakpoint): Delete function.
5834 (check_stopped_by_watchpoint): New function, factored out from
5835 linux_low_filter_event.
5836 (lp_status_maybe_breakpoint): Delete function.
5837 (linux_low_filter_event): Remove filter_ptid argument.
5838 Leave thread group exits pending here. Store the LWP's stop PC.
5839 Always leave events pending.
5840 (linux_wait_for_event_filtered): Pull all events out of the
5841 kernel, and leave them all pending.
5842 (count_events_callback, select_event_lwp_callback): Consider all
5843 events.
5844 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5845 (select_event_lwp): Only give preference to the stepping LWP in
5846 all-stop mode. Adjust comments.
5847 (ignore_event): New function.
5848 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5849 references to cancel_breakpoints. Adjust to renames. Also give
5850 equal priority to all LWPs that have had events in non-stop mode.
5851 If reporting a software breakpoint event, unadjust the LWP's PC.
5852 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5853 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5854 Adjust.
5855 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5856 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5857 (linux_stopped_by_watchpoint): Adjust.
5858 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5859 * linux-low.h (enum lwp_stop_reason): New.
5860 (struct lwp_info) <stop_pc>: Adjust comment.
5861 <stopped_by_watchpoint>: Delete field.
5862 <stop_reason>: New field.
5863 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5864 * mem-break.c (software_breakpoint_inserted_here)
5865 (hardware_breakpoint_inserted_here): New function.
5866 * mem-break.h (software_breakpoint_inserted_here)
5867 (hardware_breakpoint_inserted_here): Declare.
5868 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5869 (cancel_breakpoints): Delete.
5870 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5871 (upload_fast_traceframes): Remove references to
5872 cancel_breakpoints.
5873
5874 2015-01-09 Pedro Alves <palves@redhat.com>
5875
5876 * thread-db.c (find_new_threads_callback): Ignore thread if the
5877 kernel thread ID is -1.
5878
5879 2015-01-09 Pedro Alves <palves@redhat.com>
5880
5881 * linux-low.c (linux_attach_fail_reason_string): Move to
5882 nat/linux-ptrace.c, and rename.
5883 (linux_attach_lwp): Update comment.
5884 (attach_proc_task_lwp_callback): New function.
5885 (linux_attach): Adjust to rename and use
5886 linux_proc_attach_tgid_threads.
5887 (linux_attach_fail_reason_string): Delete declaration.
5888
5889 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5890
5891 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5892 * server.c (gdbserver_version): Likewise.
5893
5894 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5895
5896 * remote-utils.c: Include ctype.h.
5897 (input_interrupt): Explicitly handle the case when the char
5898 received is the NUL byte. Improve the printing of non-ASCII
5899 characters.
5900
5901 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5902
5903 * linux-low.c (linux_low_filter_event): Update call to
5904 linux_enable_event_reporting following the addition of
5905 a new parameter to that function.
5906
5907 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5908
5909 PR server/17457
5910 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5911 (AARCH64_FPCR_REGNO): Likewise.
5912 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5913 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5914 (aarch64_store_fpregset): Likewise.
5915
5916 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5917
5918 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5919 Remove FIXME comment about assumption about N.
5920
5921 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5922
5923 * configure.ac: If large-file support is disabled in GDBserver,
5924 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5925 * configure: Regenerate.
5926
5927 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5928
5929 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5930 warning upon ENODATA from ptrace.
5931 * linux-s390-low.c (s390_store_tdb): New.
5932 (s390_regsets): Add regset for NT_S390_TDB.
5933
5934 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5935
5936 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5937 without a fill_function.
5938 * linux-s390-low.c (s390_fill_last_break): Remove.
5939 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5940 (s390_arch_setup): Use regset's size instead of fill_function for
5941 loop end condition.
5942
5943 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5944
5945 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5946 the regset's store function when ptrace returned an error.
5947 * regcache.c (get_thread_regcache): Invalidate register cache
5948 before fetching inferior's registers.
5949
5950 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5951
5952 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5953 while-loop as for-loop.
5954 (regsets_store_inferior_registers): Likewise.
5955
5956 2014-11-28 Yao Qi <yao@codesourcery.com>
5957
5958 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5959 * config.in, configure: Re-generate.
5960 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5961 is defined.
5962
5963 2014-11-21 Yao Qi <yao@codesourcery.com>
5964
5965 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5966 (AC_CHECK_HEADERS): Remove malloc.h.
5967 * configure: Re-generated.
5968 * config.in: Re-generated.
5969 * server.h: Don't include alloca.h and malloc.h.
5970 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5971 Don't include malloc.h.
5972
5973 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5974
5975 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5976 corresponding ERRNO check in same block.
5977
5978 2014-11-12 Pedro Alves <palves@redhat.com>
5979
5980 * server.c (cont_thread): Update comment.
5981 (start_inferior, attach_inferior): No longer clear cont_thread.
5982 (handle_v_cont): No longer set cont_thread.
5983 (captured_main): Clear cont_thread each time a GDB connects.
5984
5985 2014-11-12 Pedro Alves <palves@redhat.com>
5986
5987 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5988 thread, and don't resume all threads if the Hc thread has exited.
5989
5990 2014-11-12 Pedro Alves <palves@redhat.com>
5991
5992 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5993 the process group instead of to a specific LWP.
5994
5995 2014-10-15 Pedro Alves <palves@redhat.com>
5996
5997 PR server/17487
5998 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5999 parameter.
6000 (arm_set_thread_context): Delete.
6001 (the_low_target): Adjust.
6002 * win32-i386-low.c (debug_registers_changed)
6003 (debug_registers_used): Delete.
6004 (update_debug_registers_callback): New function.
6005 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6006 needing to update their debug registers.
6007 (win32_get_current_dr): New function.
6008 (x86_dr_low_get_addr, x86_dr_low_get_control)
6009 (x86_dr_low_get_status): Fetch the debug register from the thread
6010 record's context.
6011 (i386_initial_stuff): Adjust.
6012 (i386_get_thread_context): Remove current_event parameter. Don't
6013 clear debug_registers_changed nor copy DR values to
6014 debug_reg_state.
6015 (i386_set_thread_context): Delete.
6016 (i386_prepare_to_resume): New function.
6017 (i386_thread_added): Mark the thread as needing to update irs
6018 debug registers.
6019 (the_low_target): Remove i386_set_thread_context and install
6020 i386_prepare_to_resume.
6021 * win32-low.c (win32_get_thread_context): Adjust.
6022 (win32_set_thread_context): Use SetThreadContext
6023 directly.
6024 (win32_prepare_to_resume): New function.
6025 (win32_require_context): New function, factored out from ...
6026 (thread_rec): ... this.
6027 (continue_one_thread): Call win32_prepare_to_resume on each thread
6028 we're about to continue.
6029 (win32_resume): Call win32_prepare_to_resume on the event thread.
6030 * win32-low.h (struct win32_thread_info)
6031 <debug_registers_changed>: New field.
6032 (struct win32_target_ops): Change prototype of set_thread_context,
6033 delete set_thread_context and add prepare_to_resume.
6034 (win32_require_context): New declaration.
6035
6036 2014-10-08 Gary Benson <gbenson@redhat.com>
6037
6038 * server.h: Do not include common-exceptions.h.
6039
6040 2014-10-08 Gary Benson <gbenson@redhat.com>
6041
6042 * server.h: Do not include cleanups.h.
6043
6044 2014-09-30 James Hogan <james.hogan@imgtec.com>
6045
6046 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6047 mips64-dsp-linux.c.
6048
6049 2014-09-23 Yao Qi <yao@codesourcery.com>
6050
6051 * linux-low.c (lp_status_maybe_breakpoint): New function.
6052 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6053 (count_events_callback): Likewise.
6054 (select_event_lwp_callback): Likewise.
6055 (cancel_breakpoints_callback): Likewise.
6056
6057 2014-09-19 Don Breazeal <donb@codesourcery.com>
6058
6059 * linux-low.c (handle_extended_wait): Call
6060 linux_ptrace_get_extended_event.
6061 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6062 linux_is_extended_waitstatus.
6063
6064 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6065
6066 * Makefile.in (CPPFLAGS): Define.
6067 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6068 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6069
6070 2014-09-16 Gary Benson <gbenson@redhat.com>
6071
6072 * inferiors.h (current_inferior): Renamed as...
6073 (current_thread): New variable. All uses updated.
6074 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6075 (maybe_move_out_of_jump_pad): Likewise.
6076 (cancel_breakpoint): Likewise.
6077 (linux_low_filter_event): Likewise.
6078 (wait_for_sigstop): Likewise.
6079 (linux_resume_one_lwp): Likewise.
6080 (need_step_over_p): Likewise.
6081 (start_step_over): Likewise.
6082 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6083 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6084 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6085 and save_inferior as saved_thread.
6086 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6087 saved_thread.
6088 (regcache_invalidate_thread): Likewise.
6089 * remote-utils.c (prepare_resume_reply): Likewise.
6090 * thread-db.c (thread_db_get_tls_address): Likewise.
6091 (disable_thread_event_reporting): Likewise.
6092 (remove_thread_event_breakpoints): Likewise.
6093 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6094 as saved_thread.
6095 * target.h (set_desired_inferior): Renamed as...
6096 (set_desired_thread): New declaration. All uses updated.
6097 * server.c (myresume): Updated comment to reference thread instead
6098 of inferior.
6099 (handle_serial_event): Likewise.
6100 (handle_target_event): Likewise.
6101
6102 2014-09-12 Tom Tromey <tromey@redhat.com>
6103 Gary Benson <gbenson@redhat.com>
6104
6105 * regcache.h: Include common-regcache.h.
6106 (regcache_read_pc): Don't declare.
6107 * regcache.c (get_thread_regcache_for_ptid): New function.
6108
6109 2014-09-11 Tom Tromey <tromey@redhat.com>
6110 Gary Benson <gbenson@redhat.com>
6111
6112 * symbol.c: New file.
6113 * Makefile.in (SFILES): Add symbol.c.
6114 (OBS): Add symbol.o.
6115
6116 2014-09-11 Gary Benson <gbenson@redhat.com>
6117
6118 * target.c (target_stop_ptid, target_continue_ptid): New
6119 functions.
6120
6121 2014-09-11 Tom Tromey <tromey@redhat.com>
6122 Gary Benson <gbenson@redhat.com>
6123
6124 * target.h: Include target/target.h.
6125 * target.c (target_read_memory, target_read_uint32)
6126 (target_write_memory): New functions.
6127
6128 2014-09-11 Gary Benson <gbenson@redhat.com>
6129
6130 * server.h (debug_hw_points): Don't declare.
6131 * server.c (debug_hw_points): Don't define. Replace all uses
6132 with show_debug_regs.
6133 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6134 all uses with show_debug_regs.
6135
6136 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6137
6138 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6139 endianness into account.
6140 (ppc_supply_ptrace_register): Likewise.
6141
6142 2014-09-03 James Hogan <james.hogan@imgtec.com>
6143
6144 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6145 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6146
6147 2014-09-03 Gary Benson <gbenson@redhat.com>
6148
6149 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6150 ALL_DEBUG_ADDRESS_REGISTERS.
6151
6152 2014-09-02 Gary Benson <gbenson@redhat.com>
6153
6154 * i386-low.h: Renamed as...
6155 * x86-low.h: New file. All type, function and variable name
6156 prefixes changed from "i386_" to "x86_". All references updated.
6157 * i386-low.c: Renamed as...
6158 * x86-low.c: New file. All type, function and variable name
6159 prefixes changed from "i386_" to "x86_". All references updated.
6160
6161 2014-09-02 Gary Benson <gbenson@redhat.com>
6162
6163 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6164 (x86_linux_new_thread): Likewise.
6165
6166 2014-08-29 Gary Benson <gbenson@redhat.com>
6167
6168 * server.h (setjmp.h): Do not include.
6169 (toplevel): Do not declare.
6170 (common-exceptions.h): Include.
6171 (cleanups.h): Likewise.
6172 * server.c (toplevel): Do not define.
6173 (exit_code): New static global.
6174 (detach_or_kill_for_exit_cleanup): New function.
6175 (main): New function. Original main renamed to...
6176 (captured_main): New function.
6177 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6178
6179 2014-08-29 Gary Benson <gbenson@redhat.com>
6180
6181 * Makefile.in (SFILES): Add common/common-exceptions.c.
6182 (OBS): Add common-exceptions.o.
6183 (common-exceptions.o): New rule.
6184 * utils.c (prepare_to_throw_exception): New function.
6185
6186 2014-08-29 Gary Benson <gbenson@redhat.com>
6187
6188 * config.in: Regenerate.
6189 * configure: Likewise.
6190
6191 2014-08-29 Gary Benson <gbenson@redhat.com>
6192
6193 * Makefile.in (SFILES): Add common/cleanups.c.
6194 (OBS): cleanups.o.
6195 (cleanups.o): New rule.
6196
6197 2014-08-29 Gary Benson <gbenson@redhat.com>
6198
6199 * utils.c (internal_vwarning): New function.
6200
6201 2014-08-28 Gary Benson <gbenson@redhat.com>
6202
6203 * utils.h (fatal): Remove declaration.
6204 * utils.c (fatal): Remove function.
6205
6206 2014-08-28 Gary Benson <gbenson@redhat.com>
6207
6208 * tracepoint.c (gdb_agent_init): Replace fatal with
6209 perror_with_name.
6210 (initialize_tracepoint): Likewise.
6211
6212 2014-08-28 Gary Benson <gbenson@redhat.com>
6213
6214 * remote-utils.c (remote_prepare): Replace fatal with error.
6215
6216 2014-08-28 Gary Benson <gbenson@redhat.com>
6217
6218 * linux-low.c (linux_async): Replace fatal with warning.
6219 Tidy up and return.
6220 (linux_start_non_stop): Return -1 if linux_async failed.
6221
6222 2014-08-28 Gary Benson <gbenson@redhat.com>
6223
6224 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6225 gdb_assert.
6226 (i386_dr_low_get_addr): Remove vague comment.
6227 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6228 gdb_assert.
6229
6230 2014-08-28 Gary Benson <gbenson@redhat.com>
6231
6232 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6233 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6234 internal_error.
6235 (linux_resume_one_lwp): Likewise.
6236 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6237 gdb_assert.
6238 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6239 with internal_error.
6240 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6241 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6242 (find_register_by_name): Replace fatal with internal_error.
6243 (find_regno): Likewise.
6244 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6245 * thread-db.c (thread_db_create_event): Likewise.
6246 (thread_db_load_search): Likewise.
6247 (try_thread_db_load_1): Likewise.
6248 * tracepoint.c (get_jump_space_head): Replace fatal with
6249 internal_error.
6250 (claim_trampoline_space): Likewise.
6251 (have_fast_tracepoint_trampoline_buffer): Likewise.
6252 (cmd_qtstart): Likewise.
6253 (stop_tracing): Likewise.
6254 (fast_tracepoint_collecting): Likewise.
6255 (target_malloc): Likewise.
6256 (download_tracepoint): Likewise.
6257 (download_trace_state_variables): Replace check with gdb_assert.
6258 (upload_fast_traceframes): Replace fatal with internal_error.
6259
6260 2014-08-19 Tom Tromey <tromey@redhat.com>
6261 Gary Benson <gbenson@redhat.com>
6262
6263 * Makefile.in (SFILES): Add common/common-debug.c.
6264 (OBS): Add common-debug.o.
6265 (common-debug.o): New rule.
6266 * debug.h (debug_printf): Don't declare.
6267 * debug.c (debug_printf): Renamed and rewritten as...
6268 (debug_vprintf): New function.
6269
6270 2014-08-19 Gary Benson <gbenson@redhat.com>
6271
6272 * utils.h: Do not include print-utils.h.
6273
6274 2014-08-19 Tom Tromey <tromey@redhat.com>
6275 Gary Benson <gbenson@redhat.com>
6276
6277 * server.h: Add static assertion.
6278 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6279
6280 2014-08-19 Tom Tromey <tromey@redhat.com>
6281 Gary Benson <gbenson@redhat.com>
6282
6283 * Makefile.in (SFILES): Add common/errors.c.
6284 (OBS): Add errors.o.
6285 (IPA_OBS): Add errors-ipa.o.
6286 (errors.o): New rule.
6287 (errors-ipa.o): Likewise.
6288 * utils.h (perror_with_name, error, warning): Don't declare.
6289 * utils.c (warning): Renamed and rewritten as...
6290 (vwarning): New function.
6291 (error): Renamed and rewritten as...
6292 (verror): New function.
6293 (internal_error): Renamed and rewritten as...
6294 (internal_verror): New function.
6295
6296 2014-08-07 Gary Benson <gbenson@redhat.com>
6297
6298 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6299 * configure: Regenerate.
6300 * config.in: Likewise.
6301 * server.h: Do not include errno.h.
6302 * event-loop.c: Likewise.
6303 * hostio-errno.c: Likewise.
6304 * linux-low.c: Likewise.
6305 * remote-utils.c: Likewise.
6306 * spu-low.c: Likewise.
6307 * utils.c: Likewise.
6308 * gdbreplay.c: Unconditionally include errno.h.
6309
6310 2014-08-07 Gary Benson <gbenson@redhat.com>
6311
6312 * server.h: Do not include string.h.
6313 * event-loop.c: Likewise.
6314 * linux-low.c: Likewise.
6315 * regcache.c: Likewise.
6316 * remote-utils.c: Likewise.
6317 * spu-low.c: Likewise.
6318 * utils.c: Likewise.
6319
6320 2014-08-07 Gary Benson <gbenson@redhat.com>
6321
6322 * server.h: Do not include gdb_assert.h.
6323
6324 2014-08-07 Gary Benson <gbenson@redhat.com>
6325
6326 * server.h: Do not include common-utils.h.
6327
6328 2014-08-07 Gary Benson <gbenson@redhat.com>
6329
6330 * server.h: Do not include ptid.h.
6331 * notif.h: Likewise.
6332
6333 2014-08-07 Gary Benson <gbenson@redhat.com>
6334
6335 * server.h: Do not include gdb_locale.h.
6336
6337 2014-08-07 Gary Benson <gbenson@redhat.com>
6338
6339 * server.h: Do not include gdb/signals.h.
6340 * win32-low.c: Likewise.
6341
6342 2014-08-07 Gary Benson <gbenson@redhat.com>
6343
6344 * server.h: Do not include pathmax.h.
6345
6346 2014-08-07 Gary Benson <gbenson@redhat.com>
6347
6348 * server.h: Do not include libiberty.h.
6349 * linux-bfin-low.c: Likewise.
6350
6351 2014-08-07 Gary Benson <gbenson@redhat.com>
6352
6353 * server.h: Do not include ansidecl.h.
6354
6355 2014-08-07 Gary Benson <gbenson@redhat.com>
6356
6357 * linux-x86-low.c: Do not include stddef.h.
6358 * lynx-ppc-low.c: Likewise.
6359 * tracepoint.c: Likewise.
6360
6361 2014-08-07 Gary Benson <gbenson@redhat.com>
6362
6363 * server.h: Do not include stdarg.h.
6364 * nto-low.c: Likewise.
6365
6366 2014-08-07 Gary Benson <gbenson@redhat.com>
6367
6368 * server.h: Do not include stdlib.h.
6369 * inferiors.c: Likewise.
6370 * linux-low.c: Likewise.
6371 * regcache.c: Likewise.
6372 * spu-low.c: Likewise.
6373 * tracepoint.c: Likewise.
6374 * utils.c: Likewise.
6375
6376 2014-08-07 Gary Benson <gbenson@redhat.com>
6377
6378 * server.h: Do not include stdio.h.
6379 * linux-low.c: Likewise.
6380 * remote-utils.c: Likewise.
6381 * spu-low.c: Likewise.
6382 * utils.c: Likewise.
6383 * wincecompat.c: Likewise.
6384
6385 2014-08-06 Gary Benson <gbenson@redhat.com>
6386
6387 * regcache.c (init_register_cache): Move conditionals inside if.
6388
6389 2014-08-06 Gary Benson <gbenson@redhat.com>
6390
6391 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6392
6393 2014-07-31 Gary Benson <gbenson@redhat.com>
6394
6395 * ax.h: Do not include server.h.
6396 * gdbthread.h: Likewise.
6397 * lynx-low.h: Likewise.
6398 * notif.h: Likewise.
6399
6400 2014-07-30 Gary Benson <gbenson@redhat.com>
6401
6402 * server.h: Include common-defs.h.
6403 Do not include config.h or build-gnulib-gdbserver/config.h.
6404
6405 2014-07-30 Gary Benson <gbenson@redhat.com>
6406
6407 * hostio-errno.c: Move server.h to top of includes list.
6408 * inferiors.c: Likewise.
6409 * linux-x86-low.c: Likewise.
6410 * notif.c: Include server.h.
6411
6412 2014-07-24 Tom Tromey <tromey@redhat.com>
6413 Gary Benson <gbenson@redhat.com>
6414
6415 * server.h (CORE_ADDR): Now unsigned.
6416
6417 2014-07-16 Pedro Alves <palves@redhat.com>
6418
6419 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6420
6421 2014-07-15 Pedro Alves <palves@redhat.com>
6422
6423 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6424 copy.
6425
6426 2014-07-11 Pedro Alves <palves@redhat.com>
6427
6428 * linux-low.c (kill_wait_lwp): New function, based on
6429 kill_one_lwp_callback, but use my_waitpid directly.
6430 (kill_one_lwp_callback, linux_kill): Use it.
6431
6432 2014-06-23 Pedro Alves <palves@redhat.com>
6433
6434 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6435 before setting DR0..DR3.
6436
6437 2014-06-20 Gary Benson <gbenson@redhat.com>
6438
6439 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6440 * configure: Regenerated.
6441 * config.in: Likewise.
6442
6443 2014-06-20 Gary Benson <gbenson@redhat.com>
6444
6445 * Makefile.in (SFILES): Update locations for files moved
6446 from common to nat.
6447 (object file files): Reordered.
6448
6449 2014-06-20 Gary Benson <gbenson@redhat.com>
6450
6451 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6452 (i386_dr_low_set_addr): Likewise.
6453 (i386_dr_low_get_addr): Likewise.
6454 (i386_dr_low_can_set_control): Likewise.
6455 (i386_dr_low_set_control): Likewise.
6456 (i386_dr_low_get_control): Likewise.
6457 (i386_dr_low_get_status): Likewise.
6458 (i386_get_debug_register_length): Likewise.
6459 * linux-x86-low.c (i386_dr_low_set_addr):
6460 Changed signature. Made static.
6461 (i386_dr_low_get_addr): Likewise.
6462 (i386_dr_low_set_control): Likewise.
6463 (i386_dr_low_get_control): Likewise.
6464 (i386_dr_low_get_status): Likewise.
6465 (i386_dr_low): New global variable.
6466 * win32-i386-low.c (i386_dr_low_set_addr):
6467 Changed signature. Made static.
6468 (i386_dr_low_get_addr): Likewise.
6469 (i386_dr_low_set_control): Likewise.
6470 (i386_dr_low_get_control): Likewise.
6471 (i386_dr_low_get_status): Likewise.
6472 (i386_dr_low): New global variable.
6473
6474 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6475
6476 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6477 * Makefile.in (AR, AR_FLAGS): Define.
6478 * configure: Regenerate.
6479
6480 2014-06-19 Gary Benson <gbenson@redhat.com>
6481
6482 * Makefile.in (i386-dregs.o): New rule.
6483 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6484 * i386-low.c (target.h): Remove include.
6485 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6486 (DR_CONTROL_SHIFT): Likewise.
6487 (DR_CONTROL_SIZE): Likewise.
6488 (DR_RW_EXECUTE): Likewise.
6489 (DR_RW_WRITE): Likewise.
6490 (DR_RW_READ): Likewise.
6491 (DR_RW_IORW): Likewise.
6492 (DR_LEN_1): Likewise.
6493 (DR_LEN_2): Likewise.
6494 (DR_LEN_4): Likewise.
6495 (DR_LEN_8): Likewise.
6496 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6497 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6498 (DR_ENABLE_SIZE): Likewise.
6499 (DR_LOCAL_SLOWDOWN): Likewise.
6500 (DR_GLOBAL_SLOWDOWN): Likewise.
6501 (DR_CONTROL_RESERVED): Likewise.
6502 (I386_DR_CONTROL_MASK): Likewise.
6503 (I386_DR_VACANT): Likewise.
6504 (I386_DR_LOCAL_ENABLE): Likewise.
6505 (I386_DR_GLOBAL_ENABLE): Likewise.
6506 (I386_DR_DISABLE): Likewise.
6507 (I386_DR_SET_RW_LEN): Likewise.
6508 (I386_DR_GET_RW_LEN): Likewise.
6509 (I386_DR_WATCH_HIT): Likewise.
6510 (i386_wp_op_t): Likewise.
6511 (i386_show_dr): Likewise.
6512 (i386_length_and_rw_bits): Likewise.
6513 (i386_insert_aligned_watchpoint): Likewise.
6514 (i386_remove_aligned_watchpoint): Likewise.
6515 (i386_handle_nonaligned_watchpoint): Likewise.
6516 i386_update_inferior_debug_regs(): Likewise.
6517 (i386_dr_insert_watchpoint): Likewise.
6518 (i386_dr_remove_watchpoint): Likewise.
6519 (i386_dr_region_ok_for_watchpoint): Likewise.
6520 (i386_dr_stopped_data_address): Likewise.
6521 (i386_dr_stopped_by_watchpoint): Likewise.
6522
6523 2014-06-19 Gary Benson <gbenson@redhat.com>
6524
6525 * i386-low.c (i386_dr_show): Renamed to
6526 i386_show_dr and made static. All uses updated.
6527 (i386_dr_length_and_rw_bits): Renamed to
6528 i386_length_and_rw_bits and made static.
6529 All uses updated.
6530 (i386_dr_insert_aligned_watchpoint): Renamed to
6531 i386_insert_aligned_watchpoint and made static.
6532 All uses updated.
6533 (i386_dr_remove_aligned_watchpoint): Renamed to
6534 i386_remove_aligned_watchpoint and made static.
6535 All uses updated.
6536 (i386_dr_update_inferior_debug_regs): Renamed to
6537 i386_update_inferior_debug_regs and made static.
6538 All uses updated.
6539
6540 2014-06-18 Gary Benson <gbenson@redhat.com>
6541
6542 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6543 (i386_dr_low_can_set_control): Likewise.
6544 (i386_get_debug_register_length): Likewise.
6545 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6546 (i386_dr_low_can_set_control): Likewise.
6547 (i386_get_debug_register_length): Likewise.
6548
6549 2014-06-17 Gary Benson <gbenson@redhat.com>
6550
6551 * i386-low.h (i386-dregs.h): New include.
6552 (DR_FIRSTADDR): Now in i386-dregs.h.
6553 (DR_LASTADDR): Likewise.
6554 (DR_NADDR): Likewise.
6555 (DR_STATUS): Likewise.
6556 (DR_CONTROL): Likewise.
6557 (i386_debug_reg_state): Likewise.
6558 (i386_dr_insert_watchpoint): Likewise.
6559 (i386_dr_remove_watchpoint): Likewise.
6560 (i386_dr_region_ok_for_watchpoint): Likewise.
6561 (i386_dr_stopped_data_address): Likewise.
6562 (i386_dr_stopped_by_watchpoint): Likewise.
6563 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6564
6565 2014-06-18 Gary Benson <gbenson@redhat.com>
6566
6567 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6568 i386_dr_insert_watchpoint.
6569 (i386_low_remove_watchpoint): Renamed to
6570 i386_dr_remove_watchpoint.
6571 (i386_low_region_ok_for_watchpoint): Renamed to
6572 i386_dr_region_ok_for_watchpoint.
6573 (i386_low_stopped_data_address): Renamed to
6574 i386_dr_stopped_data_address.
6575 (i386_low_stopped_by_watchpoint): Renamed to
6576 i386_dr_stopped_by_watchpoint.
6577 * i386-low.c (i386_show_dr): Renamed to
6578 i386_dr_show and made nonstatic. All uses updated.
6579 (i386_length_and_rw_bits): Renamed to
6580 i386_dr_length_and_rw_bits and made nonstatic.
6581 All uses updated.
6582 (i386_insert_aligned_watchpoint): Renamed to
6583 i386_dr_insert_aligned_watchpoint and made nonstatic.
6584 All uses updated.
6585 (i386_remove_aligned_watchpoint): Renamed to
6586 i386_dr_remove_aligned_watchpoint and made nonstatic.
6587 All uses updated.
6588 (i386_update_inferior_debug_regs): Renamed to
6589 i386_dr_update_inferior_debug_regs and made nonstatic.
6590 All uses updated.
6591 (i386_low_insert_watchpoint): Renamed to
6592 i386_dr_insert_watchpoint. All uses updated.
6593 (i386_low_remove_watchpoint): Renamed to
6594 i386_dr_remove_watchpoint. All uses updated.
6595 (i386_low_region_ok_for_watchpoint): Renamed to
6596 i386_dr_region_ok_for_watchpoint. All uses updated.
6597 (i386_low_stopped_data_address): Renamed to
6598 i386_dr_stopped_data_address. All uses updated.
6599 (i386_low_stopped_by_watchpoint): Renamed to
6600 i386_dr_stopped_by_watchpoint. All uses updated.
6601
6602 2014-06-18 Gary Benson <gbenson@redhat.com>
6603
6604 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6605 (i386_dr_low_can_set_control): Likewise.
6606 (i386_insert_aligned_watchpoint): New check.
6607
6608 2014-06-18 Gary Benson <gbenson@redhat.com>
6609
6610 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6611 Renamed to state.
6612
6613 2014-06-18 Gary Benson <gbenson@redhat.com>
6614
6615 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6616 instead of fatal and error.
6617 (i386_handle_nonaligned_watchpoint): Likewise.
6618
6619 2014-06-18 Gary Benson <gbenson@redhat.com>
6620
6621 * i386-low.c (i386_get_debug_register_length): New macro.
6622 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6623 (i386_show_dr): Use debug_printf instead of fprintf. Use
6624 phex to format values.
6625
6626 2014-06-18 Gary Benson <gbenson@redhat.com>
6627
6628 * i386-low.h: Comment changes.
6629 * i386-low.c: Likewise.
6630
6631 2014-06-18 Gary Benson <gbenson@redhat.com>
6632
6633 * i386-low.c: Whitespace changes.
6634
6635 2014-06-12 Tom Tromey <tromey@redhat.com>
6636
6637 * utils.c (freeargv): Remove.
6638
6639 2014-06-12 Tom Tromey <tromey@redhat.com>
6640
6641 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6642 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6643 (parse_debug_format_options): Likewise.
6644 (gdbserver_usage): Likewise.
6645 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6646 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6647 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6648 against libiberty.
6649 ($(LIBGNU)): Depend on libiberty.
6650 (all-lib): Recurse into all subdirs.
6651 (install-only): Invoke "install" target in subdirs.
6652 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6653 targets.
6654 * configure: Rebuild.
6655 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6656 for vasprintf, vsnprintf, or gettimeofday.
6657 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6658 srv_tgtobj.
6659
6660 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6661
6662 * development.sh: Delete.
6663 * Makefile.in (config.status): Adjust dependency on development.sh.
6664 * configure.ac: Adjust development.sh source call.
6665 * configure: Regenerate.
6666
6667 2014-06-02 Pedro Alves <palves@redhat.com>
6668
6669 * ax.c (gdb_free_agent_expr): New function.
6670 * ax.h (gdb_free_agent_expr): New declaration.
6671 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6672 list.
6673 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6674 static.
6675 (clear_breakpoint_conditions_and_commands): New function.
6676 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6677 (clear_breakpoint_conditions_and_commands): New declaration.
6678
6679 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6680
6681 * linux-aarch64-low.c (asm/ptrace.h): Include.
6682
6683 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6684
6685 Fix TLS access for -static -pthread.
6686 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6687 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6688 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6689
6690 2014-05-20 Pedro Alves <palves@redhat.com>
6691
6692 * linux-aarch64-low.c (aarch64_insert_point)
6693 (aarch64_remove_point): No longer check whether the type is
6694 supported here. Adjust to new interface.
6695 (the_low_target): Install aarch64_supports_z_point_type as
6696 supports_z_point_type method.
6697 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6698 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6699 instead of a Z packet char. Adjust.
6700 (arm_supports_z_point_type): New function.
6701 (arm_insert_point, arm_remove_point): Adjust to new interface.
6702 (the_low_target): Install arm_supports_z_point_type.
6703 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6704 (cris_insert_point, cris_remove_point): Adjust to new interface.
6705 Don't check whether the type is supported here.
6706 (the_low_target): Install cris_supports_z_point_type.
6707 * linux-low.c (linux_supports_z_point_type): New function.
6708 (linux_insert_point, linux_remove_point): Adjust to new interface.
6709 * linux-low.h (struct linux_target_ops) <insert_point,
6710 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6711 raw_breakpoint pointer parameter.
6712 <supports_z_point_type>: New method.
6713 * linux-mips-low.c (mips_supports_z_point_type): New function.
6714 (mips_insert_point, mips_remove_point): Adjust to new interface.
6715 Use mips_supports_z_point_type.
6716 (the_low_target): Install mips_supports_z_point_type.
6717 * linux-ppc-low.c (the_low_target): Install NULL as
6718 supports_z_point_type method.
6719 * linux-s390-low.c (the_low_target): Install NULL as
6720 supports_z_point_type method.
6721 * linux-sparc-low.c (the_low_target): Install NULL as
6722 supports_z_point_type method.
6723 * linux-x86-low.c (x86_supports_z_point_type): New function.
6724 (x86_insert_point): Adjust to new insert_point interface. Use
6725 insert_memory_breakpoint. Adjust to new
6726 i386_low_insert_watchpoint interface.
6727 (x86_remove_point): Adjust to remove_point interface. Use
6728 remove_memory_breakpoint. Adjust to new
6729 i386_low_remove_watchpoint interface.
6730 (the_low_target): Install x86_supports_z_point_type.
6731 * lynx-low.c (lynx_target_ops): Install NULL as
6732 supports_z_point_type callback.
6733 * nto-low.c (nto_supports_z_point_type): New.
6734 (nto_insert_point, nto_remove_point): Adjust to new interface.
6735 (nto_target_ops): Install nto_supports_z_point_type.
6736 * mem-break.c: Adjust intro comment.
6737 (struct raw_breakpoint) <raw_type, size>: New fields.
6738 <inserted>: Update comment.
6739 <shlib_disabled>: Delete field.
6740 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6741 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6742 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6743 (raw_bkpt_type_to_target_hw_bp_type): New function.
6744 (find_enabled_raw_code_breakpoint_at): New function.
6745 (find_raw_breakpoint_at): New type and size parameters. Use them.
6746 (insert_memory_breakpoint): New function, based off
6747 set_raw_breakpoint_at.
6748 (remove_memory_breakpoint): New function.
6749 (set_raw_breakpoint_at): Reimplement.
6750 (set_breakpoint): New, based on set_breakpoint_at.
6751 (set_breakpoint_at): Reimplement.
6752 (delete_raw_breakpoint): Go through the_target->remove_point
6753 instead of assuming memory breakpoints.
6754 (find_gdb_breakpoint_at): Delete.
6755 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6756 (find_gdb_breakpoint): New function.
6757 (set_gdb_breakpoint_at): Delete.
6758 (z_type_supported): New function.
6759 (set_gdb_breakpoint_1): New function, loosely based off
6760 set_gdb_breakpoint_at.
6761 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6762 (delete_gdb_breakpoint_at): Delete.
6763 (delete_gdb_breakpoint_1): New function, loosely based off
6764 delete_gdb_breakpoint_at.
6765 (delete_gdb_breakpoint): New function.
6766 (clear_gdb_breakpoint_conditions): Rename to ...
6767 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6768 breakpoint.
6769 (add_condition_to_breakpoint): Make static.
6770 (add_breakpoint_condition): Take a struct breakpoint pointer
6771 instead of an address. Adjust.
6772 (gdb_condition_true_at_breakpoint): Rename to ...
6773 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6774 z_type parameter.
6775 (gdb_condition_true_at_breakpoint): Reimplement.
6776 (add_breakpoint_commands): Take a struct breakpoint pointer
6777 instead of an address. Adjust.
6778 (gdb_no_commands_at_breakpoint): Rename to ...
6779 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6780 parameter. Return true if no breakpoint was found. Change debug
6781 output.
6782 (gdb_no_commands_at_breakpoint): Reimplement.
6783 (run_breakpoint_commands): Rename to ...
6784 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6785 and change return type to boolean.
6786 (run_breakpoint_commands): New function.
6787 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6788 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6789 breakpoint. Go through the_target->remove_point instead of
6790 assuming memory breakpoint.
6791 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6792 software and hardware breakpoints.
6793 (reinsert_raw_breakpoint): Go through the_target->insert_point
6794 instead of assuming memory breakpoint.
6795 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6796 software and hardware breakpoints.
6797 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6798 Check both software and hardware breakpoints.
6799 (validate_inserted_breakpoint): Assert the breakpoint is a
6800 software breakpoint. Set the inserted flag to -1 instead of
6801 setting shlib_disabled.
6802 (delete_disabled_breakpoints): Adjust.
6803 (validate_breakpoints): Only validate software breakpoints.
6804 Adjust to inserted flag change.
6805 (check_mem_read, check_mem_write): Skip breakpoint types other
6806 than software breakpoints. Adjust to inserted flag change.
6807 * mem-break.h (enum raw_bkpt_type): New enum.
6808 (raw_breakpoint, struct process_info): Forward declare.
6809 (Z_packet_to_target_hw_bp_type): Delete declaration.
6810 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6811 (set_gdb_breakpoint, delete_gdb_breakpoint)
6812 (clear_breakpoint_conditions): New declarations.
6813 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6814 (breakpoint_inserted_here): Update comment.
6815 (add_breakpoint_condition, add_breakpoint_commands): Replace
6816 address parameter with a breakpoint pointer parameter.
6817 (gdb_breakpoint_here): Update comment.
6818 (delete_gdb_breakpoint_at): Delete.
6819 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6820 * server.c (process_point_options): Take a struct breakpoint
6821 pointer instead of an address. Adjust.
6822 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6823 delete_gdb_breakpoint.
6824 * spu-low.c (spu_target_ops): Install NULL as
6825 supports_z_point_type method.
6826 * target.h: Include mem-break.h.
6827 (struct target_ops) <prepare_to_access_memory>: Update comment.
6828 <supports_z_point_type>: New field.
6829 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6830 instead of a char. Also take a raw breakpoint pointer.
6831 * win32-arm-low.c (the_low_target): Install NULL as
6832 supports_z_point_type.
6833 * win32-i386-low.c (i386_supports_z_point_type): New function.
6834 (i386_insert_point, i386_remove_point): Adjust to new interface.
6835 (the_low_target): Install i386_supports_z_point_type.
6836 * win32-low.c (win32_supports_z_point_type): New function.
6837 (win32_insert_point, win32_remove_point): Adjust to new interface.
6838 (win32_target_ops): Install win32_supports_z_point_type.
6839 * win32-low.h (struct win32_target_ops):
6840 <supports_z_point_type>: New method.
6841 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6842 instead of a char. Also take a raw breakpoint pointer.
6843
6844 2014-05-20 Pedro Alves <palves@redhat.com>
6845
6846 * mem-break.h: Include break-common.h.
6847 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6848 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6849 (Z_packet_to_target_hw_bp_type): New declaration.
6850 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6851 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6852 (Z_PACKET_ACCESS_WP): Delete macros.
6853 (Z_packet_to_hw_type): Delete function.
6854 * i386-low.h: Don't include break-common.h here.
6855 (Z_packet_to_hw_type): Delete declaration.
6856 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6857 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6858 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6859 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6860 * linux-aarch64-low.c: Don't include break-common.h here.
6861 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6862 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6863 (Z_packet_to_target_hw_bp_type): Delete function.
6864 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6865 function.
6866 (mips_insert_point, mips_remove_point): Use
6867 Z_packet_to_target_hw_bp_type.
6868
6869 2014-05-20 Pedro Alves <palves@redhat.com>
6870
6871 * linux-aarch64-low.c: Include break-common.h.
6872 (enum target_point_type): Delete.
6873 (Z_packet_to_point_type): Rename to ...
6874 (Z_packet_to_target_hw_bp_type): ... this, and return a
6875 target_hw_bp_type instead.
6876 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6877 instead of an enum target_point_type.
6878 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6879 breakpoint type.
6880 (aarch64_dr_state_insert_one_point)
6881 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6882 (aarch64_handle_aligned_watchpoint)
6883 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6884 Take an enum target_hw_bp_type instead of an enum
6885 target_point_type.
6886 (aarch64_supports_z_point_type): New function.
6887 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6888 use Z_packet_to_target_hw_bp_type.
6889
6890 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6891
6892 * configure.ac: Only use -Werror by default when DEVELOPMENT
6893 is true.
6894 * configure: Regenerate.
6895
6896 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6897
6898 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6899 * linux-x86-low.c (X86_64_USER_REGS): New.
6900 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6901
6902 2014-04-28 Yao Qi <yao@codesourcery.com>
6903
6904 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6905 name.
6906
6907 2014-04-25 Pedro Alves <palves@redhat.com>
6908
6909 PR server/16255
6910 * linux-low.c (linux_attach_fail_reason_string): New function.
6911 (linux_attach_lwp): Delete.
6912 (linux_attach_lwp_1): Rename to ...
6913 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6914 argument. Remove "initial" parameter. Return int instead of
6915 void. Don't error or warn here.
6916 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6917 failure to attach to the tgid. Call warning when failing to
6918 attach to an lwp.
6919 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6920 argument. Remove "initial" parameter. Return int instead of
6921 void. Don't error or warn here.
6922 (linux_attach_fail_reason_string): New declaration.
6923 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6924 interface change. Use linux_attach_fail_reason_string.
6925
6926 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6927 Walfred Tedeschi <walfred.tedeschi@intel.com>
6928
6929 * Makefile.in: Added rules to handle new files
6930 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6931 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6932 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6933 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6934 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6935 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6936 x32-avx512-linux.o.
6937 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6938 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6939 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6940 i386/x32-avx512.xml.
6941 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6942 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6943 i386/x32-avx512-linux.xml.
6944 * i387-fp.c (num_avx512_k_registers): New constant for number
6945 of K registers.
6946 (num_avx512_zmmh_low_registers): New constant for number of
6947 lower ZMM registers (0-15).
6948 (num_avx512_zmmh_high_registers): New constant for number of
6949 higher ZMM registers (16-31).
6950 (num_avx512_ymmh_registers): New contant for number of higher
6951 YMM registers (ymm16-31 added by avx521 on x86_64).
6952 (num_avx512_xmm_registers): New constant for number of higher
6953 XMM registers (xmm16-31 added by AVX512 on x86_64).
6954 (struct i387_xsave): Add space for AVX512 registers.
6955 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6956 Add code to handle AVX512 registers.
6957 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6958 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6959 prototypei from generated file.
6960 (tdesc_amd64_avx512_linux): Likewise.
6961 (init_registers_x32_avx512_linux): Likewise.
6962 (tdesc_x32_avx512_linux): Likewise.
6963 (init_registers_i386_avx512_linux): Likewise.
6964 (tdesc_i386_avx512_linux): Likewise.
6965 (x86_64_regmap): Add AVX512 registers.
6966 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6967 mask.
6968 (initialize_low_arch): Add code to initialize AVX512 registers.
6969
6970 2014-04-23 Pedro Alves <palves@redhat.com>
6971
6972 * mem-break.c (find_gdb_breakpoint_at): Make static.
6973 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6974
6975 2014-04-23 Pedro Alves <palves@redhat.com>
6976
6977 * i386-low.c: Don't include break-common.h here.
6978 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6979 prototype to take target_hw_bp_type as argument instead of a Z
6980 packet char.
6981 * i386-low.h: Include break-common.h here.
6982 (Z_packet_to_hw_type): Declare.
6983 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6984 prototypes.
6985 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6986 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6987 (x86_remove_point): Convert the packet number to a
6988 target_hw_bp_type before calling i386_low_remove_watchpoint.
6989 * win32-i386-low.c (i386_insert_point): Convert the packet number
6990 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6991 (i386_remove_point): Convert the packet number to a
6992 target_hw_bp_type before calling i386_low_remove_watchpoint.
6993
6994 2014-04-23 Pedro Alves <palves@redhat.com>
6995
6996 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6997
6998 2014-04-10 Pedro Alves <palves@redhat.com>
6999
7000 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7001 Check if the condition or command is NULL before checking if the
7002 breakpoint is known. On success, return true.
7003 * mem-break.h (add_breakpoint_condition): Document return.
7004 (add_breakpoint_commands): Add describing comment.
7005 * server.c (skip_to_semicolon): New function.
7006 (process_point_options): Use it.
7007
7008 2014-04-09 Pedro Alves <palves@redhat.com>
7009
7010 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7011 to lwpid_of.
7012
7013 2014-02-27 Pedro Alves <palves@redhat.com>
7014
7015 PR 12702
7016 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7017 macros.
7018 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7019 output.
7020 (last_thread_of_process_p): Take a PID argument instead of a
7021 thread pointer.
7022 (linux_wait_for_lwp): Delete.
7023 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7024 functions.
7025 (linux_low_filter_event): New function, party factored out from
7026 linux_wait_for_event.
7027 (linux_wait_for_event): Rename to ...
7028 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7029 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7030 sigsuspend. Check for zombie leaders.
7031 (linux_wait_for_event): Reimplement as wrapper around
7032 linux_wait_for_event_filtered.
7033 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7034 a normal or signal exit is seen, it's the whole process exiting.
7035 (wait_for_sigstop): No longer a for_each_inferior callback.
7036 Rewrite on top of linux_wait_for_event_filtered.
7037 (stop_all_lwps): Call wait_for_sigstop directly.
7038 * server.c (resume, handle_target_event): Handle
7039 TARGET_WAITKIND_NO_RESUMED.
7040
7041 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7042
7043 * win32-low.c (psapi_get_dll_name,
7044 * win32_CreateToolhelp32Snapshot): Delete.
7045 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7046 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7047 Delete.
7048 (handle_load_dll): Add function description.
7049 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7050
7051 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7052
7053 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7054 Add comment.
7055 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7056 base address when calling win32_add_one_solib.
7057 (handle_load_dll): Delete local variable load_addr.
7058 Remove 0x1000 offset applied to DLL base address when calling
7059 win32_add_one_solib.
7060 (handle_unload_dll): Add comment.
7061
7062 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7063
7064 * win32-low.c (win32_add_all_dlls): Renames
7065 win32_ensure_ntdll_loaded. Rewrite function documentation.
7066 Adjust implementation to always load all DLLs.
7067 Add 0x1000 offset to DLL base address when calling
7068 win32_add_one_solib.
7069 (child_initialization_done): New static global.
7070 (do_initial_child_stuff): Set child_initialization_done to
7071 zero during child initialization, and 1 after. Replace call
7072 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7073 Add comment.
7074 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7075 (handle_unload_dll): Add function documentation.
7076 (get_child_debug_event): Ignore load and unload DLL events
7077 during child initialization.
7078
7079 2014-02-20 Doug Evans <dje@google.com>
7080
7081 Remove global all_lwps.
7082 * inferiors.h (ptid_of): Move here from linux-low.h.
7083 (pid_of, lwpid_of): Ditto.
7084 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7085 parameter is a struct thread_info * now.
7086 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7087 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7088 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7089 directly.
7090 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7091 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7092 * linux-arm-low.c (update_registers_callback): Update, "entry"
7093 parameter is a struct thread_info * now.
7094 Fetch lwpid from current_inferior directly.
7095 (arm_insert_point): Pass &all_threads to find_inferior instead of
7096 &all_lwps.
7097 (arm_remove_point): Ditto.
7098 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7099 (arm_prepare_to_resume): Fetch pid from thread.
7100 (arm_read_description): Fetch lwpid from current_inferior directly.
7101 * linux-low.c (all_lwps): Delete.
7102 (delete_lwp): Delete call to remove_inferior.
7103 (handle_extended_wait): Fetch lwpid from thread.
7104 (add_lwp): Don't set lwp->entry.id. Remove call to
7105 add_inferior_to_list.
7106 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7107 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7108 (kill_one_lwp_callback): Ditto.
7109 (linux_kill): Don't dereference NULL pointer.
7110 Fetch ptid,lwpid from thread.
7111 (get_detach_signal): Fetch ptid from thread.
7112 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7113 Simplify call to regcache_invalidate_thread.
7114 (delete_lwp_callback): Update, "entry" parameter is a
7115 struct thread_info * now. Fetch pid from thread.
7116 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7117 (status_pending_p_callback): Update, "entry" parameter is a
7118 struct thread_info * now. Fetch ptid from thread.
7119 (find_lwp_pid): Update, "entry" parameter is a
7120 struct thread_info * now.
7121 (linux_wait_for_lwp): Fetch pid from thread.
7122 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7123 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7124 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7125 (dequeue_one_deferred_signal): Ditto.
7126 (cancel_breakpoint): Fetch ptid from current_inferior.
7127 (linux_wait_for_event): Pass &all_threads to find_inferior,
7128 not &all_lwps. Fetch ptid, lwpid from thread.
7129 (count_events_callback): Update, "entry" parameter is a
7130 struct thread_info * now.
7131 (select_singlestep_lwp_callback): Ditto.
7132 (select_event_lwp_callback): Ditto.
7133 (cancel_breakpoints_callback): Ditto.
7134 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7135 not &all_lwps.
7136 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7137 (unsuspend_one_lwp): Update, "entry" parameter is a
7138 struct thread_info * now.
7139 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7140 not &all_lwps.
7141 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7142 Fetch lwpid from thread, not lwp.
7143 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7144 Pass &all_threads to find_inferior, not &all_lwps.
7145 (send_sigstop): Fetch lwpid from thread, not lwp.
7146 (send_sigstop_callback): Update, "entry" parameter is a
7147 struct thread_info * now.
7148 (suspend_and_send_sigstop_callback): Ditto.
7149 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7150 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7151 struct thread_info * now.
7152 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7153 from thread, lwp.
7154 (lwp_running): Update, "entry" parameter is a
7155 struct thread_info * now.
7156 (stop_all_lwps): Fetch ptid from thread.
7157 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7158 (linux_resume_one_lwp): Fetch lwpid from thread.
7159 (linux_set_resume_request): Update, "entry" parameter is a
7160 struct thread_info * now. Fetch pid, lwpid from thread.
7161 (resume_status_pending_p): Update, "entry" parameter is a
7162 struct thread_info * now.
7163 (need_step_over_p): Ditto. Fetch lwpid from thread.
7164 (start_step_over): Fetch lwpid from thread.
7165 (linux_resume_one_thread): Update, "entry" parameter is a
7166 struct thread_info * now. Fetch lwpid from thread.
7167 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7168 (proceed_one_lwp): Update, "entry" parameter is a
7169 struct thread_info * now. Fetch lwpid from thread.
7170 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7171 struct thread_info * now.
7172 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7173 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7174 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7175 directly.
7176 (regsets_store_inferior_registers): Ditto.
7177 (fetch_register, store_register): Ditto.
7178 (linux_read_memory, linux_write_memory): Ditto.
7179 (linux_request_interrupt): Ditto.
7180 (linux_read_auxv): Ditto.
7181 (linux_xfer_siginfo): Ditto.
7182 (linux_qxfer_spu): Ditto.
7183 (linux_qxfer_libraries_svr4): Ditto.
7184 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7185 moved to inferiors.h.
7186 (get_lwp): Delete.
7187 (get_thread_lwp): Update.
7188 (struct lwp_info): Delete member "entry". Simplify comment for
7189 member "thread".
7190 (all_lwps): Delete.
7191 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7192 current_inferior directly.
7193 (update_watch_registers_callback): Update, "entry" parameter is a
7194 struct thread_info * now. Fetch pid from thread.
7195 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7196 (mips_insert_point): Fetch lwpid from current_inferior.
7197 Pass &all_threads to find_inferior, not &all_lwps.
7198 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7199 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7200 directly.
7201 (mips_stopped_data_address): Ditto.
7202 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7203 directly.
7204 * linux-tile-low.c (tile_arch_setup): Ditto.
7205 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7206 (update_debug_registers_callback): Update, "entry" parameter is a
7207 struct thread_info * now. Fetch pid from thread.
7208 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7209 Pass &all_threads to find_inferior, not &all_lwps.
7210 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7211 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7212 Pass &all_threads to find_inferior, not &all_lwps.
7213 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7214 (i386_dr_low_get_status): Ditto.
7215 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7216 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7217 (x86_linux_read_description): Ditto.
7218 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7219
7220 2014-02-20 Doug Evans <dje@google.com>
7221
7222 * inferiors.c (get_first_inferior): Fix buglet.
7223
7224 2014-02-19 Doug Evans <dje@google.com>
7225
7226 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7227 * inferiors.c (add_thread): Change result type to struct thread_info *.
7228 All callers updated.
7229 (add_lwp): Call add_thread here instead of in callers.
7230 All callers updated.
7231 * linux-low.h (get_lwp_thread): Rewrite.
7232 (struct lwp_info): New member "thread".
7233
7234 2014-02-19 Doug Evans <dje@google.com>
7235
7236 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7237 All callers updated.
7238
7239 2014-02-19 Doug Evans <dje@google.com>
7240
7241 * inferiors.c (add_thread): Fix whitespace.
7242
7243 2014-02-19 Doug Evans <dje@google.com>
7244
7245 * dll.c (clear_dlls): Replace accessing list implemention details
7246 with API function.
7247 * gdbthread.h (get_first_thread): Declare.
7248 * inferiors.c (for_each_inferior_with_data): New function.
7249 (get_first_thread): New function.
7250 (find_thread_ptid): Simplify.
7251 (get_first_inferior): New function.
7252 (clear_list): Delete.
7253 (one_inferior_p): New function.
7254 (clear_inferior_list): New function.
7255 (clear_inferiors): Update.
7256 * inferiors.h (for_each_inferior_with_data): Declare.
7257 (clear_inferior_list): Declare.
7258 (one_inferior_p): Declare.
7259 (get_first_inferior): Declare.
7260 * linux-low.c (linux_wait_for_event): Replace accessing list
7261 implemention details with API function.
7262 * server.c (target_running): Ditto.
7263 (accumulate_file_name_length): New function.
7264 (emit_dll_description): New function.
7265 (handle_qxfer_libraries): Replace accessing list implemention
7266 details with API function.
7267 (handle_qxfer_threads_worker): New function.
7268 (handle_qxfer_threads_proper): Replace accessing list implemention
7269 details with API function.
7270 (handle_query): Ditto.
7271 (visit_actioned_threads_callback_ftype): New typedef.
7272 (visit_actioned_threads_data): New struct.
7273 (visit_actioned_threads): Rewrite to be find_inferior callback.
7274 (resume): Call find_inferior.
7275 (handle_status): Replace accessing list implemention
7276 details with API function.
7277 (process_serial_event): Replace accessing list implemention details
7278 with API function.
7279 * target.c (set_desired_inferior): Replace accessing list implemention
7280 details with API function.
7281 * tracepoint.c (same_process_p): New function.
7282 (gdb_agent_about_to_close): Replace accessing list implemention
7283 details with API function.
7284 * win32-low.c (child_delete_thread): Replace accessing list
7285 implemention details with API function.
7286 (match_dll_by_basename): New function.
7287 (dll_is_loaded_by_basename): New function.
7288 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7289 details call to dll_is_loaded_by_basename.
7290
7291 2014-02-19 Doug Evans <dje@google.com>
7292
7293 * dll.h (struct dll_info): Add comment.
7294 * gdbthread.h (struct thread_info): Add comment.
7295 (current_ptid): Simplify.
7296 * inferiors.c (add_process): Update.
7297 (remove_process): Update.
7298 * inferiors.h (struct process_info): Rename member "head" to "entry".
7299 * linux-low.c (delete_lwp): Update.
7300 (add_lwp): Update.
7301 (last_thread_of_process_p): Update.
7302 (kill_one_lwp_callback, linux_kill): Update.
7303 (status_pending_p_callback): Update.
7304 (wait_for_sigstop): Update. Simplify read of ptid.
7305 (start_step_over): Update.
7306 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7307 (get_lwp_thread): Update.
7308 (struct lwp_info): Rename member "head" to "entry".
7309 * regcache.h (inferior_list_entry): Delete.
7310 * server.c (kill_inferior_callback): Update.
7311 (detach_or_kill_inferior_callback): Update.
7312 (print_started_pid): Update.
7313 (print_attached_pid): Update.
7314 (process_serial_event): Simplify read of ptid.
7315 * thread-db.c (thread_db_create_event): Update.
7316 (thread_db_get_tls_address): Update.
7317 * win32-low.c (current_inferior_ptid): Simplify.
7318
7319 2014-02-19 Tom Tromey <tromey@redhat.com>
7320
7321 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7322 argument.
7323 (target_supports_btrace): Update.
7324
7325 2014-02-14 Yao Qi <yao@codesourcery.com>
7326
7327 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7328 (rsp-low-ipa.o): New target.
7329
7330 2014-02-12 Tom Tromey <tromey@redhat.com>
7331
7332 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7333 convert_ascii_to_int.
7334 * regcache.c (registers_to_string): Likewise.
7335 * remote-utils.c (decode_M_packet): Likewise.
7336 * server.c (process_serial_event): Likewise.
7337
7338 2014-02-12 Tom Tromey <tromey@redhat.com>
7339
7340 * server.c (handle_query, handle_v_run): Use hex2bin, not
7341 unhexify.
7342 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7343
7344 2014-02-12 Tom Tromey <tromey@redhat.com>
7345
7346 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7347 convert_int_to_ascii.
7348 * regcache.c (registers_to_string, collect_register_as_string):
7349 Likewise.
7350 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7351 Likewise.
7352 * server.c (process_serial_event): Likewise.
7353 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7354 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7355
7356 2014-02-12 Tom Tromey <tromey@redhat.com>
7357
7358 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7359 bin2hex, not hexify.
7360 * tracepoint.c (cmd_qtstatus): Likewise.
7361
7362 2014-02-12 Tom Tromey <tromey@redhat.com>
7363
7364 * remote-utils.c (monitor_output): Pass explicit length to
7365 hexify.
7366
7367 2014-02-12 Tom Tromey <tromey@redhat.com>
7368
7369 * tracepoint.c: Include rsp-low.h.
7370 * server.c: Include rsp-low.h.
7371 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7372 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7373 declare.
7374 * remote-utils.c: Include rsp-low.h.
7375 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7376 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7377 (convert_int_to_ascii, convert_ascii_to_int): Move to
7378 common/rsp-low.c.
7379 * regcache.c: Include rsp-low.h.
7380 * ax.c: Include rsp-low.h.
7381 * Makefile.in (SFILES): Add common/rsp-low.c.
7382 (OBS): Add rsp-low.o.
7383 (rsp-low.o): New target.
7384
7385 2014-02-12 Tom Tromey <tromey@redhat.com>
7386
7387 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7388 Include print-utils.h.
7389 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7390 (plongest, thirty_two, phex_nz): Remove.
7391 * Makefile.in (SFILES): Add common/print-utils.c.
7392 (OBS): Add print-utils.o.
7393 (print-utils-ipa.o): New target.
7394 (print-utils.o): New target.
7395 (IPA_OBJS): Add print-utils-ipa.o.
7396
7397 2014-02-06 Tom Tromey <tromey@redhat.com>
7398
7399 * Makefile.in (SFILES): Fix indentation.
7400
7401 2014-02-05 Doug Evans <dje@google.com>
7402
7403 * linux-low.c (linux_wait_for_event): Improve comment.
7404 (linux_wait_1): Keep current_inferior in sync with event_child.
7405
7406 2014-01-22 Doug Evans <dje@google.com>
7407
7408 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7409
7410 2014-01-22 Doug Evans <dje@google.com>
7411
7412 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7413 * configure: Regenerate.
7414 * config.in: Regenerate.
7415 * Makefile.in (SFILES): Add debug.c.
7416 (OBS): Add debug.o.
7417 * debug.c: New file.
7418 * debug.h: New file.
7419 * linux-aarch64-low.c (*): Update all debugging printfs to use
7420 debug_printf instead of fprintf.
7421 * linux-arm-low.c (*): Ditto.
7422 * linux-cris-low.c (*): Ditto.
7423 * linux-crisv32-low.c (*): Ditto.
7424 * linux-m32r-low.c (*): Ditto.
7425 * linux-sparc-low.c (*): Ditto.
7426 * linux-x86.c (*): Ditto.
7427 * linux-low.c (*): Ditto.
7428 (linux_wait_1): Add calls to debug_enter, debug_exit.
7429 (linux_wait): Remove redundant debugging printf.
7430 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7431 (linux_resume, unstop_all_lwps): Ditto.
7432 * mem-break.c (*): Update all debugging printfs to use
7433 debug_printf instead of fprintf.
7434 * remote-utils.c (*): Ditto.
7435 * thread-db.c (*): Ditto.
7436 * server.c #include <ctype.h>, "gdb_vecs.h".
7437 (debug_threads): Moved to debug.c.
7438 (*): Update all debugging printfs to use debug_printf instead of
7439 fprintf.
7440 (start_inferior): Replace call to fflush with call to debug_flush.
7441 (monitor_show_help): Mention set debug-format.
7442 (parse_debug_format_options): New function.
7443 (handle_monitor_command): Handle "monitor set debug-format".
7444 (gdbserver_usage): Mention --debug-format.
7445 (main): Parse --debug-format.
7446 * server.h (debug_threads): Declaration moved to debug.h.
7447 #include "debug.h".
7448 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7449 trace_debug_1 that uses debug_printf.
7450 (tracepoint_look_up_symbols): Update all debugging printfs to use
7451 debug_printf instead of fprintf.
7452
7453 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7454
7455 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7456 sys/ptrace.h.
7457
7458 2014-01-17 Pedro Alves <palves@redhat.com>
7459
7460 PR build/16445
7461 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7462 defined after including gdb_proc_service.h.
7463
7464 2014-01-16 Doug Evans <dje@google.com>
7465
7466 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7467 (match_dll): Use it.
7468
7469 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7470
7471 * target.h (target_ops) <read_btrace>: Change parameters and
7472 return type to allow error reporting.
7473 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7474 trace reading errors on.
7475 * linux-low.c (linux_low_read_btrace): Pass trace reading
7476 errors on.
7477 (linux_low_disable_btrace): New.
7478
7479 2014-01-15 Doug Evans <dje@google.com>
7480
7481 * inferiors.c (thread_id_to_gdb_id): Delete.
7482 * inferiors.h (thread_id_to_gdb_id): Delete.
7483
7484 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7485
7486 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7487 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7488 versions.
7489
7490 2014-01-08 Pedro Alves <palves@redhat.com>
7491
7492 * server.c (handle_status): Don't discard previous queued stop
7493 replies or thread's pending status here.
7494 (main) <disconnection>: Do it here instead.
7495
7496 2014-01-08 Pedro Alves <palves@redhat.com>
7497
7498 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7499 * server.c (visit_actioned_threads, handle_pending_status): New
7500 function.
7501 (handle_v_cont): Factor out parts to ...
7502 (resume): ... this new function. If in all-stop, and a thread
7503 being resumed has a pending status, report it without actually
7504 resuming.
7505 (myresume): Adjust to use the new 'resume' function.
7506 (clear_pending_status_callback, set_pending_status_callback)
7507 (find_status_pending_thread_callback): New functions.
7508 (handle_status): Handle the case of multiple threads having
7509 interesting statuses to report. Report threads' real last signal
7510 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7511 with an interesting thread to report the status for, instead of
7512 always reporting the status of the first thread.
7513
7514 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7515
7516 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7517 * gdbreplay.c (gdbreplay_version): Likewise.
7518
7519 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7520
7521 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7522 iov.iov_len with the real length in use.
7523
7524 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7525
7526 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7527 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7528 for all targets that use win32-low.c.
7529 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7530 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7531
7532 2013-12-13 Pedro Alves <palves@redhat.com>
7533
7534 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7535 if equal to TARGET_WAITKIND_LOADED.
7536 * win32-low.c (cached_status): New static global.
7537 (win32_wait): Add declaration.
7538 (do_initial_child_stuff): Flush all initial pending debug events
7539 up to the initial breakpoint.
7540 (win32_wait): If CACHED_STATUS was set, return that instead
7541 of doing a real wait. Remove the code resuming the execution
7542 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7543 during the initial phase. Also remove the code changing
7544 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7545 TARGET_WAITKIND_STOPPED.
7546
7547 2013-12-11 Yao Qi <yao@codesourcery.com>
7548
7549 * notif.c (handle_notif_ack): Return 0 if no notification
7550 matches.
7551
7552 2013-11-20 Doug Evans <dje@google.com>
7553
7554 * linux-low.c (linux_set_resume_request): Fix comment.
7555
7556 2013-11-20 Doug Evans <dje@google.com>
7557
7558 * linux-low.c (resume_status_pending_p): Tweak comment.
7559
7560 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7561
7562 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7563 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7564 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7565 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7566 (srv_amd64_regobj): Add amd64-mpx.o.
7567 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7568 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7569 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7570 * i387-fp.c (num_pl_bnd_register) Added constant.
7571 (num_pl_bnd_cfg_registers) Added constant.
7572 (struct i387_xsave) Added reserved area and MPX fields.
7573 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7574 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7575 function.
7576 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7577 (init_registers_amd64_mpx_linux): Declare new function.
7578 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7579 (x86_64_regmap): Add MPX registers.
7580 (x86_linux_read_description): Add MPX case.
7581 (initialize_low_arch): Initialize MPX targets.
7582
7583 2013-11-18 Tom Tromey <tromey@redhat.com>
7584
7585 * configure: Rebuild.
7586 * configure.ac: Don't check for stdlib.h.
7587 * gdbreplay.c: Unconditionally include stdlib.h.
7588
7589 2013-11-18 Tom Tromey <tromey@redhat.com>
7590
7591 * config.in: Rebuild.
7592 * configure: Rebuild.
7593 * configure.ac: Don't use AC_HEADER_DIRENT.
7594
7595 2013-11-18 Tom Tromey <tromey@redhat.com>
7596
7597 * server.h: Don't check HAVE_STRING_H.
7598 * gdbreplay.c: Don't check HAVE_STRING_H.
7599 * configure: Rebuild.
7600
7601 2013-11-18 Tom Tromey <tromey@redhat.com>
7602
7603 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7604 LIBGNU.
7605
7606 2013-11-08 Tom Tromey <tromey@redhat.com>
7607
7608 * configure, config.in: Rebuild.
7609 * configure.ac: Remove unused configury.
7610
7611 2013-11-08 Tom Tromey <tromey@redhat.com>
7612
7613 * acinclude.m4: Include common.m4, codeset.m4.
7614 * configure, config.in: Rebuild.
7615 * configure.ac: Use GDB_AC_COMMON.
7616
7617 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7618
7619 * linux-s390-low.c (HWCAP_S390_TE): New define.
7620 (s390_arch_setup): Consider the TE field in the HWCAP for
7621 determining 'have_regset_tdb'.
7622
7623 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7624
7625 PR gdb/16014
7626 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7627 call to sizeof.
7628
7629 2013-10-02 Pedro Alves <palves@redhat.com>
7630
7631 * server.c (process_serial_event): Don't output "GDBserver
7632 exiting" if GDB is connected through stdio.
7633 * target.c (mywait): Likewise, be silent if GDB is connected
7634 through stdio.
7635
7636 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7637
7638 * lynx-low.c (lynx_add_threads_after_attach): New function.
7639 (lynx_attach): Remove call to add_thread. Add call to
7640 lynx_add_threads_after_attach instead.
7641
7642 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7643
7644 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7645 * config.in, configure: Regenerated.
7646
7647 2013-09-18 Yao Qi <yao@codesourcery.com>
7648
7649 PR server/15959
7650 * server.c (start_inferior): Clear 'resume_info'.
7651
7652 2013-09-16 Jiong Wang <jiwang@tilera.com>
7653
7654 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7655 for each register.
7656
7657 2013-09-16 Jiong Wang <jiwang@tilera.com>
7658
7659 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7660 linux-tile-low.o to srv_tgtobj.
7661
7662 2013-09-16 Will Newton <will.newton@linaro.org>
7663
7664 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7665 out regs.
7666
7667 2013-09-06 Pedro Alves <palves@redhat.com>
7668
7669 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7670 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7671 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7672 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7673 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7674 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7675
7676 2013-09-06 Pedro Alves <palves@redhat.com>
7677
7678 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7679 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7680
7681 2013-09-06 Pedro Alves <palves@redhat.com>
7682
7683 * linux-amd64-ipa.c: Include tracepoint.h.
7684 * linux-i386-ipa.c: Include tracepoint.h.
7685
7686 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7687
7688 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7689 (ps_get_thread_area): New function.
7690
7691 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7692
7693 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7694 (initialize_low_arch): Call init_registers_crisv32 rather than
7695 init_register_crisv32.
7696
7697 2013-09-05 Pedro Alves <palves@redhat.com>
7698
7699 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7700 to ...
7701 * hostio.h: ... this new file.
7702 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7703 win32-low.c: Include hostio.h.
7704
7705 2013-09-05 Pedro Alves <palves@redhat.com>
7706
7707 * server.h (gdb_client_data, handler_func, callback_handler_func)
7708 (delete_file_handler, add_file_handler, append_callback_event)
7709 (delete_callback_event, start_event_loop, initialize_event_loop):
7710 Move to event-loop.h and include it.
7711 * event-loop.h: New file.
7712
7713 2013-09-05 Pedro Alves <palves@redhat.com>
7714
7715 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7716 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7717 (loaded_dll, unloaded_dll): Move to ...
7718 * dll.h: ... this new file.
7719 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7720
7721 2013-09-05 Pedro Alves <palves@redhat.com>
7722
7723 * server.h (current_process, get_thread_process, all_processes)
7724 (add_inferior_to_list, for_each_inferior, current_inferior)
7725 (remove_inferior, add_process, remove_process, find_process_pid)
7726 (have_started_inferiors_p, have_attached_inferiors_p)
7727 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7728 (clear_inferiors, find_inferior, find_inferior_id)
7729 (inferior_target_data, set_inferior_target_data)
7730 (inferior_regcache_data, set_inferior_regcache_data): Move to
7731 inferiors.h, and include it.
7732 * inferiors.h: New file.
7733
7734 2013-09-05 Pedro Alves <palves@redhat.com>
7735
7736 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7737 Move ...
7738 * ax.h: ... here.
7739
7740 2013-09-05 Pedro Alves <palves@redhat.com>
7741
7742 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7743 tracepoint.h.
7744 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7745 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7746 (handle_tracepoint_general_set, handle_tracepoint_query)
7747 (tracepoint_finished_step, tracepoint_was_hit)
7748 (release_while_stepping_state_list, current_traceframe)
7749 (in_readonly_region, traceframe_read_mem)
7750 (fetch_traceframe_registers, traceframe_read_sdata)
7751 (traceframe_read_info, struct fast_tpoint_collect_status)
7752 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7753 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7754 (supply_fast_tracepoint_registers)
7755 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7756 (ipa_tdesc, claim_trampoline_space)
7757 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7758 (agent_mem_read, agent_get_trace_state_variable_value)
7759 (agent_set_trace_state_variable_value, agent_tsv_read)
7760 (agent_mem_read_string, get_raw_reg_func_addr)
7761 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7762 * tracepoint.h: ... this new file.
7763
7764 2013-09-05 Pedro Alves <palves@redhat.com>
7765
7766 * server.h (perror_with_name, error, fatal, warning, paddress)
7767 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7768 include it.
7769 * utils.h: New file.
7770
7771 2013-09-05 Pedro Alves <palves@redhat.com>
7772
7773 * server.h (remote_debug, noack_mode, transport_is_reliable)
7774 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7775 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7776 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7777 (write_enn, initialize_async_io, enable_async_io)
7778 (disable_async_io, check_remote_input_interrupt_request)
7779 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7780 (dead_thread_notify, prepare_resume_reply)
7781 (decode_address_to_semicolon, decode_address, decode_m_packet)
7782 (decode_M_packet, decode_X_packet, decode_xfer_write)
7783 (decode_search_memory_packet, unhexify, hexify)
7784 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7785 (look_up_one_symbol, relocate_instruction)
7786 (monitor_output): Move to remote-utils.h, and include it.
7787 * remote-utils.h: New file.
7788
7789 2013-09-05 Pedro Alves <palves@redhat.com>
7790
7791 * server.h (_): Delete.
7792
7793 2013-09-02 Pedro Alves <palves@redhat.com>
7794
7795 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7796 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7797 allocated.
7798 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7799
7800 2013-09-02 Pierre Muller <muller@sourceware.org>
7801
7802 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7803 or WriteProcessMemory complete successfully and handle
7804 ERROR_PARTIAL_COPY error.
7805
7806 2013-09-02 Pedro Alves <palves@redhat.com>
7807
7808 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7809 error instead of EIO.
7810
7811 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7812
7813 PR server/15604
7814 * linux-low.c: Include filestuff.h.
7815 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7816 * lynx-low.c: Include filestuff.h.
7817 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7818 * server.c: Include filestuff.h.
7819 (main): Call notice_open_fds.
7820 * spu-low.c: Include filestuff.h.
7821 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7822
7823 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7824
7825 * Makefile.in: Explain why ../target and ../nat are not
7826 listed as include file search paths.
7827 (linux-waitpid.o): New object file rule.
7828 * configure.srv (srv_native_linux_obj): New variable.
7829 Replace all occurrences of linux native object files with
7830 $srv_native_linux_obj.
7831 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7832 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7833 (linux_enable_event_reporting): Remove declaration.
7834 (my_waitpid): Moved to common/linux-waitpid.c.
7835 (linux_wait_for_event): Pass ptid when calling
7836 linux_enable_event_reporting.
7837 (linux_supports_tracefork_flag): Remove.
7838 (linux_enable_event_reporting): Likewise.
7839 (linux_tracefork_grandchild): Remove.
7840 (STACK_SIZE): Moved to common/linux-ptrace.c.
7841 (linux_tracefork_child): Remove.
7842 (linux_test_for_tracefork): Remove.
7843 (linux_look_up_symbols): Call linux_supports_traceclone.
7844 (initialize_low): Remove call to linux_test_for_tracefork.
7845 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7846 common/linux-ptrace.h.
7847 (PTRACE_TYPE_ARG4): Likewise.
7848 Include linux-ptrace.h.
7849
7850 2013-08-21 Pedro Alves <palves@redhat.com>
7851
7852 * config.in: Renegerate.
7853
7854 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7855
7856 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7857 (SFILES): Remove $(srcdir)/common/target-common.c and
7858 add $(srcdir)/target/waitstatus.c.
7859 (OBS): Remove target-common.o and add waitstatus.o.
7860 (server_h): Remove $(srcdir)/../common/target-common.h and
7861 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7862 and $(srcdir)/../target/waitstatus.h.
7863 (target-common.o): Remove.
7864 (waitstatus.o): New target object file.
7865 * target.h: Do not include target-common.h and
7866 include target/resume.h, target/wait.h and
7867 target/waitstatus.h.
7868
7869 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7870
7871 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7872 to PTRACE_TYPE_ARG3.
7873 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7874 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7875 PTRACE_TYPE_ARG4.
7876 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7877 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7878
7879 2013-07-27 Jie Zhang <jie@codesourcery.com>
7880 Daniel Jacobowitz <dan@codesourcery.com>
7881 Yao Qi <yao@codesourcery.com>
7882
7883 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7884 (mips-linux-watch.o): New rule.
7885 (mips_linux_watch_h): New variable.
7886 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7887 srv_tgtobj.
7888 * linux-mips-low.c: Include mips-linux-watch.h.
7889 (struct arch_process_info, struct arch_lwp_info): New.
7890 (update_watch_registers_callback): New function.
7891 (mips_linux_new_process, mips_linux_new_thread) New functions.
7892 (mips_linux_prepare_to_resume, mips_insert_point): New
7893 functions.
7894 (mips_remove_point, mips_stopped_by_watchpoint): New
7895 functions.
7896 (rsp_bp_type_to_target_hw_bp_type): New function.
7897 (mips_stopped_data_address): New function.
7898 (the_low_target): Add watchpoint support functions.
7899
7900 2013-07-27 Yao Qi <yao@codesourcery.com>
7901
7902 * i386-low.c: Include break-common.h.
7903 (enum target_hw_bp_type): Remove.
7904
7905 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7906
7907 * Makefile.in (SFILES): /common/target-common.c.
7908 (OBS): Add target-common.o.
7909 (server_h): Add $(srcdir)/../common/target-common.h.
7910 (target-common.o): New target.
7911 * server.c (queue_stop_reply_callback): Free
7912 status string after use.
7913 * target.c (target_waitstatus_to_string): Remove.
7914 * target.h: Include target-common.h.
7915 (resume_kind): Likewise.
7916 (target_waitkind): Likewise.
7917 (target_waitstatus): Likewise.
7918 (TARGET_WNOHANG): Likewise.
7919
7920 2013-07-04 Yao Qi <yao@codesourcery.com>
7921
7922 * Makefile.in (host_alias): Use @host_noncanonical@.
7923 (target_alias): Use @target_noncanonical@.
7924 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7925 ACX_NONCANONICAL_HOST.
7926 * configure: Regenerated.
7927
7928 Revert:
7929 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7930
7931 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7932 * configure: Rebuild.
7933 * Makefile.in (version_host, version_target): Get from configure.
7934 (version.c): Use $(version_host) and $(version_target).
7935
7936 2013-07-03 Pedro Alves <palves@redhat.com>
7937
7938 * Makefile.in (config.status): Depend on development.sh.
7939 * acinclude.m4: Include libmcheck.m4.
7940 * configure: Regenerate.
7941
7942 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7943
7944 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7945 attribute inside the parentheses.
7946 (winapi_DebugSetProcessKillOnExit): Ditto.
7947 (winapi_DebugBreakProcess): Ditto.
7948 (winapi_GenerateConsoleCtrlEvent): Ditto.
7949
7950 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7951
7952 * notif.h (notif_event): Add a dummy member to avoid compiler
7953 errors.
7954
7955 2013-07-01 Pedro Alves <palves@redhat.com>
7956
7957 * hostio.c (HOSTIO_PATH_MAX): Define.
7958 (require_filename, handle_open, handle_unlink, handle_readlink):
7959 Use it.
7960
7961 2013-07-01 Pedro Alves <palves@redhat.com>
7962
7963 * server.h: Include "pathmax.h".
7964 * linux-low.c: Don't include sys/param.h.
7965 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7966 MAXPATHLEN.
7967 * win32-low.c: Don't include sys/param.h.
7968 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7969
7970 2013-07-01 Pedro Alves <palves@redhat.com>
7971
7972 * event-loop.c: Don't check HAVE_UNISTD_H before including
7973 <unistd.h>.
7974 * gdbreplay.c: Likewise.
7975 * remote-utils.c: Likewise.
7976 * server.c: Likewise.
7977 * configure.ac: Don't check for unistd.h.
7978 * configure: Regenerate.
7979
7980 2013-06-28 Tom Tromey <tromey@redhat.com>
7981
7982 * Makefile.in (version.c): Use version.in, not
7983 common/version.in.
7984
7985 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7986
7987 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7988 * configure: Rebuild.
7989 * Makefile.in (version_host, version_target): Get from configure.
7990 (version.c): Use $(version_host) and $(version_target).
7991
7992 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7993
7994 Fix trace-status to output user name without trailing colon.
7995 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7996
7997 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7998
7999 Fix trace-status to output proper start-time and stop-time.
8000 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8001 output start time and stop time in hex as gdb expects.
8002
8003 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8004
8005 * tracepoint.c (build_traceframe_info_xml): Output trace state
8006 variables present in the trace buffer.
8007
8008 2013-06-24 Tom Tromey <tromey@redhat.com>
8009
8010 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8011 create-version.sh.
8012 (version.o): Remove.
8013 * gdbreplay.c: Include version.h.
8014 (version, host_name): Don't declare.
8015 * server.h: Include version.h.
8016 (version, host_name): Don't declare.
8017
8018 2013-06-12 Pedro Alves <palves@redhat.com>
8019
8020 * linux-x86-low.c (linux_is_elf64): Delete global.
8021 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8022 with local linux_pid_exe_is_elf_64_file use.
8023
8024 2013-06-11 Pedro Alves <palves@redhat.com>
8025
8026 * linux-low.c (regset_disabled, disable_regset): New functions.
8027 (regsets_fetch_inferior_registers)
8028 (regsets_store_inferior_registers): Use them.
8029 (initialize_regsets_info); Don't allocate the disabled_regsets
8030 array here.
8031 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8032 comment.
8033
8034 2013-06-11 Pedro Alves <palves@redhat.com>
8035
8036 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8037 xmalloc.
8038
8039 2013-06-11 Pedro Alves <palves@redhat.com>
8040
8041 * linux-x86-low.c (initialize_low_arch): Call
8042 init_registers_x32_avx_linux.
8043
8044 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8045
8046 Fix compatibility with Android Bionic.
8047 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8048 it is not empty.
8049
8050 2013-06-07 Pedro Alves <palves@redhat.com>
8051
8052 PR server/14823
8053 * Makefile.in (OBS): Add tdesc.o.
8054 (IPA_OBJS): Add tdesc-ipa.o.
8055 (tdesc-ipa.o): New rule.
8056 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8057 interface.
8058 * linux-low.c (new_inferior): Delete.
8059 (disabled_regsets, num_regsets): Delete.
8060 (linux_add_process): Adjust to set the new per-process
8061 new_inferior flag.
8062 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8063 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8064 was a stop. When calling arch_setup, switch the current inferior
8065 to the thread that got an event.
8066 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8067 (regsets_fetch_inferior_registers)
8068 (regsets_store_inferior_registers): New regsets_info parameter.
8069 Adjust to use it.
8070 (linux_register_in_regsets): New regs_info parameter. Adjust to
8071 use it.
8072 (register_addr, fetch_register, store_register): New usrregs_info
8073 parameter. Adjust to use it.
8074 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8075 parameter regs_info. Adjust to use it.
8076 (linux_fetch_registers): Get the current inferior's regs_info, and
8077 adjust to use it.
8078 (linux_store_registers): Ditto.
8079 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8080 (initialize_low): Don't initialize the target_regsets here. Call
8081 initialize_low_arch.
8082 * linux-low.h (target_regsets): Delete declaration.
8083 (struct regsets_info): New.
8084 (struct usrregs_info): New.
8085 (struct regs_info): New.
8086 (struct process_info_private) <new_inferior>: New field.
8087 (struct linux_target_ops): Delete the num_regs, regmap, and
8088 regset_bitmap fields. New field regs_info.
8089 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8090 * i387-fp.c (num_xmm_registers): Delete.
8091 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8092 calls to new interface.
8093 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8094 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8095 Infer the number of xmm registers from the regcache's target
8096 description.
8097 * i387-fp.h (num_xmm_registers): Delete.
8098 * inferiors.c (add_thread): Don't install the thread's regcache
8099 here.
8100 * proc-service.c (gregset_info): Fetch the current inferior's
8101 regs_info. Adjust to use it.
8102 * regcache.c: Include tdesc.h.
8103 (register_bytes, reg_defs, num_registers)
8104 (gdbserver_expedite_regs): Delete.
8105 (get_thread_regcache): If the thread doesn't have a regcache yet,
8106 create one, instead of aborting gdbserver.
8107 (regcache_invalidate_one): Rename to ...
8108 (regcache_invalidate_thread): ... this.
8109 (regcache_invalidate_one): New.
8110 (regcache_invalidate): Only invalidate registers of the current
8111 process.
8112 (init_register_cache): Add target_desc parameter, and use it.
8113 (new_register_cache): Ditto. Assert the target description has a
8114 non zero registers_size.
8115 (regcache_cpy): Add assertions. Adjust.
8116 (realloc_register_cache, set_register_cache): Delete.
8117 (registers_to_string, registers_from_string): Adjust.
8118 (find_register_by_name, find_regno, find_register_by_number)
8119 (register_cache_size): Add target_desc parameter, and use it.
8120 (free_register_cache_thread, free_register_cache_thread_one)
8121 (regcache_release, register_cache_size): New.
8122 (register_size): Add target_desc parameter, and use it.
8123 (register_data, supply_register, supply_register_zeroed)
8124 (supply_regblock, supply_register_by_name, collect_register)
8125 (collect_register_as_string, collect_register_by_name): Adjust.
8126 * regcache.h (struct target_desc): Forward declare.
8127 (struct regcache) <tdesc>: New field.
8128 (init_register_cache, new_register_cache): Add target_desc
8129 parameter.
8130 (regcache_invalidate_thread): Declare.
8131 (regcache_invalidate_one): Delete declaration.
8132 (regcache_release): Declare.
8133 (find_register_by_number, register_cache_size, register_size)
8134 (find_regno): Add target_desc parameter.
8135 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8136 declarations.
8137 * remote-utils.c: Include tdesc.h.
8138 (outreg, prepare_resume_reply): Adjust.
8139 * server.c: Include tdesc.h.
8140 (gdbserver_xmltarget): Delete declaration.
8141 (get_features_xml, process_serial_event): Adjust.
8142 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8143 declare.
8144 (struct process_info) <tdesc>: New field.
8145 (ipa_tdesc): Declare.
8146 * tdesc.c: New file.
8147 * tdesc.h: New file.
8148 * tracepoint.c: Include tdesc.h.
8149 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8150 (get_context_regcache): Adjust to pass ipa_tdesc down.
8151 (do_action_at_tracepoint): Adjust to get the register cache size
8152 from the context regcache's description.
8153 (traceframe_walk_blocks): Adjust to get the register cache size
8154 from the current trace frame's description.
8155 (traceframe_get_pc): Adjust to get current trace frame's
8156 description and pass it down.
8157 (gdb_collect): Adjust to get the register cache size from the
8158 IPA's description.
8159 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8160 (gdbserver_xmltarget): Delete.
8161 (initialize_low_tracepoint): Set the ipa's target description.
8162 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8163 (initialize_low_tracepoint): Set the ipa's target description.
8164 * linux-x86-low.c: Include tdesc.h.
8165 [__x86_64__] (is_64bit_tdesc): New.
8166 (ps_get_thread_area, x86_get_thread_area): Use it.
8167 (i386_cannot_store_register): Rename to ...
8168 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8169 (i386_cannot_fetch_register): Rename to ...
8170 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8171 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8172 to new interface.
8173 (target_regsets): Rename to ...
8174 (x86_regsets): ... this.
8175 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8176 interface.
8177 (x86_siginfo_fixup): Use is_64bit_tdesc.
8178 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8179 (tdesc_x32_avx_linux, tdesc_x32_linux)
8180 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8181 Declare.
8182 (x86_linux_update_xmltarget): Delete.
8183 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8184 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8185 (AMD64_LINUX_USER64_CS): New.
8186 (x86_linux_read_description): New, based on
8187 x86_linux_update_xmltarget.
8188 (same_process_callback): New.
8189 (x86_arch_setup_process_callback): New.
8190 (x86_linux_update_xmltarget): New.
8191 (x86_regsets_info): New.
8192 (amd64_linux_regs_info): New.
8193 (i386_linux_usrregs_info): New.
8194 (i386_linux_regs_info): New.
8195 (x86_linux_regs_info): New.
8196 (x86_arch_setup): Reimplement.
8197 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8198 (x86_emit_ops): Ditto.
8199 (the_low_target): Adjust. Install x86_linux_regs_info,
8200 x86_cannot_fetch_register, and x86_cannot_store_register.
8201 (initialize_low_arch): New.
8202 * linux-ia64-low.c (tdesc_ia64): Declare.
8203 (ia64_fetch_register): Adjust.
8204 (ia64_usrregs_info, regs_info): New globals.
8205 (ia64_regs_info): New function.
8206 (the_low_target): Adjust.
8207 (initialize_low_arch): New function.
8208 * linux-sparc-low.c (tdesc_sparc64): Declare.
8209 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8210 Adjust.
8211 (sparc_arch_setup): New function.
8212 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8213 (the_low_target): Adjust.
8214 (initialize_low_arch): New function.
8215 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8216 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8217 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8218 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8219 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8220 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8221 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8222 (tdesc_powerpc_isa205_vsx64l): Declare.
8223 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8224 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8225 (ppc_set_pc, ppc_get_hwcap): Adjust.
8226 (ppc_usrregs_info): Forward declare.
8227 (!__powerpc64__) ppc_regmap_adjusted: New global.
8228 (ppc_arch_setup): Adjust to the current process'es target
8229 description.
8230 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8231 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8232 (ppc_store_evrregset): Adjust.
8233 (target_regsets): Rename to ...
8234 (ppc_regsets): ... this, and make static.
8235 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8236 (ppc_regs_info): New function.
8237 (the_low_target): Adjust.
8238 (initialize_low_arch): New function.
8239 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8240 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8241 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8242 (tdesc_s390x_linux64v2): Declare.
8243 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8244 (s390_fill_gregset, s390_store_last_break): Adjust.
8245 (target_regsets): Rename to ...
8246 (s390_regsets): ... this, and make static.
8247 (s390_get_pc, s390_set_pc): Adjust.
8248 (s390_get_hwcap): New target_desc parameter, and use it.
8249 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8250 (s390_arch_setup): Adjust to set the current process'es target
8251 description. Don't adjust the regmap.
8252 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8253 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8254 (regs_info_3264): New globals.
8255 (s390_regs_info): New function.
8256 (the_low_target): Adjust.
8257 (initialize_low_arch): New function.
8258 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8259 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8260 [__mips64] (init_registers_mips_linux)
8261 (init_registers_mips_dsp_linux): Delete defines.
8262 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8263 (have_dsp): New global.
8264 (mips_read_description): New, based on mips_arch_setup.
8265 (mips_arch_setup): Reimplement.
8266 (get_usrregs_info): New function.
8267 (mips_cannot_fetch_register, mips_cannot_store_register)
8268 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8269 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8270 (target_regsets): Rename to ...
8271 (mips_regsets): ... this, and make static.
8272 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8273 (dsp_regs_info, regs_info): New globals.
8274 (mips_regs_info): New function.
8275 (the_low_target): Adjust.
8276 (initialize_low_arch): New function.
8277 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8278 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8279 Declare.
8280 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8281 (arm_read_description): New, with bits factored from
8282 arm_arch_setup.
8283 (arm_arch_setup): Reimplement.
8284 (target_regsets): Rename to ...
8285 (arm_regsets): ... this, and make static.
8286 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8287 (arm_regs_info): New function.
8288 (the_low_target): Adjust.
8289 (initialize_low_arch): New function.
8290 * linux-m68k-low.c (tdesc_m68k): Declare.
8291 (target_regsets): Rename to ...
8292 (m68k_regsets): ... this, and make static.
8293 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8294 (m68k_regs_info): New function.
8295 (m68k_arch_setup): New function.
8296 (the_low_target): Adjust.
8297 (initialize_low_arch): New function.
8298 * linux-sh-low.c (tdesc_sharch): Declare.
8299 (target_regsets): Rename to ...
8300 (sh_regsets): ... this, and make static.
8301 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8302 (sh_regs_info, sh_arch_setup): New functions.
8303 (the_low_target): Adjust.
8304 (initialize_low_arch): New function.
8305 * linux-bfin-low.c (tdesc_bfin): Declare.
8306 (bfin_arch_setup): New function.
8307 (bfin_usrregs_info, regs_info): New globals.
8308 (bfin_regs_info): New function.
8309 (the_low_target): Adjust.
8310 (initialize_low_arch): New function.
8311 * linux-cris-low.c (tdesc_cris): Declare.
8312 (cris_arch_setup): New function.
8313 (cris_usrregs_info, regs_info): New globals.
8314 (cris_regs_info): New function.
8315 (the_low_target): Adjust.
8316 (initialize_low_arch): New function.
8317 * linux-cris-low.c (tdesc_crisv32): Declare.
8318 (cris_arch_setup): New function.
8319 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8320 (cris_regs_info): New function.
8321 (the_low_target): Adjust.
8322 (initialize_low_arch): New function.
8323 * linux-m32r-low.c (tdesc_m32r): Declare.
8324 (m32r_arch_setup): New function.
8325 (m32r_usrregs_info, regs_info): New globals.
8326 (m32r_regs_info): Adjust.
8327 (initialize_low_arch): New function.
8328 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8329 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8330 (tic6x_usrregs_info): Forward declare.
8331 (tic6x_read_description): New function, based on ...
8332 (tic6x_arch_setup): ... this. Reimplement.
8333 (target_regsets): Rename to ...
8334 (tic6x_regsets): ... this, and make static.
8335 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8336 (tic6x_regs_info): New function.
8337 (the_low_target): Adjust.
8338 (initialize_low_arch): New function.
8339 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8340 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8341 (target_regsets): Rename to ...
8342 (xtensa_regsets): ... this, and make static.
8343 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8344 globals.
8345 (xtensa_arch_setup, xtensa_regs_info): New functions.
8346 (the_low_target): Adjust.
8347 (initialize_low_arch): New function.
8348 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8349 (nios2_arch_setup): Set the current process'es tdesc.
8350 (target_regsets): Rename to ...
8351 (nios2_regsets): ... this.
8352 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8353 (nios2_regs_info): New function.
8354 (the_low_target): Adjust.
8355 (initialize_low_arch): New function.
8356 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8357 (aarch64_arch_setup): Set the current process'es tdesc.
8358 (target_regsets): Rename to ...
8359 (aarch64_regsets): ... this.
8360 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8361 (aarch64_regs_info): New function.
8362 (the_low_target): Adjust.
8363 (initialize_low_arch): New function.
8364 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8365 globals.
8366 (target_regsets): Rename to ...
8367 (tile_regsets): ... this.
8368 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8369 (tile_regs_info): New function.
8370 (tile_arch_setup): Set the current process'es tdesc.
8371 (the_low_target): Adjust.
8372 (initialize_low_arch): New function.
8373 * spu-low.c (tdesc_spu): Declare.
8374 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8375 * win32-arm-low.c (tdesc_arm): Declare.
8376 (arm_arch_setup): New function.
8377 (the_low_target): Install arm_arch_setup instead of
8378 init_registers_arm.
8379 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8380 (init_windows_x86): Rename to ...
8381 (i386_arch_setup): ... this. Set `win32_tdesc'.
8382 (the_low_target): Adjust.
8383 * win32-low.c (win32_tdesc): New global.
8384 (child_add_thread): Don't create the thread cache here.
8385 (do_initial_child_stuff): Set the new process'es tdesc.
8386 * win32-low.h (struct target_desc): Forward declare.
8387 (win32_tdesc): Declare.
8388 * lynx-i386-low.c (tdesc_i386): Declare global.
8389 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8390 * lynx-low.c (lynx_tdesc): New global.
8391 (lynx_add_process): Set the new process'es tdesc.
8392 * lynx-low.h (struct target_desc): Forward declare.
8393 (lynx_tdesc): Declare global.
8394 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8395 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8396 * nto-low.c (nto_tdesc): New global.
8397 (do_attach): Set the new process'es tdesc.
8398 * nto-low.h (struct target_desc): Forward declare.
8399 (nto_tdesc): Declare.
8400 * nto-x86-low.c (tdesc_i386): Declare.
8401 (nto_x86_arch_setup): Set `nto_tdesc'.
8402
8403 2013-06-04 Gary Benson <gbenson@redhat.com>
8404
8405 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8406 to qSupported response when appropriate.
8407 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8408 with nonzero-length annex.
8409 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8410 arguments supplied in annex.
8411
8412 2013-05-31 Doug Evans <dje@google.com>
8413
8414 PR server/15594
8415 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8416 64 bits in 64-cross-32 environment.
8417
8418 2013-05-28 Pedro Alves <palves@redhat.com>
8419
8420 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8421 (aarch64-without-fpu.c): Delete rule.
8422 * configure.srv (aarch64*-*-linux*): Remove references to
8423 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8424 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8425 declaration.
8426
8427 2013-05-24 Pedro Alves <palves@redhat.com>
8428
8429 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8430 instead of strchr/decode_address. Error if the range isn't split
8431 with a ','. Don't assume there's be a ':' in the action.
8432
8433 2013-05-23 Yao Qi <yao@codesourcery.com>
8434 Pedro Alves <palves@redhat.com>
8435
8436 * linux-low.c (lwp_in_step_range): New function.
8437 (linux_wait_1): If the thread was range stepping and stopped
8438 outside the stepping range, report the stop to GDB. Otherwise,
8439 continue stepping. Add range stepping debug output.
8440 (linux_set_resume_request): Copy the step range from the resume
8441 request to the lwp.
8442 (linux_supports_range_stepping): New.
8443 (linux_target_ops) <supports_range_stepping>: Set to
8444 linux_supports_range_stepping.
8445 * linux-low.h (struct linux_target_ops)
8446 <supports_range_stepping>: New field.
8447 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8448 * linux-x86-low.c (x86_supports_range_stepping): New.
8449 (the_low_target) <supports_range_stepping>: Set to
8450 x86_supports_range_stepping.
8451 * server.c (handle_v_cont): Handle 'r' action.
8452 (handle_v_requests): Append ";r" if the target supports range
8453 stepping.
8454 * target.h (struct thread_resume) <step_range_start,
8455 step_range_end>: New fields.
8456 (struct target_ops) <supports_range_stepping>:
8457 New field.
8458 (target_supports_range_stepping): New macro.
8459
8460 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8461
8462 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8463 confusion in comment.
8464
8465 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8466
8467 * lynx-low.c (struct process_info_private): New type.
8468 (lynx_add_process): New function.
8469 (lynx_create_inferior, lynx_attach): Replace calls to
8470 add_process by calls to lynx_add_process.
8471 (lynx_resume): If PTID is null, then try using
8472 current_process()->private->last_wait_event_ptid.
8473 Add comments.
8474 (lynx_clear_inferiors): Delete. The contents of that function
8475 has been inlined in lynx_mourn;
8476 (lynx_wait_1): Save the ptid in the process's private data.
8477 (lynx_mourn): Free the process' private data. Replace call
8478 to lynx_clear_inferiors by call to clear_inferiors.
8479
8480 2013-05-17 Yao Qi <yao@codesourcery.com>
8481
8482 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8483 the right place.
8484
8485 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8486
8487 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8488 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8489 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8490 PT_TEXT_END_ADDR guards. Update comments.
8491 (linux_target_op) <read_offsets>: Conditionally define to
8492 linux_read_offsets if the target is UCLIBC and if it defines
8493 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8494
8495 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8496 Andrew Jenner <andrew@codesourcery.com>
8497
8498 * Makefile.in (SFILES): Add linux-nios2-low.c.
8499 (clean): Add action to delete nios2-linux.c.
8500 (nios2-linux.c): New rule.
8501 * configure.srv: Add nios2*-*-linux*.
8502 * linux-nios2-low.c: New.
8503
8504 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8505
8506 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8507
8508 2013-04-25 Hui Zhu <hui@codesourcery.com>
8509
8510 PR gdb/15186
8511 * ax.c (ax_printf): Add fflush.
8512
8513 2013-04-22 Tom Tromey <tromey@redhat.com>
8514
8515 * Makefile.in (SFILES): Add filestuff.c.
8516 (OBS): Add filestuff.o.
8517 (filestuff.o): New target.
8518 * config.in, configure: Rebuild.
8519 * configure.ac: Check for fdwalk, pipe2.
8520
8521 2013-04-17 Pedro Alves <palves@redhat.com>
8522
8523 * configure.ac (USE_THREAD_DB): Delete variable.
8524 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8525 Don't AC_SUBST USE_THREAD_DB.
8526 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8527 * config.in, configure: Regenerate.
8528
8529 2013-04-16 Pedro Alves <palves@redhat.com>
8530
8531 * linux-low.h (struct lwp_info) <thread_known>: Move under
8532 the USE_THREAD_DB #ifdef.
8533
8534 2013-04-16 Pedro Alves <palves@redhat.com>
8535
8536 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8537 (linux-low.o): Delete rule.
8538 * linux-low.h: Always include "gdb_thread_db.h" instead of
8539 conditionally including thread_db.h.
8540 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8541 HAVE_THREAD_DB_H.
8542
8543 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8544
8545 * Makefile.in (install-only): Fix make install regression.
8546
8547 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8548
8549 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8550 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8551 installation.
8552 * gdbserver.1: Remove.
8553
8554 2013-03-22 Pedro Alves <palves@redhat.com>
8555
8556 * linux-low.c (handle_extended_wait): Don't call
8557 linux_enable_event_reporting.
8558
8559 2013-03-15 Tony Theodore <tonyt@logyst.com>
8560
8561 PR build/9098:
8562 * Makefile.in (SHELL): Use @SHELL@.
8563
8564 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8565
8566 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8567 compiler warning.
8568
8569 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8570
8571 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8572 Remove extraneous NULL element.
8573
8574 2013-03-13 Yao Qi <yao@codesourcery.com>
8575
8576 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8577 'V' block in trace frame.
8578
8579 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8580
8581 * target.h (struct target_ops): Add btrace ops.
8582 (target_supports_btrace): New macro.
8583 (target_enable_btrace): New macro.
8584 (target_disable_btrace): New macro.
8585 (target_read_btrace): New macro.
8586 * gdbthread.h (struct thread_info): Add btrace field.
8587 * server.c: Include btrace-common.h.
8588 (handle_btrace_general_set): New function.
8589 (handle_btrace_enable): New function.
8590 (handle_btrace_disable): New function.
8591 (handle_general_set): Call handle_btrace_general_set.
8592 (handle_qxfer_btrace): New function.
8593 (struct qxfer qxfer_packets[]): Add btrace entry.
8594 * inferiors.c (remove_thread): Disable btrace.
8595 * linux-low: Include linux-btrace.h.
8596 (linux_low_enable_btrace): New function.
8597 (linux_low_read_btrace): New function.
8598 (linux_target_ops): Add btrace ops.
8599 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8600 Add srv_linux_btrace=yes.
8601 (x86_64-*-linux*): Add linux-btrace.o.
8602 Add srv_linux_btrace=yes.
8603 * configure.ac: Define HAVE_LINUX_BTRACE.
8604 * config.in: Regenerated.
8605 * configure: Regenerated.
8606
8607 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8608
8609 * server.c (handle_qxfer): Preserve error message if -3 is
8610 returned.
8611 (qxfer): Document the -3 return value.
8612
8613 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8614
8615 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8616 (linux_btrace_h): New variable.
8617 (linux-btrace.o): New rule.
8618
8619 2013-03-08 Stan Shebs <stan@codesourcery.com>
8620 Hafiz Abid Qadeer <abidh@codesourcery.com>
8621
8622 * tracepoint.c (trace_buffer_size): New global.
8623 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8624 (init_trace_buffer): Change to one-argument function. Allocate
8625 trace buffer memory.
8626 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8627 handle QTBuffer:size packet.
8628 (cmd_bigqtbuffer_size): New function.
8629 (initialize_tracepoint): Call init_trace_buffer with
8630 DEFAULT_TRACE_BUFFER_SIZE.
8631 * server.c (handle_query): Add QTBuffer:size in the
8632 supported packets.
8633
8634 2013-03-07 Yao Qi <yao@codesourcery.com>
8635
8636 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8637 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8638 of -1.
8639 (cmd_qtsp): Adjust condition. Do post increment.
8640 Set cur_action and cur_step_action back to 0.
8641
8642 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8643
8644 PR server/15236
8645 * linux-low.c (linux_write_memory): Return early success if LEN is
8646 zero.
8647
8648 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8649
8650 * configure.srv: Add x86_64-*-cygwin* as target.
8651
8652 2013-02-28 Tom Tromey <tromey@redhat.com>
8653
8654 * configure.ac: Invoke AC_SYS_LARGEFILE.
8655 * configure, config.in: Rebuild.
8656
8657 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8658
8659 * win32-low.c: Throughout, fix format strings and casts of
8660 printf-like functions to avoid type related warnings on all
8661 platforms.
8662 (get_child_debug_event): Print dwDebugEventCode as hex since
8663 that's how it's usually documented.
8664
8665 2013-02-28 Yao Qi <yao@codesourcery.com>
8666
8667 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8668 pulongest.
8669
8670 2013-02-27 Jiong Wang <jiwang@tilera.com>
8671
8672 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8673 (reg-tilegx32.c): New rule.
8674 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8675 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8676 different register info initializer according to elf class.
8677 (init_registers_tilgx32): New function. The tilegx32 register info
8678 initializer.
8679 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8680 (tile_store_gregset): Likewise.
8681
8682 2013-02-27 Yao Qi <yao@codesourcery.com>
8683
8684 * server.c (process_point_options): Print debug message when
8685 debug_threads is true.
8686
8687 2013-02-26 Yao Qi <yao@codesourcery.com>
8688
8689 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8690
8691 2013-02-19 Pedro Alves <palves@redhat.com>
8692 Kai Tietz <ktietz@redhat.com>
8693
8694 PR gdb/15161
8695
8696 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8697 instead of strtoul to extract address from packet.
8698 (process_serial_event) <'z'>: Likewise.
8699
8700 2013-02-18 Yao Qi <yao@codesourcery.com>
8701
8702 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8703
8704 2013-02-14 Pedro Alves <palves@redhat.com>
8705
8706 Plug memory leak.
8707
8708 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8709 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8710
8711 2013-02-14 Pedro Alves <palves@redhat.com>
8712
8713 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8714
8715 2013-02-14 Pedro Alves <palves@redhat.com>
8716
8717 * tracepoint.c (save_string): Delete.
8718 (add_tracepoint_action): Use savestring instead of save_string.
8719
8720 2013-02-12 Pedro Alves <palves@redhat.com>
8721
8722 * linux-xtensa-low.c: Ditto.
8723 * xtensa-xtregs.c: Ditto.
8724
8725 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8726
8727 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8728 thread_db.
8729
8730 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8731
8732 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8733 aarch64_num_wp_regs and aarch64_num_bp_regs to
8734 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8735
8736 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8737
8738 * linux-aarch64-low.c (ps_get_thread_area): Replace
8739 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8740
8741 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8742 Marcus Shawcroft <marcus.shawcroft@arm.com>
8743 Nigel Stephens <nigel.stephens@arm.com>
8744 Yufeng Zhang <yufeng.zhang@arm.com>
8745
8746 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8747 (aarch64.c, aarch64-without-fpu.c): New targets.
8748 * configure.srv (aarch64*-*-linux*): New.
8749 * linux-aarch64-low.c: New file.
8750
8751 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8752
8753 * linux-low.c (handle_extended_wait, linux_create_inferior)
8754 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8755 (dequeue_one_deferred_signal, linux_resume_one_thread)
8756 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8757 (linux_tracefork_grandchild, linux_test_for_tracefork)
8758 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8759 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8760 where the argument is 0.
8761
8762 2013-01-25 Yao Qi <yao@codesourcery.com>
8763
8764 * event-loop.c: Include "queue.h".
8765 (gdb_event_p): New typedef.
8766 (struct gdb_event) <next_event>: Remove.
8767 (event_queue): Change to QUEUE(gdb_event_p).
8768 (async_queue_event): Remove.
8769 (gdb_event_xfree): New.
8770 (initialize_event_loop): New.
8771 (process_event): Use API from QUEUE.
8772 (wait_for_event): Likewise.
8773 * server.c (main): Call initialize_event_loop.
8774 * server.h (initialize_event_loop): Declare.
8775
8776 2013-01-18 Yao Qi <yao@codesourcery.com>
8777
8778 * ax.h (struct eval_agent_expr_context): New.
8779 (gdb_eval_agent_expr): Update declaration.
8780 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8781 TFRAME. Add new argument CTX.
8782 * server.h (struct eval_agent_expr_context): Declare.
8783 (agent_mem_read, agent_tsv_read): Update declaration.
8784 (agent_mem_read_string): Likewise.
8785 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8786 (add_traceframe_block): Add new argument TPOINT.
8787 Increase TPOINT->traceframe_usage.
8788 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8789 eval_tracepoint_agent_expr.
8790 (condition_true_at_tracepoint): Likewise.
8791 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8792 (agent_mem_read_string, agent_tsv_read): Likewise.
8793
8794 2013-01-16 Yao Qi <yao@codesourcery.com>
8795
8796 * linux-low.c (linux_resume_one_lwp): Don't check
8797 'lwp->bp_reinsert != 0'.
8798
8799 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8800 Pedro Alves <palves@redhat.com>
8801
8802 * lynx-low.c (ptrace_request_to_str): Define a temporary
8803 macro and use it to simplify this function's implementation.
8804
8805 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8806
8807 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8808 sets errno.
8809
8810 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8811
8812 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8813
8814 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8815
8816 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8817
8818 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8819
8820 * lynx-low.c (lynx_resume): Use the resume_info parameter
8821 to determine the ptid for the lynx_ptrace call, unless
8822 it is equal to minus_one_ptid, in which case we use the
8823 ptid of the current_inferior.
8824 (lynx_wait_1): After having received a thread create/exit
8825 event, resume the inferior's execution using the signaling
8826 thread's ptid, rather than the old ptid.
8827
8828 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8829
8830 * lynx-low.c (lynx_resume): Delete variable ret.
8831
8832 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8833
8834 * gdbreplay.c (gdbreplay_version): Update copyright year.
8835 * server.c (gdbserver_version): Likewise.
8836
8837 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8838
8839 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8840 new thread.
8841
8842 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8843
8844 * lynx-low.c (ptrace_request_to_str): Add handling for
8845 PTRACE_GETTRACESIG.
8846
8847 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8848
8849 * lynx-low.c (lynx_attach): Delete variable new_process.
8850
8851 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8852
8853 * lynx-low.c (lynx_create_inferior): Delete variable
8854 new_process.
8855
8856 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8857
8858 * lynx-low.c (ptrace_request_to_str): Do not handle
8859 PTRACE_GETTHREADLIST if this macro does not exist.
8860
8861 2012-12-15 Yao Qi <yao@codesourcery.com>
8862
8863 * Makefile.in (OBS): Add notif.o.
8864 * notif.c, notif.h: New.
8865 * server.c: Include "notif.h".
8866 (struct vstop_notif) <next>: Remove.
8867 <base>: New field.
8868 (queue_stop_reply): Update.
8869 (push_event, send_next_stop_reply): Remove.
8870 (discard_queued_stop_replies): Update.
8871 (notif_stop): New variable.
8872 (handle_v_stopped): Remove.
8873 (handle_v_requests): Don't call handle_v_stopped. Call
8874 handle_ack_notif instead.
8875 (queue_stop_reply_callback): Call notif_event_enque instead
8876 of queue_stop_reply.
8877 (handle_status): Don't call send_next_stop_reply, call
8878 notif_write_event instead.
8879 (kill_inferior_callback): Likewise.
8880 (detach_or_kill_inferior_callback): Likewise.
8881 (main): Call initialize_notif.
8882 (process_serial_event): Call QUEUE_is_empty.
8883 (handle_target_event): Call notif_push instead of push event.
8884 * server.h (push_event): Remove declaration.
8885
8886 2012-12-10 Tom Tromey <tromey@redhat.com>
8887
8888 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8889 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8890 macros.
8891 (.c.o): Rewrite.
8892 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8893 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8894 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8895 (amd64-linux-ipa.o, ax.o): Rewrite.
8896 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8897 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8898 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8899 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8900 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8901 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8902 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8903 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8904 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8905 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8906 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8907 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8908 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8909 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8910 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8911 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8912 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8913 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8914 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8915 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8916 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8917 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8918 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8919 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8920 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8921 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8922 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8923 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8924 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8925 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8926 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8927 (reg-tilegx.o): Remove.
8928 (all_object_files): New macro.
8929 Include .deps files.
8930 * aclocal.m4, configure: Rebuild.
8931 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8932 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8933 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8934
8935 2012-12-05 Tom Tromey <tromey@redhat.com>
8936
8937 PR gdb/14917:
8938 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8939
8940 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8941
8942 * configure.ac: Check for linux/perf_event.h.
8943 * config.in: Regenerated.
8944 * configure: Regenerated.
8945
8946 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8947
8948 * hostio.c (handle_readlink): Decrease buffer size
8949 parameter passed to readlink by one byte.
8950
8951 2012-11-26 Yao Qi <yao@codesourcery.com>
8952
8953 * configure.ac (build_warnings): Append '-Wempty-body'.
8954 * configure: Regenerated.
8955 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8956 body.
8957
8958 2012-11-15 Pierre Muller <muller@sourceware.org>
8959
8960 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8961 * config.in: Regenerate.
8962 * configure: Regenerate.
8963 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8964 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8965 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8966 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8967 header.
8968 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8969 instead of <sys/wait.h> header.
8970 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8971
8972 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8973
8974 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8975 (various make rules): Remove -DGDBSERVER
8976
8977 2012-11-09 Yao Qi <yao@codesourcery.com>
8978
8979 * spu-low.c (current_ptid): Move it to ..
8980 * gdbthread.h: ... here. New.
8981 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8982 * server.c (myresume, process_serial_event): Likewise.
8983 * thread-db.c (thread_db_find_new_threads): Likewise.
8984 * tracepoint.c (run_inferior_command): Likewise.
8985
8986 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8987
8988 * server.c (handle_search_memory_1): Include access length in
8989 warning message.
8990
8991 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8992
8993 * linux-crisv32-low.c: Fix compile errors.
8994
8995 2012-09-04 Yao Qi <yao@codesourcery.com>
8996
8997 * tracepoint.c (cmd_qtsv): Adjust debug message.
8998 Don't check CUR_TPOINT.
8999
9000 2012-08-28 Yao Qi <yao@codesourcery.com>
9001
9002 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9003 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9004 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9005 Remove declarations of xmalloc, xreallloc, xstrdup and
9006 freeargv.
9007 * Makefile.in (libiberty_h): New.
9008 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9009 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9010
9011 2012-08-23 Yao Qi <yao@codesourcery.com>
9012
9013 * server.h: Remove declaration of 'xsnprintf'.
9014
9015 2012-08-22 Keith Seitz <keiths@redhat.com>
9016
9017 * server.h: Include build-gnulib-gbserver/config.h.
9018 * gdbreplay.c: Likewise.
9019
9020 2012-08-08 Doug Evans <dje@google.com>
9021
9022 * Makefile.in (SFILES): Add gdb_vecs.c.
9023 (OBS): Add gdb_vecs.o.
9024 (gdb_vecs_h, host_defs_h): New variables.
9025 (thread-db.o): Add $(gdb_vecs_h) dependency.
9026 (gdb_vecs.o): New rule.
9027 * thread-db.c: #include "gdb_vecs.h".
9028 (thread_db_load_search): Use a vector to iterate over path elements.
9029 Handle text appearing after "$pdir".
9030
9031 * configure.ac: Add check for strstr.
9032 * config.in: Regenerate.
9033 * configure: Regenerate.
9034
9035 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9036
9037 * hostio.c (handle_pread): If pread fails, fall back to attempting
9038 lseek/read.
9039 (handle_pwrite): Likewise for pwrite.
9040
9041 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9042
9043 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9044 between unsupported TYPE and unimplementable ADDR/LEN combination.
9045 (arm_insert_point): Act on new return value.
9046
9047 2012-07-31 Pedro Alves <palves@redhat.com>
9048
9049 * server.c (process_point_options): Only skip tokens if we find
9050 one that is unrecognized. Don't treat 'X' specially while
9051 skipping unrecognized tokens.
9052
9053 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9054
9055 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9056 to 4-byte-align HW breakpoint addresses for Thumb.
9057
9058 2012-07-27 Yao Qi <yao@codesourcery.com>
9059
9060 PR remote/14161.
9061
9062 * server.h: Declare gdb_agent_about_to_close.
9063 * target.c (kill_inferior): Include "agent.h".
9064 New. Send command 'kill'.
9065 * target.h (kill_inferior): Removed macro.
9066 * tracepoint.c (gdb_agent_about_to_close): New.
9067 (gdb_agent_helper_thread): Handle command 'close'.
9068 Wait endlessly until the inferior stops.
9069 Install gdb_agent_remove_socket to atexit hook.
9070 (agent_socket_name): New static variable.
9071 (gdb_agent_socket_init): Replace local variable 'name' with
9072 'agent_socket_name'.
9073 (gdb_agent_remove_socket): New.
9074
9075 2012-07-27 Yao Qi <yao@codesourcery.com>
9076
9077 * server.c (process_point_options): Stop at 'X' when parsing.
9078
9079 2012-07-19 Michael Eager <eager@eagercon.com>
9080
9081 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9082 to hw_execute.
9083 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9084 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9085 hardware breakpoint.
9086
9087 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9088
9089 * gdbserver/linux-low.c (initialize_low): Call
9090 linux_ptrace_init_warnings.
9091
9092 2012-07-02 Doug Evans <dje@google.com>
9093
9094 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9095 pointer to int.
9096
9097 2012-07-02 Stan Shebs <stan@codesourcery.com>
9098
9099 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9100 (ax.o): Add it to build rule.
9101 (ax-ipa.o): Ditto.
9102 (OBS): Add format.o.
9103 (IPA_OBS): Add format.o.
9104 * server.c (handle_query): Claim support for breakpoint commands.
9105 (process_point_options): Add command case.
9106 (process_serial_event): Leave running if there are printfs in
9107 effect.
9108 * mem-break.h (any_persistent_commands): Declare.
9109 (add_breakpoint_commands): Declare.
9110 (gdb_no_commands_at_breakpoint): Declare.
9111 (run_breakpoint_commands): Declare.
9112 * mem-break.c (struct point_command_list): New struct.
9113 (struct breakpoint): New field command_list.
9114 (any_persistent_commands): New function.
9115 (add_commands_to_breakpoint): New function.
9116 (add_breakpoint_commands): New function.
9117 (gdb_no_commands_at_breakpoint): New function.
9118 (run_breakpoint_commands): New function.
9119 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9120 locally.
9121 * ax.c: Include format.h.
9122 (ax_printf): New function.
9123 (gdb_eval_agent_expr): Add printf opcode.
9124
9125 2012-06-13 Yao Qi <yao@codesourcery.com>
9126
9127 * server.c (start_inferior): Remove duplicated writes to fields
9128 'last_resume_kind' and 'last_status' of 'current_inferior'.
9129
9130 2012-06-12 Yao Qi <yao@codesourcery.com>
9131 Pedro Alves <palves@redhat.com>
9132
9133 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9134 comment.
9135 * server.c (handle_v_cont): Extend comment.
9136
9137 2012-06-11 Yao Qi <yao@codesourcery.com>
9138
9139 * linux-low.c (linux_attach): Add 'static'.
9140
9141 2012-06-06 Yao Qi <yao@codesourcery.com>
9142
9143 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9144
9145 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9146
9147 Fix gcc -flto compilation warning.
9148 * server.c (main): Make variable multi_mode and attach volatile.
9149
9150 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9151
9152 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9153 if the platform doesn't know about it.
9154
9155 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9156
9157 * Makefile.in (SFILES): Add linux-tile-low.c.
9158 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9159 * configure.srv: Handle tilegx-*-linux*.
9160 * linux-tile-low.c: New file.
9161
9162 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9163
9164 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9165
9166 2012-05-24 Pedro Alves <palves@redhat.com>
9167
9168 PR gdb/7205
9169
9170 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9171
9172 2012-05-24 Pedro Alves <palves@redhat.com>
9173
9174 PR gdb/7205
9175
9176 Replace target_signal with gdb_signal throughout.
9177
9178 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9179
9180 * linux-low.c (linux_store_registers): Avoid the copying sequence
9181 when no data has been retrieved by ptrace.
9182
9183 2012-05-22 Will Deacon <will.deacon@arm.com>
9184
9185 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9186 Include asm/ptrace.h.
9187 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9188 already defined.
9189
9190 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9191
9192 * linux-low.c (linux_store_registers): Don't re-retrieve data
9193 with ptrace that has already been obtained from /proc. Always
9194 copy any data retrieved with ptrace to the buffer supplied.
9195
9196 2012-05-11 Yao Qi <yao@codesourcery.com>
9197 Pedro Alves <palves@redhat.com>
9198
9199 * linux-low.c (enum stopping_threads_kind): New.
9200 (stopping_threads): Change type to `enum stopping_threads_kind'.
9201 (handle_extended_wait): If stopping and suspending threads, leave
9202 the new_lwp suspended too.
9203 (linux_wait_for_event): Adjust.
9204 (stop_all_lwps): Set `stopping_threads' to
9205 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9206 whether we're suspending threads or just stopping them. Assert no
9207 recursion happens.
9208
9209 2012-04-29 Yao Qi <yao@codesourcery.com>
9210
9211 * server.h: Move some code to ...
9212 * gdbthread.h: ... here. New.
9213 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9214 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9215 (nto-low.o, win32-low.o): Likewise.
9216 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9217 * regcache.c, remote-utils.c, server.c: Likewise.
9218 * target.c, tracepoint.c, win32-low.c: Likewise.
9219
9220 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9221
9222 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9223 (PTRACE_ARG4_TYPE): Likewise.
9224 (PTRACE_XFER_TYPE): Likewise.
9225 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9226 ptrace to PTRACE_ARG3_TYPE.
9227 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9228 (PTRACE_ARG4_TYPE): Likewise.
9229 (PTRACE_XFER_TYPE): Likewise.
9230 (linux_detach_one_lwp): Cast fourth argument of
9231 ptrace to long then PTRACE_ARG4_TYPE.
9232 (regsets_fetch_inferior_registers): Cast third argument of
9233 ptrace to long then PTRACE_ARG3_TYPE.
9234 (regsets_store_inferior_registers): Likewise.
9235
9236 2012-04-20 Pedro Alves <palves@redhat.com>
9237
9238 * configure: Regenerate.
9239
9240 2012-04-19 Pedro Alves <palves@redhat.com>
9241
9242 * Makefile.in (GNULIB_BUILDDIR): New.
9243 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9244 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9245 (all, install-only, uninstall, clean-info, all-lib, clean): No
9246 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9247 (maintainer-clean realclean distclean): Use subdir_do.
9248 (subdir_do): New.
9249 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9250 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9251 * acinclude.m4: Include acx_configure_dir.m4.
9252 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9253 calls. Call AC_PROG_RANLIB. Configure gnulib using
9254 ACX_CONFIGURE_DIR.
9255 (GNULIB): New.
9256 (GNULIB_STDINT_H): Adjust.
9257 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9258 * gdbreplay.c: Include build-gnulib/config.h.
9259 * server.h: Likewise.
9260 * aclocal.m4: Regenerate.
9261 * config.in: Regenerate.
9262 * configure: Regenerate.
9263
9264 2012-04-19 Pedro Alves <palves@redhat.com>
9265
9266 * Makefile.in (LIBGNU, INCGNU): Adjust.
9267 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9268 (all, install-only, uninstall, clean-info, all-lib, clean)
9269 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9270 * configure.ac: Adjust AC_OUTPUT output.
9271 * aclocal.m4: Regenerate.
9272 * configure: Regenerate.
9273
9274 2012-04-19 Pedro Alves <palves@redhat.com>
9275
9276 * Makefile.in (generated_files): New.
9277 (server_h): Remove the explicit dependency on config.h, and depend
9278 on $generated_files.
9279
9280 2012-04-19 Pedro Alves <palves@redhat.com>
9281
9282 * Makefile.in (INCGNU): Add -Ignulib.
9283
9284 2012-04-19 Pedro Alves <palves@redhat.com>
9285
9286 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9287 (INCGNU): ... this, and spell out -I here.
9288 (GNULIB_LIB): Rename to ...
9289 (LIBGNU): ... this.
9290 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9291
9292 2012-04-19 Pedro Alves <palves@redhat.com>
9293
9294 * config.in: Regenerate.
9295
9296 2012-04-19 Pedro Alves <palves@redhat.com>
9297
9298 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9299 * server.h (memmem): Remove declaration.
9300 * config.in: Regenerate.
9301 * configure: Regenerate.
9302
9303 2012-04-19 Yao Qi <yao@codesourcery.com>
9304
9305 * Makefile.in (SFILES): Add common/vec.c.
9306 (OBS): Add vec.o.
9307 (vec.o): New rule.
9308
9309 2012-04-19 Yao Qi <yao@codesourcery.com>
9310
9311 * remote-utils.c (prepare_resume_reply): Replace with macro
9312 target_core_of_thread.
9313 * server.c (handle_qxfer_threads_proper): Likewise.
9314 * target.h (traget_core_of_thread): New macro.
9315
9316 2012-04-18 Pedro Alves <palves@redhat.com>
9317
9318 * aclocal.m4: Regenerate.
9319 * configure: Regenerate.
9320
9321 2012-04-16 Yao Qi <yao@codesourcery.com>
9322
9323 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9324 duplicated on address.
9325
9326 2012-04-16 Yao Qi <yao@codesourcery.com>
9327
9328 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9329 (struct tracepoint_action_ops) <send>: New field.
9330 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9331 (agent_expr_send, x_tracepoint_action_send): New.
9332 (l_tracepoint_action_send): New.
9333 (cmd_qtdp): Download and install tracepoint
9334 according to `use_agent'.
9335 (run_inferior_command): Add one more parameter `len'.
9336 Update callers.
9337 (tracepoint_send_agent): New.
9338 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9339
9340 2012-04-16 Yao Qi <yao@codesourcery.com>
9341
9342 * tracepoint.c (download_tracepoints): Moved to ...
9343 (cmd_qtstart): ... here.
9344
9345 2012-04-14 Yao Qi <yao@codesourcery.com>
9346
9347 * tracepoint.c: Include inttypes.h.
9348 (struct collect_memory_action): Use sized types.
9349 (struct tracepoint): Likewise.
9350 (cmd_qtdp, stop_tracing): Update print specifiers.
9351 (cmd_qtp, response_tracepoint): Likewise.
9352 (collect_data_at_tracepoint): Likewise.
9353 (collect_data_at_step): Likewise.
9354
9355 2012-04-14 Yao Qi <yao@codesourcery.com>
9356
9357 Import gnulib module inttypes.
9358 * aclocal.m4, config.in, configure: Regenerated.
9359
9360 2012-04-14 Yao Qi <yao@codesourcery.com>
9361
9362 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9363 Makefile and config.status at last.
9364
9365 2012-04-13 Yao Qi <yao@codesourcery.com>
9366
9367 * tracepoint.c: Include stdint.h unconditionally.
9368
9369 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9370
9371 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9372 on BFD_HAVE_SYS_PROCFS_TYPE.
9373 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9374 * configure: Regenerate.
9375 * config.in: Likewise.
9376
9377 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9378
9379 * Makefile.in (clean): Also remove x32.c x32-linux.c
9380 x32-avx.c x32-avx-linux.c.
9381 (x32.o): New target.
9382 (x32.c): Likewise.
9383 (x32-linux.o): Likewise.
9384 (x32-linux.c): Likewise.
9385 (x32-avx.o): Likewise.
9386 (x32-avx.c): Likewise.
9387 (x32-avx-linux.o): Likewise.
9388 (x32-avx-linux.c): Likewise.
9389
9390 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9391 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9392 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9393 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9394 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9395 i386/x32-avx-linux.xml.
9396
9397 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9398 (init_registers_x32_avx_linux): Likwise.
9399 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9400 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9401
9402 2012-04-13 Pedro Alves <palves@redhat.com>
9403
9404 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9405 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9406 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9407 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9408 the sub-make.
9409
9410 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9411
9412 * linux-x86-low.c (compat_x32_clock_t): New.
9413 (compat_x32_siginfo_t): Likewise.
9414 (compat_x32_siginfo_from_siginfo): Likewise.
9415 (siginfo_from_compat_x32_siginfo): Likewise.
9416 (linux_is_elf64): Likewise.
9417 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9418 and siginfo_from_compat_x32_siginfo for x32.
9419 (x86_arch_setup): Set linux_is_elf64.
9420
9421 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9422
9423 PR gdb/13969
9424 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9425 e_machine field.
9426 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9427 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9428 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9429 compatible with process.
9430
9431 2012-04-12 Yao Qi <yao@codesourcery.com>
9432
9433 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9434 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9435 (install-only, install-info, clean): Handle sub dir gnulib.
9436 (all-lib, am--refresh): New targets.
9437 (memmem.o): Remove target.
9438 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9439 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9440 (AC_REPLACE_FUNCS): Remove memmem.
9441 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9442 (AC_OUTPUT): Generate Makefile in gnulib/.
9443 * aclocal.m4, config.in, configure: Regenerated.
9444
9445 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9446
9447 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9448
9449 2012-04-05 Pedro Alves <palves@redhat.com>
9450
9451 -Werror=strict-aliasing
9452
9453 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9454 pointer.
9455
9456 2012-04-04 Pedro Alves <palves@redhat.com>
9457
9458 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9459 (sparc_store_gregset_from_stack, sparc_store_gregset)
9460 (sparc_breakpoint_at): Fix formatting.
9461
9462 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9463
9464 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9465 are available.
9466 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9467 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9468 * config.in: Regenerate.
9469 * configure: Likewise.
9470
9471 2012-03-29 Pedro Alves <palves@redhat.com>
9472
9473 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9474 Correct ptrace arguments.
9475
9476 2012-03-28 Pedro Alves <palves@redhat.com>
9477
9478 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9479 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9480 (IA64_FR1_REGNUM): New defines.
9481 (ia64_fetch_register): New.
9482 (the_low_target): Install it.
9483 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9484 field.
9485 * linux-low.c (linux_fetch_registers): Try the
9486 the_low_target.fetch_register hook first.
9487
9488 * linux-arm-low.c (the_low_target): Adjust.
9489 * linux-bfin-low.c (the_low_target): Adjust.
9490 * linux-cris-low.c (the_low_target): Adjust.
9491 * linux-crisv32-low.c (the_low_target): Adjust.
9492 * linux-m32r-low.c (the_low_target): Adjust.
9493 * linux-m68k-low.c (the_low_target): Adjust.
9494 * linux-mips-low.c (the_low_target): Adjust.
9495 * linux-ppc-low.c (the_low_target): Adjust.
9496 * linux-s390-low.c (the_low_target): Adjust.
9497 * linux-sh-low.c (the_low_target): Adjust.
9498 * linux-sparc-low.c (the_low_target): Adjust.
9499 * linux-tic6x-low.c (the_low_target): Adjust.
9500 * linux-x86-low.c (the_low_target): Adjust.
9501 * linux-xtensa-low.c (the_low_target): Adjust.
9502
9503 2012-03-26 Pedro Alves <palves@redhat.com>
9504
9505 * server.c (handle_qxfer_libraries): Don't bail early if
9506 the_target->qxfer_libraries_svr4 is not NULL.
9507
9508 2012-03-26 Pedro Alves <palves@redhat.com>
9509
9510 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9511
9512 2012-03-23 Pedro Alves <palves@redhat.com>
9513
9514 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9515 "library-list-svr4" element's start tag when the the DSO list is
9516 empty.
9517
9518 2012-03-23 Pedro Alves <palves@redhat.com>
9519
9520 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9521 a variable whose type size is the same as the inferior's pointer
9522 size.
9523
9524 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9525
9526 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9527 struct siginfo.
9528 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9529 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9530 * linux-low.h: Include <signal.h>.
9531 (struct siginfo): Remove forward declaration.
9532 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9533 struct siginfo.
9534
9535 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9536
9537 * .gitignore: Ignore more files.
9538
9539 2012-03-19 Pedro Alves <palves@redhat.com>
9540 Jan Kratochvil <jan.kratochvil@redhat.com>
9541
9542 * server.c (cont_thread, general_thread): Add describing comments.
9543 (start_inferior): Clear `cont_thread'.
9544 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9545 of a process.
9546
9547 2012-03-15 Yao Qi <yao@codesourcery.com>
9548
9549 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9550 handling to ...
9551 (cmd_qtdp): ... here.
9552
9553 2012-03-15 Yao Qi <yao@codesourcery.com>
9554
9555 * tracepoint.c (struct tracepoint_action_ops): New.
9556 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9557 (m_tracepoint_action_download): New.
9558 (r_tracepoint_action_download): New.
9559 (x_tracepoint_action_download): New.
9560 (l_tracepoint_action_download): New.
9561 (add_tracepoint_action): Install `action->ops' according type.
9562 (download_tracepoint_1): Move code `download' function pointer
9563 of various tracepoint_action_ops.
9564
9565 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9566
9567 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9568 linux_ptrace_attach_warnings.
9569
9570 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9571
9572 * Makefile.in (linux-ptrace.o): New.
9573 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9574 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9575 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9576 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9577 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9578 of these targets.
9579 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9580
9581 2012-03-08 Yao Qi <yao@codesourcery.com>
9582 Pedro Alves <palves@redhat.com>
9583
9584 Fix PR server/13392.
9585 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9586 offset of JMP insn.
9587 * tracepoint.c (remove_tracepoint): New.
9588 (cmd_qtdp): Call remove_tracepoint when failed to install.
9589
9590 2012-03-07 Pedro Alves <palves@redhat.com>
9591
9592 * linux-low.c (get_detach_signal): New.
9593 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9594 Pass on pending signals to PTRACE_DETACH. Check the result of the
9595 ptrace call.
9596 * server.c (program_signals, program_signals_p): New.
9597 (handle_general_set): Handle QProgramSignals.
9598 * server.h (program_signals, program_signals_p): Declare.
9599
9600 2012-03-05 Pedro Alves <palves@redhat.com>
9601 Jan Kratochvil <jan.kratochvil@redhat.com>
9602
9603 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9604 New comment why.
9605
9606 2012-03-03 Yao Qi <yao@codesourcery.com>
9607
9608 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9609 agent_look_up_symbols.
9610
9611 2012-03-03 Yao Qi <yao@codesourcery.com>
9612
9613 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9614 (linux-x86-low.o): Likewise.
9615 * server.h: Remove in_process_agent_loaded.
9616 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9617 common/agent.c.
9618 Update callers.
9619
9620 2012-03-03 Yao Qi <yao@codesourcery.com>
9621
9622 * tracepoint.c (gdb_agent_capability): New global.
9623 (in_process_agent_loaded_ust): Renamed to
9624 `in_process_agent_supports_ust'.
9625 Update callers.
9626 (in_process_agent_supports_ust): Call agent_capability_check.
9627 (clear_installed_tracepoints): Assert that agent supports
9628 agent.
9629
9630 2012-03-03 Yao Qi <yao@codesourcery.com>
9631
9632 * linux-low.c (linux_supports_agent): New.
9633 (linux_target_ops): Initialize field `supports_agent' with
9634 linux_supports_agent.
9635 * target.h (struct target_ops) <supports_agent>: New.
9636 (target_supports_agent): New macro.
9637 * server.c (handle_general_set): Handle packet 'QAgent'.
9638 (handle_query): Send `QAgent+'.
9639 * Makefile.in (server.o): Depends on agent.h.
9640
9641 2012-03-03 Yao Qi <yao@codesourcery.com>
9642
9643 * Makefile.in (OBS): Add agent.o.
9644 Add new rule for agent.o.
9645 Track dependence of tracepoint.c on agent.h.
9646 * tracepoint.c (run_inferior_command_1):
9647 (run_inferior_command): Call agent_run_command.
9648 (gdb_ust_connect_sync_socket): Deleted. Move it to
9649 common/agent.c.
9650 (resume_thread, stop_thread): Likewise.
9651 (gdb_ust_socket_init): Renamed to ...
9652 (gdb_agent_socket_init): ... New.
9653 (gdb_ust_thread): Renamed to ...
9654 (gdb_agent_helper_thread): ... New.
9655 (gdb_ust_init): Move some code to ...
9656 (gdb_agent_init): ... here. New.
9657 [HAVE_UST]: Call gdb_ust_init.
9658 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9659 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9660 * config.in, configure: Regenerated.
9661
9662 2012-03-02 Pedro Alves <palves@redhat.com>
9663
9664 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9665 * linux-low.c (struct simple_pid_list): New.
9666 (stopped_pids): New a struct simple_pid_list pointer.
9667 (add_to_pid_list, pull_pid_from_list): New.
9668 (handle_extended_wait): Don't assume the first signal new children
9669 report is SIGSTOP. Adjust call to pull_pid_from_list.
9670 (linux_wait_for_lwp): Adjust.
9671
9672 2012-03-02 Yao Qi <yao@codesourcery.com>
9673
9674 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9675 debug log.
9676
9677 2012-03-02 Yao Qi <yao@codesourcery.com>
9678
9679 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9680 `stop_pc' and `tpoint'. Update caller.
9681
9682 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9683
9684 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9685 * linux-low.c (use_linux_regsets): New macro.
9686 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9687 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9688 (linux_register_in_regsets): New function.
9689 (usr_fetch_inferior_registers): Skip registers covered by
9690 regsets.
9691 (usr_store_inferior_registers): Likewise.
9692 (usr_fetch_inferior_registers): New macro.
9693 (usr_store_inferior_registers): Likewise.
9694 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9695 (linux_store_registers): Likewise.
9696 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9697 prototype.
9698 (init_registers_mips64_dsp_linux): Likewise.
9699 (init_registers_mips_linux): New macro.
9700 (init_registers_mips_dsp_linux): Likewise.
9701 (mips_dsp_num_regs): Likewise.
9702 (DSP_BASE, DSP_CONTROL): New fallback macros.
9703 (mips_base_regs): New macro.
9704 (mips_regmap): Use it. Fix the size.
9705 (mips_dsp_regmap): New variable.
9706 (mips_dsp_regset_bitmap): Likewise.
9707 (mips_arch_setup): New function.
9708 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9709 than mips_regmap.
9710 (mips_cannot_store_register): Likewise.
9711 (the_low_target): Update .arch_setup, .num_regs and .regmap
9712 initializers. Add .regset_bitmap initializer.
9713 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9714 initializer.
9715 * linux-bfin-low.c (the_low_target): Likewise.
9716 * linux-cris-low.c (the_low_target): Likewise.
9717 * linux-crisv32-low.c (the_low_target): Likewise.
9718 * linux-ia64-low.c (the_low_target): Likewise.
9719 * linux-m32r-low.c (the_low_target): Likewise.
9720 * linux-m68k-low.c (the_low_target): Likewise.
9721 * linux-ppc-low.c (the_low_target): Likewise.
9722 * linux-s390-low.c (the_low_target): Likewise.
9723 * linux-sh-low.c (the_low_target): Likewise.
9724 * linux-sparc-low.c (the_low_target): Likewise.
9725 * linux-tic6x-low.c (the_low_target): Likewise.
9726 * linux-x86-low.c (the_low_target): Likewise.
9727 * linux-xtensa-low.c (the_low_target): Likewise.
9728 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9729 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9730 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9731 srv_xmlfiles.
9732 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9733 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9734
9735 2012-02-29 Yao Qi <yao@codesourcery.com>
9736 Pedro Alves <palves@redhat.com>
9737
9738 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9739 `step_over_finished' is true.
9740
9741 2012-02-27 Pedro Alves <palves@redhat.com>
9742
9743 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9744 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9745
9746 2012-02-27 Pedro Alves <palves@redhat.com>
9747
9748 PR server/9684
9749 * linux-low.c (pid_is_stopped): New.
9750 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9751
9752 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9753
9754 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9755 of conditions.
9756
9757 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9758
9759 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9760
9761 2012-02-24 Luis Machado <lgustavo@codesourcery>
9762
9763 * server.c (handle_query): Advertise support for target-side
9764 breakpoint condition evaluation.
9765 (process_point_options): New function.
9766 (process_serial_event): When inserting a breakpoint, check for
9767 a target-side condition that should be evaluated.
9768
9769 * mem-break.c: Include regcache.h and ax.h.
9770 (point_cond_list_t): New data structure.
9771 (breakpoint) <cond_list>: New field.
9772 (find_gdb_breakpoint_at): Make non-static.
9773 (delete_gdb_breakpoint_at): Clear any target-side
9774 conditions.
9775 (clear_gdb_breakpoint_conditions): New function.
9776 (add_condition_to_breakpoint): Likewise.
9777 (add_breakpoint_condition): Likewise.
9778 (gdb_condition_true_at_breakpoint): Likewise.
9779 (gdb_breakpoint_here): Return result directly instead
9780 of going through a local variable.
9781
9782 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9783 (clear_gdb_breakpoint_conditions): Likewise.
9784 (add_breakpoint_condition): Likewise.
9785 (gdb_condition_true_at_breakpoint): Likewise.
9786
9787 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9788 (need_step_over_p): Take target-side breakpoint condition into
9789 consideration.
9790
9791 2012-02-24 Luis Machado <lgustavo@codesourcery>
9792
9793 * server.h: Include tracepoint.h.
9794 (agent_mem_read, agent_get_trace_state_variable_value,
9795 agent_set_trace_state_variable_value,
9796 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9797 get_set_tsv_func_addr): New prototypes.
9798
9799 * ax.h: New include file.
9800 * ax.c: New source file.
9801
9802 * tracepoint.c: Include ax.h.
9803 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9804 agent_expr, eval_result_type): Move to ax.h.
9805 (parse_agent_expr): Rename to ...
9806 (gdb_parse_agent_expr): ... this, make it non-static and move
9807 to ax.h.
9808 (unparse_agent_expr) Rename to ...
9809 (gdb_unparse_agent_expr): ... this, make it non-static and move
9810 to ax.h.
9811 (eval_agent_expr): Rename to ...
9812 (eval_tracepoint_agent_expr): ... this.
9813 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9814 forward declarations.
9815 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9816 (agent_get_trace_state_variable_value): New function.
9817 (agent_set_trace_state_variable_value): New function.
9818 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9819 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9820 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9821 (condition_true_at_tracepoint): Likewise.
9822 (parse_agent_expr): Rename to ...
9823 (gdb_parse_agent_expr): ... this and move to ax.c.
9824 (unparse_agent_expr): Rename to ...
9825 (gdb_unparse_agent_expr): ... this and move to ax.c.
9826 (gdb_agent_op_name): Move to ax.c.
9827 (eval_agent_expr): Rename to ...
9828 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9829 and move to ax.c.
9830 (eval_tracepoint_agent_expr): New function.
9831 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9832 non-static.
9833 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9834 ax.c.
9835 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9836 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9837 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9838 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9839 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9840 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9841 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9842 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9843 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9844 (compile_bytecodes): Remove forward declaration.
9845 (is_goto_target): Move to ax.c.
9846 (compile_bytecodes): Move to ax.c and call
9847 agent_get_trace_state_variable_value (...) and
9848 agent_set_trace_state_variable_value (...).
9849
9850 * Makefile.in: Update ax.c and IPA dependencies.
9851
9852 2012-02-24 Pedro Alves <palves@redhat.com>
9853
9854 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9855 (cmd_bigqtbuffer_circular): ... this. Only handle
9856 'QTBuffer:circular:'.
9857 (handle_tracepoint_general_set): Adjust.
9858
9859 2012-02-16 Yao Qi <yao@codesourcery.com>
9860
9861 * inferiors.c: Move code to ...
9862 * dll.c: .... here. New.
9863 * server.h: Declare clear_dlls.
9864 * Makefile.in (SFILES): Add dll.c.
9865 (OBS): Add dll.o
9866 (dll.o): New rule.
9867
9868 2012-02-11 Yao Qi <yao@codesourcery.com>
9869
9870 * server.c: (handle_monitor_command): Add a new parameter
9871 `own_buf'.
9872 (handle_query): Update caller.
9873
9874 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9875
9876 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9877 * configure, config.in: Regenerate.
9878 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9879 is not defined.
9880
9881 2012-02-02 Pedro Alves <palves@redhat.com>
9882
9883 Try SIGKILL first, then PTRACE_KILL.
9884 * linux-low.c (linux_kill_one_lwp): New.
9885 (linux_kill_one_lwp): Rename to ...
9886 (kill_one_lwp_callback): ... this. Use the new
9887 linux_kill_one_lwp.
9888
9889 2012-02-02 Pedro Alves <palves@redhat.com>
9890
9891 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9892 inferior.
9893
9894 2012-01-27 Pedro Alves <palves@redhat.com>
9895
9896 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9897 (elf_64_file_p): Make static.
9898 (linux_pid_exe_is_elf_64_file): New.
9899 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9900 Delete declarations.
9901 (linux_pid_exe_is_elf_64_file): Declare.
9902 * linux-x86-low.c (x86_arch_setup): Use
9903 linux_pid_exe_is_elf_64_file.
9904
9905 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9906
9907 * linux-low.c (linux_wait_for_event_1): Rename to ...
9908 (linux_wait_for_event): ... here and merge it with former
9909 linux_wait_for_event - new variable wait_ptid, use it.
9910 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9911
9912 2012-01-23 Pedro Alves <palves@redhat.com>
9913
9914 * server.c (main): Avoid yet another case of infinite loop while
9915 detaching/killing after a longjmp.
9916
9917 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9918
9919 Code cleanup.
9920 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9921
9922 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9923
9924 * hostio.c (handle_readlink): New function.
9925 (handle_vFile): Call it to handle "vFile:readlink" packets.
9926
9927 2012-01-20 Pedro Alves <palves@redhat.com>
9928 Ulrich Weigand <ulrich.weigand@linaro.org>
9929
9930 * server.c (handle_v_requests): Only support vAttach and vRun to
9931 start multiple processes when in extended protocol mode.
9932
9933 2012-01-17 Pedro Alves <palves@redhat.com>
9934
9935 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9936 memalign plus mprotect to allocate the scratch buffer.
9937
9938 2012-01-13 Pedro Alves <palves@redhat.com>
9939
9940 * server.c (attach_inferior): Clear `cont_thread'.
9941
9942 2012-01-13 Pedro Alves <palves@redhat.com>
9943
9944 * server.c (main): Avoid infinite loop while detaching/killing
9945 after a longjmp.
9946
9947 2012-01-09 Doug Evans <dje@google.com>
9948
9949 * server.c (start_inferior): Set last_ptid in --wrapper case.
9950
9951 2012-01-06 Yao Qi <yao@codesourcery.com>
9952
9953 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9954 defined.
9955 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9956
9957 2012-01-04 Yao Qi <yao@codesourcery.com>
9958
9959 * tracepoint.c (cmd_qtdp): Print debug message
9960 for static tracepoint.
9961
9962 2012-01-04 Yao Qi <yao@codesourcery.com>
9963
9964 * tracepoint.c (trace_vdebug): Differentiate debug message
9965 between gdbserver and IPA.
9966
9967 2012-01-03 Yao Qi <yao@codesourcery.com>
9968
9969 * tracepoint.c (tracepoint_was_hit): Don't collect for
9970 static tracepoint.
9971
9972 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9973
9974 * terminal.h: Reformat copyright header.
9975
9976 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9977
9978 * server.c (gdbserver_version): Update copyright year.
9979 * gdbreplay.c (gdbreplay_version): Likewise.
9980
9981 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9982
9983 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9984
9985 Revert:
9986 2011-12-18 Hui Zhu <teawater@gmail.com>
9987 * linux-low.c (linux_create_inferior): Save return value to ret.
9988
9989 2011-12-18 Hui Zhu <teawater@gmail.com>
9990
9991 * linux-low.c (linux_create_inferior): Save return value to ret.
9992
9993 2011-12-16 Doug Evans <dje@google.com>
9994
9995 * linux-low.c (linux_create_inferior): If stdio connection,
9996 redirect stdin from /dev/null, stdout to stderr.
9997 * remote-utils.c (remote_is_stdio): New static global.
9998 (remote_connection_is_stdio): New function.
9999 (remote_prepare): Handle stdio connection.
10000 (remote_open): Ditto.
10001 (remote_close): Don't close stdin for stdio connections.
10002 (read_prim,write_prim): New functions. Replace all calls to
10003 read/write to these.
10004 * server.c (main): Watch for "-" argument. Move call to
10005 remote_prepare before start_inferior.
10006 * server.h (STDIO_CONNECTION_NAME): New macro.
10007 (remote_connection_is_stdio): Declare.
10008
10009 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10010 in debugging output.
10011
10012 2011-12-15 Yao Qi <yao@codesourcery.com>
10013
10014 * tracepoint.c: Include sys/syscall.h.
10015 (gdb_ust_thread): Remove preprocessor conditional.
10016
10017 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10018
10019 * linux-low.c (linux_detach_one_lwp): Call
10020 the_low_target.prepare_to_resume before detaching.
10021
10022 2011-12-14 Yao Qi <yao@codesourcery.com>
10023
10024 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10025 of write.
10026
10027 2011-12-14 Yao Qi <yao@codesourcery.com>
10028
10029 * i386-low.c (i386_low_stopped_data_address): Initialize local
10030 variable `control'.
10031
10032 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10033
10034 PR remote/13492
10035
10036 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10037 DR_CONTROL unless necessary. Extend comments.
10038 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10039 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10040
10041 2011-12-13 Yao Qi <yao@codesourcery.com>
10042
10043 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10044 macros.
10045 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10046
10047 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10048
10049 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10050 Print new debug message for such case.
10051
10052 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10053
10054 Fix overlapping memcpy.
10055 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10056 the read_inferior_memory transfer.
10057 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10058 write_inferior_memory transfer.
10059 (set_fast_tracepoint_jump): New variable buf. Use it for the
10060 read_inferior_memory and write_inferior_memory transfers.
10061 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10062 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10063 Use it for the write_inferior_memory transfer.
10064 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10065 buffers.
10066
10067 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10068
10069 * linux-low.c (fetch_register, store_register): Make code
10070 consistent, fix formatting.
10071
10072 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10073
10074 * linux-low.c (usr_store_inferior_registers): Factor out code
10075 to handle individual registers into...
10076 (store_register): ... this new function.
10077
10078 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10079
10080 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10081 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10082 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10083 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10084 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10085 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10086 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10087 (srv_xmlfiles): Add new XML files.
10088
10089 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10090 and <sys/uio.h>.
10091 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10092 (init_registers_s390_linux32v1): Add prototype.
10093 (init_registers_s390_linux32v2): Likewise.
10094 (init_registers_s390_linux64v1): Likewise.
10095 (init_registers_s390_linux64v2): Likewise.
10096 (init_registers_s390x_linux64v1): Likewise.
10097 (init_registers_s390x_linux64v2): Likewise.
10098 (s390_num_regs): Increment to 52.
10099 (s390_regmap): Add orig_r2 register.
10100 (s390_num_regs_3264): Increment to 68.
10101 (s390_regmap_3264): Add orig_r2 register.
10102 (s390_collect_ptrace_register): Handle orig_r2 register.
10103 (s390_supply_ptrace_register): Likewise.
10104 (s390_fill_last_break): New function.
10105 (s390_store_last_break): Likewise.
10106 (s390_fill_system_call): New function.
10107 (s390_store_system_call): Likewise.
10108 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10109 register sets.
10110 (s390_check_regset): New function.
10111 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10112 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10113 Update target_regsets for available register sets.
10114
10115 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10116 Jan Kratochvil <jan.kratochvil@redhat.com>
10117
10118 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10119 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10120 New.
10121 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10122 * linux-low.h (struct process_info_private): New member r_debug.
10123 * server.c (handle_qxfer_libraries): Call
10124 the_target->qxfer_libraries_svr4.
10125 (handle_qxfer_libraries_svr4): New function.
10126 (qxfer_packets): New entry "libraries-svr4".
10127 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10128 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10129 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10130 PACKET_qXfer_libraries_svr4.
10131
10132 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10133
10134 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10135 PSW address/mask between 8-byte and 16-byte formats.
10136 (s390_supply_ptrace_register): Likewise.
10137 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10138 basic addressing mode bit.
10139
10140 2011-11-24 Stan Shebs <stan@codesourcery.com>
10141
10142 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10143
10144 2011-11-17 Stan Shebs <stan@codesourcery.com>
10145
10146 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10147 (tracing_start_time): New global.
10148 (tracing_stop_time): New global.
10149 (tracing_user_name): New global.
10150 (tracing_notes): New global.
10151 (tracing_stop_note): New global.
10152 (cmd_qtstart): Set traceframe_usage, start_time.
10153 (stop_tracing): Set stop_time.
10154 (cmd_qtstatus): Report additional status.
10155 (cmd_qtp): New function.
10156 (handle_tracepoint_query): Call it.
10157 (cmd_qtnotes): New function.
10158 (handle_tracepoint_general_set): Call it.
10159 (get_timestamp): Rename from tsv_get_timestamp.
10160
10161 2011-11-14 Stan Shebs <stan@codesourcery.com>
10162 Kwok Cheung Yeung <kcy@codesourcery.com>
10163
10164 * linux-x86-low.c (small_jump_insn): New.
10165 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10166 trampoline and error message, build a trampoline and issue a small
10167 jump instruction to it.
10168 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10169 trampoline and error message.
10170 (x86_get_min_fast_tracepoint_insn_len): New.
10171 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10172 * linux-low.h (struct linux_target_ops): Add arguments to
10173 install_fast_tracepoint_jump_pad operation, add new operation.
10174 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10175 arguments.
10176 (linux_get_min_fast_tracepoint_insn_len): New function.
10177 (linux_target_op): Add new operation.
10178 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10179 (gdb_trampoline_buffer_end): Ditto.
10180 (gdb_trampoline_buffer_error): Ditto.
10181 (struct ipa_sym_addresses): Add fields for new IPA variables.
10182 (symbol_list): Add entries for new IPA variables.
10183 (struct tracepoint): Add fields to hold the address range of the
10184 trampoline used by the tracepoint.
10185 (trampoline_buffer_head): New static variable.
10186 (trampoline_buffer_tail): Ditto.
10187 (claim_trampoline_space): New function.
10188 (have_fast_tracepoint_trampoline_buffer): New function.
10189 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10190 structure.
10191 (install_fast_tracepoint): Ditto, also add error buffer argument.
10192 (cmd_qtminftpilen): New function.
10193 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10194 (fast_tracepoint_from_trampoline_address): New function.
10195 (fast_tracepoint_collecting): Handle trampoline as part of jump
10196 pad space.
10197 (set_trampoline_buffer_space): New function.
10198 (initialize_tracepoint): Initialize new IPA variables.
10199 * target.h (struct target_ops): Add arguments to
10200 install_fast_tracepoint_jump_pad operation, add new
10201 get_min_fast_tracepoint_insn_len operation.
10202 (target_get_min_fast_tracepoint_insn_len): New.
10203 (install_fast_tracepoint_jump_pad): Add arguments.
10204 * server.h (IPA_BUFSIZ): Define.
10205 * linux-i386-ipa.c: Include extra header files.
10206 (initialize_fast_tracepoint_trampoline_buffer): New function.
10207 (initialize_low_tracepoint): Call it.
10208 * server.h (set_trampoline_buffer_space): Declare.
10209 (claim_trampoline_space): Ditto.
10210 (have_fast_tracepoint_trampoline_buffer): Ditto.
10211
10212 2011-11-14 Yao Qi <yao@codesourcery.com>
10213
10214 * server.c (handle_query): Handle InstallInTrace for qSupported.
10215 * tracepoint.c (add_tracepoint): Sort list.
10216 (install_tracepoint, download_tracepoint): New.
10217 (cmd_qtdp): Call them to install and download tracepoints.
10218 (sort_tracepoints): Removed.
10219 (cmd_qtstart): Update.
10220
10221 2011-11-14 Yao Qi <yao@codesourcery.com>
10222
10223 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10224 * mem-break.h: Declare.
10225 * tracepoint.c (cmd_qtstart): Move some code to ...
10226 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10227 New.
10228 (download_tracepoints): Move some code to ...
10229 (download_tracepoint_1): ... here. New.
10230
10231 2011-11-08 Yao Qi <yao@codesourcery.com>
10232
10233 * remote-utils.c (relocate_instruction): A comment fix.
10234
10235 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10236
10237 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10238 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10239 dr_status_mirror and dr_control_mirror from debug_reg_state.
10240 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10241 (i386_initial_stuff): Remove use of deleted globals.
10242 (i386_get_thread_context, i386_set_thread_context,
10243 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10244 from debug_reg_state.
10245
10246 2011-11-05 Yao Qi <yao@codesourcery.com>
10247
10248 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10249 address as TPOINT's.
10250
10251 2011-11-02 Stan Shebs <stan@codesourcery.com>
10252
10253 * tracepoint.c (agent_mem_read_string): New function.
10254 (eval_agent_expr): Call it for tracenz.
10255 * server.c (handle_query): Report support for tracenz.
10256
10257 2011-11-02 Yao Qi <yao@codesourcery.com>
10258
10259 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10260
10261 2011-11-02 Yao Qi <yao@codesourcery.com>
10262
10263 * target.h: Fix a typo in comment.
10264
10265 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10266
10267 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10268 clobber the breakpoints' shadows with fast tracepoint jumps.
10269 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10270 * target.c (write_inferior_memory): Also pass MYADDR down to
10271 check_mem_write.
10272
10273 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10274
10275 * configure.ac: Check support for personality routine.
10276 * configure: Regenerate.
10277 * config.in: Likewise.
10278 * linux-low.c: Include <sys/personality.h>.
10279 Define ADDR_NO_RANDOMIZE if necessary.
10280 (linux_create_inferior): Disable address space randomization when
10281 forking inferior, if requested.
10282 (linux_supports_disable_randomization): New function.
10283 (linux_target_ops): Install it.
10284 * server.h (disable_randomization): Declare.
10285 * server.c (disable_randomization): New global variable.
10286 (handle_general_set): Handle QDisableRandomization.
10287 (handle_query): Likewise for qSupported.
10288 (main): Support --disable-randomization and --no-disable-randomization
10289 command line arguments.
10290 * target.h (struct target_ops): Add supports_disable_randomization.
10291 (target_supports_disable_randomization): New macro.
10292
10293 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10294
10295 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10296 ifdef check.
10297 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10298 [!PT_GETDSBT] (target_loadmap): New definition.
10299 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10300 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10301 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10302 and PT_GETDSBT to LINUX_LOADMAP.
10303 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10304 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10305
10306 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10307
10308 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10309 (arm_linux_hwbp_cap): New static variable.
10310 (arm_linux_get_hwbp_cap): Replace by ...
10311 (arm_linux_init_hwbp_cap): ... this new function.
10312 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10313 (arm_linux_get_hw_watchpoint_count): Likewise.
10314 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10315 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10316 (arm_prepare_to_resume): Use perror_with_name instead of error.
10317
10318 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10319
10320 * linux-arm-low.c: Include <signal.h>.
10321 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10322 (struct arm_linux_hwbp_cap): New data type.
10323 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10324 (struct arm_linux_hw_breakpoint): New data type.
10325 (MAX_BPTS, MAX_WPTS): Define.
10326 (struct arch_process_info, struct arch_lwp_info): New data types.
10327 (arm_linux_get_hwbp_cap): New function.
10328 (arm_linux_get_hw_breakpoint_count): Likewise.
10329 (arm_linux_get_hw_watchpoint_count): Likewise.
10330 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10331 (arm_hwbp_control_initialize): Likewise.
10332 (arm_hwbp_control_is_enabled): Likewise.
10333 (arm_hwbp_control_is_initialized): Likewise.
10334 (arm_hwbp_control_disable): Likewise.
10335 (arm_linux_hw_breakpoint_equal): Likewise.
10336 (arm_linux_hw_point_initialize): Likewise.
10337 (struct update_registers_data): New data structure.
10338 (update_registers_callback: New function.
10339 (arm_insert_point): Likewise.
10340 (arm_remove_point): Likewise.
10341 (arm_stopped_by_watchpoint): Likewise.
10342 (arm_stopped_data_address): Likewise.
10343 (arm_new_process): Likewise.
10344 (arm_new_thread): Likewise.
10345 (arm_prepare_to_resume): Likewise.
10346 (the_low_target): Register arm_insert_point, arm_remove_point,
10347 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10348 arm_new_thread, and arm_prepare_to_resume.
10349
10350 2011-09-15 Stan Shebs <stan@codesourcery.com>
10351
10352 * server.h (struct emit_ops): Add compare-goto fields.
10353 * tracepoint.c (gdb_agent_op_sizes): New table.
10354 (emit_eq_goto): New function.
10355 (emit_ne_goto): New function.
10356 (emit_lt_goto): New function.
10357 (emit_le_goto): New function.
10358 (emit_gt_goto): New function.
10359 (emit_ge_goto): New function.
10360 (is_goto_target): New function.
10361 (compile_bytecodes): Recognize special cases of compare-goto
10362 combinations and call specialized emitters for them.
10363 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10364 (amd64_emit_ne_goto): New function.
10365 (amd64_emit_lt_goto): New function.
10366 (amd64_emit_le_goto): New function.
10367 (amd64_emit_gt_goto): New function.
10368 (amd64_emit_ge_goto): New function.
10369 (amd64_emit_ops): Add the new functions.
10370 (i386_emit_eq_goto): New function.
10371 (i386_emit_ne_goto): New function.
10372 (i386_emit_lt_goto): New function.
10373 (i386_emit_le_goto): New function.
10374 (i386_emit_gt_goto): New function.
10375 (i386_emit_ge_goto): New function.
10376 (i386_emit_ops): Add the new functions.
10377
10378 2011-09-08 Stan Shebs <stan@codesourcery.com>
10379
10380 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10381 (i386_emit_epilogue): Restore %ebx.
10382
10383 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10384
10385 * server.c (step_thread): Remove definition.
10386 (process_serial_event): Don't handle Hs.
10387 * server.h (step_thread): Remove declaration.
10388 * target.c (set_desired_inferior): Remove use of step_thread.
10389
10390 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10391
10392 * linux-low.c: Include linux-procfs.h.
10393 (linux_attach_lwp_1): Update comments.
10394 (linux_attach): Scan for existing threads when attaching to a
10395 process that is the tgid.
10396 * Makefile.in: Update dependencies.
10397
10398 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10399
10400 * configure.srv: Add linux-procfs.o dependencies.
10401
10402 2011-08-14 Yao Qi <yao@codesourcery.com>
10403
10404 * target.h (struct target_ops): Fix indent.
10405 * win32-low.c (win32_target_ops): Fix comment.
10406
10407 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10408 Yao Qi <yao@codesourcery.com>
10409
10410 * Makefile.in (clean): Remove tic6x-*.c files.
10411 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10412 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10413 (tic6x-c64xp-linux.c): Likewise.
10414 * configure.srv: Add support for tic6x-*-uclinux.
10415 * linux-tic6x-low.c: New.
10416 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10417
10418 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10419 Yao Qi <yao@codesourcery.com>
10420
10421 * target.h (struct target_ops): Add read_loadmap.
10422 * linux-low.c (struct target_loadseg): New type.
10423 (struct target_loadmap): New type.
10424 (linux_read_loadmap): New function.
10425 (linux_target_ops): Add linux_read_loadmap.
10426 * server.c (handle_query): Support qXfer:fdpic:read packet.
10427 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10428 to NULL.
10429
10430 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10431
10432 * win32-low.c: Include <stdint.h>.
10433
10434 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10435
10436 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10437 to the inferior here.
10438 (i386_remove_aligned_watchpoint): Ditto.
10439 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10440 fit part of the watchpoint in the debug registers.
10441 (i386_update_inferior_debug_regs): New.
10442 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10443 registers, and only update the inferior on success.
10444 (i386_low_remove_watchpoint): Ditto.
10445
10446 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10447
10448 * linux-low.c (compare_ints, unique, list_threads, show_process,
10449 linux_core_of_thread): Delete.
10450 (linux_target_ops): Change linux_core_of_thread to
10451 linux_common_core_of_thread.
10452 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10453 * utils.c (malloc_failure): Change type of argument.
10454 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10455 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10456 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10457 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10458 (IPA_OBJS): Add common-utils-ipa.o.
10459 (ptid_h, linux_osdata_h): New macros.
10460 (server_h): Add common/common-utils.h, common/xml-utils.h,
10461 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10462 common/ptid.h.
10463 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10464 ptid.o, buffer.o): New rules.
10465 (linux-low.o): Add common/linux-osdata.h as a dependency.
10466 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10467 * configure.ac: Add AC_HEADER_DIRENT check.
10468 * config.in: Regenerate.
10469 * configure: Regenerate.
10470 * remote-utils.c (xml_escape_text): Delete.
10471 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10472 buffer_xml_printf): Move to common/buffer.c.
10473 * server.c (main): Remove call to initialize_inferiors.
10474 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10475 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10476 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10477 internal_error, gdb_assert, gdb_assert_fail): Delete.
10478 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10479 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10480 common/buffer.h.
10481 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10482 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10483 initialize_inferiors): Delete.
10484
10485 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10486
10487 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10488 symbol error.
10489
10490 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10491
10492 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10493 assertion.
10494 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10495
10496 2011-05-26 Yao Qi <yao@codesourcery.com>
10497
10498 * Makefile.in (thread-db.o): Track dependence to
10499 common/gdb_thread_db.h.
10500 * thread-db.c: include gdb_thread_db.h from right place.
10501
10502 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10503
10504 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10505 __FILE__ and __LINE__ to internal_error.
10506
10507 2011-05-13 Doug Evans <dje@google.com>
10508
10509 * thread-db.c (try_thread_db_load_from_sdir): New function.
10510 (try_thread_db_load_from_dir): New function.
10511 (thread_db_load_search): Handle $sdir, ignore $pdir.
10512 Remove trying of system directories if search of
10513 libthread-db-search-path fails, that is now done via $sdir.
10514
10515 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10516
10517 * server.c (handle_query): Add EnableDisableTracepoints to the list
10518 of supported features.
10519 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10520 tracepoints.
10521 (cmd_qtenable_disable): New.
10522 (cmd_qtstart): Install tracepoints even if disabled.
10523 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10524 receiving a QTEnable or QTDisable packet.
10525 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10526 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10527 tracepoints.
10528 (gdb_probe): Skip data collection if static tracepoint is disabled.
10529
10530 2011-05-10 Doug Evans <dje@google.com>
10531
10532 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10533
10534 2011-05-04 Doug Evans <dje@google.com>
10535
10536 * linux-low.c (linux_join): Skip process lookup.
10537 * spu-low.c (spu_join): Ditto.
10538 * server.c (join_inferiors_callback): Delete.
10539 (process_serial_event): For 'D' packet (detach) call join_inferior
10540 directly.
10541
10542 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10543
10544 * README: Don't mention xscale*-*-linux*.
10545 * configure.srv (xscale*-*-linux*): Don't handle target.
10546
10547 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10548
10549 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10550 casting pointers.
10551 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10552 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10553 (i386_emit_void_call_2): Likewise.
10554
10555 2011-04-26 Yao Qi <yao@codesourcery.com>
10556
10557 * linux-low.c: Move common macros to linux-ptrace.h.
10558 Include linux-ptrace.h.
10559 * Makefile.in (linux_ptrace_h): New.
10560 (linux-low.o): Depends on linux-ptrace.h.
10561
10562 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10563
10564 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10565 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10566 (remote_prepare): New function with most of the TCP code from ...
10567 (remote_open): ... here. Detect PORT here unconditionally. Move also
10568 setting transport_is_reliable.
10569 * server.c (run_once): New variable.
10570 (gdbserver_usage): Document it.
10571 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10572 the first run if RUN_ONCE.
10573 * server.h (run_once, remote_prepare): New declarations.
10574
10575 2011-04-19 Tom Tromey <tromey@redhat.com>
10576
10577 * win32-low.c (handle_load_dll): Remove duplicate "the".
10578
10579 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10580
10581 Remove support for old Cygwin 1.5 versions.
10582 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10583 function to avoid warning.
10584 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10585 warning.
10586
10587 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10588
10589 * gdbserver/server.h (Macro _): Define it if not available.
10590
10591 2011-03-14 Michael Snyder <msnyder@vmware.com>
10592
10593 * hostio.c (handle_close): Remove unnecessary null test.
10594
10595 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10596
10597 * Makefile.in (maintainer-clean realclean distclean): Remove
10598 "make ... subdir_do" command.
10599
10600 2011-03-10 Michael Snyder <msnyder@vmware.com>
10601
10602 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10603
10604 * server.c (handle_v_run): Free alloced buffer on early return.
10605
10606 2011-03-09 Yao Qi <yao@codesourcery.com>
10607
10608 Revert:
10609 2011-03-04 Yao Qi <yao@codesourcery.com>
10610
10611 * Makefile.in: Remove GNU make feature --directory.
10612
10613 2011-03-05 Yao Qi <yao@codesourcery.com>
10614
10615 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10616 (subdir_do): New make target. Copied from gdb/Makefile.
10617 (maintainer-clean, realclean, distclean, clean): Call corresponding
10618 make targets in common/Makefile.
10619
10620 2011-02-11 Yao Qi <yao@codesourcery.com>
10621
10622 * configure.ac: Call AC_PROG_RANLIB.
10623 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10624 * configure: Regenerate.
10625
10626 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10627
10628 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10629
10630 2011-03-06 Yao Qi <yao@codesourcery.com>
10631
10632 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10633
10634 2011-03-05 Yao Qi <yao@codesourcery.com>
10635
10636 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10637 (subdir_do): New make target. Copied from gdb/Makefile.
10638 (maintainer-clean, realclean, distclean, clean): Call corresponding
10639 make targets in common/Makefile.
10640
10641 2011-03-04 Yao Qi <yao@codesourcery.com>
10642
10643 * Makefile.in: Remove GNU make feature --directory.
10644
10645 2011-03-04 Michael Snyder <msnyder@vmware.com>
10646
10647 * server.c (queue_stop_reply): Call xmalloc not malloc.
10648
10649 2011-03-02 Michael Snyder <msnyder@vmware.com>
10650
10651 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10652
10653 2011-02-28 Michael Snyder <msnyder@vmware.com>
10654
10655 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10656 (cmd_qtframe): Ditto.
10657 (cmd_qtbuffer): Ditto.
10658 (cmd_bigqtbuffer): Ditto.
10659
10660 * utils.c (decimal2str): Initialize 'width' to nine, then
10661 don't mess with it.
10662
10663 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10664
10665 * hostio.c (require_data): Free *data, not data.
10666
10667 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10668
10669 * hostio.c (require_data): Use free, not xfree.
10670
10671 2011-02-27 Michael Snyder <msnyder@vmware.com>
10672
10673 * server.c (handle_query): Discard unused value.
10674
10675 * hostio.c (require_data): Free malloc memory before returning
10676 error.
10677
10678 2011-02-26 Michael Snyder <msnyder@vmware.com>
10679
10680 * linux-low.c (list_threads): Call closedir for dirent.
10681
10682 2011-02-27 Michael Snyder <msnyder@vmware.com>
10683
10684 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10685 a case statement falls through.
10686
10687 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10688
10689 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10690 in comparison.
10691
10692 2011-02-26 Michael Snyder <msnyder@vmware.com>
10693
10694 * utils.c (decimal2str): Eliminate dead code and dead param.
10695 (pulongest): Drop dead param from call to decimal2str.
10696 (plongest): Ditto.
10697
10698 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10699
10700 Revert the following patch (not approved yet):
10701 2011-02-21 Hui Zhu <teawater@gmail.com>
10702 * tracepoint.c (tp_printf): New function.
10703 (eval_agent_expr): Handle gdb_agent_op_printf.
10704
10705 2011-02-21 Hui Zhu <teawater@gmail.com>
10706
10707 * tracepoint.c (tp_printf): New function.
10708 (eval_agent_expr): Handle gdb_agent_op_printf.
10709
10710 2011-02-18 Tom Tromey <tromey@redhat.com>
10711
10712 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10713 (tracepoint.o): Likewise.
10714 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10715 (gdb_agent_op_names): Likewise.
10716
10717 2011-02-18 Tom Tromey <tromey@redhat.com>
10718
10719 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10720 gdb_agent_op_rot>: New constants.
10721 (gdb_agent_op_names): Add pick and roll.
10722 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10723 cases.
10724
10725 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10726
10727 * aclocal.m4: Regenerated with aclocal-1.11.1.
10728
10729 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10730
10731 * server.c (handle_qxfer_traceframe_info): New.
10732 (qxfer_packets): Register "traceframe-info".
10733 (handle_query): Report support for qXfer:traceframe-info:read+.
10734 * tracepoint.c (match_blocktype): New.
10735 (traceframe_find_block_type): Rename to ...
10736 (traceframe_walk_blocks): ... this. Add callback filter argument,
10737 and use it.
10738 (traceframe_find_block_type): New, reimplemented on top of
10739 traceframe_walk_blocks.
10740 (build_traceframe_info_xml): New.
10741 (traceframe_read_info): New.
10742 * server.h (traceframe_read_info): Declare.
10743
10744 2011-02-11 Yao Qi <yao@codesourcery.com>
10745
10746 * configure.ac: Call AC_PROG_RANLIB.
10747 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10748 * configure: Regenerate.
10749
10750 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10751
10752 * server.c (gdb_read_memory): Change return semantics to allow
10753 partial transfers.
10754 (handle_search_memory_1): Adjust.
10755 (process_serial_event) <'m' packet>: Handle partial transfers.
10756 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10757
10758 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10759
10760 * regcache.c (init_register_cache): Initialize
10761 regcache->register_status.
10762 (free_register_cache): Release regcache->register_status.
10763 (regcache_cpy): Copy register_status.
10764 (registers_to_string): Print 'x's for unavailable registers.
10765 (supply_register): Mark the register's status valid or
10766 unavailable, depending on whether a buffer was passed in or not.
10767 (supply_register_zeroed): New.
10768 (supply_regblock): Mark the registers' status valid or
10769 unavailable, depending on whether a buffer was passed in or not.
10770 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10771 (struct regcache): New `register_status' field.
10772 (supply_register_zeroed): Declare.
10773 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10774 supply_register_zeroed, rather than passing a NULL buffer to
10775 supply_register.
10776 * tracepoint.c (fetch_traceframe_registers): Update comment.
10777
10778 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10779
10780 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10781 buffer explicit.
10782
10783 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10784
10785 * server.h (decode_xfer_write): Change prototype.
10786 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10787 and don't extract the annex here.
10788 * server.c (decode_xfer_read): Remove `annex' parameter,
10789 and don't extract the annex here.
10790 (decode_xfer): New.
10791 (struct qxfer): New.
10792 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10793 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10794 (handle_qxfer_statictrace): New functions, abstracted out from
10795 handle_query, and made to use the struct qxfer interface.
10796 (handle_threads_qxfer_proper): Rename to ...
10797 (handle_qxfer_threads_proper): ... this.
10798 (handle_threads_qxfer): Rename to ...
10799 (handle_qxfer_threads): ... this. Adjust.
10800 (qxfer_packets): New array.
10801 (handle_qxfer): New function.
10802 (handle_query): Use handle_qxfer.
10803
10804 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10805
10806 * gdbreplay.c: Shorten lines of >= 80 columns.
10807 * linux-low.c: Ditto.
10808 * linux-ppc-low.c: Ditto.
10809 * linux-s390-low.c: Ditto.
10810 * linux-sparc-low.c: Ditto.
10811 * linux-x86-low.c: Ditto.
10812 * linux-xtensa-low.c: Ditto.
10813 * mem-break.c: Ditto.
10814 * nto-low.c: Ditto.
10815 * regcache.h: Ditto.
10816 * remote-utils.c: Ditto.
10817 * server.c: Ditto.
10818 * server.h: Ditto.
10819 * thread-db.c: Ditto.
10820 * tracepoint.c: Ditto.
10821 * utils.c: Ditto.
10822 * win32-low.h: Ditto.
10823
10824 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10825
10826 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10827 update.
10828
10829 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10830
10831 * server.c (gdbserver_version): Update copyright year in version
10832 output.
10833 * gdbreplay.c (gdbreplay_version): Ditto.
10834
10835 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10836
10837 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10838 * linux-bfin-low.c: New file.
10839 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10840 PT_DATA_ADDR for BFIN targets.
10841 * Makefile.in (SFILES): Add linux-bfin-low.c.
10842 (clean): Remove reg-bfin.c.
10843 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10844 * README: Mention supported Blackfin targets.
10845
10846 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10847
10848 * .gitignore: New file.
10849
10850 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10851
10852 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10853
10854 2010-10-22 Jie Zhang <jie@codesourcery.com>
10855
10856 * Makefile.in: Add FLAGS_TO_PASS variable.
10857 (install): Remove dependency of install-only and recursively
10858 invoke make for install-only.
10859
10860 2010-10-04 Doug Evans <dje@google.com>
10861
10862 * Makefile.in (uninstall): Use $(DESTDIR).
10863
10864 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10865
10866 PR gdb/11842
10867
10868 * linux-x86-low.c (compat_siginfo_from_siginfo)
10869 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10870 si_code is < 0. Check for si_code == SI_TIMER before checking for
10871 si_code < 0.
10872
10873 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10874
10875 * lynx-i386-low.c: New file.
10876 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10877
10878 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10879
10880 * lynx-low.c (ptrace_request_to_str): Remove handling for
10881 request values that have been removed in LynxOS 5.x.
10882
10883 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10884
10885 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10886 <ptrace.h>
10887
10888 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10889
10890 * configure.ac: Add --enable-inprocess-agent option.
10891 * configure: Rebuilt.
10892
10893 2010-09-06 Yao Qi <yao@codesourcery.com>
10894
10895 * linux-low.c (linux_kill): Remove unused variable.
10896 (linux_stabilize_threads): Likewise.
10897 * server.c (start_inferior): Likewise.
10898 (queue_stop_reply_callback): Likewise.
10899 * tracepoint.c (do_action_at_tracepoint): Likewise.
10900
10901 2010-09-06 Yao Qi <yao@codesourcery.com>
10902
10903 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10904 on return.
10905
10906 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10907
10908 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10909
10910 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10911
10912 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10913 "$(IPA_DEPFILES)".
10914
10915 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10916
10917 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10918 gdbserver/lynx-ppc-low.c: New files.
10919 * Makefile.in (lynx_low_h): New variable.
10920 (lynx-low.o, lynx-ppc-low.o): New rules.
10921 * configure.ac: On LynxOS, link with -lnetinet.
10922 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10923 * configure: regenerate.
10924
10925 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10926
10927 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10928 * configure.ac: Add check for vasprintf and vsnprintf.
10929 * configure, config.in: Regenerate.
10930 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10931
10932 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10933
10934 * gdbreplay.c: Move include of alloca.h up, next to include of
10935 malloc.h.
10936 * server.h: Add include of malloc.h.
10937 * mem-break.c: Remove include of malloc.h.
10938 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10939
10940 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10941
10942 * Makefile.in (memmem.o): Build with -Wno-error.
10943
10944 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10945
10946 * utils.c (xsnprintf): Make non-static.
10947 * server.h: Add xsnprintf declaration.
10948 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10949 replace calls to snprintf by calls to xsnprintf throughout.
10950
10951 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10952
10953 * configure.ac: Add configure check for alloca.
10954 * configure, config.in: Regenerate.
10955 * server.h: Include alloca.h if it exists.
10956 * gdbreplay.c: Include alloca.h if it exists.
10957
10958 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10959
10960 * linux-low.c (__SIGRTMIN): Define if not already defined.
10961 (linux_create_inferior): Check for __ANDROID__ rather than
10962 __SIGRTMIN.
10963 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10964 are already deferred.
10965 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10966 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10967 stopped and already has a pending signal to report.
10968 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10969 a pending signal to report or is moving out of a jump pad.
10970 (linux_init_signals): Check for __ANDROID__ rather than
10971 __SIGRTMIN.
10972
10973 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10974
10975 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10976 debug_threads check. Avoid a linear search when not doing debug
10977 output.
10978
10979 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10980
10981 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10982 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10983 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10984 (process_event): Change local fd's type to gdb_fildes_t.
10985 (create_file_handler): Adjust prototype.
10986 (delete_file_handler): Adjust prototype.
10987 (handle_file_event): Adjust prototype. Use pfildes.
10988 (create_file_event): Adjsut prototype.
10989 * remote-utils.c (remote_desc, listen_desc): Change type to
10990 gdb_fildes_t.
10991 * server.h: New gdb_fildes_t typedef.
10992 [USE_WIN32API]: Include winsock2.h.
10993 (delete_file_handler, add_file_handler): Adjust prototypes.
10994 (pfildes): Declare.
10995 * utils.c (pfildes): New.
10996
10997 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10998
10999 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11000 * configure: Regenerate.
11001
11002 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11003
11004 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11005 (linux_done_accessing_memory): ... this.
11006 (linux_target_ops): Adjust.
11007 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11008 * nto-low.c (nto_target_ops): Adjust comment.
11009 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11010 * spu-low.c (spu_target_ops): Adjust comment.
11011 * target.h (target_ops): Rename unprepare_to_access_memory field
11012 to done_accessing_memory.
11013 (unprepare_to_access_memory): Rename to ...
11014 (done_accessing_memory): ... this.
11015
11016 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11017
11018 * linux-low.c (linux_prepare_to_access_memory): New.
11019 (linux_unprepare_to_access_memory): New.
11020 (linux_target_ops): Install them.
11021 * server.c (read_memory): Rename to ...
11022 (gdb_read_memory): ... this. Use
11023 prepare_to_access_memory/prepare_to_access_memory.
11024 (write_memory): Rename to ...
11025 (gdb_write_memory): ... this. Use
11026 prepare_to_access_memory/prepare_to_access_memory.
11027 (handle_search_memory_1): Adjust.
11028 (process_serial_event): Adjust.
11029 * target.h (struct target_ops): New fields
11030 prepare_to_access_memory and unprepare_to_access_memory.
11031 (prepare_to_access_memory, unprepare_to_access_memory): New.
11032 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11033 prepare_to_access_memory/prepare_to_access_memory.
11034 * nto-low.c (nto_target_ops): Adjust.
11035 * spu-low.c (spu_target_ops): Adjust.
11036 * win32-low.c (win32_target_ops): Adjust.
11037
11038 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11039
11040 * Makefile.in (WARN_CFLAGS): Get it from configure.
11041 (WERROR_CFLAGS): New.
11042 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11043 * configure.ac: Introduce --enable-werror, which adds -Werror to
11044 the compiler command line. Enabled by default. Disable with
11045 --disable-werror. Add -Wdeclaration-after-statement
11046 Wpointer-arith and -Wformat-nonliteral to warning flags.
11047 * configure: Regenerate.
11048
11049 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11050
11051 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11052
11053 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11054
11055 * gdbreplay.c (remote_error): New.
11056 (gdbchar): New.
11057 (expect): Use gdbchar. Check for error reading from GDB.
11058 Clarify sync error output.
11059 (play): Check for errors writing to GDB.
11060 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11061 * remote-utils.c (getpkt): Check for errors writing to the remote
11062 descriptor.
11063
11064 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11065
11066 * linux-low.c (linux_wait_1): Move non-debugging code out of
11067 `debug_threads' control.
11068
11069 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11070
11071 * linux-low.c (linux_wait_1): Don't set last_status here.
11072 * server.c (push_event, queue_stop_reply_callback): Assert we're
11073 not pushing a TARGET_WAITKIND_IGNORE event.
11074 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11075 (myresume, handle_target_event): Set the thread's last_resume_kind
11076 and last_status from the target returned status.
11077
11078 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11079
11080 PR threads/10729
11081
11082 * linux-x86-low.c (update_debug_registers_callback): New.
11083 (i386_dr_low_set_addr): Use it.
11084 (i386_dr_low_get_addr): New.
11085 (i386_dr_low_set_control): Use update_debug_registers_callback.
11086 (i386_dr_low_get_control): New.
11087 (i386_dr_low_get_status): Adjust.
11088 * linux-low.c (linux_stop_lwp): New.
11089 * linux-low.h (linux_stop_lwp): Declare.
11090
11091 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11092 argument instead of a i386_debug_reg_state.
11093 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11094 a i386_debug_reg_state.
11095 (i386_insert_aligned_watchpoint): Adjust.
11096 (i386_remove_aligned_watchpoint): Adjust.
11097 (i386_low_stopped_data_address): Read the debug registers from the
11098 inferior instead of from the mirrors.
11099 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11100 (i386_dr_low_get_addr): Declare.
11101 (i386_dr_low_get_control): Declare.
11102 (i386_dr_low_get_status): Change prototype.
11103
11104 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11105 (i386_dr_low_get_addr): New.
11106 (i386_dr_low_get_control): New.
11107 (i386_dr_low_get_status): Adjust prototype. Return
11108 dr_status_mirror.
11109 (i386_initial_stuff): Clear dr_status_mirror and
11110 dr_control_mirror.
11111 (i386_get_thread_context): Adjust.
11112 (i386_set_thread_context): Adjust.
11113 (i386_thread_added): Adjust.
11114
11115 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11116
11117 * linux-low.h (linux_thread_area): Delete declaration.
11118
11119 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11120
11121 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11122 after its termination.
11123
11124 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11125
11126 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11127 (gdb_wants_all_stopped): Delete.
11128 (linux_wait_1): Don't call them.
11129 * server.c (handle_v_cont): Tag all threads as want-stopped.
11130 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11131 stopped as "client-wants-stopped".
11132
11133 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11134
11135 * Makefile.in (signals_h): New.
11136 (server_h): Depend on it.
11137 (server.o): Don't depend on $(signals_def).
11138 (signals.o): Depend on $(signals_def).
11139
11140 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11141
11142 * Makefile.in (signals_def): New.
11143 (server_h): Append include/gdb/signals.h and signals_def.
11144 (server.o): Append signals_def.
11145
11146 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11147
11148 * server.c (handle_target_event): Use target_signal_to_host for
11149 resume_info.sig initialization.
11150 * target.h (struct thread_resume) <sig>: New comment.
11151
11152 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11153
11154 * server.c (handle_query): strcpy() the returned string from paddress()
11155 instead of sprintf().
11156 * utils.c (paddress): Return phex_nz().
11157
11158 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11159
11160 * server.c (handle_v_cont): Call mourn_inferior if process
11161 just exited.
11162 (myresume): Likewise.
11163
11164 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11165
11166 Static tracepoints, and integration with UST.
11167
11168 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11169 * mem-break.c (uninsert_all_breakpoints)
11170 (reinsert_all_breakpoints): New.
11171 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11172 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11173 (gdb_agent_ust_loaded, helper_thread_id)
11174 (gdb_agent_helper_thread_id): New macros.
11175 (struct ipa_sym_addresses): Add addr_ust_loaded,
11176 addr_helper_thread_id, addr_cmd_buf.
11177 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11178 (in_process_agent_loaded_ust): New.
11179 (write_e_ust_not_loaded): New.
11180 (maybe_write_ipa_ust_not_loaded): New.
11181 (struct collect_static_trace_data_action): New.
11182 (enum tracepoint_type) <static_tracepoint>: New.
11183 (struct tracepoint) <handle>: Mention static tracepoints.
11184 (struct static_tracepoint_ctx): New.
11185 (CMD_BUF_SIZE): New.
11186 (add_tracepoint_action): Handle static tracepoint actions.
11187 (unprobe_marker_at): New.
11188 (clear_installed_tracepoints): Handle static tracepoints.
11189 (cmd_qtdp): Handle static tracepoints.
11190 (probe_marker_at): New.
11191 (cmd_qtstart): Handle static tracepoints.
11192 (response_tracepoint): Handle static tracepoints.
11193 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11194 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11195 (get_context_regcache): Handle static tracepoints.
11196 (do_action_at_tracepoint): Handle static tracepoint actions.
11197 (traceframe_find_block_type): Handle static trace data blocks.
11198 (traceframe_read_sdata): New.
11199 (download_tracepoints): Download static tracepoint actions.
11200 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11201 (GDB_PROBE_NAME): New.
11202 (ust_ops): New.
11203 (GET_UST_SYM): New.
11204 (USTF): New.
11205 (dlsym_ust): New.
11206 (ust_marker_to_static_tracepoint): New.
11207 (gdb_probe): New.
11208 (collect_ust_data_at_tracepoint): New.
11209 (gdb_ust_probe): New.
11210 (UNIX_PATH_MAX, SOCK_DIR): New.
11211 (gdb_ust_connect_sync_socket): New.
11212 (resume_thread, stop_thread): New.
11213 (run_inferior_command): New.
11214 (init_named_socket): New.
11215 (gdb_ust_socket_init): New.
11216 (cstr_to_hexstr): New.
11217 (next_st): New.
11218 (first_marker, next_marker): New.
11219 (response_ust_marker): New.
11220 (cmd_qtfstm, cmd_qtsstm): New.
11221 (unprobe_marker_at, probe_marker_at): New.
11222 (cmd_qtstmat, gdb_ust_thread): New.
11223 (gdb_ust_init): New.
11224 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11225 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11226 (ST_REGENTRY): New.
11227 (x86_64_st_collect_regmap): New.
11228 (X86_64_NUM_ST_COLLECT_GREGS): New.
11229 (AMD64_RIP_REGNUM): New.
11230 (supply_static_tracepoint_registers): New.
11231 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11232 (ST_REGENTRY): New.
11233 (i386_st_collect_regmap): New.
11234 (i386_NUM_ST_COLLECT_GREGS): New.
11235 (supply_static_tracepoint_registers): New.
11236 * server.c (handle_query): Handle qXfer:statictrace:read.
11237 <qSupported>: Report support for StaticTracepoints, and
11238 qXfer:statictrace:read features.
11239 * server.h (traceframe_read_sdata)
11240 (supply_static_tracepoint_registers): Declare.
11241 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11242 (unpack_varlen_hex): Include in IPA build.
11243 * Makefile.in (ustlibs, ustinc): New.
11244 (IPA_OBJS): Add remote-utils-ipa.o.
11245 ($(IPA_LIB)): Link -ldl and -lpthread.
11246 (UST_CFLAGS): New.
11247 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11248 * config.in, configure: Regenerate.
11249
11250 2010-06-20 Ian Lance Taylor <iant@google.com>
11251 Pedro Alves <pedro@codesourcery.com>
11252
11253 * linux-x86-low.c (always_true): Delete.
11254 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11255 trying to fool the compiler with always_true.
11256
11257 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11258
11259 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11260 conditions in gdbserver.
11261
11262 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11263
11264 * spu-low.c (spu_read_memory): Wrap around local store limit.
11265 (spu_write_memory): Likewise.
11266
11267 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11268
11269 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11270 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11271 LONGEST uses.
11272 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11273 uses.
11274 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11275 uses with LONGEST uses.
11276
11277 2010-06-14 Stan Shebs <stan@codesourcery.com>
11278 Pedro Alves <pedro@codesourcery.com>
11279
11280 Bytecode compiler.
11281
11282 * linux-x86-low.c: Include limits.h.
11283 (add_insns): New.
11284 (always_true): New.
11285 (EMIT_ASM): New.
11286 (EMIT_ASM32): New.
11287 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11288 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11289 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11290 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11291 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11292 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11293 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11294 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11295 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11296 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11297 (amd64_emit_void_call_2): New.
11298 (amd64_emit_ops): New.
11299 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11300 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11301 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11302 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11303 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11304 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11305 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11306 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11307 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11308 (i386_emit_stack_adjust, i386_emit_int_call_1)
11309 (i386_emit_void_call_2): New.
11310 (i386_emit_ops): New.
11311 (x86_emit_ops): New.
11312 (the_low_target): Install x86_emit_ops.
11313 * server.h (struct emit_ops): New.
11314 (get_raw_reg_func_addr): Declare.
11315 (current_insn_ptr, emit_error): Declare.
11316 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11317 (set_trace_state_variable_value): New defines.
11318 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11319 addr_get_trace_state_variable_value and
11320 addr_set_trace_state_variable_value.
11321 (symbol_list): New fields for get_raw_reg,
11322 get_trace_state_variable_value and set_trace_state_variable_value.
11323 (condfn): New typedef.
11324 (struct tracepoint): New field `compiled_cond'.
11325 (do_action_at_tracepoint): Clear compiled_cond.
11326 (get_trace_state_variable_value, set_trace_state_variable_value):
11327 Export in the IPA.
11328 (condition_true_at_tracepoint): If there's a compiled condition,
11329 run that.
11330 (current_insn_ptr, emit_error): New globals.
11331 (struct bytecode_address): New.
11332 (get_raw_reg_func_addr): New.
11333 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11334 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11335 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11336 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11337 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11338 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11339 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11340 (compile_tracepoint_condition, compile_bytecodes): New.
11341 * target.h (emit_ops): Forward declare.
11342 (struct target_ops): New field emit_ops.
11343 (target_emit_ops): New.
11344 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11345 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11346 * linux-low.c (linux_emit_ops): New.
11347 (linux_target_ops): Install it.
11348 * linux-low.h (struct linux_target_ops): New field emit_ops.
11349
11350 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11351
11352 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11353 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11354
11355 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11356 Stan Shebs <stan@codesourcery.com>
11357
11358 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11359 (all): Depend on $(extra_libraries).
11360 (install-only): Install the IPA.
11361 (IPA_OBJS, IPA_LIB): New.
11362 (clean): Remove the IPA lib.
11363 (IPAGENT_CFLAGS): New.
11364 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11365 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11366 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11367 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11368 * configure.ac: Check for atomic builtins support in the compiler.
11369 (IPA_DEPFILES, extra_libraries): Define.
11370 * configure.srv (ipa_obj): Add description.
11371 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11372 (i[34567]86-*-linux*): Set ipa_obj.
11373 (x86_64-*-linux*): Set ipa_obj.
11374 * linux-low.c (stabilizing_threads): New.
11375 (supports_fast_tracepoints): New.
11376 (linux_detach): Stabilize threads before detaching.
11377 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11378 the lwp is either not stabilizing, or is moving out of a jump pad.
11379 (linux_fast_tracepoint_collecting): New.
11380 (maybe_move_out_of_jump_pad): New.
11381 (enqueue_one_deferred_signal): New.
11382 (dequeue_one_deferred_signal): New.
11383 (linux_wait_for_event_1): If moving out of a jump pad, defer
11384 pending signals to later.
11385 (linux_stabilize_threads): New.
11386 (linux_wait_1): Check if threads need moving out of jump pads, and
11387 do it if so.
11388 (stuck_in_jump_pad_callback): New.
11389 (move_out_of_jump_pad_callback): New.
11390 (lwp_running): New.
11391 (linux_resume_one_lwp): Handle moving out of jump pads.
11392 (linux_set_resume_request): Dequeue deferred signals.
11393 (need_step_over_p): Also step over fast tracepoint jumps.
11394 (start_step_over): Also uninsert fast tracepoint jumps.
11395 (finish_step_over): Also reinsert fast tracepoint jumps.
11396 (linux_install_fast_tracepoint_jump): New.
11397 (linux_target_ops): Install linux_stabilize_threads and
11398 linux_install_fast_tracepoint_jump_pad.
11399 * linux-low.h (linux_target_ops) <get_thread_area,
11400 install_fast_tracepoint_jump_pad>: New fields.
11401 (struct lwp_info) <collecting_fast_tracepoint,
11402 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11403 (linux_get_thread_area): Declare.
11404 * linux-x86-low.c (jump_insn): New.
11405 (x86_get_thread_area): New.
11406 (append_insns): New.
11407 (push_opcode): New.
11408 (amd64_install_fast_tracepoint_jump_pad): New.
11409 (i386_install_fast_tracepoint_jump_pad): New.
11410 (x86_install_fast_tracepoint_jump_pad): New.
11411 (the_low_target): Install x86_get_thread_area and
11412 x86_install_fast_tracepoint_jump_pad.
11413 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11414 (struct fast_tracepoint_jump): New.
11415 (fast_tracepoint_jump_insn): New.
11416 (fast_tracepoint_jump_shadow): New.
11417 (find_fast_tracepoint_jump_at): New.
11418 (fast_tracepoint_jump_here): New.
11419 (delete_fast_tracepoint_jump): New.
11420 (set_fast_tracepoint_jump): New.
11421 (uninsert_fast_tracepoint_jumps_at): New.
11422 (reinsert_fast_tracepoint_jumps_at): New.
11423 (set_breakpoint_at): Use write_inferior_memory.
11424 (uninsert_raw_breakpoint): Use write_inferior_memory.
11425 (check_mem_read): Mask out fast tracepoint jumps.
11426 (check_mem_write): Mask out fast tracepoint jumps.
11427 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11428 (set_fast_tracepoint_jump): Declare.
11429 (delete_fast_tracepoint_jump)
11430 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11431 (reinsert_fast_tracepoint_jumps_at): Declare.
11432 * regcache.c: Don't compile many functions when building the
11433 in-process agent library.
11434 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11435 the register buffer in the heap.
11436 (free_register_cache): If the register buffer isn't owned by the
11437 regcache, don't free it.
11438 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11439 pre-existing register caches.
11440 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11441 type.
11442 (convert_ascii_to_int): : Constify `from' parameter type.
11443 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11444 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11445 the needed buffer in-place.
11446 (relocate_instruction): New.
11447 * server.c (handle_query) <qSymbols>: If the target supports
11448 tracepoints, give it a chance of looking up symbols. Report
11449 support for fast tracepoints.
11450 (handle_status): Stabilize threads.
11451 (process_serial_event): Adjust.
11452 * server.h (struct fast_tracepoint_jump): Forward declare.
11453 (struct process_info) <fast_tracepoint_jumps>: New field.
11454 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11455 (decode_X_packet, decode_M_packet): Adjust.
11456 (relocate_instruction): Declare.
11457 (in_process_agent_loaded): Declare.
11458 (tracepoint_look_up_symbols): Declare.
11459 (struct fast_tpoint_collect_status): Declare.
11460 (fast_tracepoint_collecting): Declare.
11461 (force_unlock_trace_buffer): Declare.
11462 (handle_tracepoint_bkpts): Declare.
11463 (initialize_low_tracepoint)
11464 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11465 * target.h (struct target_ops) <stabilize_threads,
11466 install_fast_tracepoint_jump_pad>: New fields.
11467 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11468 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11469 [HAVE_STDINT_H]: Include stdint.h.
11470 (trace_debug_1): Rename to ...
11471 (trace_vdebug): ... this.
11472 (trace_debug): Rename to ...
11473 (trace_debug_1): ... this. Add `level' parameter.
11474 (trace_debug): New.
11475 (ATTR_USED, ATTR_NOINLINE): New.
11476 (IP_AGENT_EXPORT): New.
11477 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11478 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11479 (about_to_request_buffer_space, trace_buffer_is_full)
11480 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11481 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11482 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11483 (traceframe_write_count, traceframes_created)
11484 (trace_state_variables)
11485 New renaming defines.
11486 (struct ipa_sym_addresses): New.
11487 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11488 (symbol_list): New.
11489 (ipa_sym_addrs): New.
11490 (all_tracepoint_symbols_looked_up): New.
11491 (in_process_agent_loaded): New.
11492 (write_e_ipa_not_loaded): New.
11493 (maybe_write_ipa_not_loaded): New.
11494 (tracepoint_look_up_symbols): New.
11495 (debug_threads) [IN_PROCESS_AGENT]: New.
11496 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11497 (UNKNOWN_SIDE_EFFECTS): New.
11498 (stop_tracing): New.
11499 (flush_trace_buffer): New.
11500 (stop_tracing_bkpt): New.
11501 (flush_trace_buffer_bkpt): New.
11502 (read_inferior_integer): New.
11503 (read_inferior_uinteger): New.
11504 (read_inferior_data_pointer): New.
11505 (write_inferior_data_pointer): New.
11506 (write_inferior_integer): New.
11507 (write_inferior_uinteger): New.
11508 (struct collect_static_trace_data_action): Delete.
11509 (enum tracepoint_type): New.
11510 (struct tracepoint) <type>: New field `type'.
11511 <actions_str, step_actions, step_actions_str>: Only include in
11512 GDBserver.
11513 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11514 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11515 (tracepoints): Use IP_AGENT_EXPORT.
11516 (last_tracepoint): Don't include in the IPA.
11517 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11518 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11519 (alloced_trace_state_variables): New.
11520 (trace_state_variables): Use IP_AGENT_EXPORT.
11521 (traceframe_t): Delete unused variable.
11522 (circular_trace_buffer): Don't include in the IPA.
11523 (trace_buffer_start): Delete.
11524 (struct trace_buffer_control): New.
11525 (trace_buffer_free): Delete.
11526 (struct ipa_trace_buffer_control): New.
11527 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11528 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11529 New.
11530 (trace_buffer_ctrl): New.
11531 (TRACE_BUFFER_CTRL_CURR): New.
11532 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11533 Reimplement as macros.
11534 (trace_buffer_wrap): Delete.
11535 (traceframe_write_count, traceframe_read_count)
11536 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11537 (struct tracepoint_hit_ctx) <type>: New field.
11538 (struct fast_tracepoint_ctx): New.
11539 (memory_barrier): New.
11540 (cmpxchg): New.
11541 (record_tracepoint_error): Update atomically in the IPA.
11542 (clear_inferior_trace_buffer): New.
11543 (about_to_request_buffer_space): New.
11544 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11545 updating the same buffer.
11546 (add_tracepoint): Default the tracepoint's type to trap
11547 tracepoint, and orig_size to -1.
11548 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11549 internal variables.
11550 (create_trace_state_variable): New parameter `gdb'. Handle it.
11551 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11552 (cmd_qtdp): Handle fast tracepoints.
11553 (cmd_qtdv): Adjust.
11554 (max_jump_pad_size): New.
11555 (gdb_jump_pad_head): New.
11556 (get_jump_space_head): New.
11557 (claim_jump_space): New.
11558 (sort_tracepoints): New.
11559 (MAX_JUMP_SIZE): New.
11560 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11561 IPA.
11562 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11563 support. Upload fast traceframes, and delete internal IPA
11564 breakpoints.
11565 (stop_tracing_handler): New.
11566 (flush_trace_buffer_handler): New.
11567 (cmd_qtstop): Upload fast tracepoints.
11568 (response_tracepoint): Handle fast tracepoints.
11569 (tracepoint_finished_step): Upload fast traceframes. Set the
11570 tracepoint hit context's tracepoint type.
11571 (handle_tracepoint_bkpts): New.
11572 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11573 type. Add comment about fast tracepoints.
11574 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11575 non-existing action_str field.
11576 (get_context_regcache): Handle fast tracepoints.
11577 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11578 to the regcache.
11579 (fast_tracepoint_from_jump_pad_address): New.
11580 (fast_tracepoint_from_ipa_tpoint_address): New.
11581 (collecting_t): New.
11582 (force_unlock_trace_buffer): New.
11583 (fast_tracepoint_collecting): New.
11584 (collecting): New.
11585 (gdb_collect): New.
11586 (write_inferior_data_ptr): New.
11587 (target_tp_heap): New.
11588 (target_malloc): New.
11589 (download_agent_expr): New.
11590 (UALIGN): New.
11591 (download_tracepoints): New.
11592 (download_trace_state_variables): New.
11593 (upload_fast_traceframes): New.
11594 (IPA_FIRST_TRACEFRAME): New.
11595 (IPA_NEXT_TRACEFRAME_1): New.
11596 (IPA_NEXT_TRACEFRAME): New.
11597 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11598 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11599 (gdb_jump_pad_buffer_end): New.
11600 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11601 (initialize_tracepoint): Adjust.
11602 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11603 buffer. Initialize the low module.
11604 * utils.c (PREFIX, TOOLNAME): New.
11605 (malloc_failure): Use PREFIX.
11606 (error): In the IPA, an error causes an exit.
11607 (fatal, warning): Use PREFIX.
11608 (internal_error): Use TOOLNAME.
11609 (NUMCELLS): Increase to 10.
11610 * configure, config.in: Regenerate.
11611
11612 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11613
11614 * server.c (handle_query) <qSupported>: Do two passes over the
11615 qSupported string to avoid nesting strtok.
11616
11617 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11618
11619 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11620 (CDEPS): New.
11621 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11622 -Wl,--dynamic-list.
11623 * configure: Regenerate.
11624 * proc-service.list: New.
11625
11626 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11627
11628 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11629 New comment.
11630
11631 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11632
11633 * gdbreplay.c (remote_open): Check error return from socket() call by
11634 its equality to -1 not by it being negative.
11635 * remote-utils.c (remote_open): Likewise.
11636
11637 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11638
11639 * config.h: Regenerate.
11640
11641 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11642
11643 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11644 doesn't provide PTRACE_GET_THREAD_AREA.
11645
11646 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11647
11648 * linux-m68k-low.c: Include <asm/ptrace.h>
11649 (ps_get_thread_area): Implement.
11650
11651 2010-05-03 Doug Evans <dje@google.com>
11652
11653 * event-loop.c (struct callback_event): New struct.
11654 (callback_list): New global.
11655 (append_callback_event, delete_callback_event): New functions.
11656 (process_callback): New function.
11657 (start_event_loop): Call it.
11658 * remote-utils.c (NOT_SCHEDULED): Define.
11659 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11660 moved out of readchar.
11661 (readchar): Rewrite. Call reschedule before returning.
11662 (reset_readchar): New function.
11663 (remote_close): Call it.
11664 (process_remaining, reschedule): New functions.
11665 * server.h (callback_handler_func): New typedef.
11666 (append_callback_event, delete_callback_event): Declare.
11667
11668 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11669
11670 * proc-service.c (ps_pglobal_lookup): Use
11671 thread_db_look_up_one_symbol.
11672 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11673 parameter. Use it instead of all_symbols_looked_up.
11674 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11675 field.
11676 (all_symbols_looked_up): Don't declare.
11677 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11678 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11679 field.
11680 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11681 Set all_symbols_looked_up here.
11682 (thread_db_look_up_one_symbol): New.
11683 (thread_db_get_tls_address): Adjust.
11684 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11685 thread_db object on the heap, and tentatively set it in the
11686 process structure.
11687 (thread_db_init): Don't set all_symbols_looked_up here.
11688 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11689
11690 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11691
11692 * linux-low.c (linux_kill, linux_detach): Adjust.
11693 (status_pending_p_callback): Remove redundant statement. Check
11694 for !TARGET_WAITIKIND_IGNORE, instead of
11695 TARGET_WAITKIND_STOPPED.
11696 (handle_tracepoints): Make sure LWP is locked. Adjust.
11697 (linux_wait_for_event_1): Adjust.
11698 (linux_cancel_breakpoints): New.
11699 (unsuspend_one_lwp): New.
11700 (unsuspend_all_lwps): New.
11701 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11702 (send_sigstop_callback): Change return type to int, add new
11703 `except' parameter and handle it.
11704 (suspend_and_send_sigstop_callback): New.
11705 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11706 pass them down. If SUSPEND, also increment the lwp's suspend
11707 count.
11708 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11709 (need_step_over_p): Don't consider suspended LWPs.
11710 (start_step_over): Adjust.
11711 (proceed_one_lwp): Change return type to int, add new `except'
11712 parameter and handle it.
11713 (unsuspend_and_proceed_one_lwp): New.
11714 (proceed_all_lwps): Use find_inferior instead of
11715 for_each_inferior.
11716 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11717 also decrement the suspend count of LWPs. Pass `except' down,
11718 instead of hacking its suspend count.
11719 (linux_pause_all): Add `freeze' parameter. Adjust.
11720 (linux_unpause_all): New.
11721 (linux_target_ops): Install linux_unpause_all.
11722 * server.c (handle_status): Adjust.
11723 * target.h (struct target_ops): New fields `unpause_all' and
11724 `cancel_breakpoints'. Add new parameter to `pause_all'.
11725 (pause_all): Add new `freeze' parameter.
11726 (unpause_all): New.
11727 (cancel_breakpoints): New.
11728 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11729 cancel breakpoints.
11730 (cmd_qtstart): Pause threads.
11731 (stop_tracing): Pause threads, and cancel breakpoints.
11732 * win32-low.c (win32_target_ops): Adjust.
11733
11734 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11735
11736 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11737 the inferior right away from here...
11738 (linux_wait_1): ... to here, and adjust to check the thread's
11739 last_resume_kind instead of the lwp's step or stop_expected flags.
11740
11741 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11742
11743 * README: Use consistent `GDB' and `GDBserver' spellings.
11744
11745 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11746
11747 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11748 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11749 (linux_detach_one_lwp): Assume the lwp is stopped.
11750 (any_thread_of): Delete.
11751 (linux_detach): Stop all lwps here. Don't blindly delete all
11752 breakpoints.
11753 (delete_lwp_callback): New.
11754 (linux_mourn): Delete all lwps of the process that is gone.
11755 (linux_wait_1): Don't delete the last lwp of the process here.
11756 * mem-break.h (mark_breakpoints_out): Declare.
11757 * mem-break.c (mark_breakpoints_out): New.
11758 (free_all_breakpoints): Use it.
11759 * server.c (handle_target_event): If the process is gone, mark
11760 breakpoints out.
11761 * thread-db.c (struct thread_db) <create_bp>: New field.
11762 (thread_db_enable_reporting): Fix prototype. Store a thread event
11763 breakpoint reference in the thread_db struct.
11764 (thread_db_load_search): Clear the thread_db object.
11765 (try_thread_db_load_1): Ditto.
11766 (switch_to_process): New.
11767 (disable_thread_event_reporting): Use it.
11768 (remove_thread_event_breakpoints): New.
11769 (thread_db_detach, thread_db_mourn): Use it.
11770
11771 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11772
11773 * linux-low.c (linux_enable_event_reporting): New.
11774 (linux_wait_for_event_1, handle_extended_wait): Use it.
11775
11776 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11777
11778 * linux-low.c (linux_kill_one_lwp, linux_kill)
11779 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11780 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11781 SIGSTOP even if the LWP is stopped.
11782 (send_sigstop_callback): New.
11783 (stop_all_lwps): Use send_sigstop_callback instead.
11784 (linux_resume_one_thread): Adjust.
11785 (proceed_one_lwp): Still proceed an LWP that the client has
11786 requested to stop, if we haven't reported it as stopped yet. Make
11787 sure that LWPs the client want stopped, have a pending SIGSTOP.
11788
11789 2010-04-26 Doug Evans <dje@google.com>
11790
11791 * server.c (handle_general_set): Make static.
11792
11793 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11794 Print received char after testing for error/eof instead of before.
11795 (input_interrupt): Tweak comment.
11796
11797 2010-04-23 Doug Evans <dje@google.com>
11798
11799 * server.c (start_inferior): Print inferior argv if --debug.
11800
11801 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11802
11803 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11804 * nto-x86-low.c: Include server.h
11805
11806 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11807
11808 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11809 be consistent with other sources of this directory.
11810 (init_registers_amd64): Correct name of source file of this function
11811 in the comment.
11812
11813 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11814
11815 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11816 64-bit executables.
11817
11818 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11819
11820 * win32-i386-low.c: Add 64-bit support.
11821 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11822 (init_registers_amd64): Declare.
11823 (mappings): Add 64-bit version of array.
11824 (init_windows_x86): New function.
11825 (the_low_target): Change init_arch field to init_windows_x86.
11826
11827 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11828
11829 * win32-low.c: Adapt to support also 64-bit architecture.
11830 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11831 (get_image_name): Use SIZE_T type for local variable `done'.
11832 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11833 (toolhelp_get_dll_name): Idem.
11834 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11835 Use uintptr_t typecast to avoid warning.
11836 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11837 (handle_exception): Use phex_nz to avoid warning.
11838 (win32_wait): Remove unused local variable `process'.
11839
11840 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11841
11842 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11843 `amd64-avx.o'.
11844
11845 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11846
11847 * configure.ac: Use `ws2_32' library for srv_mingw.
11848 * configure: Regenerate.
11849 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11850 * remote-utils.c: Likewise.
11851
11852 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11853
11854 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11855 if __x86_64__ is defined.
11856
11857 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11858
11859 * configure: Regenerate.
11860
11861 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11862
11863 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11864 * target.h (target_ops): New get_tib_address field.
11865 * win32-low.h (win32_thread_info): Add thread_local_base field.
11866 * win32-low.c (child_add_thread): Add tlb argument.
11867 Set thread_local_base field to TLB.
11868 (get_child_debug_event): Adapt to child_add_thread change.
11869 (win32_get_tib_address): New function.
11870 (win32_target_ops): Set get_tib_address field to
11871 win32_get_tib_address.
11872 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11873
11874 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11875
11876 * linux-low.c (linux_mourn): Also remove the process.
11877 * server.c (handle_target_event): Don't remove the process here.
11878 * nto-low.c (nto_mourn): New.
11879 (nto_target_ops): Install it.
11880 * spu-low.c (spu_mourn): New.
11881 (spu_target_ops): Install it.
11882 * win32-low.c (win32_mourn): New.
11883 (win32_target_ops): Install it.
11884
11885 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11886
11887 * server.h (buffer_xml_printf): Remove redundant `;'.
11888
11889 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11890
11891 * regcache.c (set_register_cache): Invalidate regcaches before
11892 changing the register cache layout.
11893 (regcache_invalidate_one): Allow a NULL regcache.
11894 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11895 regcaches before changing the register cache layout or the target
11896 regsets.
11897
11898 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11899
11900 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11901 variable warning on Linux/x86-64.
11902
11903 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11904
11905 GDBserver disconnected tracing support.
11906
11907 * linux-low.c (linux_remove_process): Delete.
11908 (add_lwp): Don't set last_resume_kind here.
11909 (linux_kill): Use `mourn'.
11910 (linux_detach): Use `thread_db_detach', and `mourn'.
11911 (linux_mourn): New.
11912 (linux_attach_lwp_1): Adjust comment.
11913 (linux_attach): last_resume_kind moved the thread_info; adjust.
11914 (status_pending_p_callback): Adjust.
11915 (linux_wait_for_event_1): Adjust.
11916 (count_events_callback, select_singlestep_lwp_callback)
11917 (select_event_lwp_callback, cancel_breakpoints_callback)
11918 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11919 (proceed_one_lwp): Adjust.
11920 (linux_async): Add debug output.
11921 (linux_thread_stopped): New.
11922 (linux_pause_all): New.
11923 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11924 linux_pause_all.
11925 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11926 (thread_db_free): Delete declaration.
11927 (thread_db_detach, thread_db_mourn): Declare.
11928 * thread-db.c (thread_db_init): Use thread_db_mourn.
11929 (thread_db_free): Delete, split in two.
11930 (disable_thread_event_reporting): New.
11931 (thread_db_detach): New.
11932 (thread_db_mourn): New.
11933
11934 * server.h (struct thread_info) <last_resume_kind>: New field.
11935 <attached>: Add comment.
11936 <gdb_detached>: New field.
11937 (handler_func): Change return type to int.
11938 (handle_serial_event, handle_target_event): Ditto.
11939 (gdb_connected): Declare.
11940 (tracing): Delete.
11941 (disconnected_tracing): Declare.
11942 (stop_tracing): Declare.
11943
11944 * server.c (handle_query) <qSupported>: Report support for
11945 disconnected tracing.
11946 (queue_stop_reply_callback): Account for running threads.
11947 (gdb_wants_thread_stopped): New.
11948 (gdb_wants_all_threads_stopped): New.
11949 (gdb_reattached_process): New.
11950 (handle_status): Clear the `gdb_detached' flag of all processes.
11951 In all-stop, stop all threads.
11952 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11953 (process_serial_event): If the remote connection breaks, or if an
11954 exit was forced with "monitor exit", force an event loop exit.
11955 Handle disconnected tracing on detach.
11956 (handle_serial_event): Adjust.
11957 (handle_target_event): If GDB isn't connected, forward events back
11958 to the inferior, unless the last process exited, in which case,
11959 exit gdbserver. Adjust interface.
11960
11961 * remote-utils.c (remote_open): Don't block in accept. Instead
11962 register an event loop source on the listen socket file
11963 descriptor. Refactor bits into ...
11964 (listen_desc): ... this new global.
11965 (gdb_connected): ... this new function.
11966 (enable_async_notification): ... this new function.
11967 (handle_accept_event): ... this new function.
11968 (remote_close): Clear remote_desc.
11969
11970 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11971
11972 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11973 New fields.
11974 (mourn_inferior): Define.
11975 (target_process_qsupported): Avoid the dangling else problem.
11976 (thread_stopped): Define.
11977 (pause_all): Define.
11978 (target_waitstatus_to_string): Declare.
11979 * target.c (target_waitstatus_to_string): New.
11980
11981 * tracepoint.c (tracing): Make extern.
11982 (disconnected_tracing): New.
11983 (stop_tracing): Make extern. Handle tracing stops due to GDB
11984 disconnecting.
11985 (cmd_qtdisconnected): New.
11986 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11987 (handle_tracepoint_general_set): Handle QTDisconnected.
11988
11989 * event-loop.c (event_handler_func): Change return type to int.
11990 (process_event): Bail out if the event handler wants the event
11991 loop to stop.
11992 (handle_file_event): Ditto.
11993 (start_event_loop): Bail out if the event handler wants the event
11994 loop to stop.
11995
11996 * nto-low.c (nto_target_ops): Adjust.
11997 * spu-low.c (spu_wait): Don't remove the process here.
11998 (spu_target_ops): Adjust.
11999 * win32-low.c (win32_wait): Don't remove the process here.
12000 (win32_target_ops): Adjust.
12001
12002 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12003
12004 * regcache.c (realloc_register_cache): Invalidate inferior's
12005 regcache before recreating it.
12006
12007 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12008
12009 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12010
12011 2010-04-09 Stan Shebs <stan@codesourcery.com>
12012 Pedro Alves <pedro@codesourcery.com>
12013
12014 * server.h (LONGEST): New.
12015 (struct thread_info) <while_stepping>: New field.
12016 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12017 Declare.
12018 (initialize_tracepoint, handle_tracepoint_general_set)
12019 (handle_tracepoint_query, tracepoint_finished_step)
12020 (tracepoint_was_hit, release_while_stepping_state_list):
12021 (current_traceframe): Declare.
12022 * server.c (handle_general_set): Handle tracepoint packets.
12023 (read_memory): New.
12024 (write_memory): New.
12025 (handle_search_memory_1): Use read_memory.
12026 (handle_query): Report support for conditional tracepoints, trace
12027 state variables, and tracepoint sources. Handle tracepoint
12028 queries.
12029 (main): Initialize the tracepoints module.
12030 (process_serial_event): Handle traceframe reads/writes.
12031
12032 * linux-low.c (handle_tracepoints): New.
12033 (linux_wait_1): Call it.
12034 (linux_resume_one_lwp): Handle while-stepping.
12035 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12036 (linux_target_ops): Install them.
12037 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12038 New field.
12039 * linux-x86-low.c (x86_supports_tracepoints): New.
12040 (the_low_target). Install it.
12041
12042 * mem-break.h (delete_breakpoint): Declare.
12043 * mem-break.c (delete_breakpoint): Make external.
12044
12045 * target.h (struct target_ops): Add `supports_tracepoints',
12046 `read_pc', and `write_pc' fields.
12047 (target_supports_tracepoints): Define.
12048 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12049 (phex_nz): New.
12050
12051 * regcache.h (struct regcache) <registers_owned>: New field.
12052 (init_register_cache, regcache_cpy): Declare.
12053 (regcache_read_pc, regcache_write_pc): Declare.
12054 (register_cache_size): Declare.
12055 (supply_regblock): Declare.
12056 * regcache.c (init_register_cache): New.
12057 (new_register_cache): Use it.
12058 (regcache_cpy): New.
12059 (register_cache_size): New.
12060 (supply_regblock): New.
12061 (regcache_read_pc, regcache_write_pc): New.
12062
12063 * tracepoint.c: New.
12064
12065 * Makefile.in (OBS): Add tracepoint.o.
12066 (tracepoint.o): New rule.
12067
12068 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12069
12070 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12071 (i386-mmx.o): New.
12072 (i386-mmx.c): Likewise.
12073 (i386-mmx-linux.o): Likewise.
12074 (i386-mmx-linux.c): Likewise.
12075
12076 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12077 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12078 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12079 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12080
12081 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12082 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12083 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12084
12085 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12086
12087 * Makefile.in (clean): Updated.
12088 (i386-avx.o): New.
12089 (i386-avx.c): Likewise.
12090 (i386-avx-linux.o): Likewise.
12091 (i386-avx-linux.c): Likewise.
12092 (amd64-avx.o): Likewise.
12093 (amd64-avx.c): Likewise.
12094 (amd64-avx-linux.o): Likewise.
12095 (amd64-avx-linux.c): Likewise.
12096
12097 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12098 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12099 (srv_amd64_regobj): Add amd64-avx.o.
12100 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12101 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12102 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12103 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12104 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12105 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12106 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12107
12108 * i387-fp.c: Include "i386-xstate.h".
12109 (i387_xsave): New.
12110 (i387_cache_to_xsave): Likewise.
12111 (i387_xsave_to_cache): Likewise.
12112 (x86_xcr0): Likewise.
12113
12114 * i387-fp.h (i387_cache_to_xsave): Likewise.
12115 (i387_xsave_to_cache): Likewise.
12116 (x86_xcr0): Likewise.
12117
12118 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12119 * linux-crisv32-low.c (target_regsets): Likewise.
12120 * linux-m68k-low.c (target_regsets): Likewise.
12121 * linux-mips-low.c (target_regsets): Likewise.
12122 * linux-ppc-low.c (target_regsets): Likewise.
12123 * linux-s390-low.c (target_regsets): Likewise.
12124 * linux-sh-low.c (target_regsets): Likewise.
12125 * linux-sparc-low.c (target_regsets): Likewise.
12126 * linux-xtensa-low.c (target_regsets): Likewise.
12127
12128 * linux-low.c: Include <sys/uio.h>.
12129 (regsets_fetch_inferior_registers): Support nt_type.
12130 (regsets_store_inferior_registers): Likewise.
12131 (linux_process_qsupported): New.
12132 (linux_target_ops): Add linux_process_qsupported.
12133
12134 * linux-low.h (regset_info): Add nt_type.
12135 (linux_target_ops): Add process_qsupported.
12136
12137 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12138 and <sys/uio.h>.
12139 (init_registers_i386_avx_linux): New.
12140 (init_registers_amd64_avx_linux): Likewise.
12141 (xmltarget_i386_linux_no_xml): Likewise.
12142 (xmltarget_amd64_linux_no_xml): Likewise.
12143 (PTRACE_GETREGSET): Likewise.
12144 (PTRACE_SETREGSET): Likewise.
12145 (x86_fill_xstateregset): Likewise.
12146 (x86_store_xstateregset): Likewise.
12147 (use_xml): Likewise.
12148 (x86_linux_update_xmltarget): Likewise.
12149 (x86_linux_process_qsupported): Likewise.
12150 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12151 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12152 init_registers_i386_linux here. Call
12153 x86_linux_update_xmltarget.
12154 (the_low_target): Add x86_linux_process_qsupported.
12155
12156 * server.c (handle_query): Call target_process_qsupported.
12157
12158 * target.h (target_ops): Add process_qsupported.
12159 (target_process_qsupported): New.
12160
12161 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12162
12163 * inferiors.c (add_thread): Set last_status kind to
12164 TARGET_WAITKIND_IGNORE.
12165 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12166 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12167 (linux_wait_1): Move `thread' local definition to block that uses
12168 it. Don't NULL initialize `event_child'.
12169 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12170 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12171 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12172
12173 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12174
12175 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12176 an extended waitstatus, or by a watchpoint.
12177 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12178 thread was stepping or has been stopped by a watchpoint.
12179
12180 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12181
12182 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12183 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12184 of another, then delete the previous, and validate all
12185 breakpoints.
12186 (validate_inserted_breakpoint): New.
12187 (delete_disabled_breakpoints): New.
12188 (validate_breakpoints): New.
12189 (check_mem_read): Validate breakpoints before trusting their
12190 shadow. Delete disabled breakpoints.
12191 (check_mem_write): Validate breakpoints before trusting they
12192 should be inserted. Delete disabled breakpoints.
12193 * mem-break.h (validate_breakpoints):
12194 * server.c (handle_query): Validate breakpoints when we see a
12195 qSymbol query.
12196
12197 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12198
12199 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12200 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12201 if we could tell there's a GDB breakpoint at stop_pc.
12202 (need_step_over_p): Don't do a step over if we find a GDB
12203 breakpoint at the resume PC.
12204
12205 * mem-break.c (struct raw_breakpoint): New.
12206 (enum bkpt_type): New type `gdb_breakpoint'.
12207 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12208 fields. New field `raw'.
12209 (find_raw_breakpoint_at): New.
12210 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12211 breakpoint instead.
12212 (set_breakpoint_at): Adjust.
12213 (delete_raw_breakpoint): New.
12214 (release_breakpoint): New.
12215 (delete_breakpoint): Rename to...
12216 (delete_breakpoint_1): ... this. Add proc parameter. Use
12217 release_breakpoint. Return ENOENT.
12218 (delete_breakpoint): Reimplement.
12219 (find_breakpoint_at): Delete.
12220 (find_gdb_breakpoint_at): New.
12221 (delete_breakpoint_at): Delete.
12222 (set_gdb_breakpoint_at): New.
12223 (delete_gdb_breakpoint_at): New.
12224 (gdb_breakpoint_here): New.
12225 (set_reinsert_breakpoint): Use release_breakpoint.
12226 (uninsert_breakpoint): Rename to ...
12227 (uninsert_raw_breakpoint): ... this.
12228 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12229 (reinsert_raw_breakpoint): Change parameter type to
12230 raw_breakpoint.
12231 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12232 instead.
12233 (check_breakpoints): Adjust. Use release_breakpoint.
12234 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12235 (breakpoint_inserted_here): Ditto.
12236 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12237 Don't trust the breakpoint's shadow if it is not inserted.
12238 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12239 (delete_all_breakpoints): Adjust.
12240 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12241 use delete_breakpoint_1.
12242
12243 * mem-break.h (breakpoints_supported): Delete declaration.
12244 (set_gdb_breakpoint_at): Declare.
12245 (gdb_breakpoint_here): Declare.
12246 (delete_breakpoint_at): Delete.
12247 (delete_gdb_breakpoint_at): Declare.
12248
12249 * server.h (struct raw_breakpoint): Forward declare.
12250 (struct process_info): New field `raw_breakpoints'.
12251
12252 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12253 breakpoints.
12254
12255 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12256
12257 * linux-low.c (status_pending_p_callback): Fix comment.
12258 (linux_wait_for_event_1): Move most of the internal breakpoint
12259 handling from here...
12260 (linux_wait_1): ... to here.
12261 (count_events_callback): New.
12262 (select_singlestep_lwp_callback): New.
12263 (select_event_lwp_callback): New.
12264 (cancel_breakpoints_callback): New.
12265 (select_event_lwp): New.
12266 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12267 priority to all LWPs that have had events that should be reported
12268 to the client. Cancel breakpoints when about to reporting the
12269 event to the client, not while stopping lwps. No longer cancel
12270 finished single-steps here.
12271 (cancel_finished_single_step): Delete.
12272 (cancel_finished_single_steps): Delete.
12273
12274 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12275
12276 * mem-break.c (enum bkpt_type): New.
12277 (struct breakpoint): New field `type'.
12278 (set_breakpoint_at): Change return type to struct breakpoint
12279 pointer. Set type to `other_breakpoint' by default.
12280 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12281 in the breakpoint list.
12282 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12283 (reinsert_breakpoint): Rename to ...
12284 (reinsert_raw_breakpoint): ... this.
12285 (reinsert_breakpoints_at): Adjust.
12286 * mem-break.h (struct breakpoint): Declare.
12287 (set_breakpoint_at): Change return type to struct breakpoint
12288 pointer.
12289
12290 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12291
12292 * server.c (handle_query): Assign, not compare.
12293
12294 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12295
12296 Teach linux gdbserver to step-over-breakpoints.
12297
12298 * linux-low.c (can_hardware_single_step): New.
12299 (supports_breakpoints): New.
12300 (handle_extended_wait): If stopping threads, read the stop pc of
12301 the new cloned LWP.
12302 (get_pc): New.
12303 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12304 low target doesn't support retrieving the PC.
12305 (add_lwp): Set last_resume_kind to resume_continue.
12306 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12307 (linux_attach): Don't clear stop_expected. Set the lwp's
12308 last_resume_kind to resume_stop.
12309 (linux_detach_one_lwp): Don't check for removed breakpoints.
12310 (check_removed_breakpoint): Delete.
12311 (status_pending_p): Rename to ...
12312 (status_pending_p_callback): ... this. Don't check for removed
12313 breakpoints. Don't consider threads that are stopped from GDB's
12314 perspective.
12315 (linux_wait_for_lwp): Always read the stop_pc here.
12316 (cancel_breakpoint): New.
12317 (step_over_bkpt): New global.
12318 (linux_wait_for_event_1): Implement stepping over breakpoints.
12319 (gdb_wants_lwp_stopped): New.
12320 (gdb_wants_all_stopped): New.
12321 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12322 single-step traps here. Store the thread's last reported target
12323 wait status.
12324 (send_sigstop): Don't clear stop_expected. Always set it,
12325 instead.
12326 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12327 (cancel_finished_single_step): New.
12328 (cancel_finished_single_steps): New.
12329 (wait_for_sigstop): Don't cancel finished single-step traps here.
12330 (linux_resume_one_lwp): Don't check for removed breakpoints.
12331 Don't set `step' on non-hardware step archs.
12332 (linux_set_resume_request): Ignore resume_stop requests if already
12333 stopping or stopped. Set the lwp's last_resume_kind.
12334 (resume_status_pending_p): Don't check for removed breakpoints.
12335 (need_step_over_p): New.
12336 (start_step_over): New.
12337 (finish_step_over): New.
12338 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12339 requests. Clear the thread's last reported target waitstatus.
12340 Don't use the `suspended' flag. Don't consider pending breakpoints.
12341 (linux_resume): Start a step-over if necessary.
12342 (proceed_one_lwp): New.
12343 (proceed_all_lwps): New.
12344 (unstop_all_lwps): New.
12345 * linux-low.h (struct lwp_info): Rewrite comment for the
12346 `suspended' flag. Add the `stop_pc' field. Delete the
12347 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12348 Add `'last_resume_kind' and `need_step_over' fields.
12349 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12350 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12351 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12352 (set_raw_breakpoint_at): New.
12353 (set_breakpoint_at): Rewrite to use it.
12354 (reinsert_breakpoint_handler): Delete.
12355 (set_reinsert_breakpoint): New.
12356 (reinsert_breakpoint_by_bp): Delete.
12357 (delete_reinsert_breakpoints): New.
12358 (uninsert_breakpoint): Rewrite.
12359 (uninsert_breakpoints_at): New.
12360 (reinsert_breakpoint): Rewrite.
12361 (reinsert_breakpoints_at): New.
12362 (check_breakpoints): Rewrite.
12363 (breakpoint_here): New.
12364 (breakpoint_inserted_here): New.
12365 (check_mem_read): Adjust.
12366 * mem-break.h (breakpoints_supported, breakpoint_here)
12367 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12368 (reinsert_breakpoint_by_bp): Delete declaration.
12369 (delete_reinsert_breakpoints): Declare.
12370 (reinsert_breakpoint): Delete declaration.
12371 (reinsert_breakpoints_at): Declare.
12372 (uninsert_breakpoint): Delete declaration.
12373 (uninsert_breakpoints_at): Declare.
12374 (check_breakpoints): Adjust prototype.
12375 * server.h: Adjust include order.
12376 (struct thread_info): Declare here. Add a `last_status' field.
12377
12378 2010-03-23 Michael Snyder <msnyder@vmware.com>
12379
12380 * server.c (crc32): New function.
12381 (handle_query): Add handling for 'qCRC:' request.
12382
12383 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12384
12385 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12386 lwp had been stopped by a watchpoint.
12387
12388 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12389
12390 * server.h (internal_error): Declare.
12391 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12392 * utils.c (internal_error): New function.
12393
12394 2010-03-15 Andreas Schwab <schwab@redhat.com>
12395
12396 * configure.srv: Fix typo setting srv_regobj.
12397
12398 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12399
12400 * linux-low.c (fetch_register): Avoid passing a non string literal
12401 format to `error'.
12402 (usr_store_inferior_registers): Ditto.
12403
12404 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12405
12406 * linux-low.c (linux_write_memory): Bail out early if peeking
12407 memory failed.
12408
12409 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12410
12411 * linux-low.h (struct lwp_info): New fields
12412 `stopped_by_watchpoint' and `stopped_data_address'.
12413 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12414 here, and cache them in the lwp object.
12415 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12416 directly.
12417 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12418 field.
12419 (linux_stopped_by_watchpoint): Rewrite.
12420 (linux_stopped_data_address): Rewrite.
12421
12422 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12423
12424 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12425 switching the current inferior, not before.
12426
12427 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12428
12429 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12430 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12431 i386-linux.c and amd64-linux.c.
12432 (reg-i386.o): Removed.
12433 (reg-i386.c): Likewise.
12434 (reg-i386-linux.o): Likewise.
12435 (reg-i386-linux.c): Likewise.
12436 (reg-x86-64.o): Likewise.
12437 (reg-x86-64.c): Likewise.
12438 (reg-x86-64-linux.o): Likewise.
12439 (reg-x86-64-linux.c): Likewise.
12440 (i386.o): New.
12441 (i386.c): Likewise.
12442 (i386-linux.o): Likewise.
12443 (i386-linux.c): Likewise.
12444 (amd64.o): Likewise.
12445 (amd64.c): Likewise.
12446 (amd64-linux.o): Likewise.
12447 (amd64-linux.c): Likewise.
12448
12449 * configure.srv (srv_i386_regobj): New.
12450 (srv_i386_linux_regobj): Likewise.
12451 (srv_amd64_regobj): Likewise.
12452 (srv_amd64_linux_regobj): Likewise.
12453 (srv_i386_32bit_xmlfiles): Likewise.
12454 (srv_i386_64bit_xmlfiles): Likewise.
12455 (srv_i386_xmlfiles): Likewise.
12456 (srv_amd64_xmlfiles): Likewise.
12457 (srv_i386_linux_xmlfiles): Likewise.
12458 (srv_amd64_linux_xmlfiles): Likewise.
12459 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12460 srv_xmlfiles to $srv_i386_xmlfiles.
12461 (i[34567]86-*-mingw32ce*): Likewise.
12462 (i[34567]86-*-mingw*): Likewise.
12463 (i[34567]86-*-nto*): Likewise.
12464 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12465 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12466 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12467 (x86_64-*-linux*): Likewise.
12468
12469 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12470 (init_registers_amd64_linux): New.
12471 (x86_arch_setup): Replace init_registers_x86_64_linux with
12472 init_registers_amd64_linux.
12473
12474 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12475
12476 * configure.ac: Check for libdl. If it is not available link against
12477 static libthread_db.
12478 * configure: Regenerate.
12479
12480 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12481
12482 PR9605
12483
12484 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12485 handing a read watchpoint.
12486 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12487
12488 2010-02-12 Doug Evans <dje@google.com>
12489
12490 * linux-low.c (linux_supports_tracefork_flag): Document.
12491 (linux_look_up_symbols): Add comment.
12492
12493 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12494
12495 * regcache.c (supply_register): Clear regcache if buf is NULL.
12496
12497 2010-02-02 Nicolas Roche <roche@sourceware.org>
12498 Joel Brobecker <brobecker@adacore.com>
12499
12500 * inferiors.c (find_inferior): Add function documentation.
12501 (unloaded_dll): Handle the case where the unloaded dll has not
12502 been previously registered in the dll list.
12503
12504 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12505
12506 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12507 (thumb2_breakpoint): New.
12508 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12509
12510 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12511
12512 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12513 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12514 breakpoints.
12515
12516 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12517
12518 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12519
12520 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12521
12522 * linux-s390-low.c (s390_collect_ptrace_register)
12523 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12524
12525 2010-01-21 Doug Evans <dje@google.com>
12526
12527 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12528 (PTRACE_ARG4_TYPE): New macro.
12529 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12530 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12531 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12532 (usr_store_inferior_registers): Ditto.
12533 (linux_read_memory, linux_write_memory): Ditto.
12534 (linux_test_for_tracefork): Ditto.
12535
12536 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12537 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12538
12539 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12540
12541 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12542 target.
12543
12544 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12545
12546 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12547 prototype to take a regcache. Adjust.
12548
12549 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12550
12551 * regcache.h (struct thread_info): Forward declare.
12552 (struct regcache): New.
12553 (new_register_cache): Adjust prototype.
12554 (get_thread_regcache): Declare.
12555 (free_register_cache): Adjust prototype.
12556 (registers_to_string, registers_from_string): Ditto.
12557 (supply_register, supply_register_by_name, collect_register)
12558 (collect_register_as_string, collect_register_by_name): Ditto.
12559 * regcache.c (struct inferior_regcache_data): Delete.
12560 (get_regcache): Rename to ...
12561 (get_thread_regcache): ... this. Adjust. Switch inferior before
12562 fetching registers.
12563 (regcache_invalidate_one): Adjust.
12564 (regcache_invalidate): Fix prototype.
12565 (new_register_cache): Return the new register cache.
12566 (free_register_cache): Change prototype.
12567 (realloc_register_cache): Adjust.
12568 (registers_to_string): Change prototype to take a regcache. Adjust.
12569 (registers_from_string): Ditto.
12570 (register_data): Ditto.
12571 (supply_register): Ditto.
12572 (supply_register_by_name): Ditto.
12573 (collect_register): Ditto.
12574 (collect_register_as_string): Ditto.
12575 (collect_register_by_name): Ditto.
12576 * server.c (process_serial_event): Adjust.
12577 * linux-low.h (regset_fill_func, regset_store_func): Change
12578 prototype.
12579 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12580 Change prototype.
12581 * linux-low.c (get_stop_pc): Adjust.
12582 (check_removed_breakpoint): Adjust.
12583 (linux_wait_for_event): Adjust.
12584 (linux_resume_one_lwp): Adjust.
12585 (fetch_register): Add regcache parameter. Adjust.
12586 (usr_store_inferior_registers): Ditto.
12587 (regsets_fetch_inferior_registers): Ditto.
12588 (regsets_store_inferior_registers): Ditto.
12589 (linux_fetch_registers, linux_store_registers): Ditto.
12590 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12591 regcache. Adjust.
12592 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12593 Ditto.
12594 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12595 prototype to take a regcache.
12596 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12597 * remote-utils.c (convert_ascii_to_int, outreg)
12598 (prepare_resume_reply): Change prototype to take a regcache.
12599 Adjust.
12600 * target.h (struct target_ops) <fetch_registers, store_registers>:
12601 Change prototype to take a regcache.
12602 (fetch_inferior_registers, store_inferior_registers): Change
12603 prototype to take a regcache. Adjust.
12604 * proc-service.c (ps_lgetregs): Adjust.
12605 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12606 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12607 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12608 take a regcache. Adjust.
12609 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12610 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12611 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12612 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12613 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12614 (cris_cannot_fetch_register):
12615 (cris_breakpoint_at): Change prototype to take a regcache.
12616 Adjust.
12617 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12618 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12619 to take a regcache. Adjust.
12620 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12621 Adjust.
12622 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12623 take a regcache. Adjust.
12624 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12625 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12626 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12627 * linux-mips-low.c (mips_get_pc):
12628 (mips_set_pc): Change prototype to take a regcache. Adjust.
12629 (mips_reinsert_addr): Adjust.
12630 (mips_collect_register): Change prototype to take a regcache.
12631 Adjust.
12632 (mips_supply_register):
12633 (mips_collect_register_32bit, mips_supply_register_32bit)
12634 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12635 (mips_store_fpregset): Ditto.
12636 * linux-ppc-low.c (ppc_supply_ptrace_register)
12637 (ppc_supply_ptrace_register): Ditto.
12638 (parse_spufs_run): Adjust.
12639 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12640 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12641 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12642 take a regcache. Adjust.
12643 * linux-s390-low.c (s390_collect_ptrace_register)
12644 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12645 (s390_set_pc): Change prototype to take a regcache. Adjust.
12646 (s390_arch_setup): Adjust.
12647 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12648 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12649 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12650 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12651 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12652 regcache. Adjust.
12653 (sparc_breakpoint_at): Adjust.
12654 * linux-xtensa-low.c (xtensa_fill_gregset):
12655 (xtensa_store_gregset):
12656 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12657 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12658 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12659 prototype to take a regcache. Adjust.
12660 * win32-arm-low.c (arm_fetch_inferior_register)
12661 (arm_store_inferior_register): Change prototype to take a
12662 regcache. Adjust.
12663 * win32-i386-low.c (i386_fetch_inferior_register)
12664 (i386_store_inferior_register): Change prototype to take a
12665 regcache. Adjust.
12666 * win32-low.c (child_fetch_inferior_registers)
12667 (child_store_inferior_registers): Change prototype to take a
12668 regcache. Adjust.
12669 (win32_wait): Adjust.
12670 (win32_fetch_inferior_registers): Change prototype to take a
12671 regcache. Adjust.
12672 (win32_store_inferior_registers): Adjust.
12673 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12674 store_inferior_register>: Change prototype to take a regcache.
12675
12676 2010-01-20 Doug Evans <dje@google.com>
12677
12678 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12679 #ifdef.
12680 (linux_wait_for_event1, linux_init_signals): Ditto.
12681 (W_STOPCODE): Provide definition if missing.
12682
12683 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12684
12685 * linux-low.c (linux_core_of_thread): New.
12686 (compare_ints, show_process, list_threads): New.
12687 (linux_qxfer_osdata): Report threads and cores.
12688 (linux_target_op): Register linux_core_of_thread.
12689 * remote-utils.c (prepare_resume_reply): Report the core.
12690 (buffer_xml_printf): Support %d specifier.
12691 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12692 New.
12693 (handle_query): Handle qXfer:threads. Announce availability
12694 thereof.
12695 * target.h (struct target_ops): New field core_of_thread.
12696
12697 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12698
12699 * Makefile.in (clean): Remove new generated files.
12700 (reg-s390.o, reg-s390.c): Remove rules.
12701 (reg-s390x.o, reg-s390x.c): Likewise.
12702 (s390-linux32.o, s390-linux32.c): Add rules.
12703 (s390-linux64.o, s390-linux64.c): Likewise.
12704 (s390x-linux64.o, s390x-linux64.c): Likewise.
12705 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12706 * linux-s390-low.c: Include <elf.h>.
12707 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12708 (init_registers_s390): Remove prototype.
12709 (init_registers_s390x): Likewise.
12710 (init_registers_s390_linux32): Add prototype.
12711 (init_registers_s390_linux64): Likewise.
12712 (init_registers_s390x_linux64): Likewise.
12713 (s390_num_regs_3264): New define.
12714 (s390_regmap_3264): New global variable.
12715 (s390_cannot_fetch_register): Remove obsolete check.
12716 (s390_cannot_store_register): Likewise.
12717 (s390_collect_ptrace_register): Handle upper/lower register halves.
12718 (s390_supply_ptrace_register): Likewise.
12719 (s390_fill_gregset): Update to register number changes.
12720 (s390_get_hwcap): New routine.
12721 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12722 Install appropriate regmap and register set.
12723
12724 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12725
12726 * server.c (gdbserver_version): Update copyright year to 2010.
12727 * gdbreplay.c (gdbreplay_version): Likewise.
12728
12729 2009-12-28 Doug Evans <dje@google.com>
12730
12731 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12732 elf/external.h. Include <elf.h> instead but only if necessary.
12733
12734 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12735
12736 * linux-low.c (linux_remove_process): Remove `detaching'
12737 parameter. Don't release/detach from thread_db here.
12738 (linux_kill): Release/detach from thread_db here, ...
12739 (linux_detach): ... and here, before actually detaching.
12740 (linux_wait_1): ... and here, when a process exits.
12741 * thread-db.c (any_thread_of): New.
12742 (thread_db_free): Switch the current inferior to a thread of the
12743 passed in process.
12744
12745 2009-12-21 Doug Evans <dje@google.com>
12746
12747 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12748
12749 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12750 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12751 warning ifndef __NR_tkill. Move setting of errno there too.
12752 Delete unnecessary resetting of errno after syscall.
12753 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12754
12755 * configure.ac: Check for dladdr.
12756 * config.in: Regenerate.
12757 * configure: Regenerate.
12758 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12759 (try_thread_db_load): Update.
12760
12761 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12762
12763 2009-12-18 Doug Evans <dje@google.com>
12764
12765 * event-loop.c: Include unistd.h if it exists.
12766
12767 * linux-low.c (my_waitpid): Move definition away from being in
12768 between linux_tracefork_child/linux_test_for_tracefork.
12769
12770 * gdb_proc_service.h (psaddr_t): Fix type.
12771 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12772 signature to match glibc.
12773
12774 2009-12-16 Doug Evans <dje@google.com>
12775
12776 * linux-low.c (linux_read_memory): Fix argument to read.
12777
12778 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12779
12780 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12781 events, don't leave current_inferior pointing at null.
12782
12783 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12784
12785 * win32-low.c (LOG): Delete.
12786 (OUTMSG): Output to stderr.
12787 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12788 on compile time LOG macro.
12789 (win32_wait): Fix debug output.
12790
12791 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12792
12793 * win32-low.c (win32_add_one_solib): If the dll name is
12794 "ntdll.dll", prepend the system directory to the dll path.
12795
12796 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12797
12798 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12799
12800 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12801 Vladimir Prus <vladimir@codesourcery.com>
12802
12803 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12804 * configure.ac: Check for __mcoldfire__ and set
12805 gdb_cv_m68k_is_coldfire.
12806 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12807 reg-cf.o and reg-m68k.o.
12808 * configure: Regenerated.
12809
12810 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12811
12812 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12813 Pass it to thread_db_free.
12814 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12815 proper `detaching' argument to linux_remove_process.
12816 * linux-low.h (thread_db_free): Add `detaching' parameter.
12817 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12818 to thread_db_free.
12819 (thread_db_free): Add `detaching' parameter. Only
12820 call td_ta_clear_event if detaching from process.
12821
12822 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12823
12824 * thread-db.c (thread_db_free): Fix typo.
12825
12826 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12827
12828 PR gdb/10838
12829 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12830
12831 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12832
12833 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12834 with an i686 compiler.
12835 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12836 needed.
12837 * configure: Rebuilt.
12838
12839 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12840
12841 PR gdb/10783
12842
12843 * server.c (handle_search_memory_1): Correct read_addr initialization
12844 in loop for searching subsequent chunks.
12845
12846 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12847
12848 * configure.ac: New --with-libthread-db option.
12849 * thread-db.c: Allow direct dependence on libthread_db.
12850 (thread_db_free): Adjust.
12851 * config.in: Regenerate.
12852 * configure: Likewise.
12853
12854 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12855
12856 PR gdb/10757
12857 * thread-db.c (attach_thread): New function.
12858 (maybe_attach_thread): Return success/failure.
12859 (find_new_threads_callback): Adjust.
12860 (thread_db_find_new_threads): Loop until no new threads.
12861
12862 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12863
12864 * proc-service.c (ps_lgetregs): Formatting.
12865
12866 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12867
12868 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12869 * configure.ac: Adjust.
12870 * linux-low.h (struct process_info_private): Move members to struct
12871 thread_db.
12872 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12873 * linux-low.c (linux_remove_process): Adjust.
12874 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12875 * server.c (handle_query): Move code ...
12876 (handle_monitor_command): ... here. New function.
12877 * target.h (struct target_ops): New member.
12878 * thread-db.c (struct thread_db): New.
12879 (libthread_db_search_path): New variable.
12880 (thread_db_create_event, thread_db_enable_reporting)
12881 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12882 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12883 (try_thread_db_load_1, dladdr_to_soname): New functions.
12884 (try_thread_db_load, thread_db_load_search): New functions.
12885 (thread_db_init): Search for libthread_db.
12886 (thread_db_free): New function.
12887 (thread_db_handle_monitor_command): Likewise.
12888 * config.in: Regenerate.
12889 * configure: Regenerate.
12890
12891 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12892
12893 * spu-low.c (spu_kill): Wait for inferior to terminate.
12894 Call clear_inferiors.
12895 (spu_detach): Call clear_inferiors.
12896
12897 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12898
12899 * aclocal.m4: Regenerate.
12900 * config.in: Likewise.
12901 * configure: Likewise.
12902
12903 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12904
12905 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12906 (parse_spufs_run): New function.
12907 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12908 (ppc_breakpoint_at): Handle SPU breakpoints.
12909
12910 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12911
12912 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12913 (SPUFS_MAGIC): Define.
12914 (spu_enumerate_spu_ids): New function.
12915 (linux_qxfer_spu): New function.
12916 (linux_target_ops): Install linux_qxfer_spu.
12917
12918 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12919
12920 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12921 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12922 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12923 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12924 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12925 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12926 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12927 (init_registers_powerpc_cell32l): Add prototype.
12928 (init_registers_powerpc_cell64l): Likewise.
12929 (ppc_arch_setup): Detect Cell/B.E. architecture.
12930
12931 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12932
12933 * Makefile.in (datarootdir): New variable.
12934
12935 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12936
12937 * linux-low.c (linux_write_memory): Update debugging output.
12938 * Makefile.in (clean): Add new descriptions.
12939 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12940 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12941 * configure.srv: Add new files for arm*-*-linux*.
12942 * linux-arm-low.c: Add new declarations.
12943 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12944 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12945 (HWCAP_VFPv3D16): New.
12946 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12947 instead of __IWMMXT__.
12948 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12949 (arm_arch_setup): New.
12950 (target_regsets): Remove #ifdef. Add VFP regset.
12951 (the_low_target): Use arm_arch_setup.
12952
12953 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12954
12955 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12956 the main thread again.
12957
12958 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12959
12960 Adding Neutrino gdbserver.
12961 * configure: Regenerated.
12962 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12963 * configure.srv (i[34567]86-*-nto*): New target.
12964 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12965 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12966 (nto_comctrl) [__QNX__]: New function.
12967 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12968
12969 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12970
12971 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12972 srv_tgtobj.
12973
12974 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12975 Pedro Alves <pedro@codesourcery.com>
12976
12977 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12978 don't support CONTEXT_EXTENDED_REGISTERS.
12979 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12980 (the_low_target): Install them.
12981 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12982 failing with ERROR_PIPE_NOT_CONNECTED.
12983
12984 2009-06-30 Doug Evans <dje@google.com>
12985 Pierre Muller <muller@ics.u-strasbg.fr>
12986
12987 Add h/w watchpoint support to x86-linux, win32-i386.
12988 * Makefile.in (SFILES): Add i386-low.c
12989 (i386_low_h): Define.
12990 (i386-low.o): Add dependencies.
12991 (linux-x86-low.o): Add i386-low.h dependency.
12992 (win32-i386-low.o): Ditto.
12993 * i386-low.c: New file.
12994 * i386-low.h: New file.
12995 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12996 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12997 * linux-low.c (linux_add_process): Initialize arch_private.
12998 (linux_remove_process): Free arch_private.
12999 (add_lwp): Initialize arch_private.
13000 (delete_lwp): Free arch_private.
13001 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13002 provided.
13003 * linux-low.h (process_info_private): New member arch_private.
13004 (lwp_info): New member arch_private.
13005 (linux_target_ops): New members new_process, new_thread,
13006 prepare_to_resume.
13007 (ptid_of): New macro.
13008 * linux-x86-low.c: Include stddef.h, i386-low.h.
13009 (arch_process_info): New struct.
13010 (arch_lwp_info): New struct.
13011 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13012 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13013 (i386_dr_low_get_status): New function.
13014 (x86_insert_point, x86_remove_point): New functions.
13015 (x86_stopped_by_watchpoint): New function.
13016 (x86_stopped_data_address): New function.
13017 (x86_linux_new_process, x86_linux_new_thread): New functions.
13018 (x86_linux_prepare_to_resume): New function.
13019 (the_low_target): Add entries for insert_point, remove_point,
13020 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13021 prepare_to_resume.
13022 * server.c (debug_hw_points): New global.
13023 (monitor_show_help): Document set debug-hw-points.
13024 (handle_query): Process "set debug-hw-points".
13025 * server.h (debug_hw_points): Declare.
13026 (paddress): Declare.
13027 * utils.c (NUMCELLS, CELLSIZE): New macros.
13028 (get_sell, xsnprintf, paddress): New functions.
13029 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13030 remove_point, stopped_by_watchpoint, stopped_data_address.
13031 * win32-i386-low.c: Include i386-low.h.
13032 (debug_reg_state): Replaces dr.
13033 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13034 (i386_dr_low_get_status): New function.
13035 (i386_insert_point, i386_remove_point): New functions.
13036 (i386_stopped_by_watchpoint): New function.
13037 (i386_stopped_data_address): New function.
13038 (i386_initial_stuff): Update.
13039 (get_thread_context,set_thread_context,i386_thread_added): Update.
13040 (the_low_target): Add entries for insert_point,
13041 remove_point, stopped_by_watchpoint, stopped_data_address.
13042 * win32-low.c (win32_insert_watchpoint): New function.
13043 (win32_remove_watchpoint): New function.
13044 (win32_stopped_by_watchpoint): New function.
13045 (win32_stopped_data_address): New function.
13046 (win32_target_ops): Add entries for insert_watchpoint,
13047 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13048 * win32-low.h (win32_target_ops): New members insert_point,
13049 remove_point, stopped_by_watchpoint, stopped_data_address.
13050
13051 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13052
13053 * server.c (process_serial_event): Re-return unsupported, not
13054 error, if the type isn't recognized. Re-allow supporting only
13055 insert or remove packets. Also call require_running for
13056 breakpoints. Add missing break statement to default case. Tidy.
13057 * target.h (struct target_ops): Rename insert_watchpoint to
13058 insert_point, and remove_watchpoint to remove_point.
13059
13060 * linux-low.h (struct linux_target_ops): Likewise.
13061 * linux-low.c (linux_insert_watchpoint): Rename to ...
13062 (linux_insert_point): ... this. Adjust.
13063 (linux_remove_watchpoint): Rename to ...
13064 (linux_remove_point): ... this. Adjust.
13065 (linux_target_ops): Adjust.
13066 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13067 (cris_insert_point): ... this.
13068 (cris_remove_watchpoint): Rename to ...
13069 (cris_remove_point): ... this.
13070 (the_low_target): Adjust.
13071
13072 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13073
13074 * server.c (handle_v_kill): Pass signal_pid to
13075 kill_inferior if multi_process is zero.
13076
13077 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13078
13079 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13080 * target.h (target_ops): Comment for *_watchpoint to make it clear
13081 the functions can get types '0' and '1'.
13082
13083 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13084
13085 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13086 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13087 * regcache.c (get_regcache): Likewise.
13088 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13089 * win32-low.c (child_fetch_inferior_registers): Remove check for
13090 regno 0.
13091
13092 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13093 Pedro Alves <pedro@codesourcery.com>
13094
13095 * target.h (struct target_ops) <supports_multi_process>: New
13096 callback.
13097 (target_supports_multi_process): New.
13098 * server.c (handle_query): Even if GDB reports support, only
13099 enable multi-process if the target also supports it. Report
13100 multi-process support only if the target backend supports it.
13101 * linux-low.c (linux_supports_multi_process): New function.
13102 (linux_target_ops): Install it as target_supports_multi_process
13103 callback.
13104
13105 2009-05-24 Doug Evans <dje@google.com>
13106
13107 Global renaming of find_thread_pid to find_thread_ptid.
13108 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13109 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13110 All callers updated.
13111
13112 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13113 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13114 directly.
13115
13116 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13117 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13118 (linux_resume_one_lwp): Ditto.
13119
13120 2009-05-23 Doug Evans <dje@google.com>
13121
13122 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13123 from struct inferior_list_entry * to struct lwp_info *.
13124 All callers updated.
13125
13126 2009-05-13 Doug Evans <dje@google.com>
13127
13128 * linux-x86-low.c: Don't include assert.h.
13129 (x86_siginfo_fixup): Use fatal, not assert.
13130 (x86_arch_setup): Fix comment.
13131
13132 2009-05-12 Doug Evans <dje@google.com>
13133
13134 Biarch support for i386/amd64 gdbserver.
13135 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13136 Add linux-x86-low.c.
13137 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13138 (linux-x86-low.o): Add.
13139 * linux-x86-64-low.c: Delete.
13140 * linux-i386-low.c: Delete.
13141 * linux-x86-low.c: New file.
13142 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13143 linux-x86-low.o.
13144 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13145 linux-x86-low.o.
13146 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13147 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13148 (linux_child_pid_to_exec_file): New function.
13149 (elf_64_header_p, elf_64_file_p): New functions.
13150 (siginfo_fixup): New function.
13151 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13152 give target a chance to convert layout.
13153 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13154 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13155
13156 2009-05-07 Doug Evans <dje@google.com>
13157
13158 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13159 (regsets_store_inferior_registers): Ditto.
13160
13161 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13162
13163 PR server/10048
13164
13165 * linux-low.c (must_set_ptrace_flags): Delete.
13166 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13167 of the global.
13168 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13169 `lwp->must_set_ptrace_flags' instead.
13170 (linux_wait_for_event_1): Set ptrace options here.
13171 (linux_wait_1): ... not here.
13172
13173 2009-04-30 Doug Evans <dje@google.com>
13174
13175 * inferiors.c (started_inferior_callback): New function.
13176 (attached_inferior_callback): New function.
13177 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13178 * server.c (print_started_pid, print_attached_pid): New functions.
13179 (detach_or_kill_for_exit): New function.
13180 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13181 * server.h (have_started_inferiors_p): Declare.
13182 (have_attached_inferiors_p): Declare.
13183
13184 * inferiors.c (remove_process): Fix memory leak, free process.
13185 * linux-low.c (linux_remove_process): New function.
13186 (linux_kill): Call it instead of remove_process.
13187 (linux_detach, linux_wait_1): Ditto.
13188
13189 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13190
13191 * configure.srv: Add x86 Windows CE target.
13192
13193 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13194
13195 * inferiors.c (get_thread_process): Make global.
13196 * server.h (get_thread_process): Add prototype.
13197 * thread-db.c (find_one_thread): Use get_thread_process
13198 instead of current_process.
13199 (thread_db_get_tls_address): Do not crash if called when
13200 thread layer is not yet initialized.
13201
13202 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13203
13204 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13205 * spu-low.c (current_tid): Rename to ...
13206 (current_ptid): ... this.
13207 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13208 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13209 ptid_get_lwp (current_ptid) instead of current_tid.
13210 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13211 instead of current_tid. Use find_process_pid to verify pid
13212 argument is valid. Pass proper argument to remove_process.
13213 (spu_thread_alive): Compare current_ptid instead of current_tid.
13214 (spu_resume): Likewise.
13215
13216 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13217
13218 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13219 variable.
13220
13221 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13222
13223 Implement the multiprocess extensions, and add linux multiprocess
13224 support.
13225
13226 * server.h (ULONGEST): Declare.
13227 (struct ptid, ptid_t): New.
13228 (minus_one_ptid, null_ptid): Declare.
13229 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13230 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13231 (struct inferior_list_entry): Change `id' type from unsigned from
13232 to ptid_t.
13233 (struct sym_cache, struct breakpoint, struct
13234 process_info_private): Forward declare.
13235 (struct process_info): Declare.
13236 (current_process): Declare.
13237 (all_processes): Declare.
13238 (initialize_inferiors): Declare.
13239 (add_thread): Adjust to use ptid_t.
13240 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13241 (add_process, remove_process, find_thread_pid): Declare.
13242 (find_inferior_id): Adjust to use ptid_t.
13243 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13244 (multi_process): Declare.
13245 (push_event): Adjust to use ptid_t.
13246 (read_ptid, write_ptid): Declare.
13247 (prepare_resume_reply): Adjust to use ptid_t.
13248 (clear_symbol_cache): Declare.
13249 * inferiors.c (all_processes): New.
13250 (null_ptid, minus_one_ptid): New.
13251 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13252 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13253 (add_thread): Change unsigned long to ptid. Remove gdb_id
13254 parameter. Adjust.
13255 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13256 (gdb_id_to_thread): Rename to ...
13257 (find_thread_pid): ... this. Change unsigned long to ptid.
13258 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13259 (loaded_dll, pull_pid_from_list): Adjust.
13260 (add_process, remove_process, find_process_pid)
13261 (get_thread_process, current_process, initialize_inferiors): New.
13262 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13263 (struct target_waitstatus) <related_pid>: Ditto.
13264 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13265 return type to int.
13266 (struct target_ops) <join>: Add `pid' argument.
13267 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13268 (struct target_ops) <wait>: Add `ptid' field. Change return type
13269 to ptid.
13270 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13271 (mywait): Add `ptid' argument. Change return type to ptid_t.
13272 (target_pid_to_str): Declare.
13273 * target.c (set_desired_inferior): Adjust to use ptids.
13274 (mywait): Add new `ptid' argument. Adjust.
13275 (target_pid_to_str): New.
13276 * mem-break.h (free_all_breakpoints): Declare.
13277 * mem-break.c (breakpoints): Delelete.
13278 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13279 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13280 to use per-process breakpoint list.
13281 (free_all_breakpoints): New.
13282 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13283 (symbol_cache, all_symbols_looked_up): Delete.
13284 (hexchars): New.
13285 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13286 read_ptid): New.
13287 (prepare_resume_reply): Change ptid argument's type from unsigned
13288 long to ptid_t. Adjust. Implement W;process and X;process.
13289 (free_sym_cache, clear_symbol_cache): New.
13290 (look_up_one_symbol): Adjust to per-process symbol cache. *
13291 * server.c (cont_thread, general_thread, step_thread): Change type
13292 to ptid_t.
13293 (attached): Delete.
13294 (multi_process): New.
13295 (last_ptid): Change type to ptid_t.
13296 (struct vstop_notif) <ptid>: Change type to ptid_t.
13297 (queue_stop_reply, push_event): Change `ptid' argument's type to
13298 ptid_t.
13299 (discard_queued_stop_replies): Add `pid' argument.
13300 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13301 changes. Don't reference the `attached' global.
13302 (attach_inferior): Adjust to mywait interface changes.
13303 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13304 features. Handle and report "multiprocess+". Handle
13305 "qAttached:PID".
13306 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13307 changes.
13308 (handle_v_kill): New.
13309 (handle_v_stopped): Adjust to use target_pid_to_str.
13310 (handle_v_requests): Allow multiple attaches and runs when
13311 multiprocess extensions are in effect. Handle "vKill".
13312 (myresume): Adjust to use ptids.
13313 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13314 (handle_status): Adjust to discard_queued_stop_replies interface
13315 change.
13316 (first_thread_of, kill_inferior_callback)
13317 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13318 (main): Call initialize_inferiors. Adjust to use ptids, killing
13319 and detaching from all inferiors. Handle multiprocess packet
13320 variants.
13321 * linux-low.h: Include gdb_proc_service.h.
13322 (struct process_info_private): New.
13323 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13324 <lwpid_of>: Use ptid_get_lwp.
13325 (get_lwp_thread): Adjust.
13326 (struct lwp_info): Add `dead' member.
13327 (find_lwp_pid): Declare.
13328 * linux-low.c (thread_db_active): Delete.
13329 (new_inferior): Adjust comment.
13330 (inferior_pid): Delete.
13331 (linux_add_process): New.
13332 (handle_extended_wait): Adjust.
13333 (add_lwp): Change unsigned long to ptid.
13334 (linux_create_inferior): Add process to processes table. Adjust
13335 to use ptids. Don't set new_inferior here.
13336 (linux_attach_lwp): Rename to ...
13337 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13338 it. Adjust to use ptids.
13339 (linux_attach_lwp): New.
13340 (linux_attach): Add process to processes table. Don't set
13341 new_inferior here.
13342 (struct counter): New.
13343 (second_thread_of_pid_p, last_thread_of_process_p): New.
13344 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13345 multiple processes.
13346 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13347 processes. Remove process from process table.
13348 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13349 to multiple processes.
13350 (any_thread_of): New.
13351 (linux_detach): Add `pid' argument, and handle it. Remove process
13352 from processes table.
13353 (linux_join): Add `pid' argument. Handle it.
13354 (linux_thread_alive): Change unsighed long argument to ptid_t.
13355 Consider dead lwps as not being alive.
13356 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13357 threads we're not interested in.
13358 (same_lwp, find_lwp_pid): New.
13359 (linux_wait_for_lwp): Change `pid' argument's type from int to
13360 ptid_t. Adjust.
13361 (linux_wait_for_event): Rename to ...
13362 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13363 from int to ptid_t. Adjust.
13364 (linux_wait_for_event): New.
13365 (linux_wait_1): Add `ptid' argument. Change return type to
13366 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13367 that exit from the process table.
13368 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13369 Adjust.
13370 (mark_lwp_dead): New.
13371 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13372 stopping all threads, mark its main lwp as dead.
13373 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13374 ptids.
13375 (fetch_register, usr_store_inferior_registers)
13376 (regsets_fetch_inferior_registers)
13377 (regsets_store_inferior_registers, linux_read_memory)
13378 (linux_write_memory): Inline `inferior_pid'.
13379 (linux_look_up_symbols): Adjust to use per-process
13380 `thread_db_active'.
13381 (linux_request_interrupt): Adjust to use ptids.
13382 (linux_read_auxv): Inline `inferior_pid'.
13383 (initialize_low): Don't reference thread_db_active.
13384 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13385 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13386 (ps_getpid): Return the pid of the current inferior.
13387 * thread-db.c (proc_handle, thread_agent): Delete.
13388 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13389 per-process data.
13390 (find_one_thread): Change argument type to ptid_t. Adjust to
13391 per-process data.
13392 (maybe_attach_thread): Adjust to per-process data and ptids.
13393 (thread_db_find_new_threads): Ditto.
13394 (thread_db_init): Ditto.
13395 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13396 processes table. Adjust to use ptids.
13397 (spu_kill, spu_detach): Adjust interface. Remove process from
13398 processes table.
13399 (spu_join, spu_thread_alive): Adjust interface.
13400 (spu_wait): Adjust interface. Remove process from processes
13401 table. Adjust to use ptids.
13402 * win32-low.c (current_inferior_tid): Delete.
13403 (current_inferior_ptid): New.
13404 (debug_event_ptid): New.
13405 (thread_rec): Take a ptid. Adjust.
13406 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13407 (child_delete_thread): Ditto.
13408 (do_initial_child_stuff): Add `attached' argument. Add process to
13409 processes table.
13410 (child_fetch_inferior_registers, child_store_inferior_registers):
13411 Adjust.
13412 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13413 (win32_attach): Pass 1 to do_initial_child_stuff.
13414 (win32_kill): Adjust interface. Remove process from processes
13415 table.
13416 (win32_detach): Ditto.
13417 (win32_join): Adjust interface.
13418 (win32_thread_alive): Take a ptid.
13419 (win32_resume): Adjust to use ptids.
13420 (get_child_debug_event): Ditto.
13421 (win32_wait): Adjust interface. Remove exiting process from
13422 processes table.
13423
13424 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13425
13426 Non-stop mode support.
13427
13428 * server.h (non_stop): Declare.
13429 (gdb_client_data, handler_func): Declare.
13430 (delete_file_handler, add_file_handler, start_event_loop):
13431 Declare.
13432 (handle_serial_event, handle_target_event, push_event)
13433 (putpkt_notif): Declare.
13434 * target.h (enum resume_kind): New.
13435 (struct thread_resume): Replace `step' field by `kind' field.
13436 (TARGET_WNOHANG): Define.
13437 (struct target_ops) <wait>: Add `options' argument.
13438 <supports_non_stop, async, start_non_stop>: New fields.
13439 (target_supports_non_stop, target_async): New.
13440 (start_non_stop): Declare.
13441 (mywait): Add `options' argument.
13442 * target.c (mywait): Add `options' argument. Print child exit
13443 notifications here.
13444 (start_non_stop): New.
13445 * server.c (non_stop, own_buf, mem_buf): New globals.
13446 (struct vstop_notif): New.
13447 (notif_queue): New global.
13448 (queue_stop_reply, push_event, discard_queued_stop_replies)
13449 (send_next_stop_reply): New.
13450 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13451 interface changes.
13452 (attach_inferior): In non-stop mode, don't wait for the target
13453 here.
13454 (handle_general_set): Handle QNonStop.
13455 (handle_query): When handling qC, return the current general
13456 thread, instead of the first thread of the list.
13457 (handle_query): If the backend supports non-stop mode, include
13458 QNonStop+ in the qSupported query response.
13459 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13460 and non-stop mode.
13461 (handle_v_attach, handle_v_run): Handle non-stop mode.
13462 (handle_v_stopped): New.
13463 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13464 (myresume): Adjust to use resume_kind. Handle non-stop.
13465 (queue_stop_reply_callback): New.
13466 (handle_status): Handle non-stop mode.
13467 (main): Clear non_stop flag on reconnection. Use the event-loop.
13468 Refactor serial protocol handling from here ...
13469 (process_serial_event): ... to this new function. When GDB
13470 selects any thread, select one here. In non-stop mode, wait until
13471 GDB acks all pending events before exiting.
13472 (handle_serial_event, handle_target_event): New.
13473 * remote-utils.c (remote_open): Install remote_desc in the event
13474 loop.
13475 (remote_close): Remove remote_desc from the event loop.
13476 (putpkt_binary): Rename to...
13477 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13478 (putpkt_binary): New as wrapper around putpkt_binary_1.
13479 (putpkt_notif): New.
13480 (prepare_resume_reply): In non-stop mode, don't change the
13481 general_thread.
13482 * event-loop.c: New.
13483 * Makefile.in (OBJ): Add event-loop.o.
13484 (event-loop.o): New rule.
13485
13486 * linux-low.h (pid_of): Moved here.
13487 (lwpid_of): New.
13488 (get_lwp_thread): Use lwpid_of.
13489 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13490 * linux-low.c (pid_of): Delete.
13491 (inferior_pid): Use lwpid_of.
13492 (linux_event_pipe): New.
13493 (target_is_async_p): New.
13494 (delete_lwp): New.
13495 (handle_extended_wait): Use lwpid_of.
13496 (add_lwp): Don't set lwpid field.
13497 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13498 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13499 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13500 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13501 first. Adjust to linux_wait_for_event interface changes. Use
13502 lwpid_of.
13503 (linux_detach): Don't delete the main lwp here.
13504 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13505 (status_pending_p): Don't consider explicitly suspended lwps.
13506 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13507 pointer. Add OPTIONS argument. Change return type to int. Use
13508 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13509 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13510 pointer. Add status pointer argument. Return a pid instead of a
13511 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13512 changes. In non-stop mode, don't switch to a random thread.
13513 (linux_wait): Rename to...
13514 (linux_wait_1): ... this. Add target_options argument, and handle
13515 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13516 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13517 clean exit and signal exit code. Don't stop all threads in
13518 non-stop mode. In all-stop mode, only stop all threads when
13519 reporting a stop to GDB. Handle explicit thread stop requests.
13520 (async_file_flush, async_file_mark): New.
13521 (linux_wait): New.
13522 (send_sigstop): Use lwpid_of.
13523 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13524 interface changes. In non-stop mode, don't switch to a random
13525 thread.
13526 (linux_resume_one_lwp): Use lwpid_of.
13527 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13528 (linux_resume_one_thread): ... this. Handle resume_stop. In
13529 non-stop mode, don't look for pending flag in all threads.
13530 (resume_status_pending_p): Don't consider explicitly suspended
13531 threads.
13532 (my_waitpid): Reimplement. Emulate __WALL.
13533 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13534 Use lwpid_of.
13535 (sigchld_handler, linux_supports_non_stop, linux_async)
13536 (linux_start_non_stop): New.
13537 (linux_target_ops): Register linux_supports_non_stop, linux_async
13538 and linux_start_non_stop.
13539 (initialize_low): Install SIGCHLD handler.
13540 * thread-db.c (thread_db_create_event, find_one_thread)
13541 (thread_db_get_tls_address): Use lwpid_of.
13542 * win32-low.c (win32_detach): Adjust to use resume_kind.
13543 (win32_wait): Add `options' argument.
13544 * spu-low.c (spu_resume): Adjust to use resume_kind.
13545 (spu_wait): Add `options' argument.
13546
13547 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13548
13549 Decouple target code from remote protocol.
13550
13551 * target.h (enum target_waitkind): New.
13552 (struct target_waitstatus): New.
13553 (struct target_ops) <wait>: Return an unsigned long. Take a
13554 target_waitstatus pointer instead of a char pointer.
13555 (mywait): Likewise.
13556 * target.c (mywait): Change prototype to return an unsigned long.
13557 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13558 * server.h (thread_from_wait, old_thread_from_wait): Delete
13559 declarations.
13560 (prepare_resume_reply): Change prototype to take a
13561 target_waitstatus.
13562 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13563 (last_status, last_ptid): New.
13564 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13565 pid instead of a signal.
13566 (attach_inferior): Remove "status" and "signal" parameters.
13567 Adjust.
13568 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13569 not as an address.
13570 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13571 (handle_v_requests, myresume): Remove "status" and "signal"
13572 parameters. Adjust.
13573 (handle_status): New.
13574 (main): Delete local `status'. Adjust.
13575 * remote-utils.c: Include target.h.
13576 (prepare_resume_reply): Change prototype to take a
13577 target_waitstatus. Adjust.
13578
13579 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13580 interface.
13581 * spu-low.c (spu_wait): Adjust.
13582 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13583 Delete.
13584 (win32_wait): Adjust.
13585
13586 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13587
13588 * target.h (struct thread_resume): Delete leave_stopped member.
13589 (struct target_ops): Add a `n' argument to the `resume' callback.
13590 * server.c (start_inferior): Adjust.
13591 (handle_v_cont, myresume): Adjust.
13592 * linux-low.c (check_removed_breakpoint): Adjust to resume
13593 interface change, and to removed leave_stopped field.
13594 (resume_ptr): Delete.
13595 (struct thread_resume_array): New.
13596 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13597 resume interface change.
13598 (linux_continue_one_thread, linux_queue_one_thread)
13599 (resume_status_pending_p): Check if the resume field is NULL
13600 instead of checking the leave_stopped member.
13601 (linux_resume): Adjust to the target resume interface change.
13602 * spu-low.c (spu_resume): Adjust to the target resume interface
13603 change.
13604 * win32-low.c (win32_detach, win32_resume): Ditto.
13605
13606 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13607
13608 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13609 flag.
13610 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13611 pending.
13612 (linux_continue_one_thread): Only preserve the stepping flag if
13613 there's a pending breakpoint.
13614
13615 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13616
13617 * server.c (main): After the inferior having exited, call
13618 remote_close before exiting gdbserver.
13619
13620 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13621
13622 Fix size of FPSCR in Power 7 processors.
13623 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13624 (PPC_FEATURE_HAS_DFP): New #define.
13625 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13626 size of the FPSCR.
13627
13628 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13629
13630 * server.c (handle_query) Whitespace and formatting.
13631
13632 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13633
13634 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13635 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13636 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13637 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13638 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13639 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13640 Makefile.in, configure.ac: Fix whitespace throughout.
13641 * configure: Regenerate.
13642
13643 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13644
13645 * inferiors.c (find_inferior): Make it safe for the callback
13646 function to delete the currently iterated inferior.
13647
13648 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13649
13650 * Makefile.in (linuw_low_h): Move higher.
13651 (thread-db.o): Depend on $(linux_low_h).
13652
13653 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13654
13655 Rename "process" to "lwp" throughout.
13656
13657 * linux-low.c (all_processes): Rename to...
13658 (all_lwps): ... this.
13659 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13660 (add_process): Rename to ...
13661 (add_lwp): ... this. Adjust.
13662 (linux_create_inferior): Adjust.
13663 (linux_attach_lwp): Adjust.
13664 (linux_attach): Adjust.
13665 (linux_kill_one_process): Rename to ...
13666 (linux_kill_one_lwp): ... this. Adjust.
13667 (linux_kill): Adjust.
13668 (linux_detach_one_process): Rename to ...
13669 (linux_detach_one_lwp): ... this. Adjust.
13670 (linux_detach): Adjust.
13671 (check_removed_breakpoint): Adjust.
13672 (status_pending_p): Adjust.
13673 (linux_wait_for_process): Rename to ...
13674 (linux_wait_for_lwp): ... this. Adjust.
13675 (linux_wait_for_event): Adjust.
13676 (send_sigstop): Adjust.
13677 (wait_for_sigstop): Adjust.
13678 (stop_all_processes): Rename to ...
13679 (stop_all_lwps): ... this.
13680 (linux_resume_one_process): Rename to ...
13681 (linux_resume_one_lwp): ... this. Adjust.
13682 (linux_set_resume_request, linux_continue_one_thread)
13683 (linux_queue_one_thread, resume_status_pending_p)
13684 (usr_store_inferior_registers, regsets_store_inferior_registers)
13685 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13686 Adjust.
13687 * linux-low.h (get_process): Rename to ...
13688 (get_lwp): ... this. Adjust.
13689 (get_thread_process): Rename to ...
13690 (get_thread_lwp): ... this. Adjust.
13691 (get_process_thread): Rename to ...
13692 (get_lwp_thread): ... this. Adjust.
13693 (struct process_info): Rename to ...
13694 (struct lwp_info): ... this.
13695 (all_processes): Rename to ...
13696 (all_lwps): ... this.
13697 * proc-service.c (ps_lgetregs): Adjust.
13698 * thread-db.c (thread_db_create_event, find_one_thread)
13699 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13700
13701 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13702
13703 * server.c (handle_query): Handle "qAttached".
13704
13705 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13706
13707 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13708 GPLv3, update license URL.
13709
13710 2009-03-01 Doug Evans <dje@google.com>
13711
13712 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13713 (server_h): Add gdb_signals.h.
13714 (signals.o): Update.
13715 * server.h (target_signal_from_host,target_signal_to_host_p)
13716 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13717
13718 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13719
13720 * remote-utils.c (getpkt): Also generate remote-debug
13721 information if noack_mode is set.
13722
13723 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13724
13725 * server.c (handle_query): Report qXfer:siginfo:read and
13726 qXfer:siginfo:write as supported and handle them.
13727 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13728 * linux-low.c (linux_xfer_siginfo): New.
13729 (linux_target_ops): Set it.
13730
13731 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13732
13733 * server.c (gdbserver_usage): Mention --remote-debug.
13734 (main): Accept '--remote-debug' switch.
13735
13736 2009-01-18 Doug Evans <dje@google.com>
13737
13738 * regcache.c (new_register_cache): No need to check result of xcalloc.
13739 * server.c (handle_search_memory): Back out calls to xmalloc,
13740 result is checked and error is returned to user upon failure.
13741 (handle_query): Ditto. Add more checks for result of malloc.
13742 (handle_v_cont): Check result of malloc, report error back to
13743 user upon failure.
13744 (handle_v_run): Ditto. Call freeargv.
13745 * server.h (freeargv): Declare.
13746 * utils.c (freeargv): New fn.
13747
13748 2009-01-15 Doug Evans <dje@google.com>
13749
13750 * gdbreplay.c (perror_with_name): Make arg const char *.
13751 * server.h (target_signal_to_name): Make return type const char *.
13752 * thread-db.c (thread_db_err_str): Make return type const char *.
13753 * utils.c (perror_with_name): Make arg const char *.
13754
13755 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13756
13757 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13758 when handling a EXIT_PROCESS_DEBUG_EVENT.
13759
13760 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13761
13762 * gdbreplay.c (gdbreplay_version): Update copyright year.
13763 * server.c (gdbserver_version): Likewise.
13764
13765 2009-01-05 Doug Evans <dje@google.com>
13766
13767 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13768 (handle_extended_wait): Improve comment.
13769
13770 2008-12-13 Doug Evans <dje@google.com>
13771
13772 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13773 * server.h (ATTR_MALLOC): New macro.
13774 (xmalloc,xcalloc,xstrdup): Declare.
13775 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13776 * inferiors.c: Ditto.
13777 * linux-low.c: Ditto.
13778 * mem-break.c: Ditto.
13779 * regcache.c: Ditto.
13780 * remote-utils.c: Ditto.
13781 * server.c: Ditto.
13782 * target.c: Ditto.
13783 * win32-low.c: Ditto.
13784
13785 2008-12-12 Doug Evans <dje@google.com>
13786
13787 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13788 in debugging printf.
13789
13790 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13791
13792 2008-12-09 Doug Evans <dje@google.com>
13793
13794 * linux-low.h (struct process_info): Delete member tid, unused.
13795 * thread-db.c (find_one_thread): Update.
13796 (maybe_attach_thread): Update.
13797
13798 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13799
13800 * target.h (struct target_ops): Add qxfer_osdata member.
13801 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13802 and dirent.h.
13803 (linux_qxfer_osdata): New functions.
13804 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13805 callback.
13806 * server.c (handle_query): Handle "qXfer:osdata:read:".
13807 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13808 (buffer_xml_printf): New functions.
13809 * server.h (struct buffer): New.
13810 (buffer_grow_str, buffer_grow_str0): New macros.
13811 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13812 (buffer_xml_printf): Declare.
13813
13814 2008-11-24 Doug Evans <dje@google.com>
13815
13816 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13817
13818 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13819
13820 * server.c (handle_v_run): Always use the supplied argument list.
13821
13822 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13823
13824 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13825 (xtensa_regmap_table): Add entry for scompare1.
13826
13827 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13828
13829 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13830 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13831 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13832 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13833 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13834 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13835 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13836 XML target descriptions.
13837 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13838 when inferior is running on an ISA 2.05 or later processor. Add
13839 special case to return offset for full 64-bit slot of FPSCR when
13840 in 32-bits.
13841
13842 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13843
13844 * Makefile.in (SFILES, clean): Added sparc64 files.
13845 (reg-sparc64.o, reg-sparc64.c): New.
13846 * configure.srv (sparc*-*-linux*): New configuration.
13847 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13848 syscall arguments for SPARC.
13849 (regsets_store_inferior_registers): Likewise.
13850 * linux-sparc-low.c: New file.
13851
13852 2008-10-21 Doug Evans <dje@google.com>
13853
13854 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13855 (READLINE_DIR,READLINE_DEP): Delete.
13856 (INTERNAL_CFLAGS): Update.
13857 (LINTFLAGS): Update.
13858
13859 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13860
13861 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13862 whole argv from the last run, not just argv[0].
13863
13864 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13865
13866 * regcache.c (new_register_cache): Return NULL if the register
13867 cache size isn't known yet.
13868 (free_register_cache): Avoid dereferencing a NULL regcache.
13869
13870 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * configure.srv: Merge MIPS and MIPS64.
13873
13874 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13875
13876 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13877
13878 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13879
13880 * Makefile.in: Add required vsx dependencies.
13881
13882 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13883 Declare init_registers_powerpc_vsx32l.
13884 Declare init_registers_powerpc_vsx64l.
13885 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13886 (ppc_arch_setup): Check for VSX in hwcap.
13887 (ppc_fill_vsxregset): New function.
13888 (ppc_store_vsxregset): New function.
13889 Add new VSX entry in regset_info target_regsets.
13890
13891 * configure.srv: Add new VSX dependencies.
13892
13893 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13894
13895 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13896 (remote_open): Set or clear transport_is_reliable.
13897 (putpkt_binary): Don't expect acks in noack mode.
13898 (getpkt): Don't send ack/nac in noack mode.
13899 * server.c (handle_general_set): Handle QStartNoAckMode.
13900 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13901 qSupported.
13902 (main): Reset noack_mode on every connection.
13903 * server.h (noack_mode): Declare.
13904
13905 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13906
13907 * Makefile.in (GDBREPLAY_OBS): New variable.
13908 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13909
13910 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13911 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13914 (usr_store_inferior_registers): Likewise.
13915 (regsets_store_inferior_registers): Likewise.
13916
13917 2008-07-31 Rolf Jansen <rj@surtec.com>
13918 Pedro Alves <pedro@codesourcery.com>
13919
13920 * configure.ac: Check for memmem declaration.
13921 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13922 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13923 (disable_packet_qfThreadInfo): Unconditionally compile.
13924 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13925 * configure, config.in: Regenerate.
13926
13927 2008-07-28 Doug Kwan <dougkwan@google.com>
13928
13929 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13930 (linux_write_memory): Remove declaration of errno.
13931
13932 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13933
13934 * linux-low.c (handle_extended_wait): Do not use "status"
13935 variable uninitialized.
13936
13937 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13938
13939 * server.c (handle_v_attach): Inhibit reporting dll changes.
13940
13941 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13942
13943 * remote-utils.c (prepare_resume_reply): If requested, don't
13944 output "thread:TID" in the T stop reply.
13945
13946 * server.c (disable_packet_vCont, disable_packet_Tthread)
13947 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13948 (handle_query): If requested, disable support for qC, qfThreadInfo
13949 and qsThreadInfo.
13950 (handle_v_requests): If requested, disable support for vCont.
13951 (gdbserver_show_disableable): New.
13952 (main): Handle --disable-packet and --disable-packet=LIST.
13953
13954 * server.h (disable_packet_vCont, disable_packet_Tthread)
13955 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13956
13957 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13958
13959 * server.c (gdbserver_usage): Mention --version.
13960
13961 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * Makefile.in (gdbreplay.o): New rule.
13964
13965 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13966
13967 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13968 message, not gdbserver.
13969
13970 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13971 Nathan Sidwell <nathan@codesourcery.com>
13972 Joseph Myers <joseph@codesourcery.com>
13973
13974 * acinclude.m4: Include ../../config/acx.m4.
13975 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13976 * configure, config.in: Regenerate.
13977 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13978 * server.c (gdbserver_version): Print PKGVERSION.
13979 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13980 (main): Adjust gdbserver_usage calls.
13981 * gdbreplay.c (version, host_name): Add declarations.
13982 (gdbreplay_version, gdbreplay_usage): New.
13983 (main): Accept --version and --help options.
13984
13985 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13986
13987 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13988 (arm_breakpoint_at): Handle Thumb.
13989 (the_low_target): Add comment.
13990
13991 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13992
13993 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13994
13995 2008-05-09 Doug Evans <dje@google.com>
13996
13997 * server.h (decode_search_memory_packet): Declare.
13998 * remote-utils.c (decode_search_memory_packet): New fn.
13999 * server.c (handle_search_memory_1): New fn.
14000 (handle_search_memory): New fn.
14001 (handle_query): Process qSearch:memory packets.
14002
14003 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14004
14005 * regcache.c (registers_length): Remove.
14006 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14007 full register packet.
14008 * regcache.h (registers_length): Remove prototype.
14009 * server.h (PBUFSIZ): Define to 16384.
14010
14011 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14012
14013 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14014 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14015 powerpc-64l.o, and powerpc-altivec64l.o.
14016 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14017 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14018 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14019 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14020 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14021 to srv_xmlfiles.
14022
14023 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14024 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14025 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14026 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14027 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14028 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14029 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14030 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14031 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14032 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14033 (clean): Update.
14034
14035 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14036 (init_registers_powerpc_32l): ... this new prototype.
14037 (init_registers_powerpc_32): Remove, replace by ...
14038 (init_registers_powerpc_altivec32l): ... this new prototype.
14039 (init_registers_powerpc_e500): Remove, replace by ...
14040 (init_registers_powerpc_e500l): ... this new prototype.
14041 (init_registers_ppc64): Remove, replace by ...
14042 (init_registers_powerpc_64l): ... this new prototype.
14043 (init_registers_powerpc_64): Remove, replace by ...
14044 (init_registers_powerpc_altivec64l): ... this new prototype.
14045 (ppc_num_regs): Set to 73.
14046 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14047 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14048 (ppc_cannot_store_register): Handle orig_r3 and trap.
14049 (ppc_arch_setup): Update init_registers_... calls.
14050 (ppc_fill_gregset): Handle orig_r3 and trap.
14051
14052 * inferiors.c (clear_inferiors): Reset current_inferior.
14053
14054 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14055
14056 * acinclude.m4: Add override.m4.
14057 * configure: Regenerate.
14058
14059 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14060
14061 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14062 initial call to init_register_ppc64.
14063
14064 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14065
14066 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14067 single powerpc*-*-linux* case.
14068 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14069
14070 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14071
14072 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14073 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14074 from reg_xmlfiles.
14075 * linux-ppc-low.c: Include <elf.h>.
14076 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14077 (ppc_hwcap): New global variable.
14078 (ppc_regmap): Remove __SPE__ #ifdef sections.
14079 (ppc_regmap_e500): New global variable.
14080 (ppc_cannot_store_register): Update __SPE__ special case.
14081 (ppc_get_hwcap): New function.
14082 (ppc_arch_setup): Use it to determine whether inferior supports
14083 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14084 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14085 Do not access registers if target does not support AltiVec.
14086 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14087 Do not access registers if target does not support SPE.
14088 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14089
14090 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14091
14092 * linux-low.c (disabled_regsets, num_regsets): New.
14093 (use_regsets_p): Delete.
14094 (linux_wait_for_process): Clear disabled_regsets.
14095 (regsets_fetch_inferior_registers): Check and set it.
14096 (regsets_store_inferior_registers): Likewise.
14097 (linux_fetch_registers, linux_store_registers): Do not use
14098 use_regsets_p.
14099 (initialize_low): Allocate disabled_regsets.
14100
14101 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14102
14103 * Makefile.in (LIBOBJS): New.
14104 (OBS): Use LIBOBJS.
14105 (memmem.o): New rule.
14106 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14107 * configure: Regenerated.
14108
14109 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14110
14111 * server.c (handle_query): Never return "unsupported" for
14112 qXfer:features:read queries.
14113
14114 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14115
14116 * server.c (get_features_xml): Fix inverted condition.
14117 (handle_query): Always support qXfer:feature:read.
14118
14119 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14120
14121 * server.c (wrapper_argv): New.
14122 (start_inferior): Handle wrapper_argv. If set, expect an extra
14123 trap.
14124 (gdbserver_usage): Document --wrapper.
14125 (main): Parse --wrapper.
14126
14127 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14128
14129 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14130 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14131 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14132 (ppc_set_pc): Likewise.
14133 (ppc_arch_setup): New function.
14134 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14135 of collect_register.
14136 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14137
14138 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14139
14140 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14141 instead of linux-ppc64-low.o.
14142 * linux-ppc64-low.c: Remove file.
14143 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14144 (linux-ppc64-low.o): Remove rule.
14145
14146 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14147 (init_registers_powerpc_64): Likewise.
14148 (ppc_regmap): Conditionally define depending on __powerpc64__.
14149 (ppc_cannot_store_register): Do not special-case "fpscr" when
14150 compiled on __powerpc64__.
14151 (ppc_collect_ptrace_register): New function.
14152 (ppc_supply_ptrace_register): New function.
14153 (ppc_breakpoint): Change type to "unsigned int".
14154 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14155 (the_low_target): Conditionally provide initializers for the
14156 arch_setup member depending on __powerpc64__. Install
14157 collect_ptrace_register and supply_ptrace_register members.
14158
14159 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14160
14161 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14162 * server.c (gdbserver_xmltarget): Define.
14163 (get_features_xml): Use it to replace "target.xml" and arch_string.
14164
14165 * configure.srv: Remove srv_xmltarget. Add XML files that were
14166 mentioned there to srv_xmlfiles instead. Remove conditional tests
14167 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14168 srv_xmlfiles and srv_regobj to include all possible choices.
14169 * configure.ac (srv_xmltarget): Remove.
14170 (srv_xmlfiles): Do not add "target.xml".
14171 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14172 checks for supplementary target information.
14173 * configure: Regenerate.
14174 * Makefile.in (XML_TARGET): Remove.
14175 (target.xml): Remove rule.
14176 (clean): Do not clean up target.xml.
14177 (.PRECIOUS): Do not mention target.xml.
14178
14179 * target.h (struct target_ops): Remove arch_string member.
14180 * linux-low.c (linux_arch_string): Remove.
14181 (linux_target_ops): Remove arch_string initializer.
14182 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14183 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14184 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14185 * spu-low.c (spu_arch_string): Remove.
14186 (spu_target_ops): Remove arch_string initializer.
14187 * win32-low.c (win32_arch_string): Remove.
14188 (win32_target_ops): Remove arch_string initializer.
14189 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14190 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14191 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14192
14193 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14194
14195 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14196 by collect_ptrace_register and supply_ptrace_register hooks.
14197 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14198 instead of checking for the_low_target.left_pad_xfer.
14199 (usr_store_inferior_registers): Use collect_ptrace_register callback
14200 instead of checking for the_low_target.left_pad_xfer.
14201
14202 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14203 (s390_supply_ptrace_register): Likewise.
14204 (s390_fill_gregset): Call s390_collect_ptrace_register.
14205 (the_low_target): Update.
14206
14207 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14208 (ppc_supply_ptrace_register): Likewise.
14209 (the_low_target): Update.
14210
14211 * linux-i386-low.c (the_low_target): Update.
14212 * linux-x86-64-low.c (the_low_target): Update.
14213
14214 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14215
14216 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14217 reg-s390.o and reg-s390x.o.
14218
14219 * linux-low.c (new_inferior): New global variable.
14220 (linux_create_inferior, linux_attach): Set it.
14221 (linux_wait_for_process): Call the_low_target.arch_setup after the
14222 target has stopped for the first time.
14223 (initialize_low): Do not call the_low_target.arch_setup.
14224
14225 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14226 (s390_set_pc): Likewise.
14227 (s390_arch_setup): New function.
14228 (the_low_target): Use s390_arch_setup as arch_setup routine.
14229
14230 * regcache.c (realloc_register_cache): New function.
14231 (set_register_cache): Call it for each existing regcache.
14232
14233 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14234
14235 * server.h (init_registers): Remove prototype.
14236
14237 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14238 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14239 instead of init_registers ().
14240 * linux-arm-low.c (init_registers_arm): Add prototype.
14241 (init_registers_arm_with_iwmmxt): Likewise.
14242 (the_low_target): Add initializer for arch_setup field.
14243 * linux-cris-low.c (init_registers_cris): Add prototype.
14244 (the_low_target): Add initializer for arch_setup field.
14245 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14246 (the_low_target): Add initializer for arch_setup field.
14247 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14248 (the_low_target): Add initializer for arch_setup field.
14249 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14250 (the_low_target): Add initializer for arch_setup field.
14251 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14252 (the_low_target): Add initializer for arch_setup field.
14253 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14254 (the_low_target): Add initializer for arch_setup field.
14255 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14256 (init_registers_mips64_linux): Likewise.
14257 (the_low_target): Add initializer for arch_setup field.
14258 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14259 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14260 (the_low_target): Add initializer for arch_setup field.
14261 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14262 (init_registers_powerpc_64): Likewise.
14263 (the_low_target): Add initializer for arch_setup field.
14264 * linux-s390-low.c (init_registers_s390): Add prototype.
14265 (init_registers_s390x): Likewise.
14266 (the_low_target): Add initializer for arch_setup field.
14267 * linux-sh-low.c (init_registers_sh): Add prototype.
14268 (the_low_target): Add initializer for arch_setup field.
14269 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14270 (the_low_target): Add initializer for arch_setup field.
14271 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14272 (the_low_target): Add initializer for arch_setup field.
14273
14274 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14275 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14276 instead of init_registers ().
14277 * win32-arm-low.c (init_registers_arm): Add prototype.
14278 (the_low_target): Add initializer for arch_setup field.
14279 * win32-i386-low.c (init_registers_i386): Add prototype.
14280 (the_low_target): Add initializer for arch_setup field.
14281
14282 * spu-low.c (init_registers_spu): Add prototype.
14283 (initialize_low): Call initialie_registers_spu () instead of
14284 initialize_registers ().
14285
14286 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14287
14288 * server.c (handle_v_requests): When handling the vRun and vAttach
14289 packets, if already debugging a process, don't kill it. Return an
14290 error instead.
14291
14292 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14293
14294 * server.c (handle_query): Correct length check.
14295
14296 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14297
14298 * win32-low.c (do_initial_child_stuff): Add process handle
14299 parameter. Set current_process_handle and current_process_id from the
14300 parameters. Clear globals.
14301 (win32_create_inferior): Don't set current_process_handle and
14302 current_process_id here. Instead pass them on the call to
14303 do_initial_child_stuff.
14304 (win32_attach): Likewise.
14305 (win32_clear_inferiors): New.
14306 (win32_kill): Don't close the current process handle or the
14307 current thread handle here. Instead call win32_clear_inferiors.
14308 (win32_detach): Don't open a new handle to the process. Call
14309 win32_clear_inferiors.
14310 (win32_join): Don't rely on current_process_handle; open a new
14311 handle using the process id.
14312 (win32_wait): Call win32_clear_inferiors when the inferior process
14313 has exited.
14314
14315 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14316
14317 * server.c (monitor_show_help): Add "exit".
14318
14319 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14320
14321 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14322 (clean): Add reg-xtensa.c.
14323 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14324 * configure.srv (xtensa*-*-linux*) New target.
14325 * linux-xtensa-low.c: New.
14326 * xtensa-xtregs.c: New.
14327
14328 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14329
14330 * hostio.c: Don't include errno.h.
14331 (errno_to_fileio_errno): Move to hostio-errno.
14332 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14333 error number outputting to the target->hostio_last_error callback.
14334 (hostio_packet_error): Use FILEIO_EINVAL directly.
14335 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14336 calls to hostio_error.
14337 * hostio-errno.c: New.
14338 * server.h (hostio_last_error_from_errno): Declare.
14339 * target.h (target_ops): Add hostio_last_error member.
14340 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14341 as hostio_last_error handler.
14342 * spu-low.c (spu_target_ops): Likewise.
14343 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14344 (wince_hostio_last_error): New functions.
14345 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14346 as hostio_last_error handler.
14347 (win32_target_ops) [!_WIN32_WCE]: Register
14348 hostio_last_error_from_errno as hostio_last_error handler.
14349 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14350 (hostio-errno.o): New rule.
14351 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14352 * configure.srv (srv_hostio_err_objs): New variable. Default to
14353 hostio-errno.o.
14354 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14355 * configure: Regenerate.
14356
14357 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14358
14359 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14360 (linux_kill, linux_detach): Clean up the process list.
14361 * remote-utils.c (remote_open): Improve port number parsing.
14362 (putpkt_binary, input_interrupt): Only send interrupts if the target
14363 is running.
14364 * server.c (extended_protocol): Make static.
14365 (attached): Define earlier.
14366 (exit_requested, response_needed, program_argv): New variables.
14367 (target_running): New.
14368 (start_inferior): Clear attached here.
14369 (attach_inferior): Set attached here.
14370 (require_running): Define.
14371 (handle_query): Use require_running and target_running. Implement
14372 "monitor exit".
14373 (handle_v_attach, handle_v_run): New.
14374 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14375 (gdbserver_usage): Update.
14376 (main): Redo argument parsing. Handle --debug and --multi. Handle
14377 --attach along with other options or after the port. Save
14378 program_argv. Support no initial program. Resynchronize
14379 communication with GDB after an error. Handle "monitor exit".
14380 Use require_running and target_running. Always allow the extended
14381 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14382 restart in extended mode.
14383 * README: Refer to the GDB manual. Update --attach usage.
14384
14385 2007-12-20 Andreas Schwab <schwab@suse.de>
14386
14387 * linux-low.c (STACK_SIZE): Define.
14388 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14389 (linux_test_for_tracefork): Likewise.
14390
14391 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * linux-low.c (linux_wait_for_event): Update messages. Do not
14394 reinsert auto-delete breakpoints.
14395 * mem-break.c (struct breakpoint): Change return type of handler to
14396 int.
14397 (set_breakpoint_at): Update handler type.
14398 (reinsert_breakpoint_handler): Return 1 instead of calling
14399 delete_breakpoint.
14400 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14401 setting a new one.
14402 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14403 * mem-break.h (set_breakpoint_at): Update handler type.
14404 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14405 * win32-low.c (auto_delete_breakpoint): New.
14406 (get_child_debug_event): Use it.
14407
14408 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14409
14410 * configure.ac: Check for pread and pwrite.
14411 * hostio.c (handle_pread): Fall back to lseek and read.
14412 (handle_pwrite): Fall back to lseek and write.
14413 * config.in, configure: Regenerated.
14414
14415 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14416
14417 * server.c (myresume): Add own_buf argument.
14418 (main): Update calls.
14419
14420 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14421
14422 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14423 * remote-utils.c (remote_open): Do not call disable_async_io.
14424 (block_async_io): Delete.
14425 (unblock_async_io): Make static.
14426 (initialize_async_io): New.
14427 * server.c (handle_v_cont): Handle async I/O here.
14428 (myresume): Likewise. Move other common resume tasks here...
14429 (main): ... from here. Call initialize_async_io. Disable async
14430 I/O before the main loop.
14431 * server.h (initialize_async_io): Declare.
14432 (block_async_io, unblock_async_io): Delete prototypes.
14433 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14434
14435 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14436
14437 * remote-utils.c (readchar): Allow binary data in received messages.
14438
14439 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14440
14441 * win32-low.c (attaching): New global.
14442 (win32_create_inferior): Clear the `attaching' global.
14443 (win32_attach): Set the `attaching' global.
14444 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14445 attaching. Only set a breakpoint at the entry point if not
14446 attaching.
14447
14448 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14449
14450 * server.c (main): Don't report dll events on the initial
14451 connection on attaches.
14452
14453 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14454
14455 * server.c (main): Relax numerical bases supported for the pid of
14456 the --attach command line argument.
14457
14458 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14459
14460 * win32-low.c (win32_attach): Call OpenProcess before
14461 DebugActiveProcess, not after. Add last error output to error
14462 call.
14463
14464 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14465
14466 * win32-low.c (win32_get_thread_context)
14467 (win32_set_thread_context): New functions.
14468 (thread_rec): Use win32_get_thread_context.
14469 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14470 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14471 field.
14472
14473 2007-12-03 Leo Zayas
14474 Pedro Alves <pedro_alves@portugalmail.pt>
14475
14476 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14477 global variables.
14478 (child_add_thread): Minor cleanup.
14479 (child_continue): Resume artificially suspended threads before
14480 calling ContinueDebugEvent.
14481 (suspend_one_thread): New.
14482 (fake_breakpoint_event): New.
14483 (get_child_debug_event): Change return type to int. Check here if
14484 gdb sent an interrupt request. If a soft interrupt was requested,
14485 fake a breakpoint event. Return 0 if there is no event to handle,
14486 and 1 otherwise.
14487 (win32_wait): Don't check here if gdb sent an interrupt request.
14488 Ensure there is a valid event to handle.
14489 (win32_request_interrupt): Add soft interruption method as last
14490 resort.
14491
14492 2007-12-03 Leo Zayas
14493 Pedro Alves <pedro_alves@portugalmail.pt>
14494
14495 * win32-low.h (win32_thread_info): Add descriptions to the
14496 structure members. Replace `suspend_count' counter by a
14497 `suspended' flag.
14498 * win32-low.c (thread_rec): Update condition of when to get the
14499 context from the inferior. Rely on ContextFlags being set if it
14500 has already been retrieved. Only suspend the inferior thread if
14501 we haven't already. Warn if that fails.
14502 (continue_one_thread): s/suspend_count/suspended/. Only call
14503 ResumeThread once. Warn if that fails.
14504
14505 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14506
14507 * win32-low.c (win32_wait): Don't read from the inferior when it
14508 has already exited.
14509
14510 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14511
14512 * Makefile.in (win32_low_h): New variable.
14513 (win32-low.o): Add dependency on $(win32_low_h).
14514 (win32-arm-low.o, win32-i386-low.o): New rules.
14515
14516 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14517
14518 * hostio.c: Correct copyright year.
14519
14520 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14521
14522 * Makefile.in (OBS): Add hostio.o.
14523 (hostio.o): New rule.
14524 * server.h (handle_vFile): Declare.
14525 * hostio.c: New file.
14526 * server.c (handle_v_requests): Take packet_len and new_packet_len
14527 for binary packets. Call handle_vFile.
14528 (main): Update call to handle_v_requests.
14529
14530 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14531
14532 * linux-low.c: Include <sched.h>.
14533
14534 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14535
14536 * linux-low.c (linux_tracefork_grandchild): New.
14537 (linux_tracefork_child): Use clone.
14538 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14539
14540 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14541
14542 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14543
14544 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14545
14546 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14547
14548 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14549
14550 * inferiors.c (change_inferior_id): Delete.
14551 (add_pid_to_list, pull_pid_from_list): New.
14552 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14553 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14554 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14555 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14556 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14557 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14558 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14559 (using_threads): Always set to 1.
14560 (handle_extended_wait): New.
14561 (add_process): Do not set TID.
14562 (linux_create_inferior): Set must_set_ptrace_flags.
14563 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14564 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14565 (linux_thread_alive): Rename TID argument to LWPID.
14566 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14567 (linux_wait_for_event): Do not use TID or check using_threads. Update
14568 call to dead_thread_notify. Call handle_extended_wait.
14569 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14570 (send_sigstop): Delete sigstop_sent.
14571 (wait_for_sigstop): Avoid TID.
14572 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14573 (linux_test_for_tracefork): New.
14574 (linux_lookup_signals): Use thread_db_active and
14575 linux_supports_tracefork_flag.
14576 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14577 * linux-low.h (get_process_thread): Avoid TID.
14578 (struct process_ifo): Move thread_known and tid to the end. Remove
14579 sigstop_sent.
14580 (linux_attach_lwp, thread_db_init): Update prototypes.
14581 * server.h (change_inferior_id): Delete prototype.
14582 (add_pid_to_list, pull_pid_from_list): New prototypes.
14583 * thread-db.c (thread_db_use_events): New.
14584 (find_first_thread): Rename to...
14585 (find_one_thread): ...this. Update callers and messages. Do not
14586 call fatal. Check thread_db_use_events. Do not call
14587 change_inferior_id or new_thread_notify.
14588 (maybe_attach_thread): Update. Do not call new_thread_notify.
14589 (thread_db_init): Set thread_db_use_events. Check use_events.
14590 * utils.c (fatal, warning): Correct message prefix.
14591
14592 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14593
14594 * Makefile.in (clean): Remove new files.
14595 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14596 (powerpc-64.o, powerpc-64.c): New rules.
14597 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14598 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14599 with SPE.
14600 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14601 SPE targets.
14602 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14603 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14604 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14605 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14606 (target_regsets): Add AltiVec and SPE register sets.
14607 * configure.ac: Check for AltiVec and SPE.
14608 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14609 (ppc_fill_vrregset, ppc_store_vrregset): New.
14610 (target_regsets): Add AltiVec register set.
14611 * configure: Regenerated.
14612
14613 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14614
14615 * linux-low.c (O_LARGEFILE): Define.
14616 (linux_read_memory): Use /proc/PID/mem.
14617 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14618 * configure, config.in: Regenerated.
14619
14620 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14621
14622 * linux-low.c (linux_wait_for_event): Do not pass signals while
14623 single-stepping.
14624
14625 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14626
14627 * win32-low.c (create_process): New.
14628 (win32_create_inferior): Use create_process instead of
14629 CreateProcess. If create_process failed retry appending an ".exe"
14630 suffix. Store the GetLastError result immediatelly after
14631 create_process calls and use it on the call to error.
14632
14633 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14634
14635 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14636
14637 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14638
14639 * configure.ac: Switch license to GPLv3.
14640
14641 2007-08-01 Michael Snyder <msnyder@access-company.com>
14642
14643 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14644
14645 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14646
14647 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14648 typedef.
14649 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14650 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14651 CloseToolhelp32Snapshot.
14652 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14653 CloseToolhelp32Snapshot.
14654
14655 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14656
14657 * server.c (main): Check for inferior exit before main loop.
14658
14659 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14660
14661 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14662 instead of on tmp_desc.
14663
14664 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14665 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14668 (add_thread): Minor cleanups.
14669 (clear_inferiors): Move lower in the file. Clear the DLL
14670 list.
14671 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14672 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14673 (xml_escape_text): New.
14674 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14675 for qSupported.
14676 (handle_v_cont): Report errors.
14677 (gdbserver_version): Update.
14678 (main): Correct size of own_buf. Do not report initial DLL events.
14679 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14680 (unloaded_dll, xml_escape_text): New.
14681 * win32-low.c (enum target_waitkind): Update comments.
14682 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14683 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14684 (win32_EnumProcessModules, win32_GetModuleInformation)
14685 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14686 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14687 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14688 (win32_Module32First, win32_Module32Next, load_toolhelp)
14689 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14690 (get_child_debug_event): Handle DLL events.
14691 (win32_wait): Likewise.
14692
14693 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14694
14695 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14696 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14697
14698 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14699
14700 * win32-low.c (handle_output_debug_string): Ignore event if not
14701 waiting.
14702
14703 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14704
14705 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14706
14707 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14708
14709 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14710
14711 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14712
14713 * inferiors.c (change_inferior_id): Add comment.
14714 * linux-low.c (check_removed_breakpoint): Add an early
14715 prototype. Improve debug output.
14716 (linux_attach): Doc update.
14717 (linux_detach_one_process, linux_detach): Clean up before releasing
14718 each process.
14719 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14720 * linux-low.h (struct process_info): Doc improvement.
14721 * mem-break.c (delete_all_breakpoints): New.
14722 * mem-break.h (delete_all_breakpoints): New prototype.
14723 * thread-db.c (find_first_thread): New.
14724 (thread_db_create_event): Call it instead of
14725 thread_db_find_new_threads. Clean up unused variables.
14726 (maybe_attach_thread): Remove first thread handling.
14727 (thread_db_find_new_threads): Use find_first_thread.
14728 (thread_db_get_tls_address): Likewise.
14729
14730 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14731
14732 * thread-db.c (thread_db_find_new_threads): Add prototype.
14733 (thread_db_create_event): Check for the main thread before adding
14734 a new thread.
14735 (maybe_attach_thread): Only enable event reporting if TID == 0.
14736 (thread_db_get_tls_address): Check for new threads.
14737
14738 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14739
14740 * linux-low.c (linux_create_inferior): Try execv before execvp.
14741 * spu-low.c (spu_create_inferior): Likewise.
14742
14743 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14744
14745 * linux-low.c (linux_create_inferior): Change execv to execvp.
14746 * spu-low.c (spu_create_inferior): Likewies.
14747
14748 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14749
14750 * Makefile.in (clean): Clean new files instead of deleted ones.
14751 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14752 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14753 rules.
14754 * configure.srv: Specify XML files and new regformats for MIPS and
14755 MIPS64 GNU/Linux.
14756 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14757 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14758 an entry for the restart register.
14759 (mips_cannot_fetch_register, mips_cannot_store_register)
14760 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14761 register names to match the XML descriptions.
14762 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14763 restart register instead of $0.
14764
14765 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14766 Markus Deuling <deuling@de.ibm.com>
14767
14768 * remote-utils.c (decode_xfer_write): New function.
14769 * server.h (decode_xfer_write): Add prototype.
14770 * server.c (handle_query): Add PACKET_LEN argument. Support
14771 qXfer:spu:read and qXfer:spu:write packets.
14772 (main): Pass packet_len to handle_query.
14773 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14774 * target.h (target_ops): Add qxfer_spu.
14775
14776 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14777
14778 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14779 accessing non-seekable spufs files.
14780
14781 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14782
14783 * server.c (handle_query): Add reply for qC packet.
14784
14785 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14786 Leo Zayas <lerele@champenstudios@com>
14787
14788 * server.h (check_remote_input_interrupt_request): New function.
14789 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14790 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14791 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14792 (check_remote_input_interrupt_request): New function.
14793 * server.h (check_remote_input_interrupt_request): Declare.
14794 * win32-low.c (winapi_DebugBreakProcess,
14795 winapi_GenerateConsoleCtrlEvent): New typedefs.
14796 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14797 to 250 ms.
14798 (win32_wait): Check for remote interrupt request
14799 with check_remote_input_interrupt_request.
14800 (win32_request_interrupt): New function.
14801 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14802
14803 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14804
14805 * win32-low.c (debug_registers_changed,
14806 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14807 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14808 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14809 (thread_rec): Get context using the low target.
14810 (child_add_thread): Call thread_added on the low target,
14811 which does the same thing.
14812 (regptr): Delete.
14813 (do_initial_child_stuff): Remove debug registers references.
14814 Set context using the low target. Resume threads after
14815 setting the contexts.
14816 (child_continue): Remove dead variable. Remove debug
14817 registers references.
14818 (child_fetch_inferior_registers): Go through the low target.
14819 (do_child_store_inferior_registers): Remove.
14820 (child_store_inferior_registers): Go through the low target.
14821 (win32_resume): Remove debug registers references.
14822 Set context using the low target.
14823 (handle_exception): Change return type to void. Don't record
14824 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14825 first chance exception.
14826 (get_child_debug_event): Change return type to void. Remove
14827 goto loop. Always return after waiting for debug event.
14828 (win32_wait): Convert to switch statement. Handle spurious
14829 events.
14830
14831 * win32-i386-low.c (debug_registers_changed,
14832 debug_registers_used): New.
14833 (initial_stuff): Rename to ...
14834 (i386_initial_stuff): ... this. Clear debug registers
14835 state variables.
14836 (store_debug_registers): Delete.
14837 (i386_get_thread_context): New.
14838 (load_debug_registers): Delete.
14839 (i386_set_thread_context): New.
14840 (i386_thread_added): New.
14841 (single_step): Rename to ...
14842 (i386_single_step): ... this.
14843 (do_fetch_inferior_registers): Rename to ...
14844 (i386_fetch_inferior_register): ... this.
14845 (i386_store_inferior_register): New.
14846 (the_low_target): Adapt to new interface.
14847
14848 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14849 (arm_get_thread_context): New.
14850 (arm_set_thread_context): New.
14851 (regptr): New.
14852 (do_fetch_inferior_registers): Rename to ...
14853 (arm_fetch_inferior_register): ... this.
14854 (arm_store_inferior_register): New.
14855 (arm_wince_breakpoint): Reimplement as unsigned long.
14856 (arm_wince_breakpoint_len): Define.
14857 (the_low_target): Adapt to new interface.
14858
14859 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14860 load_debug_registers. Add get_thread_context, set_thread_context,
14861 thread_added and store_inferior_register. Rename
14862 fetch_inferior_registers to fetch_inferior_register.
14863 (regptr): Remove declaration.
14864
14865 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14866
14867 * linux-low.c (linux_detach): Change return type to int. Return 0.
14868 * spu-low.c (spu_detach): Likewise.
14869
14870 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14871
14872 * target.h (target_ops): Change return type of detach to int.
14873 Add join.
14874 (join_inferior): New.
14875 * server.c (main): Don't skip detach support on mingw32.
14876 If the inferior doesn't support detaching return error.
14877 Call join_inferior instead of using waitpid.
14878 * linux-low.c (linux_join): New.
14879 (linux_target_op): Add linux_join.
14880 * spu-low.c (spu_join): New.
14881 (spu_target_ops): Add spu_join.
14882 * win32-low.c (win32_detach): Adapt to new interface.
14883 Reopen current_process_handle before detaching. Issue a child
14884 resume before detaching.
14885 (win32_join): New.
14886 (win32_target_op): Add win32_join.
14887
14888 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14889
14890 * win32-low.c (win32-attach): Fix return value.
14891 * target.h (target_ops): Describe ATTACH return values.
14892
14893 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14894
14895 * win32-low.c (GETPROCADDRESS): Define.
14896 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14897 (winapi_DebugSetProcessKillOnExit): Likewise.
14898 (win32_create_inferior): Force usage of ansi CreateProcessA.
14899 (win32_attach): Use GETPROCADDRESS.
14900 (win32_detach): Likewise.
14901
14902 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14903
14904 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14905
14906 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14907
14908 * win32-low.c: Commit leftover changes from 2007-03-29.
14909
14910 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14913 fields short instead of int. Add explicit padding.
14914 (i387_cache_to_fsave): Remove unnecessary casts.
14915 (i387_fsave_to_cache): Doc fix.
14916 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14917
14918 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14919
14920 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14921 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14922
14923 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14924
14925 * configure.srv (arm*-*-mingw32ce*): Move near the other
14926 arm targets.
14927
14928 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14929
14930 * configure.ac: Add errno checking.
14931 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14932 sys/file.h and malloc.h.
14933 (AC_CHECK_DECLS): Add perror.
14934 (srv_mingwce): Handle.
14935 * configure.srv (i[34567]86-*-cygwin*): Add
14936 win32-i386-low.o to srv_tgtobj.
14937 (i[34567]86-*-mingw*): Likewise.
14938 (arm*-*-mingw32ce*): Add case.
14939 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14940 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14941 [__MINGW32CE__] (strerror): New function.
14942 [__MINGW32CE__] (errno): Define to GetLastError.
14943 [__MINGW32CE__] (COUNTOF): New macro.
14944 (remote_open): Remove extra close call.
14945 * mem-break.c (delete_breakpoint_at): New function.
14946 * mem-break.h (delete_breakpoint_at): Declare.
14947 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14948 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14949 [USE_WIN32API] (read, write): Add char* casts.
14950 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14951 * server.h: Include wincecompat.h on Windows CE.
14952 [HAVE_ERRNO_H]: Check.
14953 (perror): Declare if not declared.
14954 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14955 (perror_with_name): Remove errno declaration.
14956 * wincecompat.h: New.
14957 * wincecompat.c: New.
14958 * win32-low.h: New.
14959 * win32-arm-low.c: New.
14960 * win32-i386-low.c: New.
14961 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14962 (OUTMSG2): Make it safe.
14963 (_T): New macro.
14964 (COUNTOF): New macro.
14965 (NUM_REGS): Get it from the low target.
14966 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14967 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14968 (thread_rec): Let low target handle debug registers.
14969 (child_add_thread): Likewise.
14970 (child_init_thread_list): Likewise.
14971 (continue_one_thread): Likewise.
14972 (regptr): New.
14973 (do_child_fetch_inferior_registers): Move to ...
14974 * win32-i386-low.c: ... here, and rename to ...
14975 (do_fetch_inferior_registers): ... this.
14976 * win32-low.c (child_fetch_inferior_registers):
14977 Go through the low target.
14978 (do_child_store_inferior_registers): Use regptr.
14979 (strwinerror): New function.
14980 (win32_create_inferior): Handle Windows CE.
14981 Use strwinerror instead of strerror on Windows error
14982 codes. Add program to the error output.
14983 Don't close the main thread handle on Windows CE.
14984 (win32_attach): Use coredll.dll on Windows CE.
14985 (win32_kill): Close current process and current
14986 thread handles.
14987 (win32_detach): Use coredll.dll on Windows CE.
14988 (win32_resume): Let low target handle debug registers, and
14989 step request.
14990 (handle_exception): Add/Remove initial breakpoint. Avoid
14991 non-existant WSTOPSIG on Windows CE.
14992 (win32_read_inferior_memory): Cast to remove warning.
14993 (win32_arch_string): Go through the low target.
14994 (initialize_low): Call set_breakpoint_data with the low
14995 target's breakpoint.
14996 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14997 FOP_REGNUM, mappings): Move to ...
14998 * win32-i386-low.c: ... here.
14999 * win32-low.c (win32_thread_info): Move to ...
15000 * win32-low.h: ... here.
15001 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15002 win32-arm-low.c and wincecompat.c.
15003 (all:): Add $EXEEXT.
15004 (install-only:): Likewise.
15005 (gdbserver:): Likewise.
15006 (gdbreplay:): Likewise.
15007 * config.in: Regenerate.
15008 * configure: Regenerate.
15009
15010 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15011
15012 * win32-low.c: Rename typedef thread_info to
15013 win32_thread_info throughout.
15014
15015 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15016
15017 * win32-i386-low.c: Rename to ...
15018 * win32-low.c: ... this.
15019 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15020 * Makefile.in: Likewise.
15021
15022 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15023
15024 * remote-utils.c (monitor_output): Constify msg parameter.
15025 * server.h (monitor_output): Likewise.
15026 * win32-i386-low.c (handle_output_debug_string): New.
15027 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15028 handle_output_debug_string.
15029 (get_child_debug_event): Likewise.
15030
15031 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15032
15033 * server.c (main): Correct strtoul check.
15034
15035 2007-03-27 Jon Ringle <jon@ringle.org>
15036
15037 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15038
15039 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15040
15041 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15042
15043 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * terminal.h: Check HAVE_SGTTY_H.
15046
15047 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15048
15049 * remote-utils.c (remote_open): Print out the assigned port number.
15050
15051 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15052
15053 * remote-utils.c (monitor_output): New function.
15054 * server.c (debug_threads): Define here.
15055 (monitor_show_help): New function.
15056 (handle_query): Handle qRcmd.
15057 (main): Do not handle 'd' packet.
15058 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15059 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15060 of debug_threads.
15061
15062 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15063
15064 * Makefile.in (EXEEXT): New.
15065 (clean): Use $(EXEEXT).
15066
15067 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15068
15069 * target.h (target_ops): Rename send_signal to request_interrupt,
15070 and remove enum target_signal parameter.
15071 * linux-low.c (linux_request_interrupt): Rename from
15072 linux_send_signal, and always send SIGINT.
15073 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15074 and always send SIGINT.
15075 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15076 of send_signal.
15077 (input_interrupt): Likewise.
15078
15079 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15080
15081 * server.c (get_features_xml): Check if target implemented
15082 arch_string.
15083 * win32-i386-low.c (win32_arch_string): New.
15084 (win32_target_ops): Add win32_arch_string as arch_string member.
15085
15086 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15087
15088 * spu-low.c (spu_arch_string): New.
15089 (spu_target_ops): Add spu_arch_string.
15090
15091 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15092
15093 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15094 * configure.ac: Do not check for terminal.h.
15095 * configure, config.in: Regenerated.
15096
15097 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15098
15099 * Makefile.in (OBS): Add $(XML_BUILTIN).
15100 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15101 (clean): Update.
15102 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15103 (arm-with-iwmmxt.c): New.
15104 * config.in, configure: Regenerate.
15105 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15106 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15107 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15108 (arm*-*-linux*): Add iWMMXt and regset support.
15109 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15110 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15111 (arm_store_wmmxregset, target_regsets): New.
15112 * server.c (get_features_xml): Take annex argument. Check builtin
15113 XML documents.
15114 (handle_query): Handle multiple annexes.
15115
15116 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15117
15118 * remote-utils.c [USE_WIN32API] (read, write): Define.
15119 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15120 write.
15121
15122 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15123
15124 * linux-i386-low.c (the_low_target): Set arch_string.
15125 * linux-x86-64-low.c (the_low_target): Likewise.
15126 * linux-low.c (linux_arch_string): New.
15127 (linux_target_ops): Add it.
15128 * linux-low.h (struct linux_target_ops): Add arch_string.
15129 * server.c (write_qxfer_response): Use const void * for DATA.
15130 (get_features_xml): New.
15131 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15132 * target.h (struct target_ops): Add arch_string method.
15133
15134 2007-01-03 Denis Pilat <denis.pilat@st.com>
15135 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * linux-low.c (linux_kill): Handle being called with no threads.
15138 * win32-i386-low.c (win32_kill): Likewise.
15139 (get_child_debug_event): Clear current_process_handle.
15140
15141 2006-12-30 Denis PILAT <denis.pilat@st.com>
15142 Daniel Jacobowitz <dan@codesourcery.com>
15143
15144 * remote-utils.c (remote_open): Check the type of specified
15145 serial port devices before opening them.
15146 * server.c (main): Kill the inferior if an error occurs during
15147 the first remote_open.
15148
15149 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15150
15151 * README: Update supported targets.
15152
15153 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15154
15155 * Makefile.in (clean): Remove reg-mips64.c.
15156 (reg-mips64.c, reg-mips64.o): New rules.
15157 * configure.srv: Handle mips64. Include regset support for mips.
15158 * linux-mips-low.c (union mips_register): New.
15159 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15160 (mips_breakpoint, mips_breakpoint_at): Use int.
15161 (mips_collect_register, mips_supply_register)
15162 (mips_collect_register_32bit, mips_supply_register_32bit)
15163 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15164 (mips_store_fpregset, target_regsets): New.
15165 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15166
15167 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15168
15169 * configure.srv: Add target "spu*-*-*".
15170 * Makefile.in (clean): Remove reg-spu.c.
15171 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15172 * spu-low.c: New file.
15173
15174 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15175
15176 * configure.ac: Correct td_thr_tls_get_addr test.
15177 * configure: Regenerated.
15178
15179 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15180
15181 * linux-low.c (linux_wait_for_event): Reformat. Use the
15182 pass_signals array.
15183 * remote-utils.c (decode_address_to_semicolon): New.
15184 * server.c (pass_signals, handle_general_set): New.
15185 (handle_query): Mention QPassSignals for qSupported.
15186 (main): Call handle_general_set.
15187 * server.h (pass_signals, decode_address_to_semicolon): New.
15188
15189 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15190
15191 * server.c (handle_query): Correct error handling for read_auxv.
15192
15193 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15194
15195 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15196 and srv_linux_thread_db to yes.
15197 * linux-s390-low.c (s390_fill_gregset): New function.
15198 (target_regsets): Define data structure.
15199
15200 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15201
15202 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15203 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15204 * config.in, configure: Regenerated.
15205 * inferiors.c (gdb_id_to_thread): New function.
15206 (gdb_id_to_thread_id): Use it.
15207 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15208 * linux-low.h (struct process_info): Add th member.
15209 (thread_db_get_tls_address): New prototype.
15210 * remote-utils.c (decode_address): Make non-static.
15211 * server.c (handle_query): Handle qGetTLSAddr.
15212 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15213 * target.h (struct target_ops): Add get_tls_address.
15214 * thread-db.c (maybe_attach_thread): Save the thread handle.
15215 (thread_db_get_tls_address): New.
15216
15217 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15218
15219 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15220 (linux_resume_one_process): Take a siginfo_t *. Update all
15221 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15222 (struct pending_signals): Add a siginfo_t.
15223 (linux_wait_for_process): Always set last_status.
15224 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15225 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15226 * linux-low.h (struct process_info): Add last_status.
15227
15228 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15229
15230 * remote-utils.c (try_rle): New function.
15231 (putpkt_binary): Use it.
15232
15233 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15234
15235 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15236 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15237 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15238 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15239 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15240 point registers.
15241
15242 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15243
15244 * server.c (terminal_fd): New variable.
15245 (old_foreground_pgrp): Likewise.
15246 (restore_old_foreground_pgrp): New function.
15247 (start_inferior): Record the terminal file descriptor in terminal_fd
15248 and its original foreground group in old_foreground_pgrp. Register
15249 restore_old_foreground_pgrp with atexit().
15250
15251 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15252
15253 * server.c (handle_query): Correct qPart to qXfer.
15254
15255 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15256
15257 * configure.ac: Check for more headers which are missing on
15258 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15259 * configure.srv: Add Cygwin and mingw32.
15260 * remote-utils.c: Don't include headers unconditionally which
15261 are missing on mingw32. Include <winsock.h> for mingw32.
15262 (remote_open): Adjust for mingw32 support. Flush
15263 standard error after writing to it.
15264 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15265 (unblock_async_io, enable_async_io, disable_async_io)
15266 (readchar, getpkt): Update for Winsock support.
15267 (prepare_resume_reply): Expect a protocol signal number.
15268 * server.c: Disable <sys/wait.h> on mingw32.
15269 (start_inferior): Adjust for mingw32 support. Flush
15270 standard error after writing to it.
15271 (attach_inferior): Likewise. Use protocol signal
15272 numbers.
15273 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15274 and names.
15275 * win32-i386-low.c: New file.
15276 * Makefile.in (XM_CLIBS): Set.
15277 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15278 (win32-i386-low.o): New dependency rule.
15279 * linux-low.c (linux_wait): Use target signal numbers.
15280 * target.h (struct target_ops): Doc fix.
15281 * server.h (target_signal_to_name): New prototype.
15282 * gdbreplay.c: Don't include headers unconditionally which
15283 are missing on mingw32. Include <winsock.h> for mingw32.
15284 (remote_close, remote_open): Adjust for Winsock support.
15285 * configure, config.in: Regenerated.
15286
15287 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15288
15289 * server.c (decode_xfer_read, write_qxfer_response): New.
15290 (handle_query): Take a packet length argument. Handle
15291 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15292 the qSupported response.
15293 (main): Update call to handle_query.
15294
15295 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15296
15297 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15298 (putpkt_binary): Renamed from putpkt and adjusted for binary
15299 data.
15300 (putpkt): New wrapper for putpkt_binary.
15301 (readchar): Don't mask off the high bit.
15302 (decode_X_packet): New function.
15303 * server.c (main): Call putpkt_binary if a handler sets the packet
15304 length. Save the length of the incoming packet. Handle 'X'.
15305 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15306
15307 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15308
15309 * server.c (handle_query): Handle qSupported.
15310
15311 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15312
15313 * remote-utils.c (all_symbols_looked_up): New variable.
15314 (look_up_one_symbol): Check it.
15315 * server.h (look_up_one_symbol): New declaration.
15316 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15317
15318 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15319
15320 * Makefile.in (linux-arm-low.o): Update dependencies.
15321 * linux-arm-low.c: Include "gdb_proc_service.h".
15322 (PTRACE_GET_THREAD_AREA): Define.
15323 (ps_get_thread_area): New function.
15324
15325 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15326
15327 * configure.srv (m68k*-*-uclinux*): New target.
15328 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15329 (linux_resume_one_process): Remove extraneous cast.
15330 (linux_read_offsets): New.
15331 (linux_target_op): Add linux_read_offsets on mmuless systems.
15332 * server.c (handle_query): Add qOffsets logic.
15333 * target.h (struct target_ops): Add read_offsets.
15334
15335 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15336
15337 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15338 (PTRACE_GET_THREAD_AREA): Define.
15339 (ps_get_thread_area): New function.
15340 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15341 (linux-x86-64-low.o): Update.
15342
15343 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15344
15345 * configure.ac: Remove checks for prfpregset_t.
15346 * gdb_proc_service.h: New file.
15347 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15348 new "gdb_proc_service.h".
15349 * proc-service.c: Likewise.
15350 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15351 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15352 * Makefile.in (gdb_proc_service_h): Updated.
15353 * configure, config.in: Regenerated.
15354
15355 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15356
15357 * remote-utils.c (prepare_resume_reply): Move declaration
15358 of gdb_id_from_wait to the top of the block.
15359
15360 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15361
15362 * linux-low.c (regsets_store_inferior_registers): Read the regset
15363 from the target before filling it.
15364
15365 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15366
15367 * server.c (attach_inferior): Return SIGTRAP for a successful
15368 attach.
15369
15370 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15371
15372 * Makefile.in (OBS): Add version.o.
15373 (STAGESTUFF): Delete.
15374 (version.o): Add dependencies.
15375 (version.c): Replace rule.
15376 (clean): Remove version.c.
15377 * server.c (gdbserver_version): New.
15378 (gdbserver_usage): Use printf.
15379 (main): Handle --version and --help.
15380 * server.h (version, host_name): Add declarations.
15381
15382 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15383
15384 * linux-arm-low.c:
15385 * linux-arm-low.c:
15386 * inferiors.c:
15387 * i387-fp.h:
15388 * i387-fp.c:
15389 * gdbreplay.c:
15390 * regcache.c:
15391 * proc-service.c:
15392 * mem-break.h:
15393 * mem-break.c:
15394 * linux-x86-64-low.c:
15395 * linux-sh-low.c:
15396 * linux-s390-low.c:
15397 * linux-ppc64-low.c:
15398 * linux-ppc-low.c:
15399 * linux-mips-low.c:
15400 * linux-m68k-low.c:
15401 * linux-m32r-low.c:
15402 * linux-low.h:
15403 * linux-low.c:
15404 * linux-ia64-low.c:
15405 * linux-i386-low.c:
15406 * linux-crisv32-low.c:
15407 * thread-db.c:
15408 * terminal.h:
15409 * target.h:
15410 * target.c:
15411 * server.h:
15412 * server.c:
15413 * remote-utils.c:
15414 * regcache.h:
15415 * utils.c:
15416 * Makefile.in:
15417 * configure.ac:
15418 * gdbserver.1: Add (C) after Copyright. Update the FSF
15419 address.
15420
15421 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15422
15423 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15424 (arm_breakpoint_at): Recognize both breakpoints.
15425 (the_low_target): Use the correct breakpoint instruction.
15426
15427 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15428
15429 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15430 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15431 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15432 (the_low_target): Update.
15433
15434 2005-10-25 Andreas Schwab <schwab@suse.de>
15435
15436 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15437
15438 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15439 (ia64_num_regs): Reduce to 462.
15440
15441 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15442
15443 * acinclude.m4: Correct quoting.
15444 * aclocal.m4: Regenerated.
15445
15446 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15447 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15448 (thread_db_init): Call thread_db_err_str.
15449 * configure.ac: Check for TD_VERSION.
15450 * config.in, configure: Regenerated.
15451
15452 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15453
15454 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15455
15456 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15457
15458 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15459 is not available. Define HAVE_PTRACE_GETREGS if it is.
15460 * config.in, configure: Regenerated.
15461 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15462 * linux-i386-low.c, linux-m68k-low.c: Update to use
15463 HAVE_PTRACE_GETREGS.
15464 * linux-low.c (regsets_fetch_inferior_registers)
15465 (regsets_store_inferior_registers): Only return 0 if we processed
15466 GENERAL_REGS.
15467 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15468 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15469
15470 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15471
15472 * inferiors.c (struct thread_info): Add gdb_id.
15473 (add_thread): Add gdb_id argument.
15474 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15475 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15476 calls to add_thread.
15477 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15478 * server.c (handle_query): Use thread_to_gdb_id.
15479 (handle_v_cont, main): Use gdb_id_to_thread_id.
15480 * server.h (add_thread): Update prototype.
15481 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15482 prototypes.
15483
15484 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15485
15486 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15487 left-padded registers.
15488 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15489 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15490
15491 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15492
15493 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15494 * configure: Regenerate.
15495 * config.in: Regenerate.
15496 * server.h (NEED_DECLARATION_STRERROR):
15497 Replace with !HAVE_DECL_STRERROR.
15498
15499 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15500
15501 * linux-low.c (linux_wait, linux_send_signal): Don't test
15502 an unsigned long variable for > 0 if it could be MAX_ULONG.
15503 * server.c (myresume): Likewise.
15504 * target.c (set_desired_inferior): Likewise.
15505
15506 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15507
15508 * configure.ac: Simplify and improve check for socklen_t.
15509 * configure, config.in: Regenerate.
15510
15511 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15512
15513 * acconfig.h: Remove.
15514 * configure.ac: Add a test for socklen_t. Use three-argument
15515 AC_DEFINE throughout.
15516 * config.in: Regenerated using autoheader 2.59.
15517 * configure: Regenerated.
15518
15519 * gdbreplay.c (socklen_t): Provide a default.
15520 (remote_open): Use socklen_t.
15521 * remote-utils.c (socklen_t): Provide a default.
15522 (remote_open): Use socklen_t.
15523 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15524 unsigned char.
15525
15526 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15527 char for buffers.
15528 * linux-low.c (linux_read_memory, linux_write_memory)
15529 (linux_read_auxv): Likewise.
15530 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15531 (check_mem_write): Likewise.
15532 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15533 Likewise.
15534 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15535 (registers_from_string, register_data): Likewise.
15536 * server.c (handle_query, main): Likewise.
15537 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15538 (decode_M_packet): Likewise.
15539 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15540 * target.h (struct target_ops): Update read_memory, write_memory,
15541 and read_auxv.
15542 (read_inferior_memory, write_inferior_memory): Update.
15543 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15544 to unsigned char *.
15545 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15546 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15547 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15548 linux-s390-low.c, linux-sh-low.c: Update for changes in
15549 read_inferior_memory and the_low_target->breakpoint.
15550
15551 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15552
15553 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15554 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15555 * configure.srv: Add powerpc64-*-linux*.
15556 * linux-ppc64-low.c: New file.
15557
15558 2005-05-23 Orjan Friberg <orjanf@axis.com>
15559
15560 * linux-cris-low.c: New file with support for CRIS.
15561 * linux-crisv32-low.c: Ditto for CRISv32.
15562 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15563 (clean): Add reg-cris.c and reg-crisv32.c.
15564 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15565 reg-crisv32.o, and reg-crisv32.c to make rules.
15566 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15567 recognized targets.
15568
15569 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15570
15571 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15572 of sizeof (PTRACE_XFER_TYPE).
15573 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15574
15575 2005-05-12 Orjan Friberg <orjanf@axis.com>
15576
15577 * target.h (struct target_ops): Add insert_watchpoint,
15578 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15579 pointers for hardware watchpoint support.
15580 * linux-low.h (struct linux_target_ops): Ditto.
15581 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15582 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15583 to linux_target_ops.
15584 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15585 reply packet.
15586 * server.c (main): Recognize 'Z' and 'z' packets.
15587
15588 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15589
15590 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15591 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15592 (the_low_target): Add new members.
15593
15594 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15595
15596 * proc-service.c (ps_lgetregs): Search all_processes instead of
15597 all_threads.
15598
15599 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15600
15601 * server.c (start_inferior): Change return type to int.
15602 (attach_inferior): Change sigptr to int *.
15603 (handle_v_cont, handle_v_requests): Change signal to int *.
15604 (main): Change signal to int.
15605
15606 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15607
15608 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15609 * configure.srv: Add m32r*-*-linux*.
15610 * linux-m32r-low.c: New file.
15611
15612 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15613
15614 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15615
15616 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15617
15618 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15619 Take unsigned long arguments for PIDs.
15620 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15621 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15622 (wait_for_sigstop, linux_resume_one_process)
15623 (regsets_fetch_inferior_registers, linux_send_signal)
15624 (linux_read_auxv): Likewise. Update the types of variables holding
15625 PIDs. Update format string specifiers.
15626 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15627 * remote-utils.c (prepare_resume_reply): Likewise.
15628 * server.c (cont_thread, general_thread, step_thread)
15629 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15630 unsigned long.
15631 (handle_query): Update format specifiers.
15632 (handle_v_cont, main): Use strtoul for thread IDs.
15633 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15634 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15635 (general_thread, step_thread, thread_from_wait)
15636 (old_thread_from_wait): Update.
15637 * target.h (struct thread_resume): Use unsigned long for THREAD.
15638 (struct target_ops): Use unsigned long for arguments to attach and
15639 thread_alive.
15640
15641 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15642
15643 * acinclude.m4: Include bfd/bfd.m4 directly.
15644 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15645 <agriffis@toolchain.org>.
15646 * aclocal.m4, configure: Regenerated.
15647
15648 2005-01-07 Andrew Cagney <cagney@gnu.org>
15649
15650 * configure.ac: Rename configure.in, require autoconf 2.59.
15651 * configure: Re-generate.
15652
15653 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15654
15655 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15656 LIBS when finished.
15657 * aclocal.m4: Regenerated.
15658 * configure: Regenerated.
15659
15660 2004-11-21 Andreas Schwab <schwab@suse.de>
15661
15662 * linux-m68k-low.c (m68k_num_gregs): Define.
15663 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15664 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15665 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15666 (m68k_breakpoint_at): New. Add to the_low_target.
15667
15668 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15669 srv_linux_thread_db to yes.
15670
15671 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15672
15673 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15674 (ARCH_SET_FS): Likewise.
15675 (ARCH_GET_FS): Likewise.
15676 (ARCH_GET_GS): Likewise.
15677
15678 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15679
15680 * linux-i386-low.c (ps_get_thread_area): New.
15681 * linux-x86-64-low.c (ps_get_thread_area): New.
15682 * linux-low.c: Include <sys/syscall.h>.
15683 (linux_kill_one_process): Don't kill the first thread here.
15684 (linux_kill): Kill the first thread here.
15685 (kill_lwp): New function.
15686 (send_sigstop, linux_send_signal): Use it.
15687 * proc-service.c: Clean up #ifdefs.
15688 (fpregset_info): Delete.
15689 (ps_lgetregs): Update and enable implementation.
15690 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15691 implementations.
15692 * remote-utils.c (struct sym_cache, symbol_cache): New.
15693 (input_interrupt): Print a clearer message.
15694 (async_io_enabled): New variable.
15695 (enable_async_io, disable_async_io): Use it. Update comments.
15696 (look_up_one_symbol): Use the symbol cache.
15697 * thread-db.c (thread_db_look_up_symbols): New function.
15698 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15699
15700 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15701
15702 * configure.in: Test for -rdynamic.
15703 * configure: Regenerated.
15704 * Makefile (INTERNAL_LDFLAGS): New.
15705 (gdbserver, gdbreplay): Use it.
15706
15707 2004-09-02 Andrew Cagney <cagney@gnu.org>
15708
15709 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15710
15711 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15712
15713 * linux-low.c (linux_wait): Clear all_processes list also.
15714
15715 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15716
15717 * linux-low.c: Include <errno.h>. Remove extern declaration of
15718 errno.
15719
15720 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15721
15722 * gdbreplay.c, server.h, utils.c: Update copyright years.
15723
15724 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15725
15726 * server.c (main): Print child status or termination signal from
15727 variable 'signal', not 'sig'.
15728
15729 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15730
15731 * linux-low.c (linux_read_memory): Change return type to
15732 int. Check for and return error from ptrace().
15733 * target.c (read_inferior_memory): Change return type to int. Pass
15734 back return status from the_target->read_memory().
15735 * target.h (struct target_ops): Adapt *read_memory() prototype.
15736 Update comment.
15737 (read_inferior_memory): Adapt prototype.
15738 * server.c (main): Return an error packet if
15739 read_inferior_memory() returns an error.
15740
15741 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15742
15743 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15744 Unify with other clean targets.
15745
15746 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15747
15748 * server.c (handle_v_cont): Call set_desired_inferior.
15749
15750 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15751
15752 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15753
15754 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15755
15756 * linux-low.c (linux_wait): Unblock async I/O.
15757 (linux_resume): Block and enable async I/O.
15758 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15759 * server.h (block_async_io, unblock_async_io): Add prototypes.
15760
15761 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15762
15763 * remote-utils.c (remote_open): Print a status notice after
15764 opening a TCP port.
15765 * server.c (attach_inferior): Print a status notice after
15766 attaching.
15767
15768 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15769
15770 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15771
15772 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15773
15774 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15775 error packet.
15776 * server.c, target.h: Update copyright years.
15777
15778 2004-02-25 Roland McGrath <roland@redhat.com>
15779
15780 * target.h (struct target_ops): New member `read_auxv'.
15781 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15782 * linux-low.c (linux_read_auxv): New function.
15783 (linux_target_ops): Initialize `read_auxv' member to that.
15784
15785 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15786
15787 Committed by Jim Blandy <jimb@redhat.com>.
15788
15789 * linux-s390-low.c (s390_num_regs): Update.
15790 (s390_regmap): Remove control registers. Use __s390x__ predefine
15791 instead of GPR_SIZE to distiguish s390 and s390x targets.
15792
15793 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15794
15795 * linux-low.c: Update copyright year.
15796 (check_removed_breakpoint): Clear pending_is_breakpoint.
15797 (linux_set_resume_request, linux_queue_one_thread)
15798 (resume_status_pending_p): New functions.
15799 (linux_continue_one_thread): Use process->resume.
15800 (linux_resume): Only resume threads if there are no pending events.
15801 * linux-low.h (struct process_info): Add resume request
15802 pointer.
15803
15804 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15805
15806 * regcache.c (new_register_cache): Clear the allocated register
15807 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15808
15809 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15810
15811 * linux-low.c (linux_resume): Take a struct thread_resume *
15812 argument.
15813 (linux_wait): Update call.
15814 (resume_ptr): New static variable.
15815 (linux_continue_one_thread): Renamed from
15816 linux_continue_one_process. Use resume_ptr.
15817 (linux_resume): Use linux_continue_one_thread.
15818 * server.c (handle_v_cont, handle_v_requests): New functions.
15819 (myresume): New function.
15820 (main): Handle 'v' case.
15821 * target.h (struct thread_resume): New type.
15822 (struct target_ops): Change argument of "resume" to struct
15823 thread_resume *.
15824 (myresume): Delete macro.
15825
15826 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15827
15828 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15829 (uninstall): Support DESTDIR.
15830
15831 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15832
15833 * configure.srv: Add xscale*linux copy of arm*linux entry.
15834
15835 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15836
15837 * linux-arm-low.c (arm_reinsert_addr): New function.
15838 (the_low_target): Add arm_reinsert_addr.
15839
15840 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15841
15842 * mem-break.c: Remove whitespace at end of file.
15843
15844 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15845
15846 * configure.in: Check whether we need to prototype strerror.
15847 * server.h: Optionally prototype strerror.
15848 * gdbreplay.c (perror_with_name): Use strerror.
15849 * linux-low.c (linux_attach_lwp): Use strerror.
15850 * utils.c (perror_with_name): Use strerror.
15851 * config.in, configure: Regenerated.
15852
15853 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15854
15855 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15856 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15857
15858 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15859
15860 * Makefile.in (SFILES): Update.
15861 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15862 low-sun3.c: Remove files.
15863
15864 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15865
15866 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15867 (linux_detach_one_process, linux_detach): New functions.
15868 (linux_target_ops): Add linux_detach.
15869 * server.c (main): Handle 'D' packet.
15870 * target.h (struct target_ops): Add "detach" member.
15871 (detach_inferior): Define.
15872
15873 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15874
15875 From Kelley Cook <kelleycook@wideopenwest.com>:
15876 * configure.srv: Accept i[34567]86 variants.
15877
15878 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15879
15880 * linux-low.c (linux_wait_for_event): Correct comment typos.
15881 (linux_resume_one_process): Call check_removed_breakpoint.
15882 (linux_send_signal): New function.
15883 (linux_target_ops): Add linux_send_signal.
15884 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15885 of kill.
15886 * target.h (struct target_ops): Add send_signal.
15887
15888 2003-05-29 Jim Blandy <jimb@redhat.com>
15889
15890 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15891 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15892 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15893 away part of the register's value.
15894
15895 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15896
15897 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15898 (linux_wait_for_event, linux_init_signals): Likewise.
15899
15900 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15901
15902 * configure.in: Check for stdlib.h.
15903 * configure: Regenerated.
15904 * config.in: Regenerated.
15905
15906 2003-01-04 Andreas Schwab <schwab@suse.de>
15907
15908 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15909
15910 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15911
15912 * Makefile.in: Remove obsolete code.
15913
15914 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15915
15916 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15917 defined(PT_FPR0_HI).
15918
15919 2002-11-17 Stuart Hughes <seh@zee2.com>
15920
15921 * linux-arm-low.c (arm_num_regs): Increase.
15922 (arm_regmap): Include status register.
15923
15924 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15925
15926 * linux-low.c (register_addr): Remove incorrect -1 check.
15927
15928 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15929
15930 * linux-low.c (linux_create_inferior): Call setpgid. Return
15931 the new PID.
15932 (unstopped_p, linux_signal_pid): Remove.
15933 (linux_target_ops): Remove linux_signal_pid.
15934 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15935 global instead of target method.
15936 * target.h (struct target_ops): Remove signal_pid. Update comment
15937 for create_inferior.
15938 * server.c (signal_pid): New variable.
15939 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15940 gdbserver. Set the child to be the foreground process group.
15941 (attach_inferior): Set signal_pid.
15942
15943 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15944
15945 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15946
15947 2002-08-20 Jim Blandy <jimb@redhat.com>
15948
15949 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15950 default for this.
15951
15952 2002-08-01 Andrew Cagney <cagney@redhat.com>
15953
15954 * Makefile.in: Make chill references obsolete.
15955
15956 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15957
15958 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15959 * configure: Regenerate.
15960 * config.in: Regenerate.
15961
15962 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15963
15964 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15965 (perror_with_name, remote_close, remote_open, expect, play): Static.
15966
15967 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15968
15969 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15970 byte offsets instead of an array of indexes.
15971 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15972
15973 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15974
15975 * regcache.c: Add comment.
15976
15977 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15978
15979 * thread-db.c: New file.
15980 * proc-service.c: New file.
15981 * acinclude.m4: New file.
15982 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15983 proc-service.o, and thread-db.o.
15984 (linux-low.o): Add USE_THREAD_DB.
15985 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15986 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15987 * aclocal.m4: Regenerated.
15988 * config.in: Regenerated.
15989 * configure: Regenerated.
15990 * configure.in: Check for proc_service.h, sys/procfs.h,
15991 thread_db.h, and linux/elf.h headrs.
15992 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15993 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15994 Check for -lthread_db and thread support.
15995 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15996 PowerPC, and SuperH.
15997 * i387-fp.c: Constify arguments.
15998 * i387-fp.h: Likewise.
15999 * inferiors.c: (struct thread_info): Renamed from
16000 `struct inferior_info'. Remove PID member. Use generic inferior
16001 list header. All uses updated.
16002 (inferiors, signal_pid): Removed.
16003 (all_threads): New variable.
16004 (get_thread): Define.
16005 (add_inferior_to_list): New function.
16006 (for_each_inferior): New function.
16007 (change_inferior_id): New function.
16008 (add_inferior): Removed.
16009 (remove_inferior): New function.
16010 (add_thread): New function.
16011 (free_one_thread): New function.
16012 (remove_thread): New function.
16013 (clear_inferiors): Use for_each_inferior and free_one_thread.
16014 (find_inferior): New function.
16015 (find_inferior_id): New function.
16016 (inferior_target_data): Update argument type.
16017 (set_inferior_target_data): Likewise.
16018 (inferior_regcache_data): Likewise.
16019 (set_inferior_regcache_data): Likewise.
16020 * linux-low.c (linux_bp_reinsert): Remove.
16021 (all_processes, stopping_threads, using_thrads)
16022 (struct pending_signals, debug_threads, pid_of): New.
16023 (inferior_pid): Replace with macro.
16024 (struct inferior_linux_data): Remove.
16025 (get_stop_pc, add_process): New functions.
16026 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16027 Use add_process and add_thread.
16028 (linux_attach_lwp): New function, based on old linux_attach. Use
16029 add_process and add_thread. Set stop_expected for new threads.
16030 (linux_attach): New function.
16031 (linux_kill_one_process): New function.
16032 (linux_kill): Kill all LWPs.
16033 (linux_thread_alive): Use find_inferior_id.
16034 (check_removed_breakpoints, status_pending_p): New functions.
16035 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16036 Update. Use WNOHANG. Wait for cloned processes also. Update process
16037 struct for the found process.
16038 (linux_wait_for_event): New function.
16039 (linux_wait): Use it. Support LWPs.
16040 (send_sigstop, wait_for_sigstop, stop_all_processes)
16041 (linux_resume_one_process, linux_continue_one_process): New functions.
16042 (linux_resume): Support LWPs.
16043 (REGISTER_RAW_SIZE): Remove.
16044 (fetch_register): Use register_size instead. Call supply_register.
16045 (usr_store_inferior_registers): Likewise. Call collect_register.
16046 Fix recursive case.
16047 (regsets_fetch_inferior_registers): Improve error message.
16048 (regsets_store_inferior_registers): Add debugging.
16049 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16050 (unstopped_p, linux_signal_pid): New functions.
16051 (linux_target_ops): Add linux_signal_pid.
16052 (linux_init_signals): New function.
16053 (initialize_low): Call it. Initialize using_threads.
16054 * regcache.c (inferior_regcache_data): Add valid
16055 flag.
16056 (get_regcache): Fetch registers lazily. Add fetch argument
16057 and update all callers.
16058 (regcache_invalidate_one, regcache_invalidate): New
16059 functions.
16060 (new_register_cache): Renamed from create_register_cache.
16061 Return the new regcache.
16062 (free_register_cache): Change argument to a void *.
16063 (registers_to_string, registers_from_string): Call get_regcache
16064 with fetch flag set.
16065 (register_data): Make static. Pass fetch flag to get_regcache.
16066 (supply_register): Call get_regcache with fetch flag clear.
16067 (collect_register): Call get_regcache with fetch flag set.
16068 (collect_register_as_string): New function.
16069 * regcache.h: Update.
16070 * remote-utils.c (putpkt): Flush after debug output and use
16071 stderr.
16072 Handle input interrupts while waiting for an ACK.
16073 (input_interrupt): Use signal_pid method.
16074 (getpkt): Flush after debug output and use stderr.
16075 (outreg): Use collect_register_as_string.
16076 (new_thread_notify, dead_thread_notify): New functions.
16077 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16078 and general_thread.
16079 (look_up_one_symbol): Flush after debug output.
16080 * server.c (step_thread, server_waiting): New variables.
16081 (start_inferior): Don't use signal_pid. Update call to mywait.
16082 (attach_inferior): Update call to mywait.
16083 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16084 (main): Don't fetch/store registers explicitly. Use
16085 set_desired_inferior. Support proposed ``Hs'' packet. Update
16086 calls to mywait.
16087 * server.h: Update.
16088 (struct inferior_list, struct_inferior_list_entry): New.
16089 * target.c (set_desired_inferior): New.
16090 (write_inferior_memory): Constify.
16091 (mywait): New function.
16092 * target.h: Update.
16093 (struct target_ops): New signal_pid method.
16094 (mywait): Removed macro, added prototype.
16095
16096 * linux-low.h (regset_func): Removed.
16097 (regset_fill_func, regset_store_func): New.
16098 (enum regset_type): New.
16099 (struct regset_info): Add type field. Use new operation types.
16100 (struct linux_target_ops): stop_pc renamed to get_pc.
16101 Add decr_pc_after_break and breakpoint_at.
16102 (get_process, get_thread_proess, get_process_thread)
16103 (strut process_info, all_processes, linux_attach_lwp)
16104 (thread_db_init): New.
16105
16106 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16107 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16108 (the_low_target): Add new members.
16109 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16110 (i386_store_fpxregset): Constify.
16111 (target_regsets): Add new kind identifier.
16112 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16113 (i386_set_pc): Add debugging.
16114 (i386_breakpoint_at): New function.
16115 (the_low_target): Add new members.
16116 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16117 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16118 (mips_breakpoint_at): New.
16119 (the_low_target): Add new members.
16120 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16121 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16122 (the_low_target): Add new members.
16123 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16124 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16125 (the_low_target): Add new members.
16126 * linux-x86-64-low.c (target_regsets): Add new kind
16127 identifier.
16128
16129 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16130
16131 From Martin Pool <mbp@samba.org>:
16132 * server.c (gdbserver_usage): New function.
16133 (main): Call it.
16134
16135 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16136
16137 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16138 stop_at -> stop_pc.
16139
16140 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16141
16142 * Makefile.in: Remove obsolete code.
16143
16144 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16145
16146 * linux-low.c (regsets_fetch_inferior_registers),
16147 (regsets_store_inferior_registers): Removed cast to int from
16148 ptrace() calls.
16149 * regcache.h: Added declaration of struct inferior_info.
16150
16151 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16152
16153 * inferiors.c (struct inferior_info): Add regcache_data.
16154 (add_inferior): Call create_register_cache.
16155 (clear_inferiors): Call free_register_cache.
16156 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16157 * regcache.c (struct inferior_regcache_data): New.
16158 (registers): Remove.
16159 (get_regcache): New function.
16160 (create_register_cache, free_register_cache): New functions.
16161 (set_register_cache): Don't initialize the register cache here.
16162 (registers_to_string, registers_from_string, register_data): Call
16163 get_regcache.
16164 * regcache.h: Add prototypes.
16165 * server.h: Likewise.
16166
16167 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16168
16169 * mem-break.c: New file.
16170 * mem-break.h: New file.
16171 * Makefile.in: Add mem-break.o rule; update server.h
16172 dependencies.
16173 * inferiors.c (struct inferior_info): Add target_data
16174 member.
16175 (clear_inferiors): Free target_data member if set.
16176 (inferior_target_data, set_inferior_target_data): New functions.
16177 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16178 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16179 * linux-low.c (linux_bp_reinsert): New variable.
16180 (struct inferior_linux_data): New.
16181 (linux_create_inferior): Use set_inferior_target_data.
16182 (linux_attach): Likewise. Call add_inferior.
16183 (linux_wait_for_one_inferior): New function.
16184 (linux_wait): Call it.
16185 (linux_write_memory): Add const.
16186 (initialize_low): Call set_breakpoint_data.
16187 * linux-low.h (struct linux_target_ops): Add breakpoint
16188 handling members.
16189 * server.c (attach_inferior): Remove extra add_inferior
16190 call.
16191 * server.h: Include mem-break.h. Update inferior.c
16192 prototypes.
16193 * target.c (read_inferior_memory)
16194 (write_inferior_memory): New functions.
16195 * target.h (read_inferior_memory)
16196 (write_inferior_memory): Change macros to prototypes.
16197 (struct target_ops): Update comments. Add const to write_memory
16198 definition.
16199
16200 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16201
16202 * linux-low.c (usr_store_inferior_registers): Support
16203 registers which are allowed to fail to store.
16204 * linux-low.h (linux_target_ops): Likewise.
16205 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16206 (ppc_cannot_store_register): FPSCR may not be storable.
16207
16208 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16209
16210 * server.h: Include <string.h> if HAVE_STRING_H.
16211 * ChangeLog: Correct paths in last ChangeLog entry.
16212
16213 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16214
16215 * linux-low.h: Remove obsolete prototypes.
16216 (struct linux_target_ops): New.
16217 (extern the_low_target): New.
16218 * linux-low.c (num_regs, regmap): Remove declarations.
16219 (register_addr): Use the_low_target explicitly.
16220 (fetch_register): Likewise.
16221 (usr_fetch_inferior_registers): Likewise.
16222 (usr_store_inferior_registers): Likewise.
16223 * linux-arm-low.c (num_regs): Remove.
16224 (arm_num_regs): Define.
16225 (arm_regmap): Renamed from regmap, made static.
16226 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16227 made static.
16228 (arm_cannot_store_register): Renamed from cannot_store_register,
16229 made static.
16230 (the_low_target): New.
16231 * linux-i386-low.c (num_regs): Remove.
16232 (i386_num_regs): Define.
16233 (i386_regmap): Renamed from regmap, made static.
16234 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16235 made static.
16236 (i386_cannot_store_register): Renamed from cannot_store_register,
16237 made static.
16238 (the_low_target): New.
16239 * linux-ia64-low.c (num_regs): Remove.
16240 (ia64_num_regs): Define.
16241 (ia64_regmap): Renamed from regmap, made static.
16242 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16243 made static.
16244 (ia64_cannot_store_register): Renamed from cannot_store_register,
16245 made static.
16246 (the_low_target): New.
16247 * linux-m68k-low.c (num_regs): Remove.
16248 (m68k_num_regs): Define.
16249 (m68k_regmap): Renamed from regmap, made static.
16250 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16251 made static.
16252 (m68k_cannot_store_register): Renamed from cannot_store_register,
16253 made static.
16254 (the_low_target): New.
16255 * linux-mips-low.c (num_regs): Remove.
16256 (mips_num_regs): Define.
16257 (mips_regmap): Renamed from regmap, made static.
16258 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16259 made static.
16260 (mips_cannot_store_register): Renamed from cannot_store_register,
16261 made static.
16262 (the_low_target): New.
16263 * linux-ppc-low.c (num_regs): Remove.
16264 (ppc_num_regs): Define.
16265 (ppc_regmap): Renamed from regmap, made static.
16266 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16267 made static.
16268 (ppc_cannot_store_register): Renamed from cannot_store_register,
16269 made static.
16270 (the_low_target): New.
16271 * linux-s390-low.c (num_regs): Remove.
16272 (s390_num_regs): Define.
16273 (s390_regmap): Renamed from regmap, made static.
16274 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16275 made static.
16276 (s390_cannot_store_register): Renamed from cannot_store_register,
16277 made static.
16278 (the_low_target): New.
16279 * linux-sh-low.c (num_regs): Remove.
16280 (sh_num_regs): Define.
16281 (sh_regmap): Renamed from regmap, made static.
16282 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16283 made static.
16284 (sh_cannot_store_register): Renamed from cannot_store_register,
16285 made static.
16286 (the_low_target): New.
16287 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16288 (the_low_target): New.
16289
16290 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16291
16292 * Makefile.in: Add stamp-h target.
16293 * configure.in: Create stamp-h.
16294 * configure: Regenerated.
16295
16296 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16297
16298 * inferiors.c: New file.
16299 * target.c: New file.
16300 * target.h: New file.
16301 * Makefile.in: Add target.o and inferiors.o. Update
16302 dependencies.
16303 * linux-low.c (inferior_pid): New static variable,
16304 moved from server.c.
16305 (linux_create_inferior): Renamed from create_inferior.
16306 Call add_inferior. Return 0 on success instead of a PID.
16307 (linux_attach): Renamed from myattach.
16308 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16309 (linux_thread_alive): Renamed from mythread_alive.
16310 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16311 child dies.
16312 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16313 (regsets_store_inferior_registers): Correct error message.
16314 Add missing ``return 0''.
16315 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16316 (linux_store_registers): Renamed from store_inferior_registers.
16317 (linux_read_memory): Renamed from read_inferior_memory.
16318 (linux_write_memory): Renamed from write_inferior_memory.
16319 (linux_target_ops): New structure.
16320 (initialize_low): Call set_target_ops ().
16321 * remote-utils.c (unhexify): New function.
16322 (hexify): New function.
16323 (input_interrupt): Send signals to ``signal_pid''.
16324 * server.c (inferior_pid): Remove.
16325 (start_inferior): Update create_inferior call.
16326 (attach_inferior): Call add_inferior.
16327 (handle_query): New function.
16328 (main): Call handle_query for `q' packets.
16329 * server.h: Include "target.h". Remove obsolete prototypes.
16330 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16331
16332 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16333
16334 * Makefile.in: Add WARN_CFLAGS. Update configury
16335 dependencies.
16336 * configure.in: Check for <string.h>
16337 * configure: Regenerate.
16338 * config.in: Regenerate.
16339 * gdbreplay.c: Include needed system headers.
16340 (remote_open): Remove strchr prototype.
16341 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16342 * regcache.c (supply_register): Change buf argument to const void *.
16343 (supply_register_by_name): Likewise.
16344 (collect_register): Change buf argument to void *.
16345 (collect_register_by_name): Likewise.
16346 * regcache.h: Add missing prototypes.
16347 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16348 * server.c (handle_query): New function.
16349 (attached): New static variable, moved out of main.
16350 (main): Quiet longjmp clobber warnings.
16351 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16352 * utils.c (error): Remove NORETURN.
16353 (fatal): Likewise.