Make gdbserver find_register_by_number static
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2
3 * regcache.c (find_register_by_number): Make static.
4 (find_regno): Use find_register_by_number
5 * regcache.h (struct reg): Remove declaration.
6
7 2018-03-23 Alan Hayward <alan.hayward@arm.com>
8
9 * tdesc.c (target_desc::~target_desc): Move to here.
10 (target_desc::operator==): Likewise.
11 * tdesc.h (target_desc::~target_desc): Move from here.
12 (target_desc::operator==): Likewise.
13
14 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
15
16 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
17
18 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
19
20 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
21 S390_TDESC_GS.
22 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
23 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
24 and init_registers_s390_gs_linux64.
25
26 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
27
28 * linux-s390-low.c (s390_fill_gs): Remove function.
29 (s390_fill_gsbc): Remove function.
30 (s390_regsets): Set fill functions for the guarded storage regsets
31 to NULL.
32
33 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
34
35 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
36 the word size. Add comment.
37 (s390_get_wordsize): New function.
38 (s390_arch_setup): No longer select a temporary tdesc to fetch the
39 pswm with it. Instead, use s390_get_wordsize to determine the
40 word size first and derive the correct tdesc from that directly.
41
42 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * Makefile.in: Include silent-rules.mk.
45 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
46 (COMPILE): Add ECHO_CXX.
47 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
48 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
49 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
50 (version-generated.c): Add ECHO_GEN.
51 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
52 (IPAGENT_COMPILE): Add ECHO_CXX.
53 (%-generated.c): Add ECHO_REGDAT.
54
55 2018-03-14 Tom Tromey <tom@tromey.com>
56
57 PR cli/14977:
58 * ax.c (ax_printf): Special case for NULL.
59
60 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * linux-low.c (linux_qxfer_libraries_svr4): Use
63 xml_escape_text_append.
64
65 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
66
67 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
68
69 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
70
71 * server.c (handle_general_set): Remove unnecessary xstrdup.
72
73 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
74
75 * server.c (parse_debug_format_options): Adjust to
76 delim_string_to_char_ptr_vec changes.
77 * thread-db.c (thread_db_load_search): Adjust to
78 dirnames_to_char_ptr_vec changes.
79
80 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
81
82 * target.h (target_enable_btrace, target_disable_btrace)
83 (target_read_btrace, target_read_btrace_conf): Turn macro into
84 inline function. Throw error if target method is not defined.
85 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
86 check for btrace target method. Be prepared to handle exceptions
87 from btrace target methods.
88
89 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
90
91 * server.c (captured_main): Change order of error message printed
92 when the current working directory cannot be found.
93
94 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
95
96 * server.c: Include "filenames.h" and "pathstuff.h".
97 (program_name): Delete variable.
98 (program_path): New anonymous class.
99 (get_exec_wrapper): Use "program_path" instead of
100 "program_name".
101 (handle_v_run): Likewise.
102 (captured_main): Likewise.
103 (process_serial_event): Likewise.
104
105 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
106
107 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
108 (OBJS): Add "pathstuff.o".
109 * server.c (current_directory): New global variable.
110 (captured_main): Initialize "current_directory".
111
112 2018-02-26 Alan Hayward <alan.hayward@arm.com>
113
114 * tdesc.c: Use common/tdesc.h.
115 * tdesc.h: Likewise.
116
117 2018-02-20 Alan Hayward <alan.hayward@arm.com>
118 Simon Marchi <simon.marchi@ericsson.com>
119
120 * Makefile.in: Switch order of make rules.
121
122 2018-02-19 Alan Hayward <alan.hayward@arm.com>
123
124 * Makefile.in: Add common directory in build.
125 * configure.ac: Add common reference.
126 * configure: Regenerate.
127
128 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
129
130 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
131 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
132 * spu-low.c (spu_target_ops): Likewise.
133 * win32-low.c (win32_target_ops): Likewise.
134 * server.c (supported_btrace_packets): Report packets unconditionally.
135 * target.h (target_ops) <supports_btrace>: Remove.
136 (target_supports_btrace): Remove.
137
138 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
139
140 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
141 (handle_btrace_disable): Change return type to void. Use exceptions
142 to report errors.
143 (handle_btrace_general_set): Catch exception and copy message to
144 return message.
145
146 2018-02-08 Tom Tromey <tom@tromey.com>
147
148 * linux-low.c (install_software_single_step_breakpoints): Use
149 make_scoped_restore.
150 * inferiors.c (make_cleanup_restore_current_thread): Remove.
151 (do_restore_current_thread_cleanup): Remove.
152 * gdbthread.h (make_cleanup_restore_current_thread): Don't
153 declare.
154
155 2018-02-08 Tom Tromey <tom@tromey.com>
156
157 * mem-break.c (set_raw_breakpoint_at): Use
158 gdb::unique_xmalloc_ptr.
159
160 2018-01-30 Pedro Alves <palves@redhat.com>
161
162 PR gdb/13211
163 * target.c (target_terminal::terminal_state): Rename to ...
164 (target_terminal::m_terminal_state): ... this.
165
166 2018-01-19 James Clarke <jrtc27@jrtc27.com>
167
168 * linux-low.c (handle_extended_wait): Surround call to
169 thread_db_notice_clone with #ifdef USE_THREAD_DB.
170
171 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
172
173 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
174 linux_ptrace_attach_fail_reason_string now returning an
175 std::string.
176 (linux_attach): Likewise.
177 * thread-db.c (attach_thread): Likewise.
178
179 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
180
181 PR gdb/21559
182 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
183 checking for fs_base/gs_base fields in struct user_regs_struct.
184 * configure: Regenerate.
185
186 2018-01-16 Yao Qi <yao.qi@linaro.org>
187
188 PR gdb/18749
189 * linux-low.c (fetch_register): Call supply_register instead of
190 error.
191
192 2018-01-08 Yao Qi <yao.qi@linaro.org>
193 Simon Marchi <simon.marchi@ericsson.com>
194
195 * Makefile.in (OBS): Remove selftest.o.
196 * configure.ac: Set srv_selftest_objs if $development is true.
197 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
198 * configure: Re-generated.
199 * server.c (captured_main): Wrap variable selftest_filter with
200 GDB_SELF_TEST.
201
202 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
203
204 * server.c (parse_debug_format_options): Return std::string.
205 (handle_monitor_command, captured_main): Adjust.
206
207 2018-01-05 Pedro Alves <palves@redhat.com>
208
209 PR gdb/18653
210 * server.c (captured_main): Pass quiet=false to
211 save_original_signals_state.
212
213 2018-01-01 Joel Brobecker <brobecker@adacore.com>
214
215 * gdbreplay.c (gdbreplay_version): Update copyright year in
216 version message.
217 * server.c (gdbserver_version): Likewise.
218
219 2017-12-08 Tom Tromey <tom@tromey.com>
220
221 * ax.c (ax_printf): Update.
222
223 2017-12-07 Yao Qi <yao.qi@linaro.org>
224
225 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
226 aarch64_linux_read_description.
227 * linux-amd64-ipa.c (idx2mask): New array.
228 (get_ipa_tdesc): Move idx2mask out.
229 (initialize_low_tracepoint): Initialize target descriptions.
230 * linux-i386-ipa.c (idx2mask): New array.
231 (get_ipa_tdesc): Move idx2mask out.
232 (initialize_low_tracepoint): Initialize target descriptions.
233
234 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
235
236 * tdesc.c (struct tdesc_type): Change return type.
237 (tdesc_add_flag): Change parameter type.
238 (tdesc_add_bitfield): Likewise.
239 (tdesc_add_field): Likewise.
240 (tdesc_set_struct_size): Likewise.
241
242 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
243
244 * regcache.c (registers_to_string): Remove unused variable.
245
246 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
247
248 * inferiors.c (for_each_inferior_with_data): Remove.
249 * inferiors.h (for_each_inferior_with_data): Remove.
250 * server.c (handle_qxfer_threads_worker): Change parameter type.
251 (handle_qxfer_threads_proper): Use for_each_thread.
252
253 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
254
255 * inferiors.c (for_each_inferior): Remove.
256 (clear_inferiors): Use for_each_thread.
257 * inferiors.h (for_each_inferior): Remove.
258 * linux-low.c (linux_wait_for_event_filtered): Use
259 for_each_thread.
260 (linux_stabilize_threads): Likewise.
261 * regcache.c (regcache_release): Likewise.
262 * server.c (gdb_wants_all_threads_stopped): Likewise.
263 (clear_pending_status_callback): Remove.
264 (handle_status): Use for_each_thread.
265 (captured_main): Likewise.
266 * win32-low.c (child_init_thread_list): Likewise.
267 (win32_clear_inferiors): Likewise.
268 (fake_breakpoint_event): Likewise.
269
270 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
271
272 * inferiors.h (find_inferior): Remove.
273 * inferiors.c (find_inferior): Remove.
274
275 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
276
277 * linux-low.c (resume_status_pending_p): Update comment.
278 (need_step_over_p): Update comment.
279
280 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
281
282 * linux-low.c (proceed_one_lwp): Return void, change parameter
283 type.
284 (unsuspend_and_proceed_one_lwp): Likewise.
285 (proceed_all_lwps): Use for_each_thread.
286 (unstop_all_lwps): Likewise.
287
288 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
289
290 * linux-low.c (linux_resume_one_thread): Return void, take
291 parameter directly.
292 (linux_resume): Use for_each_thread.
293
294 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
295
296 * linux-low.c (send_sigstop_callback): Return void, change
297 parameter type. Rename to...
298 (send_sigstop): ... this.
299 (suspend_and_send_sigstop_callback): Return void, change parameter
300 type. Rename to...
301 (suspend_and_send_sigstop): ... this.
302 (stop_all_lwps): Use for_each_thread.
303
304 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
305
306 * linux-low.c (lwp_running): Return bool, remove unused
307 argument.
308 (linux_stabilize_threads): Use find_thread.
309
310 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
311
312 * linux-low.c (select_singlestep_lwp_callback): Remove.
313 (count_events_callback): Remove.
314 (select_event_lwp_callback): Remove.
315 (select_event_lwp): Use find_thread/for_each_thread.
316
317 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
318
319 * linux-low.c (not_stopped_callback): Return bool, take filter
320 argument directly.
321 (linux_wait_for_event_filtered): Use find_thread.
322 (linux_wait_1): Likewise.
323
324 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
325
326 * linux-low.c (same_lwp): Remove.
327 (find_lwp_pid): Use find_thread.
328
329 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
330
331 * linux-low.c (delete_lwp_callback): Remove.
332 (linux_mourn): Use for_each_thread.
333
334 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
335
336 * linux-low.c (linux_detach_lwp_callback): Return void, remove
337 args parameter, don't check for pid.
338 (linux_detach): Use for_each_thread.
339
340 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
341
342 * linux-low.c (struct counter): Remove.
343 (second_thread_of_pid_p): Remove.
344 (last_thread_of_process_p): Use find_thread.
345
346 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
347
348 * inferiors.c (find_inferior_in_random): Remove.
349 * inferiors.h (find_inferior_in_random): Remove.
350 * linux-low.c (status_pending_p_callback): Return bool, accept
351 parameter ptid directly.
352 (linux_wait_for_event_filtered): Use find_thread_in_random.
353 (linux_wait_1): Likewise.
354
355 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
356
357 * inferiors.c (find_inferior_id): Remove.
358 (find_thread_ptid): Move implemention from find_inferior_id to
359 here.
360 * inferiors.h (find_inferior_id): Remove.
361 * server.c (handle_status): Use find_thread_ptid.
362 (process_serial_event): Likewise.
363 * thread-db.c (find_one_thread): Likewise.
364 (thread_db_thread_handle): Likewise.
365 * win32-low.c (thread_rec): Likewise.
366 (child_delete_thread): Likewise.
367 (win32_thread_alive): Likewise.
368 (get_child_debug_event): Likewise.
369
370 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
371
372 * linux-mips-low.c (update_watch_registers_callback): Return
373 void, remove pid_p parameter, don't check for pid.
374 (mips_insert_point, mips_remove_point): Use for_each_thread.
375
376 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
377
378 * lynx.low (lynx_delete_thread_callback): Remove.
379 (lynx_mourn): Use for_each_thread.
380
381 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
382
383 * regcache.c (regcache_invalidate_one): Remove.
384 (regcache_invalidate_pid): use for_each_thread.
385
386 2017-11-26 Tom Tromey <tom@tromey.com>
387
388 * linux-low.c (linux_create_inferior): Update.
389
390 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
391
392 * spu-low.c (spu_create_inferior): Fix typo in argument name.
393
394 2017-11-24 Alan Hayward <alan.hayward@arm.com>
395
396 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
397 * linux-aarch64-low.c (initialize_low_arch): Call init func.
398 * linux-aarch64-tdesc-selftest.c: New file.
399 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
400
401 2017-11-24 Alan Hayward <alan.hayward@arm.com>
402
403 * configure.srv: Add new file.
404 * linux-aarch64-low.c (initialize_low_arch): Call init func.
405 * linux-aarch64-tdesc-selftest.c: New file.
406 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
407
408 2017-11-24 Alan Hayward <alan.hayward@arm.com>
409
410 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
411 * linux-aarch64-low.c (initialize_low_arch): Remove init.
412 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
413
414 2017-11-24 Alan Hayward <alan.hayward@arm.com>
415
416 * configure.srv: Add new files.
417 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
418 aarch64_linux_read_description.
419 * linux-aarch64-low.c (aarch64_linux_read_description):
420 Merge with aarch64_arch_setup.
421 (aarch64_arch_setup): Call aarch64_linux_read_description.
422 * linux-aarch64-tdesc.c: New file.
423 * linux-aarch64-tdesc.h: New file.
424
425 2017-11-24 Yao Qi <yao.qi@linaro.org>
426
427 * configure.srv: Set $srv_regobj for tic6x-linux.
428 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
429 (tic6x_read_description): Move some code to tic6x_arch_setup.
430 (tic6x_tdesc_test): New function.
431 (initialize_low_arch): Call selftests::register_test.
432
433 2017-11-22 Yao Qi <yao.qi@linaro.org>
434
435 * remote-utils.c (prepare_resume_reply): Use memcpy.
436
437 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
438
439 * linux-low.c (kill_one_lwp_callback): Return void, take
440 argument directly, don't filter on pid.
441 (linux_kill): Use for_each_thread.
442
443 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
444
445 * linux-low.c (need_step_over_p): Return bool, remove dummy
446 argument.
447 (linux_resume, proceed_all_lwps): Use find_thread.
448
449 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
450
451 * linux-low.c (resume_status_pending_p): Return bool, remove
452 flag_p argument.
453 (linux_resume): Use find_thread.
454
455 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
456
457 * linux-low.c (struct thread_resume_array): Remove.
458 (linux_set_resume_request): Return void, take arguments
459 directly.
460 (linux_resume): Use for_each_thread.
461
462 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
463
464 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
465 return bool, remove data argument.
466 (linux_stabilize_threads): Use find_thread.
467
468 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
469
470 * linux-low.c (unsuspend_one_lwp): Remove.
471 (unsuspend_all_lwps): Use for_each_thread, inline code from
472 unsuspend_one_lwp.
473
474 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
475
476 * gdbthread.h (find_thread): Add overload with ptid_t filter.
477 * linux-low.c (struct iterate_over_lwps_args): Remove.
478 (iterate_over_lwps_filter): Remove.
479 (iterate_over_lwps): Use find_thread.
480
481 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
482
483 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
484 (linux_handle_new_gdb_connection): Use for_each_thread, inline
485 code from reset_lwp_ptrace_options_callback.
486
487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
488
489 * linux-arm-low.c (struct update_registers_data): Remove.
490 (update_registers_callback): Return void, take arguments
491 directly, don't check thread's pid.
492 (arm_insert_point, arm_remove_point): Use for_each_thread.
493
494 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
495
496 * win32-low.c (continue_one_thread): Return void, take argument
497 directly.
498 (child_continue): Use for_each_thread.
499
500 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
501
502 * win32-i386-low.c (update_debug_registers_callback): Rename
503 to ...
504 (update_debug_registers): ... this, return void, remove pid_p arg.
505 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
506
507 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
508
509 * inferiors.h (struct process_info): Add constructor, initialize
510 fields..
511 <syscalls_to_catch>: Change type to std::vector<int>.
512 * inferiors.c (add_process): Allocate process_info with new.
513 (remove_process): Free process_info with delete.
514 * linux-low.c (handle_extended_wait): Adjust.
515 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
516 * server.c (handle_general_set): Adjust.
517
518 2017-11-16 Pedro Alves <palves@redhat.com>
519
520 * remote-utils.c (remote_close): Block SIGIO signals instead of
521 uninstalling the SIGIO handler.
522
523 2017-11-16 Alan Hayward <alan.hayward@arm.com>
524
525 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
526
527 2017-11-16 Yao Qi <yao.qi@linaro.org>
528
529 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
530 (tic6x_store_gregset): Likewise.
531 (tic6x_usrregs_info): Move it up.
532
533 2017-11-15 Alan Hayward <alan.hayward@arm.com>
534
535 * Makefile.in: Update arch rules.
536 * configure.srv: Explicitly mark arch/ files.
537
538 2017-11-13 Andreas Schwab <schwab@suse.de>
539
540 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
541 function.
542 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
543
544 2017-11-06 Pedro Alves <palves@redhat.com>
545
546 * config.in, configure: Regenerate.
547
548 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
549
550 * target.c (struct thread_search): Remove.
551 (thread_search_callback): Remove.
552 (prepare_to_access_memory): Use for_each_thread instead of
553 find_inferior. Inline code from thread_search_callback.
554
555 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
556
557 * server.c (struct visit_actioned_threads_data): Remove.
558 (visit_actioned_threads): Change prototype to take arguments
559 directly.
560 (resume): Use find_thread instead of find_inferior.
561
562 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
563
564 * server.c (queue_stop_reply_callback): Change prototype, return
565 void.
566 (find_status_pending_thread_callback): Remove.
567 (handle_status): Replace find_inferior with find_thread and
568 for_each_thread.
569
570 2017-10-25 Alan Hayward <alan.hayward@arm.com>
571
572 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
573 with REGNO.
574 (aarch64_store_gregset): Likewise.
575 (aarch64_fill_fpregset): Likewise.
576 (aarch64_store_fpregset): Likewise.
577
578 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
579
580 * gdbthread.h (find_thread, for_each_thread): New functions.
581 * inferiors.c (thread_of_pid): Remove.
582 (find_any_thread_of_pid): Use find_thread.
583 * linux-low.c (num_lwps): Use for_each_thread.
584
585 2017-10-17 Yao Qi <yao.qi@linaro.org>
586
587 * Makefile.in: Remove one rule.
588 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
589
590 2017-10-17 Yao Qi <yao.qi@linaro.org>
591
592 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
593 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
594
595 2017-10-17 Yao Qi <yao.qi@linaro.org>
596
597 * configure.srv: Rename arm.o with arch/arm.o.
598
599 2017-10-17 Yao Qi <yao.qi@linaro.org>
600
601 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
602 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
603 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
604 (arch-i386.o, arch-amd64.o): Remove rules.
605 (arch/%.o): New rule.
606 Update POSTCOMPILE and COMPILE.pre.
607 * configure.ac: Invoke AC_CONFIG_COMMANDS.
608 * configure: Re-generated.
609 * configure.srv: Replace arch-i386.o with arch/i386.o.
610 Replace arch-amd64.o with arch/amd64.o.
611
612 2017-10-16 Yao Qi <yao.qi@linaro.org>
613
614 * configure: Regenerated.
615
616 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
617
618 * inferiors.h: (struct inferior_list): Remove.
619 (struct inferior_list_entry); Remove.
620 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
621 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
622 get_first_inferior): Remove.
623 (for_each_inferior, for_each_inferior_with_data, find_inferior,
624 find_inferior_id, find_inferior_in_random): Change signature.
625 * inferiors.c (all_threads): Change type to
626 std::list<thread_info *>.
627 (get_thread): Remove macro.
628 (find_inferior, find_inferior_id): Change signature, implement
629 using find_thread.
630 (find_inferior_in_random): Change signature, implement using
631 find_thread_in_random.
632 (for_each_inferior, for_each_inferior_with_data): Change
633 signature, implement using for_each_thread.
634 (add_inferior_to_list, remove_inferior): Remove.
635 (add_thread, get_first_thread, thread_of_pid,
636 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
637 (get_first_inferior, one_inferior_p, clear_inferior_list):
638 Remove.
639 (clear_inferiors, get_thread_process): Update.
640 * gdbthread.h: Include <list>.
641 (struct thread_info) <entry>: Remove field.
642 <id>: New field.
643 (all_threads): Change type to std::list<thread_info *>.
644 (get_first_inferior): Add doc.
645 (find_thread, for_each_thread, find_thread_in_random): New
646 functions.
647 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
648 * linux-arm-low.c (update_registers_callback): Update.
649 * linux-low.c (second_thread_of_pid_p): Update.
650 (kill_one_lwp_callback, linux_detach_lwp_callback,
651 delete_lwp_callback, status_pending_p_callback, same_lwp,
652 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
653 iterate_over_lwps, not_stopped_callback,
654 resume_stopped_resumed_lwps, count_events_callback,
655 select_singlestep_lwp_callback, select_event_lwp_callback,
656 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
657 suspend_and_send_sigstop_callback, wait_for_sigstop,
658 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
659 lwp_running, linux_set_resume_request, resume_status_pending_p,
660 need_step_over_p, start_step_over, linux_resume_one_thread,
661 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
662 reset_lwp_ptrace_options_callback): Update.
663 * linux-mips-low.c (update_watch_registers_callback): Update.
664 * regcache.c (regcache_invalidate_one, regcache_invalidate):
665 Update.
666 (free_register_cache_thread_one): Remove.
667 (regcache_release): Update.
668 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
669 handle_qxfer_threads_worker): Update.
670 (handle_query): Update, use list iterator.
671 (visit_actioned_threads, handle_pending_status,
672 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
673 clear_pending_status_callback, set_pending_status_callback,
674 find_status_pending_thread_callback, handle_status,
675 process_serial_event): Update.
676 * target.c (thread_search_callback): Update.
677 * thread-db.c (thread_db_get_tls_address): Update.
678 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
679 Update.
680 * win32-i386-low.c (update_debug_registers_callback): Update.
681 * win32-low.c (delete_thread_info, child_delete_thread,
682 continue_one_thread, suspend_one_thread,
683 get_child_debug_event): Adjust.
684
685 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
686
687 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
688 * inferiors.h: Include <list>.
689 (struct process_info) <entry>: Remove field.
690 <pid>: New field.
691 (pid_of): Change macro to function.
692 (ptid_of, lwpid_of): Remove macro.
693 (all_processes): Change type to std::list<process_info *>.
694 (ALL_PROCESSES): Remove macro.
695 (for_each_process, find_process): New function.
696 * inferiors.c (all_processes): Change type to
697 std::list<process_info *>.
698 (find_thread_process): Adjust.
699 (add_process): Likewise.
700 (remove_process): Likewise.
701 (find_process_pid): Likewise.
702 (get_first_process): Likewise.
703 (started_inferior_callback): Remove.
704 (have_started_inferiors_p): Adjust.
705 (attached_inferior_callback): Remove.
706 (have_attached_inferiors_p): Adjust.
707 * linux-low.c (check_zombie_leaders): Likewise.
708 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
709 (x86_linux_update_xmltarget): Adjust.
710 * server.c (handle_query): Likewise.
711 (gdb_reattached_process): Remove.
712 (handle_status): Adjust.
713 (kill_inferior_callback): Likewise.
714 (detach_or_kill_inferior): Remove.
715 (print_started_pid): Likewise.
716 (print_attached_pid): Likewise.
717 (detach_or_kill_for_exit): Update.
718 (process_serial_event): Likewise.
719 * linux-arm-low.c (arm_new_fork): Likewise.
720
721 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
722
723 * dll.h: Include <list>.
724 (struct dll_info): Add constructor.
725 <entry>: Remove field.
726 (all_dlls): Change type to std::list<dll_info>.
727 * dll.c: Include <algorithm>.
728 (get_dll): Remove macro.
729 (all_dlls): Change type to std::list<dll_info *>.
730 (free_one_dll): Remove.
731 (match_dll): Likewise.
732 (loaded_dll): Adjust.
733 (unloaded_dll): Adjust to all_dlls type change, use
734 std::find_if. Inline code from match_dll.
735 (clear_dlls): Adjust to all_dlls type change.
736 * server.c (emit_dll_description): Remove.
737 (handle_qxfer_libraries): Adjust to all_dlls type change,
738 integrate emit_dll_description's functionality.
739
740 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
741
742 * linux-low.h (struct linux_target_ops) <delete_process>: New
743 field.
744 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
745 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
746 (struct linux_target_ops): Add delete_process callback.
747 * linux-arm-low.c (arm_delete_process): New.
748 (struct linux_target_ops): Add delete_process callback.
749 * linux-bfin-low.c (struct linux_target_ops): Likewise.
750 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
751 * linux-m32r-low.c (struct linux_target_ops): Likewise.
752 * linux-mips-low.c (mips_linux_delete_process): New.
753 (struct linux_target_ops): Add delete_process callback.
754 * linux-ppc-low.c (struct linux_target_ops): Likewise.
755 * linux-s390-low.c (struct linux_target_ops): Likewise.
756 * linux-sh-low.c (struct linux_target_ops): Likewise.
757 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
758 * linux-tile-low.c (struct linux_target_ops): Likewise.
759 * linux-x86-low.c (x86_linux_delete_process): New.
760 (struct linux_target_ops): Add delete_process callback.
761 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
762
763 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
764
765 * linux-aarch64-low.c (the_low_target): Add thread delete
766 callback.
767 * linux-arm-low.c (arm_delete_thread): New function.
768 (the_low_target): Add thread delete callback.
769 * linux-bfin-low.c (the_low_target): Likewise.
770 * linux-crisv32-low.c (the_low_target): Likewise.
771 * linux-low.c (delete_lwp): Invoke delete_thread callback if
772 set.
773 * linux-low.h (struct linux_target_ops) <delete_thread>: New
774 field.
775 * linux-m32r-low.c (the_low_target): Add thread delete callback.
776 * linux-mips-low.c (mips_linux_delete_thread): New function.
777 (the_low_target): Add thread delete callback.
778 * linux-ppc-low.c (the_low_target): Likewise.
779 * linux-s390-low.c (the_low_target): Likewise.
780 * linux-sh-low.c (the_low_target): Likewise.
781 * linux-tic6x-low.c (the_low_target): Likewise.
782 * linux-tile-low.c (the_low_target): Likewise.
783 * linux-x86-low.c (the_low_target): Likewise.
784 * linux-xtensa-low.c (the_low_target): Likewise.
785
786 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
787
788 * win32-low.c: Include "common-inferior.h".
789
790 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
791
792 * inferiors.c (set_inferior_cwd): New function.
793 * server.c (handle_general_set): Handle QSetWorkingDir packet.
794 (handle_query): Inform that QSetWorkingDir is supported.
795 * win32-low.c (create_process): Pass the inferior's cwd to
796 CreateProcess.
797
798 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
799
800 * inferiors.c (current_inferior_cwd): New global variable.
801 (get_inferior_cwd): New function.
802 * inferiors.h (struct process_info) <cwd>: New field.
803
804 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
805
806 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
807 (OBS): Add gdb_tilde_expand.o.
808
809 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
810
811 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
812 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
813
814 2017-09-29 Pedro Alves <palves@redhat.com>
815
816 * ax.c (gdb_parse_agent_expr): Constify.
817 * ax.h (gdb_parse_agent_expr): Constify.
818 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
819 Constify.
820 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
821 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
822 * remote-utils.h (read_ptid): Constify.
823 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
824 (process_point_options, process_serial_event): Constify.
825 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
826 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
827 (cmd_qtbuffer): Constify.
828
829 2017-09-29 Pedro Alves <palves@redhat.com>
830
831 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
832 fails.
833
834 2017-09-29 Pedro Alves <palves@redhat.com>
835
836 * linux-low.c (handle_extended_wait): Pass parent thread instead
837 of process to thread_db_notice_clone.
838 * linux-low.h (thread_db_notice_clone): Replace parent process
839 parameter with parent thread parameter.
840 * thread-db.c (find_one_thread): Add comment.
841 (thread_db_notice_clone): Replace parent process parameter with
842 parent thread parameter. Temporarily switch to the parent thread.
843
844 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
845
846 * gdbthread.h: Include "common-gdbthread.h".
847 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
848 "if" when validating the ptid.
849 * remote-utils.c: Include "gdbthread.h".
850 (prepare_resume_reply): Use "switch_to_thread".
851 * target.c (done_accessing_memory): Likewise.
852
853 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
854
855 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
856 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
857 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
858 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
859 s390x-gs-linux64-ipa.o to ipa_obj.
860 * linux-s390-low.c (HWCAP_S390_GS): New define.
861 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
862 New functions.
863 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
864 (s390_arch_setup): Check for guarded-storage support and choose
865 appropriate tdesc.
866 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
867 init_registers_s390x_gs_linux64.
868 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
869 enum value.
870 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
871 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
872
873 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
874
875 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
876
877 2017-09-21 Kevin Buettner <kevinb@redhat.com>
878
879 * linux-low.h (struct lwp_info): Add new field, thread_handle.
880 (thread_db_thread_handle): Declare.
881 * linux-low.c (linux_target_ops): Initialize thread_handle.
882 * server.c (handle_qxfer_threads_worker): Add support for
883 "handle" attribute.
884 * target.h (struct target_ops): Add new function pointer,
885 thread_handle.
886 (target_thread_handle): Define.
887 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
888 field in lwp.
889 (thread_db_thread_handle): New function.
890
891 2017-09-21 Kevin Buettner <kevinb@redhat.com>
892
893 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
894 * linux-low.h (thread_db_notice_clone): Declare.
895 * thread-db.c (thread_db_notice_clone): New function.
896
897 2017-09-21 Pedro Alves <palves@redhat.com>
898
899 * server.c (gdb_read_memory, handle_status, process_serial_event)
900 (handle_serial_event, handle_target_event): Adjust to
901 set_desired_thread prototype change.
902 * target.c (set_desired_thread): Remove 'use_general' parameter
903 and adjust.
904 * target.h (set_desired_thread): Remove 'use_general' parameter.
905
906 2017-09-20 Tom Tromey <tom@tromey.com>
907
908 * target.c (target_terminal::terminal_state): Define.
909 (target_terminal::init): Rename from target_terminal_init.
910 (target_terminal::inferior): Rename from
911 target_terminal_inferior.
912 (target_terminal::ours): Rename from target_terminal_ours.
913 (target_terminal::ours_for_output, target_terminal::info): New.
914
915 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
916
917 * server.c (accumulate_file_name_length): Remove.
918 (emit_dll_description): Adjust to std::string change.
919 (handle_qxfer_libraries): Use std::string to hold document.
920
921 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
922
923 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
924 return type of xml_escape_text.
925 * server.c (emit_dll_description): Likewise.
926
927 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
928
929 * server.c (captured_main): Accept argument for --selftest.
930 Update run_tests call.
931 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
932 when registering selftests.
933
934 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
935
936 * regcache.c (get_thread_regcache): Update code to use "std::vector"
937 instead of "VEC" for "target_desc.reg_defs".
938 (regcache_cpy): Likewise.
939 (registers_to_string): Likewise.
940 (registers_from_string): Likewise.
941 (find_regno): Likewise.
942 (supply_regblock): Likewise.
943 (regcache_raw_read_unsigned): Likewise.
944 * tdesc.c (init_target_desc): Likewise.
945 (tdesc_create_reg): Likewise.
946 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
947 (struct target_desc) <reg_defs>: Convert to "std::vector".
948 (target_desc): Do not initialize "reg_defs".
949 (~target_desc): Update code to use "std::vector" instead of "VEC"
950 for "target_desc.reg_defs".
951 (operator==): Likewise.
952
953 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
954
955 * inferiors.h (thread_to_gdb_id): Remove.
956 * inferiors.c (thread_to_gdb_id): Remove.
957 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
958 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
959 lynx_store_registers, lynx_read_memory, lynx_write_memory):
960 Likewise.
961 * nto-low.c (nto_fetch_registers, nto_store_registers,
962 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
963
964 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
965
966 * inferiors.h (gdb_id_to_thread_id): Remove.
967 * inferiors.c (gdb_id_to_thread_id): Remove.
968 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
969 removal. Move pid declaration closer to where it's used.
970
971 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
972
973 * server.c (handle_detach): New function.
974 (process_serial_event): Move code out, call handle_detach.
975
976 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
977
978 * server.c (require_running): Rename to ...
979 (require_running_or_return): ... this ...
980 (require_running_or_break): ... and this.
981 (handle_query, process_serial_event): Adjust.
982
983 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
984
985 * linux-low.c (linux_set_resume_request): Remove unused
986 variables.
987
988 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
989
990 * server.c (first_thread_of): Remove.
991 (process_serial_event): Replace usage of first_thread_of with
992 find_any_thread_of_pid.
993 * tracepoint.c (same_process_p): Remove.
994 (gdb_agent_about_to_close): Replace usage of same_process_p with
995 find_any_thread_of_pid.
996 * linux-x86-low.c (same_process_callback): Remove.
997 (x86_arch_setup_process_callback): Replace usage of
998 same_process_callback with find_any_thread_of_pid.
999 * thread-db.c (any_thread_of): Remove.
1000 (switch_to_process): Replace usage of any_thread_of with
1001 find_any_thread_of_pid.
1002 * inferiors.c (thread_pid_matches_callback): Remove.
1003 (find_thread_process): Adjust to use find_any_thread_of_pid.
1004
1005 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1006
1007 * regcache.c (get_thread_regcache): Guard calls to "memset"
1008 with "!VEC_empty".
1009
1010 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1011
1012 * linux-low.c (handle_extended_wait): Use
1013 "allocate_target_description" instead of "XNEW".
1014 * linux-x86-low.c (initialize_low_arch): Likewise.
1015
1016 2017-09-05 Yao Qi <yao.qi@linaro.org>
1017
1018 * configure.srv (srv_i386_regobj): Remove.
1019 (srv_amd64_regobj): Remove.
1020 (srv_regobj): Set it to "" for x86 non-linux targets.
1021 * linux-x86-tdesc.c (i386_linux_read_description):
1022 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1023 (init_registers_i386): Remove the declaration.
1024 (tdesc_i386): Remove the declaration.
1025 (lynx_i386_arch_setup): Call i386_create_target_description.
1026 * nto-x86-low.c: Likewise.
1027 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1028 [!__x86_64__]: include arch/i386.h.
1029 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1030
1031 2017-09-05 Yao Qi <yao.qi@linaro.org>
1032
1033 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1034 i386/amd64-XXX-linux from it.
1035
1036 2017-09-05 Yao Qi <yao.qi@linaro.org>
1037
1038 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1039 false.
1040 (ipa_amd64_linux_regobj): Remove.
1041 (ipa_x32_linux_regobj): Remove.
1042
1043 2017-09-05 Yao Qi <yao.qi@linaro.org>
1044
1045 * Makefile.in (arch-amd64.o): New rule.
1046 * configure.srv: Append arch-amd64.o.
1047 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1048 (get_ipa_tdesc): Call amd64_linux_read_description.
1049 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1050 and init_registers_amd64_XXX.
1051 * linux-x86-low.c (x86_linux_read_description): Call
1052 amd64_linux_read_description.
1053 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1054 (initialize_low_arch): Don't call init_registers_x32_XXX and
1055 init_registers_amd64_XXX.
1056 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1057 and tdesc_amd64_XXX.
1058 [__x86_64__] (amd64_tdesc_test): New function.
1059 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1060 and init_registers_amd64_XXX.
1061 * linux-x86-tdesc.c: Include arch/amd64.h.
1062 (xcr0_to_tdesc_idx): New function.
1063 (i386_linux_read_description): New function.
1064 (amd64_get_ipa_tdesc_idx): New function.
1065 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1066 (amd64_get_ipa_tdesc): Declare.
1067
1068 2017-09-05 Yao Qi <yao.qi@linaro.org>
1069
1070 * configure.srv (srv_i386_linux_xmlfiles): Remove
1071 i386/i386-XXX-linux.xml from it.
1072
1073 2017-09-05 Yao Qi <yao.qi@linaro.org>
1074
1075 * configure.srv: Set srv_i386_linux_regobj empty if $development
1076 is false.
1077 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1078 initialize_low_tdesc.
1079 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1080 with #if initialize_low_tdesc.
1081 * linux-x86-tdesc-selftest.c: New file.
1082 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1083
1084 2017-09-05 Yao Qi <yao.qi@linaro.org>
1085
1086 * Makefile.in (arch-i386.o): New rule.
1087 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1088 (x86_64-*-linux*): Likewise.
1089 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1090 include arch/i386.h.
1091 (i386_linux_read_description): Remove code and call
1092 i386_create_target_description.
1093 * tdesc.c (allocate_target_description): New function.
1094 * tdesc.h (set_tdesc_architecture): Remove declaration.
1095 (set_tdesc_osabi): Likewise.
1096
1097 2017-09-05 Yao Qi <yao.qi@linaro.org>
1098
1099 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1100 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1101 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1102 .xmltarget.
1103 * server.c (get_features_xml): Call tdesc_get_features_xml.
1104 * tdesc.c (set_tdesc_architecture): New function.
1105 (set_tdesc_osabi): New function.
1106 (tdesc_get_features_xml): New function.
1107 (tdesc_create_feature): Add an argument.
1108 * tdesc.h (struct target_desc) <features>: New field.
1109 <arch, osabi>: New field.
1110 (~target_desc): xfree features, arch, and osabi.
1111 (target_desc::oerator==): Don't compare .xmltarget.
1112 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1113 (set_tdesc_osabi): Likewise.
1114 (tdesc_get_features_xml): Likewise.
1115
1116 2017-09-05 Yao Qi <yao.qi@linaro.org>
1117
1118 * linux-x86-tdesc.c: Include selftest.h.
1119 (i386_tdesc_test): New function.
1120 (initialize_low_tdesc): Call selftests::register_test.
1121 * tdesc.h: Include regdef.h.
1122 (target_desc): Override operator == and !=.
1123
1124 2017-09-05 Yao Qi <yao.qi@linaro.org>
1125
1126 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1127 (ipa_obj): Likewise.
1128 * linux-i386-ipa.c: Include common/x86-xstate.h
1129 (get_ipa_tdesc): Call i386_linux_read_description.
1130 (initialize_low_tracepoint): Don't call init_registers_XXX
1131 functions, call initialize_low_tdesc instead.
1132 * linux-x86-low.c (x86_linux_read_description): Call
1133 i386_linux_read_description.
1134 (initialize_low_arch): Don't call init_registers_i386_XXX
1135 functions, call initialize_low_tdesc.
1136 * linux-x86-tdesc.c: New file.
1137 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1138 (i386_get_ipa_tdesc_idx): Declare.
1139 (i386_get_ipa_tdesc): Declare.
1140 (initialize_low_tdesc): Declare.
1141
1142 2017-09-05 Yao Qi <yao.qi@linaro.org>
1143
1144 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1145 instead of 0.
1146
1147 2017-09-05 Yao Qi <yao.qi@linaro.org>
1148
1149 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1150 * regcache.c (get_thread_regcache): Use VEC_length.
1151 (init_register_cache): Likewise.
1152 (regcache_cpy): Likewise.
1153 (registers_to_string): Iterate reg_defs via VEC_iterate.
1154 (find_regno): Likewise.
1155 (find_register_by_number): Use VEC_index.
1156 (register_size): Call find_register_by_number.
1157 (register_data): Call find_register_by_number.
1158 (supply_regblock): Use VEC_length.
1159 (regcache_raw_read_unsigned): Likewise.
1160 * tdesc.c (init_target_desc): Iterate reg_defs via
1161 VEC_iterate.
1162 (default_description): Update initializer.
1163 (copy_target_description): Don't update field num_registers.
1164 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1165 <num_registers>: Remove.
1166
1167 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1168
1169 * Makefile.in (.SECONDARY): Define target.
1170
1171 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1172
1173 * linux-low.c (linux_wait_1): Adjust.
1174 * server.c (queue_stop_reply_callback): Adjust.
1175
1176 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1177
1178 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1179 QEnvironmentUnset and QEnvironmentReset packets.
1180 (handle_query): Inform remote that QEnvironmentHexEncoded,
1181 QEnvironmentUnset and QEnvironmentReset are supported.
1182
1183 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1184
1185 * inferiors.h (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 * inferiors.c (inferior_target_data): Rename to ...
1192 (thread_target_data): ... this.
1193 (inferior_regcache_data): Rename to ...
1194 (thread_regcache_data): ... this.
1195 (set_inferior_regcache_data): Rename to ...
1196 (set_thread_regcache_data): ... this.
1197 (free_one_thread): Update.
1198 * linux-low.h (get_thread_lwp): Update.
1199 * regcache.c (get_thread_regcache): Update.
1200 (regcache_invalidate_thread): Update.
1201 (free_register_cache_thread): Update.
1202 * win32-i386-low.c (update_debug_registers_callback): Update.
1203 (win32_get_current_dr): Update.
1204 * win32-low.c (thread_rec): Update.
1205 (delete_thread_info): Update.
1206 (continue_one_thread): Update.
1207 (suspend_one_thread): Update.
1208
1209 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1210
1211 * inferiors.c (set_inferior_target_data): Remove.
1212 * inferiors.h (set_inferior_target_data): Remove.
1213
1214 2017-08-18 Yao Qi <yao.qi@linaro.org>
1215
1216 * Makefile.in (OBS): Add selftest.o.
1217 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1218 * configure, config.in: Re-generated.
1219 * server.c: Include common/sefltest.h.
1220 (captured_main): Handle option --selftest.
1221
1222 2017-08-09 Yao Qi <yao.qi@linaro.org>
1223
1224 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1225 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1226 i386-avx-mpx.o and i386-mmx.o.
1227 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1228 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1229 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1230 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1231 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1232 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1233 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1234 i386/amd64-avx-mpx.xml.
1235
1236 2017-08-09 Yao Qi <yao.qi@linaro.org>
1237
1238 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1239 and x32-avx-avx512.o.
1240 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1241 i386/x32-avx-avx512.xml.
1242
1243 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1244
1245 * tracepoint.h (enum class fast_tpoint_collect_result): New
1246 enumeration.
1247 (fast_tracepoint_collecting): Change return type to
1248 fast_tpoint_collect_result.
1249 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1250 * linux-low.h: Include tracepoint.h.
1251 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1252 fast_tpoint_collect_result.
1253 * linux-low.c (handle_tracepoints): Adjust.
1254 (linux_fast_tracepoint_collecting): Change return type to
1255 fast_tpoint_collect_result.
1256 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1257 linux_wait_1, stuck_in_jump_pad_callback,
1258 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1259 proceed_one_lwp): Adjust to type change.
1260
1261 2017-07-10 Yao Qi <yao.qi@linaro.org>
1262
1263 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1264
1265 2017-06-29 Yao Qi <yao.qi@linaro.org>
1266
1267 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1268 Remove.
1269 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1270
1271 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1272
1273 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1274
1275 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1276
1277 * linux-low.c (linux_create_inferior): Adjust code to access the
1278 environment information via 'gdb_environ' class.
1279 * lynx-low.c (lynx_create_inferior): Likewise.
1280 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1281 (get_environ): Return a pointer to 'our_environ'.
1282 (captured_main): Initialize 'our_environ'.
1283 * server.h (get_environ): Adjust prototype.
1284 * spu-low.c (spu_create_inferior): Adjust code to access the
1285 environment information via 'gdb_environ' class.
1286
1287 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1290 usage of "register" keyword.
1291
1292 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1293
1294 * configure: Re-generate.
1295
1296 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1297
1298 * configure: Re-generate.
1299
1300 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * Makefile.in (COMPILE.pre): Add "-x c++".
1303
1304 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1305
1306 * fork-child.c: Conditionally include <signal.h>.
1307
1308 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1309
1310 * server.c (handle_general_set): Handle new packet
1311 "QStartupWithShell".
1312 (handle_query): Add "QStartupWithShell" to the list of supported
1313 packets.
1314 (gdbserver_usage): Add help text explaining the
1315 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1316 options.
1317 (captured_main): Recognize and act upon the presence of the new
1318 CLI options.
1319
1320 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1321 Pedro Alves <palves@redhat.com>
1322
1323 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1324 * configure: Regenerate.
1325 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1326 "fork-inferior.o".
1327 (i[34567]86-*-lynxos*): Likewise.
1328 (spu*-*-*): Likewise.
1329 * fork-child.c: New file.
1330 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1331 and "environ.h".
1332 (linux_ptrace_fun): New function.
1333 (linux_create_inferior): Adjust function prototype to reflect
1334 change on "target.h". Adjust function code to use
1335 "fork_inferior".
1336 (linux_request_interrupt): Delete "signal_pid".
1337 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1338 (lynx_ptrace_fun): New function.
1339 (lynx_create_inferior): Adjust function prototype to reflect
1340 change on "target.h". Adjust function code to use
1341 "fork_inferior".
1342 * nto-low.c (nto_create_inferior): Adjust function prototype and
1343 code to reflect change on "target.h". Update comments.
1344 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1345 "common-terminal.h" and "environ.h".
1346 (terminal_fd): Moved to fork-child.c.
1347 (old_foreground_pgrp): Likewise.
1348 (restore_old_foreground_pgrp): Likewise.
1349 (last_status): Make it global.
1350 (last_ptid): Likewise.
1351 (our_environ): New variable.
1352 (startup_with_shell): Likewise.
1353 (program_name): Likewise.
1354 (program_argv): Rename to...
1355 (program_args): ...this.
1356 (wrapper_argv): New variable.
1357 (start_inferior): Delete function.
1358 (get_exec_wrapper): New function.
1359 (get_exec_file): Likewise.
1360 (get_environ): Likewise.
1361 (prefork_hook): Likewise.
1362 (post_fork_inferior): Likewise.
1363 (postfork_hook): Likewise.
1364 (postfork_child_hook): Likewise.
1365 (handle_v_run): Update code to deal with arguments coming from the
1366 remote host. Update calls from "start_inferior" to
1367 "create_inferior".
1368 (captured_main): Likewise. Initialize environment variable. Call
1369 "have_job_control".
1370 * server.h (post_fork_inferior): New prototype.
1371 (get_environ): Likewise.
1372 (last_status): Declare.
1373 (last_ptid): Likewise.
1374 (signal_pid): Likewise.
1375 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1376 (spu_ptrace_fun): New function.
1377 (spu_create_inferior): Adjust function prototype to reflect change
1378 on "target.h". Adjust function code to use "fork_inferior".
1379 * target.c (target_terminal_init): New function.
1380 (target_terminal_inferior): Likewise.
1381 (target_terminal_ours): Likewise.
1382 * target.h: Include <vector>.
1383 (struct target_ops) <create_inferior>: Update prototype.
1384 (create_inferior): Update macro.
1385 * utils.c (gdb_flush_out_err): New function.
1386 * win32-low.c (win32_create_inferior): Adjust function prototype
1387 and code to reflect change on "target.h".
1388
1389 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1390
1391 * inferiors.c (switch_to_thread): New function.
1392
1393 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1394
1395 * Makefile.in (SFILE): Add "common/job-control.c".
1396 (OBS): Add "job-control.o".
1397
1398 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1399
1400 * Makefile: Remove "@host_makefile_frag@".
1401
1402 2017-05-05 Pedro Alves <palves@redhat.com>
1403
1404 * configure: Regenerate.
1405
1406 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1407
1408 * configure: Regenerate.
1409
1410 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1413 software_single_step change of return type to
1414 std::vector<CORE_ADDR>.
1415 * linux-low.c (install_software_single_step_breakpoints):
1416 Likewise.
1417 * linux-low.h (install_software_single_step_breakpoints):
1418 Likewise.
1419
1420 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1421
1422 * remote-utils.c: Include "gdb_termios.h" instead of
1423 "terminal.h".
1424 * terminal.h: Delete file.
1425
1426 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1427
1428 * server.c: Include <vector>.
1429 <program_argv, wrapper_argv>: Convert to std::vector.
1430 (start_inferior): Rewrite function to use C++.
1431 (handle_v_run): Likewise. Update code that calculates the argv
1432 based on the vRun packet; use C++.
1433 (captured_main): Likewise.
1434
1435 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1436
1437 * server.c (handle_v_cont): Initialize thread_resume::thread
1438 with null_ptid.
1439
1440 2017-04-05 Pedro Alves <palves@redhat.com>
1441
1442 * configure: Regenerate.
1443
1444 2017-04-05 Pedro Alves <palves@redhat.com>
1445
1446 * gdbreplay.c (sync_error): Constify.
1447 * linux-x86-low.c (push_opcode): Constify.
1448
1449 2017-04-05 Pedro Alves <palves@redhat.com>
1450
1451 * win32-low.c (get_child_debug_event)
1452 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1453 Report TARGET_WAITKIND_SPURIOUS instead.
1454
1455 2017-04-05 Pedro Alves <palves@redhat.com>
1456
1457 * remote-utils.c (remote_prepare, remote_open): Constify.
1458 * remote-utils.h (remote_prepare, remote_open): Constify.
1459 * server.c (captured_main): Constify 'port' handling.
1460
1461 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1462
1463 * Makefile.in (clean): Clear .deps.
1464
1465 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1466
1467 * .gitignore: Remove generated files, replace with wildcard.
1468 * (clean): Replace removal of generated files with wildcard.
1469 (version.c): Replace with...
1470 (version-generated.c): ...this.
1471 (xml-builtin.c): Replace with...
1472 (xml-builtin-generated.c): ...this.
1473 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1474 (%.c: *regformats*): Replace with...
1475 (%-generated.c: *regformats*): ...this.
1476
1477 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1478
1479 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1480 (xtensa_fill_gregset): Call collect_register_by_name for
1481 threadptr register.
1482 (xtensa_store_gregset): Call supply_register_by_name for
1483 threadptr register.
1484
1485 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1486
1487 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1488 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1489 (xtensa_store_gregset): Call supply_register for all registers in
1490 a0_regnum..a0_regnum + C0_NREGS range.
1491
1492 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1493
1494 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1495 (ax-ipa.o: ax.c): Remove.
1496 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1497 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1498 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1499 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1500 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1501
1502 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1503
1504 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1505 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1506 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1507 (errors-ipa.o: ../common/errors.c): Remove.
1508 (format-ipa.o: ../common/format.c): Remove.
1509 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1510
1511 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1512
1513 * Makefile.in (%-ipa.o: %.c): New rule.
1514 (tracepoint-ipa.o: tracepoint.c): Remove.
1515 (utils-ipa.o: utils.c): Remove.
1516 (remote-utils-ipa.o: remote-utils.c): Remove.
1517 (regcache-ipa.o: regcache.c): Remove.
1518 (i386-linux-ipa.o: i386-linux.c): Remove.
1519 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1520 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1521 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1522 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1523 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1524 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1525 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1526 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1527 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1528 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1529 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1530 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1531 (aarch64-ipa.o: aarch64.c): Remove.
1532 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1533 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1534 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1535 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1536 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1537 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1538 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1539 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1540 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1541 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1542 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1543 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1544 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1545 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1546 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1547 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1548 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1549 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1550 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1551 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1552 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1553 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1554 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1555 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1556 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1557 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1558 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1559 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1560 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1561 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1562 (tdesc-ipa.o: tdesc.c): Remove.
1563 (x32-linux-ipa.o: x32-linux.c): Remove.
1564 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1565 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1566
1567 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1568
1569 * Makefile.in (%.o: ../arch/%.c): New rule.
1570 (arm.o: ../arch/arm.c): Remove.
1571 (arm-linux.o: ../arch/arm-linux.c): Remove.
1572 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1573 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1574
1575 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1576
1577 * Makefile.in (%.o: ../nat/%.c): New rule.
1578 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1579 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1580 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1581 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1582 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1583 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1584 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1585 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1586 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1587 (linux-personality.o: ../nat/linux-personality.c): Remove.
1588 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1589 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1590 (x86-linux.o: ../nat/x86-linux.c): Remove.
1591 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1592 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1593
1594 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * Makefile.in (%.o: ../common/%.c): New rule.
1597 (signals.o: ../common/signals.c): Remove.
1598 (print-utils.o: ../common/print-utils.c): Remove.
1599 (rsp-low.o: ../common/rsp-low.c): Remove.
1600 (common-utils.o: ../common/common-utils.c): Remove.
1601 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1602 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1603 (vec.o: ../common/vec.c): Remove.
1604 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1605 (xml-utils.o: ../common/xml-utils.c): Remove.
1606 (ptid.o: ../common/ptid.c): Remove.
1607 (buffer.o: ../common/buffer.c): Remove.
1608 (format.o: ../common/format.c): Remove.
1609 (filestuff.o: ../common/filestuff.c): Remove.
1610 (agent.o: ../common/agent.c): Remove.
1611 (errors.o: ../common/errors.c): Remove.
1612 (environ.o: ../common/environ.c): Remove.
1613 (common-debug.o: ../common/common-debug.c): Remove.
1614 (cleanups.o: ../common/cleanups.c): Remove.
1615 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1616 (fileio.o: ../common/fileio.c): Remove.
1617 (common-regcache.o: ../common/common-regcache.c): Remove.
1618 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1619 (new-op.o: ../common/new-op.c): Remove.
1620 (btrace-common.o: ../common/btrace-common.c): Remove.
1621
1622 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1623
1624 * Makefile.in (%.o: ../target/%.c): New rule.
1625 (waitstatus.o: ../target/waitstatus.c): Remove.
1626
1627 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1628
1629 * Makefile.in
1630 (%.c: ../regformats/%.dat,
1631 (%.c: ../regformats/arm/%.dat,
1632 (%.c: ../regformats/i386/%.dat,
1633 (%.c: ../regformats/rs6000/%.dat): New rules.
1634 (aarch64.c): Remove.
1635 (reg-arm.c): Remove.
1636 (arm-with-iwmmxt.c): Remove.
1637 (arm-with-vfpv2.c): Remove.
1638 (arm-with-vfpv3.c): Remove.
1639 (arm-with-neon.c): Remove.
1640 (reg-bfin.c): Remove.
1641 (reg-cris.c): Remove.
1642 (reg-crisv32.c): Remove.
1643 (i386.c): Remove.
1644 (i386-linux.c): Remove.
1645 (i386-avx.c): Remove.
1646 (i386-avx-linux.c): Remove.
1647 (i386-avx-avx512.c): Remove.
1648 (i386-avx-avx512-linux.c): Remove.
1649 (i386-mpx.c): Remove.
1650 (i386-mpx-linux.c): Remove.
1651 (i386-avx-mpx-avx512-pku.c): Remove.
1652 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1653 (i386-avx-mpx.c): Remove.
1654 (i386-avx-mpx-linux.c): Remove.
1655 (i386-mmx.c): Remove.
1656 (i386-mmx-linux.c): Remove.
1657 (reg-ia64.c): Remove.
1658 (reg-m32r.c): Remove.
1659 (reg-m68k.c): Remove.
1660 (reg-cf.c): Remove.
1661 (mips-linux.c): Remove.
1662 (mips-dsp-linux.c): Remove.
1663 (mips64-linux.c): Remove.
1664 (mips64-dsp-linux.c): Remove.
1665 (nios2-linux.c): Remove.
1666 (powerpc-32.c): Remove.
1667 (powerpc-32l.c): Remove.
1668 (powerpc-altivec32l.c): Remove.
1669 (powerpc-cell32l.c): Remove.
1670 (powerpc-vsx32l.c): Remove.
1671 (powerpc-isa205-32l.c): Remove.
1672 (powerpc-isa205-altivec32l.c): Remove.
1673 (powerpc-isa205-vsx32l.c): Remove.
1674 (powerpc-e500l.c): Remove.
1675 (powerpc-64l.c): Remove.
1676 (powerpc-altivec64l.c): Remove.
1677 (powerpc-cell64l.c): Remove.
1678 (powerpc-vsx64l.c): Remove.
1679 (powerpc-isa205-64l.c): Remove.
1680 (powerpc-isa205-altivec64l.c): Remove.
1681 (powerpc-isa205-vsx64l.c): Remove.
1682 (s390-linux32.c): Remove.
1683 (s390-linux32v1.c): Remove.
1684 (s390-linux32v2.c): Remove.
1685 (s390-linux64.c): Remove.
1686 (s390-linux64v1.c): Remove.
1687 (s390-linux64v2.c): Remove.
1688 (s390-te-linux64.c): Remove.
1689 (s390-vx-linux64.c): Remove.
1690 (s390-tevx-linux64.c): Remove.
1691 (s390x-linux64.c): Remove.
1692 (s390x-linux64v1.c): Remove.
1693 (s390x-linux64v2.c): Remove.
1694 (s390x-te-linux64.c): Remove.
1695 (s390x-vx-linux64.c): Remove.
1696 (s390x-tevx-linux64.c): Remove.
1697 (tic6x-c64xp-linux.c): Remove.
1698 (tic6x-c64x-linux.c): Remove.
1699 (tic6x-c62x-linux.c): Remove.
1700 (reg-sh.c): Remove.
1701 (reg-sparc64.c): Remove.
1702 (reg-spu.c): Remove.
1703 (amd64.c): Remove.
1704 (amd64-linux.c): Remove.
1705 (amd64-avx.c): Remove.
1706 (amd64-avx-linux.c): Remove.
1707 (amd64-avx-avx512.c): Remove.
1708 (amd64-avx-avx512-linux.c): Remove.
1709 (amd64-mpx.c): Remove.
1710 (amd64-mpx-linux.c): Remove.
1711 (amd64-avx-mpx-avx512-pku.c): Remove.
1712 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1713 (amd64-avx-mpx.c): Remove.
1714 (amd64-avx-mpx-linux.c): Remove.
1715 (x32.c): Remove.
1716 (x32-linux.c): Remove.
1717 (x32-avx.c): Remove.
1718 (x32-avx-linux.c): Remove.
1719 (x32-avx-avx512.c): Remove.
1720 (x32-avx-avx512-linux.c): Remove.
1721 (reg-xtensa.c): Remove.
1722 (reg-tilegx.c): Remove.
1723 (reg-tilegx32.c): Remove.
1724
1725 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1726
1727 * Makefile.in (SFILES): Add "common/environ.c".
1728 (OBJS): Add "common/environ.h".
1729
1730 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1731
1732 * configure.ac: Check if the fs_base and gs_base members of
1733 `struct user_regs_struct' exist.
1734 * config.in: Regenerated.
1735 * configure: Likewise.
1736
1737 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1738
1739 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1740 target_read_memory.
1741 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1742 (get_next_pcs_syscall_next_pc): Likewise.
1743
1744 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1745
1746 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1747 * nto-x86-low.c: Likewise.
1748
1749 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * Makefile.in: Include disable-implicit-rules.mk.
1752
1753 2016-11-23 Pedro Alves <palves@redhat.com>
1754
1755 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1756 (debug_vprintf): Use std::chrono::steady_clock instead of
1757 gettimeofday. Use '.' instead of ':'.
1758 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1759 (get_timestamp): Use std::chrono::steady_clock instead of
1760 gettimeofday.
1761
1762 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1763
1764 * Makefile.in: Fix whitespace formatting.
1765
1766 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1767
1768 * Makefile.in (SFILES, OBS): Flatten list and order
1769 alphabetically.
1770
1771 2016-11-23 Pedro Alves <palves@redhat.com>
1772
1773 * event-loop.c (handle_file_event): Use warning.
1774 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1775 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1776 Use warning.
1777
1778 2016-11-23 Pedro Alves <palves@redhat.com>
1779
1780 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1781 output.
1782 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1783 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1784 debug_printf and debug_flush for debug output.
1785 * server.c (handle_general_set): Likewise.
1786 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1787 output.
1788
1789 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1790
1791 * Makefile.in (.c.o): Replace rule with ...
1792 (%.o: %.c): ... this one.
1793
1794 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1795
1796 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1797 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1798 make.
1799 * configure.ac: Remove checks for the make program.
1800 * configure: Re-generate.
1801
1802 2016-10-28 Pedro Alves <palves@redhat.com>
1803
1804 * Makefile.in (CXX_DIALECT): Get from configure.
1805 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1806 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1807 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1808 * config.in: Regenerate.
1809 * configure: Regenerate.
1810
1811 2016-10-27 Yao Qi <yao.qi@linaro.org>
1812
1813 * linux-low.c (linux_supports_range_stepping): Return true if
1814 can_software_single_step return true.
1815
1816 2016-10-27 Yao Qi <yao.qi@linaro.org>
1817
1818 * inferiors.c (find_inferior_in_random): New function.
1819 * inferiors.h (find_inferior_in_random): Declare.
1820 * linux-low.c (linux_wait_for_event_filtered): Call
1821 find_inferior_in_random instead of find_inferior.
1822
1823 2016-10-27 Yao Qi <yao.qi@linaro.org>
1824
1825 * linux-low.c (linux_wait_1): If single-step breakpoints are
1826 inserted, remove them.
1827
1828 2016-10-26 Pedro Alves <palves@redhat.com>
1829
1830 * linux-low.c (handle_extended_wait): Link parent/child fork
1831 threads.
1832 (linux_wait_1): Unlink them.
1833 (linux_set_resume_request): Ignore resume requests for
1834 already-resumed and unhandled fork child threads.
1835 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1836 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1837 New functions.
1838 (handle_v_requests) <vCont>: Don't call require_running.
1839 * server.h (in_queued_stop_replies): New declaration.
1840
1841 2016-10-24 Yao Qi <yao.qi@linaro.org>
1842
1843 PR server/20733
1844 * linux-aarch64-low.c (append_insns): Cast the return value to
1845 'uint32_t *'.
1846
1847 2016-10-10 Yao Qi <yao.qi@linaro.org>
1848
1849 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1850
1851 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1852
1853 * target.c (target_supports_multi_process): New function, moved
1854 from...
1855 * target.h (target_supports_multi_process): ... here. Remove
1856 macro.
1857
1858 2016-10-05 Tom Tromey <tom@tromey.com>
1859
1860 PR remote/20655:
1861 * tracepoint.c (handle_tracepoint_bkpts): Check
1862 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1863
1864 2016-10-05 Yao Qi <yao.qi@linaro.org>
1865
1866 * configure.srv: Update the path of arm-*.xml files.
1867
1868 2016-10-05 Terry Guo <terry.guo@arm.com>
1869 Yao Qi <yao.qi@linaro.org>
1870
1871 * Makefile.in: Adjust the path of rules.
1872 * configure.srv: Update the path of xml files.
1873 * regformats/arm-with-iwmmxt.dat: Regenerated.
1874 * regformats/arm-with-neon.dat: Likewise.
1875 * regformats/arm-with-vfpv2.dat: Likewise.
1876 * regformats/arm-with-vfpv3.dat Likewise.
1877
1878 2016-09-30 Yao Qi <yao.qi@linaro.org>
1879
1880 PR gdbserver/20627
1881 * target.c (target_stop_and_wait): Don't call
1882 target_continue_no_signal, use resume_stop instead.
1883
1884 2016-09-26 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-low.c (linux_wait_1): Call debug_exit.
1887
1888 2016-09-23 Pedro Alves <palves@redhat.com>
1889
1890 * Makefile.in (SFILES): Add common/new-op.c.
1891 (OBS): Add common/new-op.o.
1892 (new-op.o): New rule.
1893
1894 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1895
1896 * .gitinore: Ignore more files.
1897
1898 2016-09-21 Yao Qi <yao.qi@linaro.org>
1899
1900 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1901 23.
1902
1903 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1904
1905 * server.c (start_inferior): Call target_mourn_inferior instead of
1906 mourn_inferior; pass ptid_t argument to it.
1907 (resume): Likewise.
1908 (handle_target_event): Likewise.
1909 * target.c (target_mourn_inferior): New function.
1910 * target.h (mourn_inferior): Delete macro.
1911
1912 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1913
1914 * linux-low.c (lwp_is_stepping): New function.
1915
1916 2016-09-06 Carl Love <cel@us.ibm.com>
1917
1918 * server.c (start_inferior): Fixed comment, requested comment change
1919 didn't get updated correctly. Removed reference to ptrace () call as
1920 it is only true on Linux systems.
1921
1922 2016-09-06 Carl Love <cel@us.ibm.com>
1923
1924 * server.c (start_inferior): Do not call
1925 function target_post_create_inferior () if the
1926 inferior process has already exited.
1927
1928 2016-09-05 Pedro Alves <palves@redhat.com>
1929
1930 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1931 (COMPILE.pre, CC_LD): Use CXX directly.
1932 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1933 * acinclude.m4: Don't include build-with-cxx.m4.
1934 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1935 * configure: Regenerate.
1936
1937 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1938
1939 PR gdb/19495
1940 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1941 call writing data to own_buf.
1942
1943 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1944
1945 * target.c (mywait): Call target_wait instead of
1946 the_target->wait.
1947 (target_wait): New function.
1948
1949 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1950
1951 * server.c (start_inferior): New variable 'ptid'. Replace calls
1952 to the_target->resume by target_continue{,_no_signal}, depending
1953 on the case.
1954 * target.c (target_stop_and_wait): Call target_continue_no_signal
1955 instead of the_target->resume.
1956 (target_continue): New function.
1957
1958 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1959
1960 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1961
1962 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1963
1964 PR server/20491
1965 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1966 ps_prochandle.
1967 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1968 * linux-arm-low.c (ps_get_thread_area): Likewise.
1969 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1970 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1971 * linux-mips-low.c (ps_get_thread_area): Likewise.
1972 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1973 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1974 * linux-x86-low.c (ps_get_thread_area): Likewise.
1975 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1976
1977 2016-08-19 Pedro Alves <palves@redhat.com>
1978
1979 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1980
1981 2016-08-19 Pedro Alves <palves@redhat.com>
1982
1983 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1984 comment. Use memcpy instead of casting through unsigned long.
1985
1986 2016-08-19 Pedro Alves <palves@redhat.com>
1987
1988 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1989 allocating around 0x80000000.
1990
1991 2016-08-19 Pedro Alves <palves@redhat.com>
1992
1993 PR gdb/20415
1994 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1995 (x32-avx512-linux-ipa.o): New rules.
1996 * configure.ac (x86_64-*-linux*): New x32 check.
1997 * configure.srv (ipa_x32_linux_regobj): New.
1998 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1999 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2000 descriptions.
2001 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2002 descriptions.
2003 * configure: Regenerate.
2004
2005 2016-08-09 Pedro Alves <palves@redhat.com>
2006
2007 PR gdb/18653
2008 * Makefile.in (OBS): Add signals-state-save-restore.o.
2009 (signals-state-save-restore.o): New rule.
2010 * config.in: Regenerate.
2011 * configure: Regenerate.
2012 * linux-low.c: Include "signals-state-save-restore.h".
2013 (linux_create_inferior): Call
2014 restore_original_signals_state.
2015 * server.c: Include "dispositions-save-restore.h".
2016 (captured_main): Call save_original_signals_state.
2017
2018 2016-08-05 Pedro Alves <palves@redhat.com>
2019
2020 * configure: Regenerate.
2021
2022 2016-08-04 Yao Qi <yao.qi@linaro.org>
2023
2024 * linux-low.c (regsets_fetch_inferior_registers): Check
2025 errno is ESRCH or not.
2026
2027 2016-08-02 Yao Qi <yao.qi@linaro.org>
2028
2029 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2030 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2031 (thread_db_load_search): Update.
2032 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2033 td_ta_set_event and td_ta_event_getmsg.
2034
2035 2016-07-26 Pedro Alves <palves@redhat.com>
2036
2037 PR server/20414
2038 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2039 of unsigned long for 64-bit registers and use uint32_t instead of
2040 unsigned int for 32-bit registers.
2041
2042 2016-07-26 Pedro Alves <palves@redhat.com>
2043
2044 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2045 to 'ptrace'.
2046
2047 2016-07-21 Tom Tromey <tom@tromey.com>
2048
2049 * configure: Rebuild.
2050
2051 2016-07-21 Yao Qi <yao.qi@linaro.org>
2052
2053 * mem-break.c (find_gdb_breakpoint): Cast bp to
2054 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2055
2056 2016-07-21 Yao Qi <yao.qi@linaro.org>
2057
2058 * server.c (handle_v_requests): Support s and S actions
2059 if target_supports_software_single_step return true.
2060
2061 2016-07-21 Yao Qi <yao.qi@linaro.org>
2062
2063 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2064 is resume_step, call maybe_hw_step.
2065 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2066 and unstop them.
2067 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2068 breakpoints or not.
2069 (proceed_one_lwp): If resume request is resume_step, install
2070 reinsert breakpoints and call maybe_hw_step.
2071
2072 2016-07-21 Yao Qi <yao.qi@linaro.org>
2073
2074 * linux-low.c (proceed_one_lwp): Declare.
2075 (linux_resume_one_thread): Remove local variable 'step'.
2076 Lift code enqueue signal. Call proceed_one_lwp instead of
2077 linux_resume_one_lwp.
2078
2079 2016-07-21 Yao Qi <yao.qi@linaro.org>
2080
2081 * linux-low.c (linux_resume_one_thread): Call
2082 enqueue_pending_signal.
2083
2084 2016-07-21 Yao Qi <yao.qi@linaro.org>
2085
2086 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2087 * inferiors.c (do_restore_current_thread_cleanup): New function.
2088 (make_cleanup_restore_current_thread): Likewise.
2089 * linux-low.c (install_software_single_step_breakpoints): Call
2090 make_cleanup_restore_current_thread. Switch current_thread to
2091 thread.
2092
2093 2016-07-21 Yao Qi <yao.qi@linaro.org>
2094
2095 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2096 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2097 (clone_one_breakpoint): Likewise.
2098 (delete_reinsert_breakpoints): Change parameter to thread.
2099 Callers updated.
2100 (has_reinsert_breakpoints): Likewise.
2101 (uninsert_reinsert_breakpoints): Likewise.
2102 (reinsert_reinsert_breakpoints): Likewise.
2103 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2104 (delete_reinsert_breakpoints): Likewise.
2105 (reinsert_reinsert_breakpoints): Likewise.
2106 (uninsert_reinsert_breakpoints): Likewise.
2107 (has_reinsert_breakpoints): Likewise.
2108
2109 2016-07-21 Yao Qi <yao.qi@linaro.org>
2110
2111 * inferiors.c (get_thread_process): Make parameter const.
2112 * inferiors.h (get_thread_process): Update declaration.
2113 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2114 Add new parameters child_thread and parent_thread. Callers
2115 updated.
2116 * mem-break.h (clone_all_breakpoints): Update declaration.
2117
2118 2016-07-21 Yao Qi <yao.qi@linaro.org>
2119
2120 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2121 <command_list, handler>: Remove.
2122 (struct gdb_breakpoint): New.
2123 (struct other_breakpoint): New.
2124 (struct reinsert_breakpoint): New.
2125 (is_gdb_breakpoint): New function.
2126 (any_persistent_commands): Update command_list if
2127 is_gdb_breakpoint returns true.
2128 (set_breakpoint): Create breakpoints according to their types.
2129 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2130 (set_gdb_breakpoint_1): Likewise.
2131 (set_gdb_breakpoint): Likewise.
2132 (clear_breakpoint_conditions): Change parameter type to
2133 'struct gdb_breakpoint *'.
2134 (clear_breakpoint_commands): Likewise.
2135 (clear_breakpoint_conditions_and_commands): Likewise.
2136 (add_condition_to_breakpoint): Likewise.
2137 (add_breakpoint_condition): Likewise.
2138 (add_commands_to_breakpoint): Likewise.
2139 (check_breakpoints): Check other_breakpoint.
2140 (clone_one_breakpoint): Clone breakpopint according to its type.
2141 * mem-break.h (struct gdb_breakpoint): Declare.
2142 (set_gdb_breakpoint): Update declaration.
2143 (clear_breakpoint_conditions_and_commands): Likewise.
2144 (add_breakpoint_condition): Likewise.
2145 (add_breakpoint_commands): Likewise.
2146 * server.c (process_point_options): Change parameter type to
2147 'struct gdb_breakpoint *'.
2148
2149 2016-07-21 Yao Qi <yao.qi@linaro.org>
2150
2151 * mem-break.c (set_breakpoint_at): Rename it to ...
2152 (set_breakpoint_type_at): ... it.
2153 (set_breakpoint_at): Call set_breakpoint_type_at.
2154 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2155 * mem-break.h (set_breakpoint_at): Update comments.
2156
2157 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2158
2159 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2160 to buf parameter.
2161 (nios2_store_gregset): Likewise.
2162
2163 2016-07-01 Pedro Alves <palves@redhat.com>
2164 Antoine Tremblay <antoine.tremblay@ericsson.com>
2165
2166 * linux-low.c: Change interface to take the target lwp_info
2167 pointer directly and return void. Handle detaching from a zombie
2168 thread.
2169 (linux_detach_lwp_callback): New function.
2170 (linux_detach): Detach from the leader thread after detaching from
2171 the clone threads.
2172
2173 2016-06-28 Yao Qi <yao.qi@linaro.org>
2174
2175 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2176 for variable new_offset.
2177 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2178 (aarch64_ftrace_insn_reloc_cb): Likewise.
2179 (aarch64_ftrace_insn_reloc_tb): Likewise.
2180 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2181 PRIx64 instead of PRIx32.
2182
2183 2016-06-28 Yao Qi <yao.qi@linaro.org>
2184
2185 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2186 (the_low_target): Install arm_get_syscall_trapinfo.
2187
2188 2016-06-28 Yao Qi <yao.qi@linaro.org>
2189
2190 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2191 function.
2192 (the_low_target): Install aarch64_get_syscall_trapinfo.
2193
2194 2016-06-28 Yao Qi <yao.qi@linaro.org>
2195
2196 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2197 Callers updated.
2198 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2199 Remove parameter sysno.
2200 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2201 sysret.
2202
2203 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2204
2205 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2206 (s390_emit_ne_goto): Likewise.
2207 (s390_emit_lt_goto): Likewise.
2208 (s390_emit_le_goto): Likewise.
2209 (s390_emit_gt_goto): Likewise.
2210 (s390_emit_ge_goto): Likewise.
2211 (s390x_emit_eq_goto): Likewise.
2212 (s390x_emit_ne_goto): Likewise.
2213 (s390x_emit_lt_goto): Likewise.
2214 (s390x_emit_le_goto): Likewise.
2215 (s390x_emit_gt_goto): Likewise.
2216 (s390x_emit_ge_goto): Likewise.
2217 (s390_emit_ops_impl): Mark variable static.
2218 (s390x_emit_ops): Likewise.
2219
2220 2016-06-17 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-low.c (handle_extended_wait): Call
2223 uninsert_reinsert_breakpoints for the parent process. Remove
2224 reinsert breakpoints from the child process. Reinsert them to
2225 the parent process when vfork is done.
2226 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2227 (reinsert_reinsert_breakpoints): New function.
2228 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2229 (reinsert_reinsert_breakpoints): Declare.
2230
2231 2016-06-17 Yao Qi <yao.qi@linaro.org>
2232
2233 * linux-low.c (handle_extended_wait): If the parent is doing
2234 step-over, remove the reinsert breakpoints from the forked child.
2235
2236 2016-06-17 Yao Qi <yao.qi@linaro.org>
2237
2238 * linux-low.c (unsuspend_all_lwps): Declare.
2239 (linux_low_filter_event): If thread exited, call finish_step_over.
2240 If step-over is finished, unsuspend other threads.
2241
2242 2016-06-17 Yao Qi <yao.qi@linaro.org>
2243
2244 * linux-low.c (linux_resume_one_lwp_throw): Assert
2245 has_reinsert_breakpoints returns false.
2246 * mem-break.c (delete_disabled_breakpoints): Assert
2247 bp type isn't reinsert_breakpoint.
2248
2249 2016-06-17 Yao Qi <yao.qi@linaro.org>
2250
2251 * linux-low.c (maybe_hw_step): New function.
2252 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2253 (finish_step_over): Switch current_thread to lwp temporarily,
2254 and assert has_reinsert_breakpoints returns true.
2255 (proceed_one_lwp): Call maybe_hw_step.
2256 * mem-break.c (has_reinsert_breakpoints): New function.
2257 * mem-break.h (has_reinsert_breakpoints): Declare.
2258
2259 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2260
2261 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2262
2263 2016-05-17 Yao Qi <yao.qi@linaro.org>
2264
2265 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2266 instead of find_inferior.
2267
2268 2016-05-05 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2271 Initialize res to zero.
2272
2273 2016-05-05 Yao Qi <yao.qi@linaro.org>
2274
2275 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2276 to uint32_t.
2277
2278 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2279
2280 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2281 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2282 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2283
2284 2016-04-28 Par Olsson <par.olsson@windriver.com>
2285 Simon Marchi <simon.marchi@ericsson.com>
2286
2287 * tracepoint.c (write_inferior_int8): New function.
2288 (cmd_qtenable_disable): Write enable flag using
2289 write_inferior_int8.
2290
2291 2016-04-25 Yao Qi <yao.qi@linaro.org>
2292
2293 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2294 (need_step_over_p): Return zero if the LWP has pending signals
2295 can be delivered on software single step target.
2296
2297 2016-04-25 Yao Qi <yao.qi@linaro.org>
2298
2299 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2300 return instead of error.
2301
2302 2016-04-22 Yao Qi <yao.qi@linaro.org>
2303
2304 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2305 to 23.
2306
2307 2016-04-22 Yao Qi <yao.qi@linaro.org>
2308
2309 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2310 signal when stepping over breakpoint with software single
2311 step.
2312
2313 2016-04-21 Pedro Alves <palves@redhat.com>
2314
2315 * linux-s390-low.c (s390_collect_ptrace_register)
2316 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2317 add casts.
2318 (s390_check_regset): Use void * instead of gdb_byte *.
2319
2320 2016-04-20 Pedro Alves <palves@redhat.com>
2321
2322 * configure: Renegerate.
2323
2324 2016-04-20 Yao Qi <yao.qi@linaro.org>
2325
2326 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2327 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2328 number 16.
2329 (arm_store_gregset): Likewise.
2330
2331 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2332
2333 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2334 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2335 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2336 (amd64-avx-mpx-linux.c): New rules.
2337 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2338 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2339 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2340 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2341 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2342 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2343 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2344 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2345 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2346 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2347 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2348 * linux-x86-low.c (x86_linux_read_description): Add case for
2349 X86_XSTATE_AVX_MPX_MASK.
2350 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2351 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2352 init_registers_i386_avx_mpx_linux.
2353 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2354 (initialize_low_tracepoint): Call
2355 init_registers_i386_avx_mpx_linux.
2356 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2357 (initialize_low_tracepoint): Call
2358 init_registers_amd64_avx_mpx_linux.
2359 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2360 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2361 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2362 declarations.
2363
2364 2016-04-18 Pedro Alves <palves@redhat.com>
2365
2366 * configure: Regenerate.
2367
2368 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2369
2370 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2371 (aarch64_emit_sub): Likewise.
2372
2373 2016-04-12 Pedro Alves <palves@redhat.com>
2374
2375 * utils.c (prepare_to_throw_exception): Delete.
2376
2377 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2378
2379 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2380
2381 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2382
2383 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2384
2385 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2386
2387 * linux-aarch64-ipa.c: Add <elf.h> include.
2388 * linux-ppc-ipa.c: Add <elf.h> include.
2389 * linux-s390-ipa.c: Add <elf.h> include.
2390
2391 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2392
2393 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2394 (get_raw_reg_ptr): Likewise.
2395 (get_trace_state_variable_value_ptr): Likewise.
2396 (set_trace_state_variable_value_ptr): Likewise.
2397 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2398 char *.
2399
2400 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2401 Marcin Kościelnicki <koriakin@0x04.net>
2402
2403 PR/17221
2404 * linux-ppc-low.c (emit_insns): New function.
2405 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2406 (ppc_emit_prologue): New function.
2407 (ppc_emit_epilogue): New function.
2408 (ppc_emit_add): New function.
2409 (ppc_emit_sub): New function.
2410 (ppc_emit_mul): New function.
2411 (ppc_emit_lsh): New function.
2412 (ppc_emit_rsh_signed): New function.
2413 (ppc_emit_rsh_unsigned): New function.
2414 (ppc_emit_ext): New function.
2415 (ppc_emit_zero_ext): New function.
2416 (ppc_emit_log_not): New function.
2417 (ppc_emit_bit_and): New function.
2418 (ppc_emit_bit_or): New function.
2419 (ppc_emit_bit_xor): New function.
2420 (ppc_emit_bit_not): New function.
2421 (ppc_emit_equal): New function.
2422 (ppc_emit_less_signed): New function.
2423 (ppc_emit_less_unsigned): New function.
2424 (ppc_emit_ref): New function.
2425 (ppc_emit_const): New function.
2426 (ppc_emit_reg): New function.
2427 (ppc_emit_pop): New function.
2428 (ppc_emit_stack_flush): New function.
2429 (ppc_emit_swap): New function.
2430 (ppc_emit_stack_adjust): New function.
2431 (ppc_emit_call): New function.
2432 (ppc_emit_int_call_1): New function.
2433 (ppc_emit_void_call_2): New function.
2434 (ppc_emit_if_goto): New function.
2435 (ppc_emit_goto): New function.
2436 (ppc_emit_eq_goto): New function.
2437 (ppc_emit_ne_goto): New function.
2438 (ppc_emit_lt_goto): New function.
2439 (ppc_emit_le_goto): New function.
2440 (ppc_emit_gt_goto): New function.
2441 (ppc_emit_ge_goto): New function.
2442 (ppc_write_goto_address): New function.
2443 (ppc_emit_ops_impl): New static variable.
2444 (ppc64v1_emit_prologue): New function.
2445 (ppc64v2_emit_prologue): New function.
2446 (ppc64_emit_epilogue): New function.
2447 (ppc64_emit_add): New function.
2448 (ppc64_emit_sub): New function.
2449 (ppc64_emit_mul): New function.
2450 (ppc64_emit_lsh): New function.
2451 (ppc64_emit_rsh_signed): New function.
2452 (ppc64_emit_rsh_unsigned): New function.
2453 (ppc64_emit_ext): New function.
2454 (ppc64_emit_zero_ext): New function.
2455 (ppc64_emit_log_not): New function.
2456 (ppc64_emit_bit_and): New function.
2457 (ppc64_emit_bit_or): New function.
2458 (ppc64_emit_bit_xor): New function.
2459 (ppc64_emit_bit_not): New function.
2460 (ppc64_emit_equal): New function.
2461 (ppc64_emit_less_signed): New function.
2462 (ppc64_emit_less_unsigned): New function.
2463 (ppc64_emit_ref): New function.
2464 (ppc64_emit_const): New function.
2465 (ppc64v1_emit_reg): New function.
2466 (ppc64v2_emit_reg): New function.
2467 (ppc64_emit_pop): New function.
2468 (ppc64_emit_stack_flush): New function.
2469 (ppc64_emit_swap): New function.
2470 (ppc64v1_emit_call): New function.
2471 (ppc64v2_emit_call): New function.
2472 (ppc64v1_emit_int_call_1): New function.
2473 (ppc64v2_emit_int_call_1): New function.
2474 (ppc64v1_emit_void_call_2): New function.
2475 (ppc64v2_emit_void_call_2): New function.
2476 (ppc64_emit_if_goto): New function.
2477 (ppc64_emit_eq_goto): New function.
2478 (ppc64_emit_ne_goto): New function.
2479 (ppc64_emit_lt_goto): New function.
2480 (ppc64_emit_le_goto): New function.
2481 (ppc64_emit_gt_goto): New function.
2482 (ppc64_emit_ge_goto): New function.
2483 (ppc64v1_emit_ops_impl): New static variable.
2484 (ppc64v2_emit_ops_impl): New static variable.
2485 (ppc_emit_ops): New function.
2486 (linux_low_target): Wire in ppc_emit_ops.
2487
2488 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2489 Marcin Kościelnicki <koriakin@0x04.net>
2490
2491 PR/17221
2492 * Makefile.in: Add powerpc-*-ipa.o
2493 * configure.srv: Add ipa_obj for powerpc*-linux.
2494 * linux-ppc-ipa.c: New file.
2495 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2496 includes.
2497 (PPC_FIELD): New macro.
2498 (PPC_SEXT): New macro.
2499 (PPC_OP6): New macro.
2500 (PPC_BO): New macro.
2501 (PPC_LI): New macro.
2502 (PPC_BD): New macro.
2503 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2504 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2505 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2506 (ppc_get_thread_area): New function.
2507 (is_elfv2_inferior): New function.
2508 (gen_ds_form): New function.
2509 (GEN_STD): New macro.
2510 (GEN_STDU): New macro.
2511 (GEN_LD): New macro.
2512 (GEN_LDU): New macro.
2513 (gen_d_form): New function.
2514 (GEN_ADDI): New macro.
2515 (GEN_ADDIS): New macro.
2516 (GEN_LI): New macro.
2517 (GEN_LIS): New macro.
2518 (GEN_ORI): New macro.
2519 (GEN_ORIS): New macro.
2520 (GEN_LWZ): New macro.
2521 (GEN_STW): New macro.
2522 (GEN_STWU): New macro.
2523 (gen_xfx_form): New function.
2524 (GEN_MFSPR): New macro.
2525 (GEN_MTSPR): New macro.
2526 (GEN_MFCR): New macro.
2527 (GEN_MTCR): New macro.
2528 (GEN_SYNC): New macro.
2529 (GEN_LWSYNC): New macro.
2530 (gen_x_form): New function.
2531 (GEN_OR): New macro.
2532 (GEN_MR): New macro.
2533 (GEN_LWARX): New macro.
2534 (GEN_STWCX): New macro.
2535 (GEN_CMPW): New macro.
2536 (gen_md_form): New function.
2537 (GEN_RLDICL): New macro.
2538 (GEN_RLDICR): New macro.
2539 (gen_i_form): New function.
2540 (GEN_B): New macro.
2541 (GEN_BL): New macro.
2542 (gen_b_form): New function.
2543 (GEN_BNE): New macro.
2544 (GEN_LOAD): New macro.
2545 (GEN_STORE): New macro.
2546 (gen_limm): New function.
2547 (gen_atomic_xchg): New function.
2548 (gen_call): New function.
2549 (ppc_relocate_instruction): New function.
2550 (ppc_install_fast_tracepoint_jump_pad): New function.
2551 (ppc_get_min_fast_tracepoint_insn_len): New function.
2552 (ppc_get_ipa_tdesc_idx): New function.
2553 (the_low_target): Wire in the new functions.
2554 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2555 tdescs.
2556 * linux-ppc-tdesc.h: New file.
2557
2558 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2559
2560 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2561 (alloc_jump_pad_buffer): New function.
2562 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2563 (alloc_jump_pad_buffer): New function.
2564 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2565 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2566 (alloc_jump_pad_buffer): New function.
2567 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2568 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2569 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2570 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2571
2572 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2573
2574 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2575 * linux-amd64-ipa.c: Likewise.
2576 * linux-i386-ipa.c: Likewise.
2577 * linux-s390-ipa.c: Likewise.
2578 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2579 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2580 set_trace_state_variable_value_ptr.
2581 (struct ipa_sym_addresses): Likewise.
2582 (symbol_list): Likewise.
2583 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2584 accessing gdb_collect directly.
2585 (gdb_collect_ptr_type): New typedef.
2586 (get_raw_reg_ptr_type): New typedef.
2587 (get_trace_state_variable_value_ptr_type): New typedef.
2588 (set_trace_state_variable_value_ptr_type): New typedef.
2589 (gdb_collect_ptr): New global.
2590 (get_raw_reg_ptr): New global.
2591 (get_trace_state_variable_value_ptr): New global.
2592 (set_trace_state_variable_value_ptr): New global.
2593 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2594 accessing get_raw_reg directly.
2595 (get_get_tsv_func_addr): Likewise for
2596 get_trace_state_variable_value_ptr.
2597 (get_set_tsv_func_addr): Likewise for
2598 set_trace_state_variable_value_ptr.
2599 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2600
2601 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2602
2603 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2604
2605 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2606
2607 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2608 packets.
2609 (relocate_instruction): Remove own_buf.
2610 * server.c (own_buf): Make global.
2611 (handle_v_requests): Make global.
2612 * server.h (own_buf): New declaration.
2613 (handle_v_requests): New prototype.
2614
2615 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2616
2617 PR 18377
2618 * linux-s390-low.c (add_insns): New function.
2619 (s390_emit_prologue): New function.
2620 (s390_emit_epilogue): New function.
2621 (s390_emit_add): New function.
2622 (s390_emit_sub): New function.
2623 (s390_emit_mul): New function.
2624 (s390_emit_lsh): New function.
2625 (s390_emit_rsh_signed): New function.
2626 (s390_emit_rsh_unsigned): New function.
2627 (s390_emit_ext): New function.
2628 (s390_emit_log_not): New function.
2629 (s390_emit_bit_and): New function.
2630 (s390_emit_bit_or): New function.
2631 (s390_emit_bit_xor): New function.
2632 (s390_emit_bit_not): New function.
2633 (s390_emit_equal): New function.
2634 (s390_emit_less_signed): New function.
2635 (s390_emit_less_unsigned): New function.
2636 (s390_emit_ref): New function.
2637 (s390_emit_if_goto): New function.
2638 (s390_emit_goto): New function.
2639 (s390_write_goto_address): New function.
2640 (s390_emit_litpool): New function.
2641 (s390_emit_const): New function.
2642 (s390_emit_call): New function.
2643 (s390_emit_reg): New function.
2644 (s390_emit_pop): New function.
2645 (s390_emit_stack_flush): New function.
2646 (s390_emit_zero_ext): New function.
2647 (s390_emit_swap): New function.
2648 (s390_emit_stack_adjust): New function.
2649 (s390_emit_set_r2): New function.
2650 (s390_emit_int_call_1): New function.
2651 (s390_emit_void_call_2): New function.
2652 (s390_emit_eq_goto): New function.
2653 (s390_emit_ne_goto): New function.
2654 (s390_emit_lt_goto): New function.
2655 (s390_emit_le_goto): New function.
2656 (s390_emit_gt_goto): New function.
2657 (s390_emit_ge_goto): New function.
2658 (s390x_emit_prologue): New function.
2659 (s390x_emit_epilogue): New function.
2660 (s390x_emit_add): New function.
2661 (s390x_emit_sub): New function.
2662 (s390x_emit_mul): New function.
2663 (s390x_emit_lsh): New function.
2664 (s390x_emit_rsh_signed): New function.
2665 (s390x_emit_rsh_unsigned): New function.
2666 (s390x_emit_ext): New function.
2667 (s390x_emit_log_not): New function.
2668 (s390x_emit_bit_and): New function.
2669 (s390x_emit_bit_or): New function.
2670 (s390x_emit_bit_xor): New function.
2671 (s390x_emit_bit_not): New function.
2672 (s390x_emit_equal): New function.
2673 (s390x_emit_less_signed): New function.
2674 (s390x_emit_less_unsigned): New function.
2675 (s390x_emit_ref): New function.
2676 (s390x_emit_if_goto): New function.
2677 (s390x_emit_const): New function.
2678 (s390x_emit_call): New function.
2679 (s390x_emit_reg): New function.
2680 (s390x_emit_pop): New function.
2681 (s390x_emit_stack_flush): New function.
2682 (s390x_emit_zero_ext): New function.
2683 (s390x_emit_swap): New function.
2684 (s390x_emit_stack_adjust): New function.
2685 (s390x_emit_int_call_1): New function.
2686 (s390x_emit_void_call_2): New function.
2687 (s390x_emit_eq_goto): New function.
2688 (s390x_emit_ne_goto): New function.
2689 (s390x_emit_lt_goto): New function.
2690 (s390x_emit_le_goto): New function.
2691 (s390x_emit_gt_goto): New function.
2692 (s390x_emit_ge_goto): New function.
2693 (s390_emit_ops): New function.
2694 (struct linux_target_ops): Fill in emit_ops hook.
2695
2696 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2697
2698 PR 18377
2699 * Makefile.in: Add s390 IPA files.
2700 * configure.srv: Build IPA for s390.
2701 * linux-s390-ipa.c: New file.
2702 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2703 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2704 (tdesc_s390_linux32): Likewise.
2705 (init_registers_s390_linux32v1): Likewise.
2706 (tdesc_s390_linux32v1): Likewise.
2707 (init_registers_s390_linux32v2): Likewise.
2708 (tdesc_s390_linux32v2): Likewise.
2709 (init_registers_s390_linux64): Likewise.
2710 (tdesc_s390_linux64): Likewise.
2711 (init_registers_s390_linux64v1): Likewise.
2712 (tdesc_s390_linux64v1): Likewise.
2713 (init_registers_s390_linux64v2): Likewise.
2714 (tdesc_s390_linux64v2): Likewise.
2715 (init_registers_s390_te_linux64): Likewise.
2716 (tdesc_s390_te_linux64): Likewise.
2717 (init_registers_s390_vx_linux64): Likewise.
2718 (tdesc_s390_vx_linux64): Likewise.
2719 (init_registers_s390_tevx_linux64): Likewise.
2720 (tdesc_s390_tevx_linux64): Likewise.
2721 (init_registers_s390x_linux64): Likewise.
2722 (tdesc_s390x_linux64): Likewise.
2723 (init_registers_s390x_linux64v1): Likewise.
2724 (tdesc_s390x_linux64v1): Likewise.
2725 (init_registers_s390x_linux64v2): Likewise.
2726 (tdesc_s390x_linux64v2): Likewise.
2727 (init_registers_s390x_te_linux64): Likewise.
2728 (tdesc_s390x_te_linux64): Likewise.
2729 (init_registers_s390x_vx_linux64): Likewise.
2730 (tdesc_s390x_vx_linux64): Likewise.
2731 (init_registers_s390x_tevx_linux64): Likewise.
2732 (tdesc_s390x_tevx_linux64): Likewise.
2733 (have_hwcap_s390_vx): New static variable.
2734 (s390_arch_setup): Fill have_hwcap_s390_vx.
2735 (s390_get_thread_area): New function.
2736 (s390_ft_entry_gpr_esa): New const.
2737 (s390_ft_entry_gpr_zarch): New const.
2738 (s390_ft_entry_misc): New const.
2739 (s390_ft_entry_fr): New const.
2740 (s390_ft_entry_vr): New const.
2741 (s390_ft_main_31): New const.
2742 (s390_ft_main_64): New const.
2743 (s390_ft_exit_fr): New const.
2744 (s390_ft_exit_vr): New const.
2745 (s390_ft_exit_misc): New const.
2746 (s390_ft_exit_gpr_esa): New const.
2747 (s390_ft_exit_gpr_zarch): New const.
2748 (append_insns): New function.
2749 (s390_relocate_instruction): New function.
2750 (s390_install_fast_tracepoint_jump_pad): New function.
2751 (s390_get_min_fast_tracepoint_insn_len): New function.
2752 (s390_get_ipa_tdesc_idx): New function.
2753 (struct linux_target_ops): Wire in the above functions.
2754 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2755 * linux-s390-tdesc.h: New file.
2756
2757 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2758
2759 * linux-s390-low.c (s390_supports_tracepoints): New function.
2760 (struct linux_target_ops): Fill supports_tracepoints hook.
2761
2762 2016-03-18 Yao Qi <yao.qi@linaro.org>
2763
2764 * linux-low.c (lwp_signal_can_be_delivered): New function.
2765 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2766
2767 2016-03-18 Yao Qi <yao.qi@linaro.org>
2768
2769 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2770 0 if signal is enqueued. Remove 'signal' from one debugging
2771 message. Move one debugging message to some lines below.
2772 Remove code setting 'signal' to 0.
2773
2774 2016-03-18 Yao Qi <yao.qi@linaro.org>
2775
2776 * linux-low.c (linux_low_filter_event): Remove redundant
2777 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2778
2779 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2780
2781 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2782 (struct linux_target_ops): Wire in the above.
2783
2784 2016-03-03 Yao Qi <yao.qi@linaro.org>
2785
2786 * linux-low.c: Update comments to start_step_over.
2787
2788 2016-03-03 Yao Qi <yao.qi@linaro.org>
2789
2790 PR server/19736
2791 * linux-low.c (handle_extended_wait): Set child suspended
2792 if event_lwp->bp_reinsert isn't zero.
2793
2794 2016-03-02 Yao Qi <yao.qi@linaro.org>
2795
2796 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2797 enqueue_pending_signal.
2798
2799 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2800
2801 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2802 is actually loaded.
2803
2804 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2805
2806 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2807 (s390_regmap_3264) [!__s390x__]: New global.
2808 (s390_collect_ptrace_register): Skip map entries containing -1.
2809 (s390_supply_ptrace_register): Ditto.
2810 (s390_fill_gprs_high): New function.
2811 (s390_store_gprs_high): New function.
2812 (s390_regsets): Add NT_S390_HIGH_GPRS.
2813 (s390_get_hwcap): Enable on 31-bit.
2814 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2815 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2816 Detect NT_S390_HIGH_GPRS.
2817 (s390_usrregs_info_3264): Enable on 31-bit.
2818 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2819 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2820
2821 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2822
2823 PR gdb/13808
2824 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2825 * configure.srv: Ditto.
2826 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2827 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2828 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2829 (init_registers_amd64_linux): Remove prototype.
2830 (tdesc_amd64_linux): Remove declaration.
2831 (get_ipa_tdesc): New function.
2832 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2833 initialize remaining tdescs.
2834 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2835 (init_registers_i386_linux): Remove prototype.
2836 (tdesc_i386_linux): Remove declaration.
2837 (get_ipa_tdesc): New function.
2838 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2839 initialize remaining tdescs.
2840 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2841 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2842 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2843 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2844 (x86_get_ipa_tdesc_idx): New function.
2845 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2846 * linux-x86-tdesc.h: New file.
2847 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2848 (target_get_ipa_tdesc_idx): New macro.
2849 * tracepoint.c (ipa_tdesc_idx): New macro.
2850 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2851 (symbol_list): Add ipa_tdesc_idx.
2852 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2853 (ipa_tdesc): Remove.
2854 (ipa_tdesc_idx): New variable.
2855 (get_context_regcache): Use get_ipa_tdesc.
2856 (gdb_collect): Ditto.
2857 (gdb_probe): Ditto.
2858 * tracepoint.h (get_ipa_tdesc): New prototype.
2859 (ipa_tdesc): Remove.
2860
2861 2016-02-24 Pedro Alves <palves@redhat.com>
2862
2863 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2864 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2865 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2866 Factor out common code between the USE_SIGTRAP_SIGINFO and
2867 !USE_SIGTRAP_SIGINFO blocks.
2868 (linux_low_filter_event): Call save_stop_reason instead of
2869 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2870 Update comments.
2871 (linux_wait_1): Update comments.
2872
2873 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2874
2875 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2876 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2877 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2878 ppc_insert_point, ppc_remove_point.
2879
2880 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2881
2882 * linux-s390-low.c (s390_supports_z_point_type): New function.
2883 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2884
2885 2016-02-16 Yao Qi <yao.qi@linaro.org>
2886
2887 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2888 PC. Get pc from regcache_read_pc.
2889
2890 2016-02-12 Yao Qi <yao.qi@linaro.org>
2891
2892 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2893 or linux_get_pc_32bit.
2894 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2895
2896 2016-02-12 Yao Qi <yao.qi@linaro.org>
2897
2898 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2899 arm_linux_get_next_pcs_fixup.
2900
2901 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2902
2903 * tracepoint.c (x_tracepoint_action_download): Change
2904 write_inferior_data_ptr to write_inferior_data_pointer.
2905 (cmd_qtstart): Likewise.
2906 (write_inferior_data_ptr): Remove.
2907 (download_agent_expr): Change write_inferior_data_ptr to
2908 write_inferior_data_pointer.
2909 (download_tracepoint_1): Likewise.
2910 (download_tracepoint): Likewise.
2911 (download_trace_state_variables): Likewise.
2912
2913 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2914 Marcin Kościelnicki <koriakin@0x04.net>
2915
2916 * tracepoint.c (struct tracepoint_action_ops): Remove.
2917 (struct tracepoint_action): Remove ops.
2918 (m_tracepoint_action_download, r_tracepoint_action_download)
2919 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2920 size and offset accordingly.
2921 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2922 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2923 (tracepoint_action_send, tracepoint_action_download): New functions.
2924 Helpers for trace action handlers.
2925 (add_tracepoint_action): Remove setup actions ops.
2926 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2927
2928 2016-02-10 Yao Qi <yao.qi@linaro.org>
2929
2930 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2931
2932 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2933
2934 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2935 to AC_OUTPUT.
2936 * configure: Regenerate.
2937
2938 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2939
2940 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2941 void * to gdb_byte *.
2942 * linux-low.c (siginfo_fixup): Likewise.
2943 (linux_xfer_siginfo): Likewise.
2944 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2945 Likewise.
2946 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2947
2948 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2949
2950 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2951 to srv_tgtobj.
2952 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2953 to srv_tgtobj.
2954 * linux-x86-low.c [__x86_64__]: Include
2955 "nat/amd64-linux-siginfo.h".
2956 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2957 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2958 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2959 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2960 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2961 (cpt_si_fd, si_timerid, si_overrun): Move from
2962 nat/amd64-linux-siginfo.c.
2963 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2964
2965 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2966
2967 * server.c (skip_to_semicolon): Remove.
2968 (process_point_options): Use strchrnul instead of
2969 skip_to_semicolon.
2970
2971 2016-01-26 Yao Qi <yao.qi@linaro.org>
2972
2973 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2974 * linux-low.c (install_software_single_step_breakpoints): Don't
2975 call regcache_read_pc.
2976 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2977 argument pc.
2978
2979 2016-01-26 Yao Qi <yao.qi@linaro.org>
2980
2981 * linux-low.c (install_software_single_step_breakpoints): Call
2982 regcache_read_pc instead of get_pc.
2983
2984 2016-01-26 Yao Qi <yao.qi@linaro.org>
2985
2986 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2987 (unblock_async_io): Rename to ...
2988 (block_unblock_async_io): ... it. New function.
2989 (enable_async_io): Don't install SIGIO handler. Unblock it
2990 instead.
2991 (disable_async_io): Don't ignore SIGIO. Block it instead.
2992 (initialize_async_io): Install SIGIO handler. Don't call
2993 unblock_async_io.
2994
2995 2016-01-26 Yao Qi <yao.qi@linaro.org>
2996
2997 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2998 first character is '\003', call *the_target->request_interrupt.
2999
3000 2016-01-25 Yao Qi <yao.qi@linaro.org>
3001
3002 * remote-utils.c (new_thread_notify): Remove.
3003 (dead_thread_notify): Likewise.
3004 * remote-utils.h (new_thread_notify): Remove declaration.
3005 (dead_thread_notify): Likewise.
3006
3007 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3008
3009 * gdb.trace/pending.exp: Fix expected message on continue.
3010
3011 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3012
3013 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3014 it works properly on big-endian machines where sizeof (CORE_ADDR)
3015 != sizeof (void *).
3016
3017 2016-01-21 Pedro Alves <palves@redhat.com>
3018
3019 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3020 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3021 * configure: Regenerate.
3022
3023 2016-01-21 Yao Qi <yao.qi@linaro.org>
3024
3025 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3026 is_thumb and set it according to CPSR saved on the stack.
3027 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3028 arm_sigreturn_next_pc.
3029
3030 2016-01-18 Yao Qi <yao.qi@linaro.org>
3031
3032 * linux-low.c (linux_set_pc_64bit): New function.
3033 (linux_get_pc_64bit): New function.
3034 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3035 Declare.
3036 * linux-sparc-low.c (debug_threads): Remove declaration.
3037 (sparc_get_pc): Remove.
3038 (the_low_target): Use linux_get_pc_64bit instead of
3039 sparc_get_pc.
3040 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3041 (the_low_target): Use linux_get_pc_64bit and
3042 linux_set_pc_64bit.
3043
3044 2016-01-18 Yao Qi <yao.qi@linaro.org>
3045
3046 * linux-arm-low.c (debug_threads): Remove declaration.
3047 (arm_get_pc, arm_set_pc): Remove.
3048 (the_low_target): Use linux_get_pc_32bit and
3049 linux_set_pc_32bit.
3050 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3051 (the_low_target): Use linux_get_pc_32bit and
3052 linux_set_pc_32bit.
3053 * linux-cris-low.c (debug_threads): Remove declaration.
3054 (cris_get_pc, cris_set_pc,): Remove.
3055 (the_low_target): Use linux_get_pc_32bit and
3056 linux_set_pc_32bit.
3057 * linux-crisv32-low.c (debug_threads): Remove declaration.
3058 (cris_get_pc, cris_set_pc): Remove.
3059 (the_low_target): Use linux_get_pc_32bit and
3060 linux_set_pc_32bit.
3061 * linux-low.c: Include inttypes.h.
3062 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3063 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3064 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3065 (the_low_target): Use linux_get_pc_32bit and
3066 linux_set_pc_32bit.
3067 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3068 (the_low_target): Use linux_get_pc_32bit and
3069 linux_set_pc_32bit.
3070 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3071 (the_low_target): Use linux_get_pc_32bit and
3072 linux_set_pc_32bit.
3073 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3074 (the_low_target): Use linux_get_pc_32bit and
3075 linux_set_pc_32bit.
3076 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3077 (the_low_target): Use linux_get_pc_32bit and
3078 linux_set_pc_32bit.
3079
3080 2016-01-18 Gary Benson <gbenson@redhat.com>
3081
3082 * configure.ac (AC_FUNC_FORK): New check.
3083 * config.in: Regenerate.
3084 * configure: Likewise.
3085
3086 2016-01-14 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3089 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3090 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3091 arm_get_next_pcs_ctor.
3092
3093 2016-01-12 Josh Stone <jistone@redhat.com>
3094 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3095
3096 * inferiors.h: Include "gdb_vecs.h".
3097 (struct process_info): Add syscalls_to_catch.
3098 * inferiors.c (remove_process): Free syscalls_to_catch.
3099 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3100 syscall_return stops.
3101 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3102 * server.c (handle_general_set): Handle QCatchSyscalls.
3103 (handle_query): Report support for QCatchSyscalls.
3104 * target.h (struct target_ops): Add supports_catch_syscall.
3105 (target_supports_catch_syscall): New macro.
3106 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3107 (struct lwp_info): Add syscall_state.
3108 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3109 Maintain syscall_state and syscalls_to_catch across exec.
3110 (get_syscall_trapinfo): New function, proxy to the_low_target.
3111 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3112 (linux_low_filter_event): Toggle syscall_state entry/return for
3113 syscall traps, and set it ignored for all others.
3114 (gdb_catching_syscalls_p): New function.
3115 (gdb_catch_this_syscall_p): New function.
3116 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3117 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3118 (linux_supports_catch_syscall): New function.
3119 (linux_target_ops): Install it.
3120 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3121 (the_low_target): Install it.
3122
3123 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3124
3125 * acinclude.m4: Include new ../warning.m4 file.
3126 * configure: Regenerated.
3127 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3128
3129 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3130
3131 * ax.c (is_goto_target): Mark static.
3132 * linux-low.c (register_addr): Likewise.
3133 (linux_fetch_registers, linux_store_registers): Likewise.
3134 * mem-break.c (any_persistent_commands): Fix old prototype.
3135 (add_commands_to_breakpoint): Mark static.
3136 * regcache.c (find_register_by_name): Delete unused func.
3137 * remote-utils.c (hex_or_minus_one): Mark static.
3138 * server.c (monitor_show_help): Mark static.
3139 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3140 handle_v_requests): Likewise.
3141
3142 2016-01-12 Pedro Alves <palves@redhat.com>
3143
3144 Remove use of the registered trademark symbol throughout.
3145
3146 2016-01-08 Yao Qi <yao.qi@linaro.org>
3147
3148 * remote-utils.c (getpkt): If c is '\003', call target hook
3149 request_interrupt.
3150
3151 2016-01-06 Yao Qi <yao.qi@linaro.org>
3152
3153 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3154 linux-aarch32-low.c.
3155 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3156 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3157 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3158 (thumb2_breakpoint): Declare.
3159 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3160 linux-aarch32-low.h.
3161 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3162 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3163 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3164
3165 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3166
3167 * gdbreplay.c (gdbreplay_version): Change copyright year in
3168 version message.
3169 * server.c (gdbserver_version): Likewise.
3170
3171 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3172
3173 * server.c (crc32_table): Delete.
3174 (crc32): Use libiberty's xcrc32 function.
3175
3176 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3177
3178 * lynx-low.c (lynx_delete_thread_callback): New function.
3179 (lynx_mourn): Properly delete our process and all of its
3180 threads. Remove call to clear_inferiors.
3181
3182 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3183
3184 * target.c (thread_search_callback): Add check that
3185 the thread_stopped target callback is not NULL before
3186 calling it.
3187
3188 2015-12-21 Yao Qi <yao.qi@linaro.org>
3189
3190 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3191 arm breakpoint.
3192
3193 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3194
3195 * server.c (handle_query): Call target_supports_software_single_step.
3196
3197 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3198
3199 * linux-low.c (single_step): New function.
3200 (linux_resume_one_lwp_throw): Call single_step.
3201 (start_step_over): Likewise.
3202
3203 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3204
3205 * Makefile.in (SFILES): Append arch/arm-linux.c,
3206 arch/arm-get-next-pcs.c.
3207 (arm-linux.o): New rule.
3208 (arm-get-next-pcs.o): New rule.
3209 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3210 arm-linux.o.
3211 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3212 to linux-aarch32-low.c.
3213 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3214 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3215 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3216 (thumb2_breakpoint_len): Likewise.
3217 (arm_is_thumb_mode): Make non-static.
3218 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3219 from linux-aarch32-low.c.
3220 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3221 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3222 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3223 (thumb2_breakpoint_len): Likewise.
3224 (arm_is_thumb_mode): New declaration.
3225 * linux-arm-low.c: Include arch/arm-linux.h
3226 aarch/arm-get-next-pcs.h, sys/syscall.h.
3227 (get_next_pcs_ops): New struct.
3228 (get_next_pcs_addr_bits_remove): New function.
3229 (get_next_pcs_is_thumb): New function.
3230 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3231 (arm_sigreturn_next_pc): Likewise.
3232 (get_next_pcs_syscall_next_pc): Likewise.
3233 (arm_gdbserver_get_next_pcs): Likewise.
3234 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3235 Initialize.
3236 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3237 * server.h: Include gdb_vecs.h.
3238
3239 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3240
3241 * Makefile.in (SFILES): Append common/common-regcache.c.
3242 (OBS): Append common-regcache.o.
3243 (common-regcache.o): New rule.
3244 * regcache.c (init_register_cache): Initialize cache to
3245 REG_UNAVAILABLE.
3246 (regcache_raw_read_unsigned): New function.
3247 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3248 register_status enum.
3249
3250 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3251
3252 * linux-aarch64-low.c (the_low_targets): Rename
3253 breakpoint_reinsert_addr to get_next_pcs.
3254 * linux-arm-low.c (the_low_targets): Likewise.
3255 * linux-bfin-low.c (the_low_targets): Likewise.
3256 * linux-cris-low.c (the_low_targets): Likewise.
3257 * linux-crisv32-low.c (the_low_targets): Likewise.
3258 * linux-low.c (can_software_single_step): Likewise.
3259 (install_software_single_step_breakpoints): New function.
3260 (start_step_over): Use install_software_single_step_breakpoints.
3261 * linux-low.h: New CORE_ADDR vector.
3262 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3263 get_next_pcs.
3264 * linux-mips-low.c (the_low_targets): Likewise.
3265 * linux-nios2-low.c (the_low_targets): Likewise.
3266 * linux-sparc-low.c (the_low_targets): Likewise.
3267
3268 2015-12-17 Pedro Alves <palves@redhat.com>
3269
3270 * linux-low.c (linux_kill_one_lwp): Remove references to
3271 LinuxThreads.
3272 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3273 to 'kill'.
3274 (linux_init_signals): Delete.
3275 (initialize_low): Adjust.
3276 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3277
3278 2015-12-16 Pedro Alves <palves@redhat.com>
3279
3280 * configure.ac (compiler warning flags): When testing a
3281 -Wno-foo option, check whether -Wfoo works instead.
3282 * configure: Regenerate.
3283
3284 2015-12-11 Don Breazeal <donb@codesourcery.com>
3285
3286 * server.c (process_serial_event): Don't exit from gdbserver
3287 in remote mode if there are still active inferiors.
3288
3289 2015-12-11 Yao Qi <yao.qi@linaro.org>
3290
3291 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3292 arm_breakpoint_at if the process is 32-bit.
3293
3294 2015-12-11 Yao Qi <yao.qi@linaro.org>
3295
3296 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3297 arm breakpoint.
3298
3299 2015-12-07 Yao Qi <yao.qi@linaro.org>
3300
3301 * configure.srv: Append arm.o to srv_tgtobj for
3302 aarch64*-*-linux* target.
3303 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3304 from linux-arm-low.c.
3305 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3306 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3307 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3308 (thumb2_breakpoint_len): Likewise.
3309 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3310 (arm_breakpoint_kinds): Likewise.
3311 (arm_breakpoint_kind_from_pc): Likewise.
3312 (arm_sw_breakpoint_from_kind): Likewise.
3313 (arm_breakpoint_kind_from_current_state): Likewise.
3314 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3315 (arm_sw_breakpoint_from_kind): Declare.
3316 (arm_breakpoint_kind_from_current_state): Declare.
3317 (arm_breakpoint_at): Declare.
3318 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3319 arm_sw_breakpoint_from_kind if process is 32-bit.
3320 (aarch64_breakpoint_kind_from_pc): New function.
3321 (aarch64_breakpoint_kind_from_current_state): New function.
3322 (the_low_target): Initialize fields breakpoint_kind_from_pc
3323 and breakpoint_kind_from_current_state.
3324 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3325 linux-aarch32-low.c.
3326 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3327 (arm_breakpoint, arm_breakpoint_len): Likewise.
3328 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3329 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3330 (arm_is_thumb_mode): Likewise.
3331 (arm_breakpoint_at): Likewise.
3332 (arm_breakpoint_kind_from_pc): Likewise.
3333 (arm_sw_breakpoint_from_kind): Likewise.
3334 (arm_breakpoint_kind_from_current_state): Likewise.
3335
3336 Revert:
3337 2015-08-04 Yao Qi <yao.qi@linaro.org>
3338
3339 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3340 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3341 * server.c (extended_protocol): Remove "static".
3342 * server.h (extended_protocol): Declare it.
3343
3344 2015-12-04 Josh Stone <jistone@redhat.com>
3345
3346 * target.h (struct target_ops) <arch_setup>: Rename to ...
3347 (struct target_ops) <post_create_inferior>: ... this.
3348 (target_arch_setup): Rename to ...
3349 (target_post_create_inferior): ... this, calling post_create_inferior.
3350 * server.c (start_inferior): Update target_arch_setup calls to
3351 target_post_create_inferior.
3352 * linux-low.c (linux_low_ptrace_options): Forward declare.
3353 (linux_arch_setup): Update its comment for general use.
3354 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3355 (struct linux_target_ops): Use linux_post_create_inferior.
3356 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3357 to post_create_inferior.
3358 * nto-low.c (struct nto_target_ops): Likewise.
3359 * spu-low.c (struct spu_target_ops): Likewise.
3360 * win32-low.c (struct win32_target_ops): Likewise.
3361
3362 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3363
3364 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3365
3366 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3367
3368 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3369 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3370 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3371 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3372 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3373 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3374 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3375 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3376 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3377 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3378 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3379 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3380
3381 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3382
3383 * linux-low.c (linux_look_up_symbols): Don't call
3384 linux_supports_traceclone.
3385 * linux-low.h (thread_db_init): Remove use_events argument.
3386 * thread-db.c (thread_db_use_event): Remove global variable.
3387 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3388 (struct thread_db) <td_create_bp>: Remove field.
3389 (thread_db_create_event): Remove function.
3390 (thread_db_enable_reporting): Likewise.
3391 (find_one_thread): Don't check for thread_db_use_events.
3392 (attach_thread): Likewise.
3393 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3394 (try_thread_db_load_1): Don't check for thread_db_use_events.
3395 (thread_db_init): Remove use_events argument and thread events
3396 handling.
3397 (remove_thread_event_breakpoints): Remove function.
3398 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3399
3400 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3401
3402 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3403 New function.
3404 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3405 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3406 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3407 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3408 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3409 Initialize.
3410 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3411 New function.
3412 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3413 * linux-low.c (can_hardware_single_step): Use
3414 supports_hardware_single_step.
3415 (can_software_single_step): New function.
3416 (start_step_over): Call can_software_single_step.
3417 (linux_supports_hardware_single_step): New function.
3418 (struct target_ops) <supports_software_single_step>: Initialize.
3419 * linux-low.h (struct linux_target_ops)
3420 <supports_hardware_single_step>: Initialize.
3421 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3422 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3423 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3424 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3425 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3426 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3427 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3428 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3429 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3430 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3431 Initialize.
3432 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3433 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3434 Initialize.
3435 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3436 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3437 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3438 New function.
3439 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3440 * target.h (struct target_ops): <supports_software_single_step>:
3441 New field.
3442 (target_supports_software_single_step): New macro.
3443
3444 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3445
3446 * linux-low.c (linux_wait_1): Fix pc advance condition.
3447 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3448 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3449
3450 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * linux-arm-low.c (arm_is_thumb_mode): New function.
3453 (arm_breakpoint_at): Use arm_is_thumb_mode.
3454 (arm_breakpoint_kind_from_current_state): New function.
3455 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3456 Initialize.
3457 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3458 (linux_breakpoint_kind_from_current_state): New function.
3459 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3460 * linux-low.h (struct linux_target_ops)
3461 <breakpoint_kind_from_current_state>: New field.
3462 * target.h (struct target_ops): Likewise.
3463 (target_breakpoint_kind_from_current_state): New macro.
3464
3465 2015-11-30 Pedro Alves <palves@redhat.com>
3466
3467 * linux-low.c (linux_resume): Wake up the event loop before
3468 returning.
3469
3470 2015-11-30 Pedro Alves <palves@redhat.com>
3471
3472 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3473 check.
3474 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3475 to -1.
3476 * target.c (struct thread_search): New structure.
3477 (thread_search_callback): New function.
3478 (prev_general_thread): New global.
3479 (prepare_to_access_memory, done_accessing_memory): New functions.
3480 * target.h (prepare_to_access_memory, done_accessing_memory):
3481 Replace macros with function declarations.
3482
3483 2015-11-30 Pedro Alves <palves@redhat.com>
3484
3485 PR 14618
3486 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3487 report TARGET_WAITKIND_NO_RESUMED.
3488 * remote-utils.c (prepare_resume_reply): Handle
3489 TARGET_WAITKIND_NO_RESUMED.
3490 * server.c (report_no_resumed): New global.
3491 (handle_query) <qSupported>: Handle "no-resumed+". Report
3492 "no-resumed+" support.
3493 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3494 return error if the client doesn't support no-resumed events.
3495 (push_stop_notification): New function.
3496 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3497 events if the client supports them.
3498
3499 2015-11-30 Pedro Alves <palves@redhat.com>
3500
3501 * linux-low.c (thread_still_has_status_pending_p): Don't check
3502 vCont;t here.
3503 (lwp_resumed): New function.
3504 (status_pending_p_callback): Return early if the LWP is not
3505 supposed to be resumed.
3506
3507 2015-11-30 Pedro Alves <palves@redhat.com>
3508
3509 * linux-low.c (handle_extended_wait): Assert that the LWP's
3510 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3511 thread create events, leave the new child's status pending.
3512 (linux_low_filter_event): If GDB wants to hear about thread exit
3513 events, leave the LWP marked dead and don't delete it.
3514 (linux_wait_for_event_filtered): Don't check for thread exit.
3515 (filter_exit_event): New function.
3516 (linux_wait_1): Use it, when returning an exit event.
3517 (linux_resume_one_lwp_throw): Assert that the LWP's
3518 waitstatus is TARGET_WAITKIND_IGNORE.
3519 * remote-utils.c (prepare_resume_reply): Handle
3520 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3521 * server.c (report_thread_events): New global.
3522 (handle_general_set): Handle QThreadEvents.
3523 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3524 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3525 TARGET_WAITKIND_THREAD_EXITED.
3526 * server.h (report_thread_events): Declare.
3527
3528 2015-11-30 Pedro Alves <palves@redhat.com>
3529
3530 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3531 the thread's last_resume_kind was resume_stop.
3532
3533 2015-11-30 Pedro Alves <palves@redhat.com>
3534
3535 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3536 before returning.
3537
3538 2015-11-30 Pedro Alves <palves@redhat.com>
3539
3540 * server.c (handle_v_requests): Handle vCtrlC.
3541
3542 2015-11-30 Pedro Alves <palves@redhat.com>
3543
3544 * gdbthread.h (find_any_thread_of_pid): Declare.
3545 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3546 functions.
3547 * server.c (handle_query): If current_thread is NULL, look for
3548 another thread of the selected process.
3549
3550 2015-11-26 Daniel Colascione <dancol@dancol.org>
3551 Simon Marchi <simon.marchi@ericsson.com>
3552
3553 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3554 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3555 name in reply.
3556 * target.h (struct target_ops) <thread_name>: New field.
3557 (target_thread_name): New macro.
3558
3559 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3560
3561 * regcache.h (regcache_invalidate_pid): Add declaration.
3562 * regcache.c (regcache_invalidate_pid): New function, extracted
3563 from regcache_invalidate.
3564 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3565 Add trivial documentation comment.
3566 * lynx-low.c: Use regcache_invalidate_pid instead of
3567 regcache_invalidate.
3568
3569 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3570
3571 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3572 and Elf64_auxv_t if the target is Android.
3573
3574 2015-11-22 Doug Evans <xdje42@gmail.com>
3575
3576 * target.h: #include <sys/types.h>.
3577
3578 2015-11-19 Pedro Alves <palves@redhat.com>
3579
3580 * linux-low.c (linux_process_qsupported): Change prototype.
3581 Adjust.
3582 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3583 Change prototype.
3584 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3585 and adjust to loop over all features.
3586 * server.c (handle_query) <qSupported>: Adjust to call
3587 target_process_qsupported once, passing it a vector of unprocessed
3588 features.
3589 * target.h (struct target_ops) <process_qsupported>: Change
3590 prototype.
3591 (target_process_qsupported): Adjust.
3592
3593 2015-11-19 Pedro Alves <palves@redhat.com>
3594
3595 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3596 mode.
3597 * configure: Regenerate.
3598
3599 2015-11-19 Pedro Alves <palves@redhat.com>
3600
3601 * configure: Regenerate.
3602
3603 2015-11-19 Yao Qi <yao.qi@linaro.org>
3604
3605 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3606 type to uint32_t.
3607
3608 2015-11-19 Yao Qi <yao.qi@linaro.org>
3609
3610 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3611 (struct aarch64_operand): Move enum out.
3612
3613 2015-11-19 Yao Qi <yao.qi@linaro.org>
3614
3615 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3616 struct user_fpsimd_state *.
3617 (aarch64_store_fpregset): Likewise.
3618
3619 2015-11-19 Yao Qi <yao.qi@linaro.org>
3620
3621 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3622 struct user_pt_regs *.
3623 (aarch64_store_gregset): Likewise.
3624
3625 2015-11-18 Pedro Alves <palves@redhat.com>
3626
3627 * Makefile.in (all_object_files): Add $IPA_OBJS.
3628
3629 2015-11-17 Pedro Alves <palves@redhat.com>
3630
3631 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3632 GDB_SIGNAL_0 and gdb_signal_to_string.
3633
3634 2015-11-17 Pedro Alves <palves@redhat.com>
3635
3636 * win32-low.c (handle_output_debug_string): Remove parameter.
3637 (win32_kill): Remove our_status local and adjust call to
3638 handle_output_debug_string.
3639 (get_child_debug_event): Adjust call to
3640 handle_output_debug_string.
3641
3642 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3643
3644 * linux-mips-low.c (mips_fill_gregset): Add cast.
3645 (mips_store_gregset): Likewise.
3646 (mips_fill_fpregset): Likewise.
3647 (mips_store_fpregset): Likewise.
3648
3649 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3650
3651 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3652 priv.
3653
3654 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3655
3656 * linux-mips-low.c (mips_linux_new_thread): Change type of
3657 watch_type to enum target_hw_bp_type.
3658
3659 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3660
3661 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3662 Change return type to arm_hwbp_type.
3663
3664 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3665
3666 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3667 (arm_store_gregset): Likewise.
3668 * linux-arm-low.c (arm_get_hwcap): Likewise.
3669 (arm_read_description): Likewise.
3670
3671 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3672
3673 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3674
3675 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3676
3677 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3678 (ppc_fill_vsxregset): Likewise.
3679 (ppc_store_vsxregset): Likewise.
3680 (ppc_fill_vrregset): Likewise.
3681 (ppc_store_vrregset): Likewise.
3682 (ppc_fill_evrregset): Likewise.
3683 (ppc_store_evrregset): Likewise.
3684
3685 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3686
3687 * linux-ppc-low.c (ppc_usrregs_info): Remove
3688 forward-declaration.
3689 (ppc_arch_setup): Move lower in file.
3690
3691 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3692
3693 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3694 (ps_pdwrite): Likewise.
3695
3696 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3697
3698 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3699 to after assert checks.
3700
3701 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3702
3703 * proc-service.c (ps_pdread): Add/adjust casts.
3704 (ps_pdwrite): Add/adjust casts.
3705
3706 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3707
3708 * server.c (handle_search_memory_1): Cast return value of
3709 memmem.
3710
3711 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3712
3713 * server.c (write_qxfer_response): Change type of data to
3714 gdb_byte *.
3715
3716 2015-10-29 Pedro Alves <palves@redhat.com>
3717
3718 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3719
3720 2015-10-29 Pedro Alves <palves@redhat.com>
3721
3722 * tracepoint.c (clear_installed_tracepoints): Add casts.
3723
3724 2015-10-29 Pedro Alves <palves@redhat.com>
3725
3726 * server.c (handle_v_cont, process_serial_event): Add enum
3727 gdb_signal casts to signal parsing code.
3728
3729 2015-10-29 Pedro Alves <palves@redhat.com>
3730
3731 * linux-low.h (NULL_REGSET): Define.
3732 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3733 * linux-arm-low.c (arm_regsets): Likewise.
3734 * linux-crisv32-low.c (cris_regsets): Likewise.
3735 * linux-m68k-low.c (m68k_regsets): Likewise.
3736 * linux-mips-low.c (mips_regsets): Likewise.
3737 * linux-nios2-low.c (nios2_regsets): Likewise.
3738 * linux-ppc-low.c (ppc_regsets): Likewise.
3739 * linux-s390-low.c (s390_regsets): Likewise.
3740 * linux-sh-low.c (sh_regsets): Likewise.
3741 * linux-sparc-low.c (sparc_regsets): Likewise.
3742 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3743 * linux-tile-low.c (tile_regsets): Likewise.
3744 * linux-x86-low.c (x86_regsets): Likewise.
3745 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3746
3747 2015-10-29 Pedro Alves <palves@redhat.com>
3748
3749 * linux-low.h (NULL_REGSET): Define.
3750 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3751 * linux-arm-low.c (arm_regsets): Likewise.
3752 * linux-crisv32-low.c (cris_regsets): Likewise.
3753 * linux-m68k-low.c (m68k_regsets): Likewise.
3754 * linux-mips-low.c (mips_regsets): Likewise.
3755 * linux-nios2-low.c (nios2_regsets): Likewise.
3756 * linux-ppc-low.c (ppc_regsets): Likewise.
3757 * linux-s390-low.c (s390_regsets): Likewise.
3758 * linux-sh-low.c (sh_regsets): Likewise.
3759 * linux-sparc-low.c (sparc_regsets): Likewise.
3760 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3761 * linux-tile-low.c (tile_regsets): Likewise.
3762 * linux-x86-low.c (x86_regsets): Likewise.
3763 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3764
3765 2015-10-26 Doug Evans <dje@google.com>
3766
3767 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3768
3769 2015-10-26 Doug Evans <dje@google.com>
3770
3771 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3772
3773 2015-10-26 Doug Evans <dje@google.com>
3774
3775 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3776 for debug_printf.
3777 (attach_thread, find_new_threads_callback): Ditto.
3778
3779 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3780
3781 * mem-break.h (set_breakpoint_data): Remove.
3782
3783 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3784
3785 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3786 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3787 (initialize_low): Remove set_breakpoint_data call.
3788 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3789 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3790 (initialize_low): Remove set_breakpoint_data call.
3791 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3792 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3793 (initialize_low): Remove set_breakpoint_data call.
3794
3795 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3796
3797 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3798 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3799 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3800 * target.h (target_breakpoint_kind_from_pc): New macro.
3801
3802 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3803
3804 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3805 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3806 the default breakpoint kind.
3807
3808 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3809
3810 * linux-arm-low.c (arm_supports_z_point_type): Add software
3811 breakpoint support.
3812
3813 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3814
3815 * linux-arm-low.c: Refactor breakpoint definitions.
3816 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3817 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3818
3819 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3820
3821 * Makefile.in: Add arm.c/o.
3822 * configure.srv: Likewise.
3823 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3824 (arm_breakpoint_kind_from_pc): New function.
3825 (arm_sw_breakpoint_from_kind): Return proper kind.
3826 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3827
3828 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3829
3830 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3831 removal.
3832 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3833 (struct raw_breakpoint) <size>: Remove.
3834 (struct raw_breakpoint) <kind>: Add.
3835 (bp_size): New function.
3836 (bp_opcode): Likewise.
3837 (find_raw_breakpoint_at): Adjust for kind.
3838 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3839 (remove_memory_breakpoint): Adjust for kind call bp_size.
3840 (set_raw_breakpoint_at): Adjust for kind.
3841 (set_breakpoint): Likewise.
3842 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3843 (delete_raw_breakpoint): Adjust for kind.
3844 (delete_breakpoint): Likewise.
3845 (find_gdb_breakpoint): Likewise.
3846 (set_gdb_breakpoint_1): Likewise.
3847 (set_gdb_breakpoint): Likewise.
3848 (delete_gdb_breakpoint_1): Likewise.
3849 (delete_gdb_breakpoint): Likewise.
3850 (uninsert_raw_breakpoint): Likewise.
3851 (reinsert_raw_breakpoint): Likewise.
3852 (set_breakpoint_data): Remove.
3853 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3854 (check_mem_read): Adjust for kind call bp_size.
3855 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3856 (clone_one_breakpoint): Adjust for kind.
3857 * mem-break.h (set_gdb_breakpoint): Likewise.
3858 (delete_gdb_breakpoint): Likewise.
3859 * server.c (process_serial_event): Likewise.
3860
3861 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3862
3863 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3864 (struct linux_target_ops) <breakpoint>: Remove.
3865 (struct linux_target_ops) <breakpoint_len>: Remove.
3866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3868 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3869 (arm_sw_breakpoint_from_kind): New function.
3870 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3871 (struct linux_target_ops) <breakpoint>: Remove.
3872 (struct linux_target_ops) <breakpoint_len>: Remove.
3873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3875 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3876 (struct linux_target_ops) <breakpoint>: Remove.
3877 (struct linux_target_ops) <breakpoint_len>: Remove.
3878 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3880 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3881 (struct linux_target_ops) <breakpoint>: Remove.
3882 (struct linux_target_ops) <breakpoint_len>: Remove.
3883 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3884 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3885 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3886 and sw_breakpoint_from_kind to increment the pc.
3887 (linux_breakpoint_kind_from_pc): New function.
3888 (linux_sw_breakpoint_from_kind): New function.
3889 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3890 (initialize_low): Call breakpoint_kind_from_pc and
3891 sw_breakpoint_from_kind to replace breakpoint_data/len.
3892 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3893 New field.
3894 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3895 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3896 (struct linux_target_ops) <breakpoint>: Remove.
3897 (struct linux_target_ops) <breakpoint_len>: Remove.
3898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3900 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3901 (struct linux_target_ops) <breakpoint>: Remove.
3902 (struct linux_target_ops) <breakpoint_len>: Remove.
3903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3905 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3906 (struct linux_target_ops) <breakpoint>: Remove.
3907 (struct linux_target_ops) <breakpoint_len>: Remove.
3908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3910 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3911 (struct linux_target_ops) <breakpoint>: Remove.
3912 (struct linux_target_ops) <breakpoint_len>: Remove.
3913 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3914 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3915 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3916 (struct linux_target_ops) <breakpoint>: Remove.
3917 (struct linux_target_ops) <breakpoint_len>: Remove.
3918 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3919 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3920 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3921 (struct linux_target_ops) <breakpoint>: Remove.
3922 (struct linux_target_ops) <breakpoint_len>: Remove.
3923 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3925 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3926 (struct linux_target_ops) <breakpoint>: Remove.
3927 (struct linux_target_ops) <breakpoint_len>: Remove.
3928 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3929 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3930 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3931 (struct linux_target_ops) <breakpoint>: Remove.
3932 (struct linux_target_ops) <breakpoint_len>: Remove.
3933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3935 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3941 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3942 (struct linux_target_ops) <breakpoint>: Remove.
3943 (struct linux_target_ops) <breakpoint_len>: Remove.
3944 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3945 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3946 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3947 (struct linux_target_ops) <breakpoint>: Remove.
3948 (struct linux_target_ops) <breakpoint_len>: Remove.
3949 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3951
3952 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3953
3954 * linux-cris-low.c (cris_get_pc): Remove void arg.
3955
3956 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3957
3958 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3959 variable name.
3960
3961 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3962
3963 * inferiors.c (thread_pid_matches_callback): New function.
3964 (find_thread_process): New function.
3965 (remove_thread): Reset current_thread.
3966 (remove_process): Assert threads have been removed first.
3967
3968 2015-10-15 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3971 if it is 3.
3972 (aarch64_remove_point): Likewise.
3973 * regcache.c (regcache_register_size): New function.
3974
3975 2015-10-12 Yao Qi <yao.qi@linaro.org>
3976
3977 * linux-aarch64-low.c: Update all callers as emit_load_store
3978 is renamed to aarch64_emit_load_store.
3979
3980 2015-10-12 Yao Qi <yao.qi@linaro.org>
3981
3982 * linux-aarch64-low.c: Update all callers of function renaming
3983 from emit_insn to aarch64_emit_insn.
3984
3985 2015-10-12 Yao Qi <yao.qi@linaro.org>
3986
3987 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3988 arch/aarch64-insn.h.
3989 (struct aarch64_memory_operand): Likewise.
3990 (ENCODE): Likewise.
3991 (emit_insn): Move to arch/aarch64-insn.c.
3992 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3993 (emit_load_store): Move to arch/aarch64-insn.c.
3994 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3995 (can_encode_int32): Remove.
3996
3997 2015-10-12 Yao Qi <yao.qi@linaro.org>
3998
3999 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4000 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4001 (aarch64_relocate_instruction): Likewise.
4002 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4003 (struct aarch64_insn_visitor): Likewise.
4004
4005 2015-10-12 Yao Qi <yao.qi@linaro.org>
4006
4007 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4008 (struct aarch64_insn_visitor): New.
4009 (struct aarch64_insn_relocation_data): New.
4010 (aarch64_ftrace_insn_reloc_b): New function.
4011 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4012 (aarch64_ftrace_insn_reloc_cb): Likewise.
4013 (aarch64_ftrace_insn_reloc_tb): Likewise.
4014 (aarch64_ftrace_insn_reloc_adr): Likewise.
4015 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4016 (aarch64_ftrace_insn_reloc_others): Likewise.
4017 (visitor): New.
4018 (aarch64_relocate_instruction): Use visitor.
4019
4020 2015-10-12 Yao Qi <yao.qi@linaro.org>
4021
4022 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4023 int. Add argument buf.
4024 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4025 aarch64_relocate_instruction.
4026
4027 2015-10-12 Yao Qi <yao.qi@linaro.org>
4028
4029 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4030 argument insn. Remove local variable insn. Don't call
4031 target_read_uint32.
4032 (aarch64_install_fast_tracepoint_jump_pad): Call
4033 target_read_uint32.
4034
4035 2015-09-30 Yao Qi <yao.qi@linaro.org>
4036
4037 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4038 (emit_load_store_pair): Likewise.
4039
4040 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4041
4042 * dll.c (match_dll): Add cast(s).
4043 (unloaded_dll): Likewise.
4044 * linux-low.c (second_thread_of_pid_p): Likewise.
4045 (delete_lwp_callback): Likewise.
4046 (count_events_callback): Likewise.
4047 (select_event_lwp_callback): Likewise.
4048 (linux_set_resume_request): Likewise.
4049 * server.c (accumulate_file_name_length): Likewise.
4050 (emit_dll_description): Likewise.
4051 (handle_qxfer_threads_worker): Likewise.
4052 (visit_actioned_threads): Likewise.
4053 * thread-db.c (any_thread_of): Likewise.
4054 * tracepoint.c (same_process_p): Likewise.
4055 (match_blocktype): Likewise.
4056 (build_traceframe_info_xml): Likewise.
4057
4058 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4059
4060 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4061 assignment.
4062 (gdb_unparse_agent_expr): Likewise.
4063 * hostio.c (require_data): Likewise.
4064 (handle_pread): Likewise.
4065 * linux-low.c (disable_regset): Likewise.
4066 (fetch_register): Likewise.
4067 (store_register): Likewise.
4068 (get_dynamic): Likewise.
4069 (linux_qxfer_libraries_svr4): Likewise.
4070 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4071 (set_fast_tracepoint_jump): Likewise.
4072 (uninsert_fast_tracepoint_jumps_at): Likewise.
4073 (reinsert_fast_tracepoint_jumps_at): Likewise.
4074 (validate_inserted_breakpoint): Likewise.
4075 (clone_agent_expr): Likewise.
4076 * regcache.c (init_register_cache): Likewise.
4077 * remote-utils.c (putpkt_binary_1): Likewise.
4078 (decode_M_packet): Likewise.
4079 (decode_X_packet): Likewise.
4080 (look_up_one_symbol): Likewise.
4081 (relocate_instruction): Likewise.
4082 (monitor_output): Likewise.
4083 * server.c (handle_search_memory): Likewise.
4084 (handle_qxfer_exec_file): Likewise.
4085 (handle_qxfer_libraries): Likewise.
4086 (handle_qxfer): Likewise.
4087 (handle_query): Likewise.
4088 (handle_v_cont): Likewise.
4089 (handle_v_run): Likewise.
4090 (captured_main): Likewise.
4091 * target.c (write_inferior_memory): Likewise.
4092 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4093 * tracepoint.c (init_trace_buffer): Likewise.
4094 (add_tracepoint_action): Likewise.
4095 (add_traceframe): Likewise.
4096 (add_traceframe_block): Likewise.
4097 (cmd_qtdpsrc): Likewise.
4098 (cmd_qtdv): Likewise.
4099 (cmd_qtstatus): Likewise.
4100 (response_source): Likewise.
4101 (response_tsv): Likewise.
4102 (cmd_qtnotes): Likewise.
4103 (gdb_collect): Likewise.
4104 (initialize_tracepoint): Likewise.
4105
4106 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4107
4108 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4109 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4110 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4111 <NOP>: New.
4112 (enum aarch64_condition_codes): New enum.
4113 (w0): New static global.
4114 (fp): Likewise.
4115 (lr): Likewise.
4116 (struct aarch64_memory_operand) <type>: New
4117 MEMORY_OPERAND_POSTINDEX type.
4118 (postindex_memory_operand): New helper function.
4119 (emit_ret): New function.
4120 (emit_load_store_pair): New function, factored out of emit_stp
4121 with support for MEMORY_OPERAND_POSTINDEX.
4122 (emit_stp): Rewrite using emit_load_store_pair.
4123 (emit_ldp): New function.
4124 (emit_load_store): Likewise.
4125 (emit_ldr): Mention post-index instruction in comment.
4126 (emit_ldrh): New function.
4127 (emit_ldrb): New function.
4128 (emit_ldrsw): Mention post-index instruction in comment.
4129 (emit_str): Likewise.
4130 (emit_subs): New function.
4131 (emit_cmp): Likewise.
4132 (emit_and): Likewise.
4133 (emit_orr): Likewise.
4134 (emit_orn): Likewise.
4135 (emit_eor): Likewise.
4136 (emit_mvn): Likewise.
4137 (emit_lslv): Likewise.
4138 (emit_lsrv): Likewise.
4139 (emit_asrv): Likewise.
4140 (emit_mul): Likewise.
4141 (emit_sbfm): Likewise.
4142 (emit_sbfx): Likewise.
4143 (emit_ubfm): Likewise.
4144 (emit_ubfx): Likewise.
4145 (emit_csinc): Likewise.
4146 (emit_cset): Likewise.
4147 (emit_nop): Likewise.
4148 (emit_ops_insns): New helper function.
4149 (emit_pop): Likewise.
4150 (emit_push): Likewise.
4151 (aarch64_emit_prologue): New function.
4152 (aarch64_emit_epilogue): Likewise.
4153 (aarch64_emit_add): Likewise.
4154 (aarch64_emit_sub): Likewise.
4155 (aarch64_emit_mul): Likewise.
4156 (aarch64_emit_lsh): Likewise.
4157 (aarch64_emit_rsh_signed): Likewise.
4158 (aarch64_emit_rsh_unsigned): Likewise.
4159 (aarch64_emit_ext): Likewise.
4160 (aarch64_emit_log_not): Likewise.
4161 (aarch64_emit_bit_and): Likewise.
4162 (aarch64_emit_bit_or): Likewise.
4163 (aarch64_emit_bit_xor): Likewise.
4164 (aarch64_emit_bit_not): Likewise.
4165 (aarch64_emit_equal): Likewise.
4166 (aarch64_emit_less_signed): Likewise.
4167 (aarch64_emit_less_unsigned): Likewise.
4168 (aarch64_emit_ref): Likewise.
4169 (aarch64_emit_if_goto): Likewise.
4170 (aarch64_emit_goto): Likewise.
4171 (aarch64_write_goto_address): Likewise.
4172 (aarch64_emit_const): Likewise.
4173 (aarch64_emit_call): Likewise.
4174 (aarch64_emit_reg): Likewise.
4175 (aarch64_emit_pop): Likewise.
4176 (aarch64_emit_stack_flush): Likewise.
4177 (aarch64_emit_zero_ext): Likewise.
4178 (aarch64_emit_swap): Likewise.
4179 (aarch64_emit_stack_adjust): Likewise.
4180 (aarch64_emit_int_call_1): Likewise.
4181 (aarch64_emit_void_call_2): Likewise.
4182 (aarch64_emit_eq_goto): Likewise.
4183 (aarch64_emit_ne_goto): Likewise.
4184 (aarch64_emit_lt_goto): Likewise.
4185 (aarch64_emit_le_goto): Likewise.
4186 (aarch64_emit_gt_goto): Likewise.
4187 (aarch64_emit_ge_got): Likewise.
4188 (aarch64_emit_ops_impl): New static global variable.
4189 (aarch64_emit_ops): New target function, return
4190 &aarch64_emit_ops_impl.
4191 (struct linux_target_ops): Install it.
4192
4193 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4194
4195 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4196 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4197 aarch64-ipa.o.
4198 * linux-aarch64-ipa.c: New file.
4199 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4200 and endian.h.
4201 (aarch64_get_thread_area): New target method.
4202 (extract_signed_bitfield): New helper function.
4203 (aarch64_decode_ldr_literal): New function.
4204 (enum aarch64_opcodes): New enum.
4205 (struct aarch64_register): New struct.
4206 (struct aarch64_operand): New struct.
4207 (x0): New static global.
4208 (x1): Likewise.
4209 (x2): Likewise.
4210 (x3): Likewise.
4211 (x4): Likewise.
4212 (w2): Likewise.
4213 (ip0): Likewise.
4214 (sp): Likewise.
4215 (xzr): Likewise.
4216 (aarch64_register): New helper function.
4217 (register_operand): Likewise.
4218 (immediate_operand): Likewise.
4219 (struct aarch64_memory_operand): New struct.
4220 (offset_memory_operand): New helper function.
4221 (preindex_memory_operand): Likewise.
4222 (enum aarch64_system_control_registers): New enum.
4223 (ENCODE): New macro.
4224 (emit_insn): New helper function.
4225 (emit_b): New function.
4226 (emit_bcond): Likewise.
4227 (emit_cb): Likewise.
4228 (emit_tb): Likewise.
4229 (emit_blr): Likewise.
4230 (emit_stp): Likewise.
4231 (emit_ldp_q_offset): Likewise.
4232 (emit_stp_q_offset): Likewise.
4233 (emit_load_store): Likewise.
4234 (emit_ldr): Likewise.
4235 (emit_ldrsw): Likewise.
4236 (emit_str): Likewise.
4237 (emit_ldaxr): Likewise.
4238 (emit_stxr): Likewise.
4239 (emit_stlr): Likewise.
4240 (emit_data_processing_reg): Likewise.
4241 (emit_data_processing): Likewise.
4242 (emit_add): Likewise.
4243 (emit_sub): Likewise.
4244 (emit_mov): Likewise.
4245 (emit_movk): Likewise.
4246 (emit_mov_addr): Likewise.
4247 (emit_mrs): Likewise.
4248 (emit_msr): Likewise.
4249 (emit_sevl): Likewise.
4250 (emit_wfe): Likewise.
4251 (append_insns): Likewise.
4252 (can_encode_int32_in): New helper function.
4253 (aarch64_relocate_instruction): New function.
4254 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4255 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4256 (struct linux_target_ops): Install aarch64_get_thread_area,
4257 aarch64_install_fast_tracepoint_jump_pad and
4258 aarch64_get_min_fast_tracepoint_insn_len.
4259
4260 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4261
4262 * Makefile.in (aarch64-insn.o): New rule.
4263 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4264
4265 2015-09-21 Yao Qi <yao.qi@linaro.org>
4266
4267 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4268
4269 2015-09-21 Yao Qi <yao.qi@linaro.org>
4270
4271 * tracepoint.c (max_jump_pad_size): Remove.
4272
4273 2015-09-18 Yao Qi <yao.qi@linaro.org>
4274
4275 * linux-aarch64-low.c: Don't include sys/uio.h.
4276 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4277
4278 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4279
4280 * tracepoint.c (eval_result_type): Change prototype.
4281 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4282
4283 2015-09-15 Pedro Alves <palves@redhat.com>
4284
4285 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4286 Check whether to report exec events instead of checking whether
4287 multiprocess is enabled.
4288
4289 2015-09-15 Pedro Alves <palves@redhat.com>
4290
4291 PR remote/18965
4292 * remote-utils.c (prepare_resume_reply): Merge
4293 TARGET_WAITKIND_VFORK_DONE switch case with the
4294 TARGET_WAITKIND_FORKED case.
4295
4296 2015-09-15 Yao Qi <yao.qi@linaro.org>
4297
4298 * server.c (handle_query): Check string comparison using
4299 "else if" instead of "if".
4300
4301 2015-09-15 Yao Qi <yao.qi@linaro.org>
4302
4303 * server.c (vCont_supported): New global variable.
4304 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4305 matches. Append ";vContSupported+" to own_buf.
4306 (handle_v_requests): Append ";s;S" to own_buf if target supports
4307 hardware single step or vCont_supported is false.
4308 (capture_main): Set vCont_supported to zero.
4309
4310 2015-09-15 Yao Qi <yao.qi@linaro.org>
4311
4312 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4313 it to ...
4314 (linux_supports_hardware_single_step): ... New function.
4315 (linux_target_ops): Update.
4316 * lynx-low.c (lynx_target_ops): Set field
4317 supports_hardware_single_step to target_can_do_hardware_single_step.
4318 * nto-low.c (nto_target_ops): Likewise.
4319 * spu-low.c (spu_target_ops): Likewise.
4320 * win32-low.c (win32_target_ops): Likewise.
4321 * target.c (target_can_do_hardware_single_step): New function.
4322 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4323 Remove. <supports_hardware_single_step>: New field.
4324 (target_supports_conditional_breakpoints): Remove.
4325 (target_supports_hardware_single_step): New macro.
4326 (target_can_do_hardware_single_step): Declare.
4327 * server.c (handle_query): Use target_supports_hardware_single_step
4328 instead of target_supports_conditional_breakpoints.
4329
4330 2015-09-15 Yao Qi <yao.qi@linaro.org>
4331
4332 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4333 function.
4334 (struct linux_target_ops the_low_target): Install
4335 aarch64_linux_siginfo_fixup.
4336
4337 2015-09-11 Don Breazeal <donb@codesourcery.com>
4338 Luis Machado <lgustavo@codesourcery.com>
4339
4340 * linux-low.c (linux_mourn): Static declaration.
4341 (linux_arch_setup): Move in front of
4342 handle_extended_wait.
4343 (linux_arch_setup_thread): New function.
4344 (handle_extended_wait): Handle exec events. Call
4345 linux_arch_setup_thread. Make event_lwp argument a
4346 pointer-to-a-pointer.
4347 (check_zombie_leaders): Do not check stopped threads.
4348 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4349 (linux_low_filter_event): Add lwp and thread for exec'ing
4350 non-leader thread if leader thread has been deleted.
4351 Refactor code into linux_arch_setup_thread and call it.
4352 Pass child lwp pointer by reference to handle_extended_wait.
4353 (linux_wait_for_event_filtered): Update comment.
4354 (linux_wait_1): Prevent clobbering exec event status.
4355 (linux_supports_exec_events): New function.
4356 (linux_target_ops) <supports_exec_events>: Initialize new member.
4357 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4358 new member.
4359 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4360 * server.c (report_exec_events): New global variable.
4361 (handle_query): Handle qSupported query for exec-events feature.
4362 (captured_main): Initialize report_exec_events.
4363 * server.h (report_exec_events): Declare new global variable.
4364 * target.h (struct target_ops) <supports_exec_events>: New
4365 member.
4366 (target_supports_exec_events): New macro.
4367 * win32-low.c (win32_target_ops) <supports_exec_events>:
4368 Initialize new member.
4369
4370 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4371
4372 * linux-low.c (linux_low_enable_btrace): Remove.
4373 (linux_target_ops): Replace linux_low_enable_btrace with
4374 linux_enable_btrace.
4375
4376 2015-09-03 Yao Qi <yao.qi@linaro.org>
4377
4378 * linux-aarch64-low.c (aarch64_insert_point): Call
4379 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4380 returns true.
4381
4382 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4383
4384 * linux-low.c (check_stopped_by_breakpoint): Use
4385 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4386
4387 2015-08-27 Pedro Alves <palves@redhat.com>
4388
4389 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4390
4391 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4392
4393 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4394 the XNEW-family equivalent.
4395 (compile_bytecodes): Likewise.
4396 * dll.c (loaded_dll): Likewise.
4397 * event-loop.c (append_callback_event): Likewise.
4398 (create_file_handler): Likewise.
4399 (create_file_event): Likewise.
4400 * hostio.c (handle_open): Likewise.
4401 * inferiors.c (add_thread): Likewise.
4402 (add_process): Likewise.
4403 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4404 * linux-arm-low.c (arm_new_process): Likewise.
4405 (arm_new_thread): Likewise.
4406 * linux-low.c (add_to_pid_list): Likewise.
4407 (linux_add_process): Likewise.
4408 (handle_extended_wait): Likewise.
4409 (add_lwp): Likewise.
4410 (enqueue_one_deferred_signal): Likewise.
4411 (enqueue_pending_signal): Likewise.
4412 (linux_resume_one_lwp_throw): Likewise.
4413 (linux_resume_one_thread): Likewise.
4414 (linux_read_memory): Likewise.
4415 (linux_write_memory): Likewise.
4416 * linux-mips-low.c (mips_linux_new_process): Likewise.
4417 (mips_linux_new_thread): Likewise.
4418 (mips_add_watchpoint): Likewise.
4419 * linux-x86-low.c (initialize_low_arch): Likewise.
4420 * lynx-low.c (lynx_add_process): Likewise.
4421 * mem-break.c (set_raw_breakpoint_at): Likewise.
4422 (set_breakpoint): Likewise.
4423 (add_condition_to_breakpoint): Likewise.
4424 (add_commands_to_breakpoint): Likewise.
4425 (clone_agent_expr): Likewise.
4426 (clone_one_breakpoint): Likewise.
4427 * regcache.c (new_register_cache): Likewise.
4428 * remote-utils.c (look_up_one_symbol): Likewise.
4429 * server.c (queue_stop_reply): Likewise.
4430 (start_inferior): Likewise.
4431 (queue_stop_reply_callback): Likewise.
4432 (handle_target_event): Likewise.
4433 * spu-low.c (fetch_ppc_memory): Likewise.
4434 (store_ppc_memory): Likewise.
4435 * target.c (set_target_ops): Likewise.
4436 * thread-db.c (thread_db_load_search): Likewise.
4437 (try_thread_db_load_1): Likewise.
4438 * tracepoint.c (add_tracepoint): Likewise.
4439 (add_tracepoint_action): Likewise.
4440 (create_trace_state_variable): Likewise.
4441 (cmd_qtdpsrc): Likewise.
4442 (cmd_qtro): Likewise.
4443 (add_while_stepping_state): Likewise.
4444 * win32-low.c (child_add_thread): Likewise.
4445 (get_image_name): Likewise.
4446
4447 2015-08-25 Yao Qi <yao.qi@linaro.org>
4448
4449 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4450
4451 2015-08-25 Yao Qi <yao.qi@linaro.org>
4452
4453 * Makefile.in (aarch64-linux.o): New rule.
4454 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4455 srv_tgtobj.
4456 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4457 (aarch64_init_debug_reg_state): Make it extern.
4458 (aarch64_linux_prepare_to_resume): Remove.
4459
4460 2015-08-25 Yao Qi <yao.qi@linaro.org>
4461
4462 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4463 lwp_arch_private_info and ptid_of_lwp.
4464
4465 2015-08-25 Yao Qi <yao.qi@linaro.org>
4466
4467 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4468 Find proc_info by find_process_pid. All callers updated.
4469
4470 2015-08-25 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4473 Remove.
4474 (debug_reg_change_callback): Remove.
4475 (aarch64_notify_debug_reg_change): Remove.
4476
4477 2015-08-25 Yao Qi <yao.qi@linaro.org>
4478
4479 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4480 Call current_lwp_ptid.
4481
4482 2015-08-25 Yao Qi <yao.qi@linaro.org>
4483
4484 * linux-aarch64-low.c (debug_reg_change_callback): Use
4485 debug_printf.
4486
4487 2015-08-25 Yao Qi <yao.qi@linaro.org>
4488
4489 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4490
4491 2015-08-25 Yao Qi <yao.qi@linaro.org>
4492
4493 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4494
4495 2015-08-25 Yao Qi <yao.qi@linaro.org>
4496
4497 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4498 the code.
4499
4500 2015-08-25 Yao Qi <yao.qi@linaro.org>
4501
4502 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4503 Remove.
4504 (debug_reg_change_callback): Remove argument entry and add argument
4505 lwp. Remove local variable thread. Don't print thread id in the
4506 debugging output. Don't check whether pid of thread equals to pid.
4507 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4508 iterate_over_lwps instead find_inferior.
4509
4510 2015-08-24 Pedro Alves <palves@redhat.com>
4511
4512 * inferiors.c (get_first_process): New function.
4513 * inferiors.h (get_first_process): New declaration.
4514 * remote-utils.c (read_ptid): Default to the first process in the
4515 list, instead of to the current thread's process.
4516
4517 2015-08-24 Pedro Alves <palves@redhat.com>
4518
4519 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4520 * event-loop.c: Likewise.
4521 * remote-utils.c: Likewise.
4522 * tracepoint.c: Likewise.
4523
4524 2015-08-24 Pedro Alves <palves@redhat.com>
4525
4526 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4527 ptid_get_lwp.
4528
4529 2015-08-21 Pedro Alves <palves@redhat.com>
4530
4531 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4532 instead of literal 1.
4533
4534 2015-08-21 Pedro Alves <palves@redhat.com>
4535
4536 * tdesc.c (default_description): Explicitly zero-initialize.
4537
4538 2015-08-21 Pedro Alves <palves@redhat.com>
4539
4540 PR gdb/18749
4541 * inferiors.c (remove_thread): Discard any pending stop reply for
4542 this thread.
4543 * server.c (remove_all_on_match_pid): Rename to ...
4544 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4545 instead of a pid.
4546 (discard_queued_stop_replies): Change parameter to a ptid. Now
4547 extern.
4548 (handle_v_kill, kill_inferior_callback, captured_main)
4549 (process_serial_event): Adjust.
4550 * server.h (discard_queued_stop_replies): Declare.
4551
4552 2015-08-21 Pedro Alves <palves@redhat.com>
4553
4554 * linux-low.c (wait_for_sigstop): Always switch to no thread
4555 selected if the previously current thread dies.
4556 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4557 process instead of the current thread's.
4558 * remote-utils.c (input_interrupt): Don't check if there's no
4559 current thread.
4560 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4561 current thread to the general thread fails, error out.
4562 (handle_qxfer_auxv, handle_qxfer_libraries)
4563 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4564 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4565 (handle_query): Check if there's a thread selected instead of
4566 checking whether there's any thread in the thread list.
4567 (handle_qxfer_threads, handle_qxfer_btrace)
4568 (handle_qxfer_btrace_conf): Don't error out early if there's no
4569 thread in the thread list.
4570 (handle_v_cont, myresume): Don't set the current thread to the
4571 continue thread.
4572 (process_serial_event) <Hg handling>: Also set thread_id if the
4573 previous general thread is still alive.
4574 (process_serial_event) <g/G handling>: If setting the current
4575 thread to the general thread fails, error out.
4576 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4577 thread's lwp instead of the current thread's.
4578 * target.c (set_desired_thread): If the desired thread was not
4579 found, leave the current thread pointing to NULL. Return an int
4580 (boolean) indicating success.
4581 * target.h (set_desired_thread): Change return type to int.
4582
4583 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4584
4585 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4586 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4587 #includes.
4588 (ps_get_thread_area): New function.
4589
4590 2015-08-19 Gary Benson <gbenson@redhat.com>
4591
4592 * hostio.c (handle_pread): Do not attempt to read more data
4593 than hostio_reply_with_data can fit in a packet.
4594
4595 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4596
4597 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4598
4599 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4600
4601 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4602
4603 2015-08-06 Pedro Alves <palves@redhat.com>
4604
4605 * tracepoint.c (expr_eval_result): Now an int.
4606
4607 2015-08-06 Pedro Alves <palves@redhat.com>
4608
4609 * gdbthread.h (struct regcache): Forward declare.
4610 (struct thread_info) <regcache_data>: Now a struct regcache
4611 pointer.
4612 * inferiors.c (inferior_regcache_data)
4613 (set_inferior_regcache_data): Now work with struct regcache
4614 pointers.
4615 * inferiors.h (struct regcache): Forward declare.
4616 (inferior_regcache_data, set_inferior_regcache_data): Now work
4617 with struct regcache pointers.
4618 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4619 (free_register_cache_thread): Remove struct regcache pointer
4620 casts.
4621
4622 2015-08-06 Pedro Alves <palves@redhat.com>
4623
4624 * server.c (captured_main): On error, print the exception message
4625 to stderr, and if run_once is set, throw a quit.
4626
4627 2015-08-06 Pedro Alves <palves@redhat.com>
4628
4629 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4630 the current thread.
4631
4632 2015-08-06 Pedro Alves <palves@redhat.com>
4633
4634 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4635 reading beyond the passed in buffer length.
4636
4637 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4638
4639 * tracepoint.c (symbol_list) <required>: Remove.
4640
4641 2015-08-06 Pedro Alves <palves@redhat.com>
4642
4643 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4644 count if stopping and suspending threads.
4645 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4646 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4647 (linux_detach): Complete an ongoing step-over.
4648 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4649 throughout.
4650 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4651 (linux_wait_1): If passing a signal to the inferior after
4652 finishing a step-over, unsuspend and re-resume all lwps. If we
4653 see a single-step event but the thread should be continuing, don't
4654 pass the trap to gdb.
4655 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4656 internal_error instead of gdb_assert.
4657 (enqueue_pending_signal): New function.
4658 (check_ptrace_stopped_lwp_gone): Add debug output.
4659 (start_step_over): Use internal_error instead of gdb_assert.
4660 (complete_ongoing_step_over): New function.
4661 (linux_resume_one_thread): Don't resume a suspended thread.
4662 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4663 it stepping.
4664
4665 2015-08-06 Pedro Alves <palves@redhat.com>
4666
4667 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4668 (linux_thread_alive): Use lwp_is_marked_dead.
4669 (extended_event_reported): Delete.
4670 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4671 instead of extended_event_reported.
4672 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4673 as well.
4674 (lwp_is_marked_dead): New function.
4675 (lwp_running): Use lwp_is_marked_dead.
4676 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4677 comment.
4678
4679 2015-08-06 Pedro Alves <palves@redhat.com>
4680
4681 * linux-low.c (linux_wait_1): Move fork event output out of the
4682 !report_to_gdb check. Pass event_child->waitstatus to
4683 target_waitstatus_to_string instead of ourstatus.
4684
4685 2015-08-04 Yao Qi <yao.qi@linaro.org>
4686
4687 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4688 if current_thread is 32 bit.
4689
4690 2015-08-04 Yao Qi <yao.qi@linaro.org>
4691
4692 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4693 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4694 * server.c (extended_protocol): Remove "static".
4695 * server.h (extended_protocol): Declare it.
4696
4697 2015-08-04 Yao Qi <yao.qi@linaro.org>
4698
4699 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4700 both aarch64 and aarch32.
4701 (aarch64_set_pc): Likewise.
4702
4703 2015-08-04 Yao Qi <yao.qi@linaro.org>
4704
4705 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4706 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4707 arm-with-neon.xml to srv_xmlfiles.
4708 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4709 (is_64bit_tdesc): New function.
4710 (aarch64_linux_read_description): New function.
4711 (aarch64_arch_setup): Call aarch64_linux_read_description.
4712 (regs_info): Rename to regs_info_aarch64.
4713 (aarch64_regs_info): Return right regs_info.
4714 (initialize_low_arch): Call initialize_low_arch_aarch32.
4715
4716 2015-08-04 Yao Qi <yao.qi@linaro.org>
4717
4718 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4719 * linux-aarch32-low.c: New file.
4720 * linux-aarch32-low.h: New file.
4721 * linux-arm-low.c (arm_fill_gregset): Move it to
4722 linux-aarch32-low.c.
4723 (arm_store_gregset): Likewise.
4724 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4725 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4726 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4727 (regs_info): Rename to regs_info_arm.
4728 (arm_regs_info): Return regs_info_aarch32 if
4729 have_ptrace_getregset is 1 and target description is
4730 arm_with_neon or arm_with_vfpv3.
4731 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4732 Call initialize_low_arch_aarch32 instead.
4733
4734 2015-08-04 Yao Qi <yao.qi@linaro.org>
4735
4736 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4737 * linux-low.c: ... here.
4738 * linux-low.h (have_ptrace_getregset): Declare it.
4739
4740 2015-08-04 Pedro Alves <palves@redhat.com>
4741
4742 * thread-db.c (struct thread_db): Use new typedefs.
4743 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4744 CHK calls.
4745 (disable_thread_event_reporting): Cast result of dlsym to
4746 destination function pointer type.
4747 (thread_db_mourn): Use td_ta_delete_ftype.
4748
4749 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4750
4751 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4752 arch variant.
4753 (CDX_BREAKPOINT): Define for R2.
4754 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4755 (the_low_target): Add comments.
4756
4757 2015-07-30 Yao Qi <yao.qi@linaro.org>
4758
4759 * linux-arm-low.c (arm_hwcap): Remove it.
4760 (arm_read_description): New local variable arm_hwcap. Don't
4761 set arm_hwcap to zero.
4762
4763 2015-07-30 Yao Qi <yao.qi@linaro.org>
4764
4765 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4766 Use regcache->tdesc instead.
4767 (arm_store_wmmxregset): Likewise.
4768 (arm_fill_vfpregset): Likewise.
4769 (arm_store_vfpregset): Likewise.
4770
4771 2015-07-30 Yao Qi <yao.qi@linaro.org>
4772
4773 * linux-arm-low.c: Include arch/arm.h.
4774 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4775 (arm_store_gregset): Likewise.
4776
4777 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4778
4779 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4780 ptrace's 4th parameter.
4781
4782 2015-07-27 Yao Qi <yao.qi@linaro.org>
4783
4784 * configure.srv (case aarch64*-*-linux*): Don't set
4785 srv_linux_usrregs.
4786
4787 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4788
4789 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4790 sys/ptrace.h.
4791 * linux-arm-low.c: Likewise.
4792 * linux-cris-low.c: Likewise.
4793 * linux-crisv32-low.c: Likewise.
4794 * linux-low.c: Likewise.
4795 * linux-m68k-low.c: Likewise.
4796 * linux-mips-low.c: Likewise.
4797 * linux-nios2-low.c: Likewise.
4798 * linux-s390-low.c: Likewise.
4799 * linux-sparc-low.c: Likewise.
4800 * linux-tic6x-low.c: Likewise.
4801 * linux-tile-low.c: Likewise.
4802 * linux-x86-low.c: Likewise.
4803
4804 2015-07-24 Pedro Alves <palves@redhat.com>
4805
4806 * config.in: Regenerate.
4807 * configure: Regenerate.
4808
4809 2015-07-24 Pedro Alves <palves@redhat.com>
4810
4811 * acinclude.m4: Include ../ptrace.m4.
4812 * configure.ac: Call GDB_AC_PTRACE.
4813 * config.in, configure: Regenerate.
4814
4815 2015-07-24 Yao Qi <yao.qi@linaro.org>
4816
4817 * linux-low.c (linux_create_inferior): Remove setting to
4818 proc->priv->new_inferior.
4819 (linux_attach): Likewise.
4820 (linux_low_filter_event): Likewise.
4821 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4822
4823 2015-07-24 Yao Qi <yao.qi@linaro.org>
4824
4825 * linux-low.c (linux_arch_setup): New function.
4826 (linux_low_filter_event): If proc->tdesc is NULL and
4827 proc->attached is true, call the_low_target.arch_setup.
4828 Otherwise, keep status pending, and return.
4829 (linux_resume_one_lwp_throw): Don't call get_pc if
4830 thread->while_stepping isn't NULL. Don't call
4831 get_thread_regcache if proc->tdesc is NULL.
4832 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4833 (linux_target_ops): Install arch_setup.
4834 * server.c (start_inferior): Call the_target->arch_setup.
4835 * target.h (struct target_ops) <arch_setup>: New field.
4836 (target_arch_setup): New marco.
4837 * lynx-low.c (lynx_target_ops): Update.
4838 * nto-low.c (nto_target_ops): Update.
4839 * spu-low.c (spu_target_ops): Update.
4840 * win32-low.c (win32_target_ops): Update.
4841
4842 2015-07-24 Yao Qi <yao.qi@linaro.org>
4843
4844 * linux-low.c (linux_add_process): Don't set
4845 proc->priv->new_inferior.
4846 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4847 (linux_attach): Likewise.
4848
4849 2015-07-24 Yao Qi <yao.qi@linaro.org>
4850
4851 * server.c (start_inferior): Code refactor.
4852
4853 2015-07-24 Yao Qi <yao.qi@linaro.org>
4854
4855 * server.c (process_serial_event): Set general_thread.
4856
4857 2015-07-21 Yao Qi <yao.qi@linaro.org>
4858
4859 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4860 aarch64_linux_get_debug_reg_capacity.
4861
4862 2015-07-17 Yao Qi <yao.qi@linaro.org>
4863
4864 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4865 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4866 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4867 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4868 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4869 (AARCH64_HWP_ALIGNMENT): Likewise.
4870 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4871 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4872 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4873 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4874 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4875 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4876 (struct aarch64_debug_reg_state): Likewise.
4877 (struct arch_lwp_info): Likewise.
4878 (aarch64_align_watchpoint): Likewise.
4879 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4880 (aarch64_watchpoint_length): Likewise.
4881 (aarch64_point_encode_ctrl_reg): Likewise
4882 (aarch64_point_is_aligned): Likewise.
4883 (aarch64_align_watchpoint): Likewise.
4884 (aarch64_linux_set_debug_regs):
4885 (aarch64_dr_state_insert_one_point): Likewise.
4886 (aarch64_dr_state_remove_one_point): Likewise.
4887 (aarch64_handle_breakpoint): Likewise.
4888 (aarch64_handle_aligned_watchpoint): Likewise.
4889 (aarch64_handle_unaligned_watchpoint): Likewise.
4890 (aarch64_handle_watchpoint): Likewise.
4891
4892 2015-07-17 Yao Qi <yao.qi@linaro.org>
4893
4894 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4895 and don't aarch64_get_debug_reg_state. All callers update.
4896 (aarch64_handle_aligned_watchpoint): Likewise.
4897 (aarch64_handle_unaligned_watchpoint): Likewise.
4898 (aarch64_handle_watchpoint): Likewise.
4899 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4900 (aarch64_remove_point): Likewise.
4901
4902 2015-07-17 Yao Qi <yao.qi@linaro.org>
4903
4904 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4905 debug_printf.
4906 (aarch64_handle_unaligned_watchpoint): Likewise.
4907
4908 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4909
4910 Revert the previous 3 commits:
4911 Move gdb_regex* to common/
4912 Move linux_find_memory_regions_full & co.
4913 gdbserver build-id attribute generator
4914
4915 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4916 Jan Kratochvil <jan.kratochvil@redhat.com>
4917
4918 gdbserver build-id attribute generator.
4919 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4920 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4921 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4922 (find_phdr): New.
4923 (get_dynamic): Use find_pdhr to traverse program headers.
4924 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4925 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4926 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4927 (get_hex_build_id): New.
4928 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4929 to reply XML document.
4930
4931 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4932 Jan Kratochvil <jan.kratochvil@redhat.com>
4933
4934 * target.c: Include target/target-utils.h and fcntl.h.
4935 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4936 (target_fileio_read_stralloc): New functions.
4937
4938 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4939
4940 * Makefile.in (OBS): Add gdb_regex.o.
4941 (gdb_regex.o): New.
4942 * config.in: Rebuilt.
4943 * configure: Rebuilt.
4944
4945 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4946 Jan Kratochvil <jan.kratochvil@redhat.com>
4947
4948 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4949 * Makefile.in (OBS): Add target-utils.o.
4950 (linux-maps.o, target-utils.o): New.
4951 * configure.srv (srv_linux_obj): Add linux-maps.o.
4952
4953 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4954
4955 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4956 function, return 1.
4957 (the_low_target): Install it.
4958
4959 2015-07-14 Pedro Alves <palves@redhat.com>
4960
4961 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4962 Instead, ignore ECHILD, and throw an error for other errnos.
4963
4964 2015-07-10 Pedro Alves <palves@redhat.com>
4965
4966 * event-loop.c (struct callback_event) <data>: Change type to
4967 gdb_client_data instance instead of gdb_client_data pointer.
4968 (append_callback_event): Adjust.
4969
4970 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4971
4972 * linux-aarch64-low.c: Add comments for each linux_target_ops
4973 method. Remove comments already covered in target_ops and
4974 linux_target_ops definitions.
4975 (the_low_target): Add comments for each unimplemented method.
4976
4977 2015-07-09 Yao Qi <yao.qi@linaro.org>
4978
4979 * linux-aarch64-low.c (aarch64_regmap): Remove.
4980 (aarch64_usrregs_info): Remove.
4981 (regs_info): Set field usrregs to NULL.
4982
4983 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4984
4985 * linux-low.c: Include "rsp-low.h"
4986 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4987 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4988 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4989 (handle_btrace_enable_pt): New.
4990 (handle_btrace_general_set): Support "pt".
4991 (handle_btrace_conf_general_set): Support "pt:size".
4992
4993 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4994
4995 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4996 Z_PACKET_SW_BP.
4997
4998 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4999
5000 * linux-aarch64-low.c: Remove comment about endianness.
5001 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5002 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5003 memcmp.
5004
5005 2015-06-24 Gary Benson <gbenson@redhat.com>
5006
5007 * linux-i386-ipa.c (stdint.h): Do not include.
5008 * lynx-i386-low.c (stdint.h): Likewise.
5009 * lynx-ppc-low.c (stdint.h): Likewise.
5010 * mem-break.c (stdint.h): Likewise.
5011 * thread-db.c (stdint.h): Likewise.
5012 * tracepoint.c (stdint.h): Likewise.
5013 * win32-low.c (stdint.h): Likewise.
5014
5015 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5016
5017 * server.c (write_qxfer_response): Update call to
5018 remote_escape_output.
5019
5020 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5021 Jan Kratochvil <jan.kratochvil@redhat.com>
5022
5023 Merge multiple hex conversions.
5024 * gdbreplay.c (tohex): Rename to 'fromhex'.
5025 (logchar): Use fromhex.
5026
5027 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5028
5029 * server.c (handle_qxfer_libraries): Set `version' attribute for
5030 <library-list>.
5031
5032 2015-06-10 Gary Benson <gbenson@redhat.com>
5033
5034 * target.h (struct target_ops) <multifs_open>: New field.
5035 <multifs_unlink>: Likewise.
5036 <multifs_readlink>: Likewise.
5037 * linux-low.c (nat/linux-namespaces.h): New include.
5038 (linux_target_ops): Initialize the_target->multifs_open,
5039 the_target->multifs_unlink and the_target->multifs_readlink.
5040 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5041 * hostio.c (hostio_fs_pid): New static variable.
5042 (hostio_handle_new_gdb_connection): New function.
5043 (handle_setfs): Likewise.
5044 (handle_open): Use the_target->multifs_open as appropriate.
5045 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5046 (handle_readlink): Use the_target->multifs_readlink as
5047 appropriate.
5048 (handle_vFile): Handle vFile:setfs packets.
5049 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5050 after target_handle_new_gdb_connection.
5051
5052 2015-06-10 Gary Benson <gbenson@redhat.com>
5053
5054 * configure.ac (AC_CHECK_FUNCS): Add setns.
5055 * config.in: Regenerate.
5056 * configure: Likewise.
5057 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5058 (linux-namespaces.o): New rule.
5059 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5060
5061 2015-06-09 Gary Benson <gbenson@redhat.com>
5062
5063 * hostio.c (handle_open): Process mode argument with
5064 fileio_to_host_mode.
5065
5066 2015-06-01 Yao Qi <yao.qi@linaro.org>
5067
5068 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5069 * linux-x86-low.c: Likewise.
5070
5071 2015-05-28 Don Breazeal <donb@codesourcery.com>
5072
5073 * linux-low.c (handle_extended_wait): Initialize
5074 thread_info.last_resume_kind for new fork children.
5075
5076 2015-05-15 Pedro Alves <palves@redhat.com>
5077
5078 * target.h (target_handle_new_gdb_connection): Rewrite using if
5079 wrapped in do/while.
5080
5081 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5082
5083 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5084 * configure, config.in: Regenerate.
5085 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5086 Declare typedef.
5087
5088 2015-05-12 Don Breazeal <donb@codesourcery.com>
5089
5090 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5091 PTRACE_EVENT_VFORK_DONE.
5092 (linux_low_ptrace_options, extended_event_reported): Add vfork
5093 events.
5094 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5095 and "vforkdone" for RSP 'T' Stop Reply Packet.
5096 * server.h (report_vfork_events): Declare
5097 global variable.
5098
5099 2015-05-12 Don Breazeal <donb@codesourcery.com>
5100
5101 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5102 (the_low_target) <new_fork>: Initialize new member.
5103 * linux-arm-low.c (arm_new_fork): New function.
5104 (the_low_target) <new_fork>: Initialize new member.
5105 * linux-low.c (handle_extended_wait): Call new target function
5106 new_fork.
5107 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5108 * linux-mips-low.c (mips_add_watchpoint): New function
5109 extracted from mips_insert_point.
5110 (the_low_target) <new_fork>: Initialize new member.
5111 (mips_linux_new_fork): New function.
5112 (mips_insert_point): Call mips_add_watchpoint.
5113 * linux-x86-low.c (x86_linux_new_fork): New function.
5114 (the_low_target) <new_fork>: Initialize new member.
5115
5116 2015-05-12 Don Breazeal <donb@codesourcery.com>
5117
5118 * linux-low.c (handle_extended_wait): Implement return value,
5119 rename argument 'event_child' to 'event_lwp', handle
5120 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5121 (linux_low_ptrace_options): New function.
5122 (linux_low_filter_event): Call linux_low_ptrace_options,
5123 use different argument fo linux_enable_event_reporting,
5124 use return value from handle_extended_wait.
5125 (extended_event_reported): New function.
5126 (linux_wait_1): Call extended_event_reported and set
5127 status to report fork events.
5128 (linux_write_memory): Add pid to debug message.
5129 (reset_lwp_ptrace_options_callback): New function.
5130 (linux_handle_new_gdb_connection): New function.
5131 (linux_target_ops): Initialize new structure member.
5132 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5133 * lynx-low.c: Initialize new structure member.
5134 * remote-utils.c (prepare_resume_reply): Implement stop reason
5135 "fork" for "T" stop message.
5136 * server.c (handle_query): Call handle_new_gdb_connection.
5137 * server.h (report_fork_events): Declare global flag.
5138 * target.h (struct target_ops) <handle_new_gdb_connection>:
5139 New member.
5140 (target_handle_new_gdb_connection): New macro.
5141 * win32-low.c: Initialize new structure member.
5142
5143 2015-05-12 Don Breazeal <donb@codesourcery.com>
5144
5145 * mem-break.c (APPEND_TO_LIST): Define macro.
5146 (clone_agent_expr): New function.
5147 (clone_one_breakpoint): New function.
5148 (clone_all_breakpoints): New function.
5149 * mem-break.h: Declare new functions.
5150
5151 2015-05-12 Don Breazeal <donb@codesourcery.com>
5152
5153 * linux-low.c (linux_supports_fork_events): New function.
5154 (linux_supports_vfork_events): New function.
5155 (linux_target_ops): Initialize new structure members.
5156 (initialize_low): Call linux_check_ptrace_features.
5157 * lynx-low.c (lynx_target_ops): Initialize new structure
5158 members.
5159 * server.c (report_fork_events, report_vfork_events):
5160 New global flags.
5161 (handle_query): Add new features to qSupported packet and
5162 response.
5163 (captured_main): Initialize new global variables.
5164 * target.h (struct target_ops) <supports_fork_events>:
5165 New member.
5166 <supports_vfork_events>: New member.
5167 (target_supports_fork_events): New macro.
5168 (target_supports_vfork_events): New macro.
5169 * win32-low.c (win32_target_ops): Initialize new structure
5170 members.
5171
5172 2015-05-12 Gary Benson <gbenson@redhat.com>
5173
5174 * server.c (handle_qxfer_exec_file): Use current process
5175 if annex is empty.
5176
5177 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5178
5179 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5180 Remove HAVE_PTRACE_GETREGS conditionals.
5181 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5182 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5183
5184 2015-05-08 Yao Qi <yao.qi@linaro.org>
5185
5186 * linux-low.c (linux_supports_conditional_breakpoints): New
5187 function.
5188 (linux_target_ops): Install new target method.
5189 * lynx-low.c (lynx_target_ops): Install NULL hook for
5190 supports_conditional_breakpoints.
5191 * nto-low.c (nto_target_ops): Likewise.
5192 * spu-low.c (spu_target_ops): Likewise.
5193 * win32-low.c (win32_target_ops): Likewise.
5194 * server.c (handle_query): Check
5195 target_supports_conditional_breakpoints.
5196 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5197 New field.
5198 (target_supports_conditional_breakpoints): New macro.
5199
5200 2015-05-06 Pedro Alves <palves@redhat.com>
5201
5202 PR server/18081
5203 * server.c (start_inferior): If the process exits, mourn it.
5204
5205 2015-04-21 Gary Benson <gbenson@redhat.com>
5206
5207 * hostio.c (fileio_open_flags_to_host): Factored out to
5208 fileio_to_host_openflags in common/fileio.c. Single use
5209 updated.
5210
5211 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5212
5213 * linux-xtensa-low.c (xtensa_fill_gregset)
5214 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5215 XCHAL_HAVE_LOOP.
5216
5217 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5218
5219 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5220 (regs_info): Replace usrregs pointer with NULL.
5221
5222 2015-04-17 Gary Benson <gbenson@redhat.com>
5223
5224 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5225 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5226 * server.c (handle_qxfer_exec_file): New function.
5227 (qxfer_packets): Add exec-file entry.
5228 (handle_query): Report qXfer:exec-file:read as supported packet.
5229
5230 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5231
5232 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5233
5234 2015-04-09 Gary Benson <gbenson@redhat.com>
5235
5236 * hostio-errno.c (errno_to_fileio_error): Remove function.
5237 Update caller to use remote_fileio_to_fio_error.
5238
5239 2015-04-09 Yao Qi <yao.qi@linaro.org>
5240
5241 * linux-low.c (linux_insert_point): Call
5242 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5243 (linux_remove_point): Call remove_memory_breakpoint if type is
5244 raw_bkpt_type_sw.
5245 * linux-x86-low.c (x86_insert_point): Don't call
5246 insert_memory_breakpoint.
5247 (x86_remove_point): Don't call remove_memory_breakpoint.
5248
5249 2015-04-01 Pedro Alves <palves@redhat.com>
5250 Cleber Rosa <crosa@redhat.com>
5251
5252 * server.c (gdbserver_usage): Reorganize and extend the usage
5253 message.
5254
5255 2015-03-24 Pedro Alves <palves@redhat.com>
5256
5257 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5258 output. Also dump TRAP_TRACE.
5259 (linux_low_filter_event): In debug output, distinguish a
5260 resume_stop SIGSTOP from a delayed SIGSTOP.
5261
5262 2015-03-24 Gary Benson <gbenson@redhat.com>
5263
5264 * linux-x86-low.c (x86_linux_new_thread): Moved to
5265 nat/x86-linux.c.
5266 (x86_linux_prepare_to_resume): Likewise.
5267
5268 2015-03-24 Gary Benson <gbenson@redhat.com>
5269
5270 * Makefile.in (x86-linux-dregs.o): New rule.
5271 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5272 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5273 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5274 (x86_linux_dr_get): Likewise.
5275 (x86_linux_dr_set): Likewise.
5276 (update_debug_registers_callback): Likewise.
5277 (x86_linux_dr_set_addr): Likewise.
5278 (x86_linux_dr_get_addr): Likewise.
5279 (x86_linux_dr_set_control): Likewise.
5280 (x86_linux_dr_get_control): Likewise.
5281 (x86_linux_dr_get_status): Likewise.
5282 (x86_linux_update_debug_registers): Likewise.
5283
5284 2015-03-24 Gary Benson <gbenson@redhat.com>
5285
5286 * linux-x86-low.c (x86_linux_update_debug_registers):
5287 New function, factored out from...
5288 (x86_linux_prepare_to_resume): ...this.
5289
5290 2015-03-24 Gary Benson <gbenson@redhat.com>
5291
5292 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5293 (x86_linux_dr_set): Likewise.
5294 (update_debug_registers_callback): Likewise.
5295 (x86_linux_dr_set_addr): Likewise.
5296 (x86_linux_dr_get_addr): Likewise.
5297 (x86_linux_dr_set_control): Likewise.
5298 (x86_linux_dr_get_control): Likewise.
5299 (x86_linux_dr_get_status): Likewise.
5300 (x86_linux_prepare_to_resume): Likewise.
5301
5302 2015-03-24 Gary Benson <gbenson@redhat.com>
5303
5304 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5305 Use perror_with_name. Pass string through gettext.
5306 (x86_linux_dr_set): Likewise.
5307
5308 2015-03-24 Gary Benson <gbenson@redhat.com>
5309
5310 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5311 (x86_linux_dr_set_addr): ...this.
5312 (x86_dr_low_get_addr): Rename to...
5313 (x86_linux_dr_get_addr): ...this.
5314 (x86_dr_low_set_control): Rename to...
5315 (x86_linux_dr_set_control): ...this.
5316 (x86_dr_low_get_control): Rename to...
5317 (x86_linux_dr_get_control): ...this.
5318 (x86_dr_low_get_status): Rename to...
5319 (x86_linux_dr_get_status): ...this.
5320 (x86_dr_low): Update with new function names.
5321
5322 2015-03-24 Gary Benson <gbenson@redhat.com>
5323
5324 * Makefile.in (x86-linux.o): New rule.
5325 * configure.srv: Add x86-linux.o to relevant targets.
5326 * linux-low.c (lwp_set_arch_private_info): New function.
5327 (lwp_arch_private_info): Likewise.
5328 * linux-x86-low.c: Include nat/x86-linux.h.
5329 (arch_lwp_info): Removed structure.
5330 (update_debug_registers_callback):
5331 Use lwp_set_debug_registers_changed.
5332 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5333 and lwp_set_debug_registers_changed.
5334 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5335
5336 2015-03-24 Gary Benson <gbenson@redhat.com>
5337
5338 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5339 * linux-arm-low.c (arm_new_thread): Likewise.
5340 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5341 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5342 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5343 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5344
5345 2015-03-24 Gary Benson <gbenson@redhat.com>
5346
5347 * linux-low.c (ptid_of_lwp): New function.
5348 (lwp_is_stopped): Likewise.
5349 (lwp_stop_reason): Likewise.
5350 * linux-x86-low.c (update_debug_registers_callback):
5351 Use lwp_is_stopped.
5352 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5353 lwp_stop_reason.
5354
5355 2015-03-24 Gary Benson <gbenson@redhat.com>
5356
5357 * linux-low.h (linux_stop_lwp): Remove declaration.
5358
5359 2015-03-24 Gary Benson <gbenson@redhat.com>
5360
5361 * linux-low.h: Include nat/linux-nat.h.
5362 * linux-low.c (iterate_over_lwps_args): New structure.
5363 (iterate_over_lwps_filter): New function.
5364 (iterate_over_lwps): Likewise.
5365 * linux-x86-low.c (update_debug_registers_callback):
5366 Update signature to what iterate_over_lwps expects.
5367 Remove PID check that iterate_over_lwps now performs.
5368 (x86_dr_low_set_addr): Use iterate_over_lwps.
5369 (x86_dr_low_set_control): Likewise.
5370
5371 2015-03-24 Gary Benson <gbenson@redhat.com>
5372
5373 * linux-x86-low.c (x86_debug_reg_state): New function.
5374 (x86_linux_prepare_to_resume): Use the above.
5375
5376 2015-03-24 Gary Benson <gbenson@redhat.com>
5377
5378 * linux-low.c (current_lwp_ptid): New function.
5379 * linux-x86-low.c: Include nat/linux-nat.h.
5380 (x86_dr_low_get_addr): Use current_lwp_ptid.
5381 (x86_dr_low_get_control): Likewise.
5382 (x86_dr_low_get_status): Likewise.
5383
5384 2015-03-20 Pedro Alves <palves@redhat.com>
5385
5386 * tracepoint.c (cmd_qtstatus): Make "str" const.
5387
5388 2015-03-20 Pedro Alves <palves@redhat.com>
5389
5390 * server.c (handle_general_set): Make "req_str" const.
5391
5392 2015-03-19 Pedro Alves <palves@redhat.com>
5393
5394 * linux-low.c (linux_resume_one_lwp): Rename to ...
5395 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5396 instead call perror_with_name.
5397 (check_ptrace_stopped_lwp_gone): New function.
5398 (linux_resume_one_lwp): Reimplement as wrapper around
5399 linux_resume_one_lwp_throw that swallows errors if the LWP is
5400 gone.
5401
5402 2015-03-19 Pedro Alves <palves@redhat.com>
5403
5404 * linux-low.c (count_events_callback, select_event_lwp_callback):
5405 No longer check whether the thread has resume_stop as last resume
5406 kind.
5407
5408 2015-03-19 Pedro Alves <palves@redhat.com>
5409
5410 * linux-low.c (count_events_callback, select_event_lwp_callback):
5411 Use the lwp's status_pending_p field, not the thread's.
5412
5413 2015-03-19 Pedro Alves <palves@redhat.com>
5414
5415 * linux-low.c (select_event_lwp_callback): Update comments to
5416 no longer mention SIGTRAP.
5417
5418 2015-03-18 Gary Benson <gbenson@redhat.com>
5419
5420 * server.c (handle_query): Do not report vFile:fstat as supported.
5421
5422 2015-03-11 Gary Benson <gbenson@redhat.com>
5423
5424 * hostio.c (sys/types.h): New include.
5425 (sys/stat.h): Likewise.
5426 (common-remote-fileio.h): Likewise.
5427 (handle_fstat): New function.
5428 (handle_vFile): Handle vFile:fstat packets.
5429
5430 2015-03-11 Gary Benson <gbenson@redhat.com>
5431
5432 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5433 struct stat.st_blocks and struct stat.st_blksize.
5434 * configure: Regenerate.
5435 * config.in: Likewise.
5436 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5437 (OBS): Add common-remote-fileio.o.
5438 (common-remote-fileio.o): New rule.
5439
5440 2015-03-09 Pedro Alves <palves@redhat.com>
5441
5442 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5443 'struct sockaddr' pointer in 'accept' call.
5444
5445 2015-03-09 Pedro Alves <palves@redhat.com>
5446
5447 Revert:
5448 2015-03-07 Pedro Alves <palves@redhat.com>
5449 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5450 or <winsock2.h> here. Instead include "gdb_socket.h".
5451 (remote_open): Use union gdb_sockaddr_u.
5452 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5453 or <winsock2.h> here. Instead include "gdb_socket.h".
5454 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5455 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5456 or <sys/un.h>.
5457 (init_named_socket, gdb_agent_helper_thread): Use union
5458 gdb_sockaddr_u.
5459
5460 2015-03-07 Pedro Alves <palves@redhat.com>
5461
5462 * configure.ac (build_warnings): Move
5463 -Wdeclaration-after-statement to the C-specific set.
5464 * configure: Regenerate.
5465
5466 2015-03-07 Pedro Alves <palves@redhat.com>
5467
5468 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5469 or <winsock2.h> here. Instead include "gdb_socket.h".
5470 (remote_open): Use union gdb_sockaddr_u.
5471 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5472 or <winsock2.h> here. Instead include "gdb_socket.h".
5473 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5474 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5475 or <sys/un.h>.
5476 (init_named_socket, gdb_agent_helper_thread): Use union
5477 gdb_sockaddr_u.
5478
5479 2015-03-07 Pedro Alves <palves@redhat.com>
5480
5481 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5482 instead.
5483
5484 2015-03-06 Yao Qi <yao.qi@linaro.org>
5485
5486 * linux-aarch64-low.c (aarch64_insert_point): Use
5487 show_debug_regs as a boolean.
5488 (aarch64_remove_point): Likewise.
5489
5490 2015-03-05 Pedro Alves <palves@redhat.com>
5491
5492 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5493 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5494 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5495 * nto-low.c (nto_target_ops): Likewise.
5496 * spu-low.c (spu_target_ops): Likewise.
5497 * win32-low.c (win32_target_ops): Likewise.
5498
5499 2015-03-04 Pedro Alves <palves@redhat.com>
5500
5501 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5502 Decide whether a breakpoint triggered based on the SIGTRAP's
5503 siginfo.si_code.
5504 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5505 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5506 (linux_low_filter_event): Check for breakpoints before checking
5507 watchpoints.
5508 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5509 siginfo.si_code.
5510 (linux_stopped_by_sw_breakpoint)
5511 (linux_supports_stopped_by_sw_breakpoint)
5512 (linux_stopped_by_hw_breakpoint)
5513 (linux_supports_stopped_by_hw_breakpoint): New functions.
5514 (linux_target_ops): Install new target methods.
5515
5516 2015-03-04 Pedro Alves <palves@redhat.com>
5517
5518 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5519 * server.c (swbreak_feature, hwbreak_feature): New globals.
5520 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5521 (captured_main): Clear swbreak_feature and hwbreak_feature.
5522 * server.h (swbreak_feature, hwbreak_feature): Declare.
5523 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5524 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5525 supports_stopped_by_hw_breakpoint>: New fields.
5526 (target_supports_stopped_by_sw_breakpoint)
5527 (target_stopped_by_sw_breakpoint)
5528 (target_supports_stopped_by_hw_breakpoint)
5529 (target_stopped_by_hw_breakpoint): Declare.
5530
5531 2015-03-04 Pedro Alves <palves@redhat.com>
5532
5533 enum lwp_stop_reason -> enum target_stop_reason
5534 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5535 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5536 (linux_wait_1, stuck_in_jump_pad_callback)
5537 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5538 (linux_stopped_by_watchpoint):
5539 * linux-low.h (enum lwp_stop_reason): Delete.
5540 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5541 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5542
5543 2015-03-04 Yao Qi <yao.qi@linaro.org>
5544
5545 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5546
5547 2015-03-03 Gary Benson <gbenson@redhat.com>
5548
5549 * hostio.c (handle_vFile): Fix prefix lengths.
5550
5551 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5552
5553 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5554 ptr_bits.
5555
5556 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5557
5558 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5559 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5560 (clean): Add "rm -f" for above C files.
5561 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5562 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5563 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5564 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5565 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5566 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5567 (init_registers_s390x_vx_linux64)
5568 (init_registers_s390x_tevx_linux64)
5569 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5570 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5571 declarations.
5572 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5573 (s390_store_vxrs_high): New functions.
5574 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5575 NT_S390_VXRS_HIGH.
5576 (s390_arch_setup): Add logic for selecting one of the new target
5577 descriptions. Activate the new vector regsets if applicable.
5578 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5579 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5580 and init_registers_s390x_tevx_linux64.
5581
5582 2015-03-01 Pedro Alves <palves@redhat.com>
5583
5584 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5585 parameter.
5586
5587 2015-02-27 Pedro Alves <palves@redhat.com>
5588
5589 * linux-x86-low.c (u_debugreg_offset): New function.
5590 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5591
5592 2015-02-27 Pedro Alves <palves@redhat.com>
5593
5594 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5595 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5596 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5597 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5598 (ps_lsetfpregs, ps_getpid)
5599 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5600 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5601 (ps_lsetxregs, ps_plog): Declare.
5602
5603 2015-02-27 Pedro Alves <palves@redhat.com>
5604
5605 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5606 IP_AGENT_EXPORT_FUNC.
5607 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5608 IP_AGENT_EXPORT_FUNC.
5609 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5610 (IP_AGENT_EXPORT): Delete.
5611 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5612 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5613 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5614 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5615 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5616 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5617 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5618 (traceframe_read_count, traceframe_write_count)
5619 (traceframes_created, trace_state_variables, get_raw_reg)
5620 (get_trace_state_variable_value, set_trace_state_variable_value)
5621 (ust_loaded, helper_thread_id, cmd_buf): Use
5622 IPA_SYM_EXPORTED_NAME.
5623 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5624 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5625 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5626 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5627 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5628 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5629 EXTERN_C_PUSH/EXTERN_C_POP.
5630 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5631 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5632 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5633 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5634 (traceframe_write_count, traceframe_read_count)
5635 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5636 (about_to_request_buffer_space, get_trace_state_variable_value)
5637 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5638 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5639 EXTERN_C_PUSH/EXTERN_C_POP.
5640 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5641 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5642 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5643 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5644 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5645 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5646 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5647 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5648 Define.
5649 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5650 (IP_AGENT_EXPORT_VAR_DECL): Define.
5651 (tracing): Declare.
5652 (gdb_agent_get_raw_reg): Declare.
5653
5654 2015-02-27 Tom Tromey <tromey@redhat.com>
5655 Pedro Alves <palves@redhat.com>
5656
5657 Rename symbols whose names are reserved C++ keywords throughout.
5658
5659 2015-02-27 Pedro Alves <palves@redhat.com>
5660
5661 * Makefile.in (COMPILER): New, get it from autoconf.
5662 (CXX): Get from autoconf instead.
5663 (COMPILE.pre): Use COMPILER.
5664 (CC-LD): Rename to ...
5665 (CC_LD): ... this. Use COMPILER.
5666 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5667 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5668 * acinclude.m4: Include build-with-cxx.m4.
5669 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5670 Disable -Werror by default if building in C++ mode.
5671 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5672 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5673 the C++ compiler. Save/restore CXXFLAGS too.
5674 * configure: Regenerate.
5675
5676 2015-02-27 Pedro Alves <palves@redhat.com>
5677
5678 * acinclude.m4: Include libiberty.m4.
5679 * configure.ac: Call libiberty_INIT.
5680 * config.in, configure: Regenerate.
5681
5682 2015-02-26 Pedro Alves <palves@redhat.com>
5683
5684 * linux-low.c (linux_wait_1): When incrementing the PC past a
5685 program breakpoint always use the_low_target.breakpoint_len as
5686 increment, rather than the maximum between that and
5687 the_low_target.decr_pc_after_break.
5688
5689 2015-02-23 Pedro Alves <palves@redhat.com>
5690
5691 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5692 thread was doing a step-over; always adjust the PC if
5693 we stepped over a permanent breakpoint.
5694 (linux_wait_1): If we stepped over breakpoint that was on top of a
5695 permanent breakpoint, manually advance the PC past it.
5696
5697 2015-02-23 Pedro Alves <palves@redhat.com>
5698
5699 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5700 modes.
5701 (x86_fill_gregset, x86_store_gregset): Use it when handling
5702 $orig_eax.
5703
5704 2015-02-20 Pedro Alves <palves@redhat.com>
5705
5706 * thread-db.c: Include "nat/linux-procfs.h".
5707 (thread_db_init): Skip listing new threads if the kernel supports
5708 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5709
5710 2015-02-20 Pedro Alves <palves@redhat.com>
5711
5712 * linux-low.c (status_pending_p_callback): Use ptid_match.
5713
5714 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5715
5716 PR breakpoints/16812
5717 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5718 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5719 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5720
5721 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5722
5723 PR breakpoints/15956
5724 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5725
5726 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5727
5728 * linux-low.c (linux_low_btrace_conf): Print size.
5729 * server.c (handle_btrace_conf_general_set): New.
5730 (hanle_general_set): Call handle_btrace_conf_general_set.
5731 (handle_query): Report Qbtrace-conf:bts:size as supported.
5732
5733 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5734
5735 * linux-low.c (linux_low_enable_btrace): Update parameters.
5736 (linux_low_btrace_conf): New.
5737 (linux_target_ops)<to_btrace_conf>: Initialize.
5738 * server.c (current_btrace_conf): New.
5739 (handle_btrace_enable): Rename to ...
5740 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5741 to target_enable_btrace. Update comment. Update users.
5742 (handle_qxfer_btrace_conf): New.
5743 (qxfer_packets): Add btrace-conf entry.
5744 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5745 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5746 (target_ops)<read_btrace_conf>: New.
5747 (target_enable_btrace): Update parameters.
5748 (target_read_btrace_conf): New.
5749
5750 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5751
5752 * server.c (handle_btrace_general_set): Remove call to
5753 target_supports_btrace.
5754 (supported_btrace_packets): New.
5755 (handle_query): Call supported_btrace_packets.
5756 * target.h: include btrace-common.h.
5757 (btrace_target_info): Removed.
5758 (supports_btrace, target_supports_btrace): Update parameters.
5759
5760 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5761
5762 * Makefile.in (SFILES): Add common/btrace-common.c.
5763 (OBS): Add common/btrace-common.o.
5764 (btrace-common.o): Add build rules.
5765 * linux-low: Include btrace-common.h.
5766 (linux_low_read_btrace): Use struct btrace_data. Call
5767 btrace_data_init and btrace_data_fini.
5768
5769 2015-02-06 Pedro Alves <palves@redhat.com>
5770
5771 * thread-db.c (find_new_threads_callback): Add debug output.
5772
5773 2015-02-04 Pedro Alves <palves@redhat.com>
5774
5775 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5776 (resume_stopped_resumed_lwps): New function.
5777 (linux_wait_for_event_filtered): Use it.
5778
5779 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5780
5781 * Makefile.in (SFILES): Add linux-personality.c.
5782 (linux-personality.o): New rule.
5783 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5784 list of objects to be built.
5785 * linux-low.c: Include nat/linux-personality.h.
5786 (linux_create_inferior): Remove code to disable address space
5787 randomization (moved to ../nat/linux-personality.c). Create
5788 cleanup to disable address space randomization.
5789
5790 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5791
5792 * Makefile.in (posix-strerror.o): New rule.
5793 (mingw-strerror.o): Likewise.
5794 * configure: Regenerated.
5795 * configure.ac: Source file ../common/common.host. Initialize new
5796 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5797
5798 2015-01-14 Yao Qi <yao@codesourcery.com>
5799
5800 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5801 (ppc-linux.o): New rule.
5802 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5803 * configure.ac: AC_CHECK_FUNCS(getauxval).
5804 * config.in: Re-generated.
5805 * configure: Re-generated.
5806 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5807 ppc64_64bit_inferior_p
5808
5809 2015-01-14 Yao Qi <yao@codesourcery.com>
5810
5811 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5812 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5813 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5814 (PT_ORIG_R3, PT_TRAP): Likewise.
5815 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5816 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5817 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5818
5819 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5820
5821 * i387-fp.c (i387_cache_to_xsave): In look over
5822 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5823 zmmh_low_space field by use of zmmh_high_space.
5824
5825 2015-01-09 Pedro Alves <palves@redhat.com>
5826
5827 * linux-low.c (step_over_bkpt): Move higher up in the file.
5828 (handle_extended_wait): Don't store the stop_pc here.
5829 (get_stop_pc): Adjust comments and rename to ...
5830 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5831 stopped for a software breakpoint or hardware breakpoint.
5832 (thread_still_has_status_pending_p): New function.
5833 (status_pending_p_callback): Use
5834 thread_still_has_status_pending_p. If the event is no longer
5835 interesting, resume the LWP.
5836 (handle_tracepoints): Add assert.
5837 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5838 (wstatus_maybe_breakpoint): New function.
5839 (cancel_breakpoint): Delete function.
5840 (check_stopped_by_watchpoint): New function, factored out from
5841 linux_low_filter_event.
5842 (lp_status_maybe_breakpoint): Delete function.
5843 (linux_low_filter_event): Remove filter_ptid argument.
5844 Leave thread group exits pending here. Store the LWP's stop PC.
5845 Always leave events pending.
5846 (linux_wait_for_event_filtered): Pull all events out of the
5847 kernel, and leave them all pending.
5848 (count_events_callback, select_event_lwp_callback): Consider all
5849 events.
5850 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5851 (select_event_lwp): Only give preference to the stepping LWP in
5852 all-stop mode. Adjust comments.
5853 (ignore_event): New function.
5854 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5855 references to cancel_breakpoints. Adjust to renames. Also give
5856 equal priority to all LWPs that have had events in non-stop mode.
5857 If reporting a software breakpoint event, unadjust the LWP's PC.
5858 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5859 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5860 Adjust.
5861 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5862 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5863 (linux_stopped_by_watchpoint): Adjust.
5864 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5865 * linux-low.h (enum lwp_stop_reason): New.
5866 (struct lwp_info) <stop_pc>: Adjust comment.
5867 <stopped_by_watchpoint>: Delete field.
5868 <stop_reason>: New field.
5869 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5870 * mem-break.c (software_breakpoint_inserted_here)
5871 (hardware_breakpoint_inserted_here): New function.
5872 * mem-break.h (software_breakpoint_inserted_here)
5873 (hardware_breakpoint_inserted_here): Declare.
5874 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5875 (cancel_breakpoints): Delete.
5876 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5877 (upload_fast_traceframes): Remove references to
5878 cancel_breakpoints.
5879
5880 2015-01-09 Pedro Alves <palves@redhat.com>
5881
5882 * thread-db.c (find_new_threads_callback): Ignore thread if the
5883 kernel thread ID is -1.
5884
5885 2015-01-09 Pedro Alves <palves@redhat.com>
5886
5887 * linux-low.c (linux_attach_fail_reason_string): Move to
5888 nat/linux-ptrace.c, and rename.
5889 (linux_attach_lwp): Update comment.
5890 (attach_proc_task_lwp_callback): New function.
5891 (linux_attach): Adjust to rename and use
5892 linux_proc_attach_tgid_threads.
5893 (linux_attach_fail_reason_string): Delete declaration.
5894
5895 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5896
5897 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5898 * server.c (gdbserver_version): Likewise.
5899
5900 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5901
5902 * remote-utils.c: Include ctype.h.
5903 (input_interrupt): Explicitly handle the case when the char
5904 received is the NUL byte. Improve the printing of non-ASCII
5905 characters.
5906
5907 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5908
5909 * linux-low.c (linux_low_filter_event): Update call to
5910 linux_enable_event_reporting following the addition of
5911 a new parameter to that function.
5912
5913 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5914
5915 PR server/17457
5916 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5917 (AARCH64_FPCR_REGNO): Likewise.
5918 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5919 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5920 (aarch64_store_fpregset): Likewise.
5921
5922 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5923
5924 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5925 Remove FIXME comment about assumption about N.
5926
5927 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5928
5929 * configure.ac: If large-file support is disabled in GDBserver,
5930 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5931 * configure: Regenerate.
5932
5933 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5934
5935 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5936 warning upon ENODATA from ptrace.
5937 * linux-s390-low.c (s390_store_tdb): New.
5938 (s390_regsets): Add regset for NT_S390_TDB.
5939
5940 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5941
5942 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5943 without a fill_function.
5944 * linux-s390-low.c (s390_fill_last_break): Remove.
5945 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5946 (s390_arch_setup): Use regset's size instead of fill_function for
5947 loop end condition.
5948
5949 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5950
5951 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5952 the regset's store function when ptrace returned an error.
5953 * regcache.c (get_thread_regcache): Invalidate register cache
5954 before fetching inferior's registers.
5955
5956 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5957
5958 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5959 while-loop as for-loop.
5960 (regsets_store_inferior_registers): Likewise.
5961
5962 2014-11-28 Yao Qi <yao@codesourcery.com>
5963
5964 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5965 * config.in, configure: Re-generate.
5966 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5967 is defined.
5968
5969 2014-11-21 Yao Qi <yao@codesourcery.com>
5970
5971 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5972 (AC_CHECK_HEADERS): Remove malloc.h.
5973 * configure: Re-generated.
5974 * config.in: Re-generated.
5975 * server.h: Don't include alloca.h and malloc.h.
5976 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5977 Don't include malloc.h.
5978
5979 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5980
5981 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5982 corresponding ERRNO check in same block.
5983
5984 2014-11-12 Pedro Alves <palves@redhat.com>
5985
5986 * server.c (cont_thread): Update comment.
5987 (start_inferior, attach_inferior): No longer clear cont_thread.
5988 (handle_v_cont): No longer set cont_thread.
5989 (captured_main): Clear cont_thread each time a GDB connects.
5990
5991 2014-11-12 Pedro Alves <palves@redhat.com>
5992
5993 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5994 thread, and don't resume all threads if the Hc thread has exited.
5995
5996 2014-11-12 Pedro Alves <palves@redhat.com>
5997
5998 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5999 the process group instead of to a specific LWP.
6000
6001 2014-10-15 Pedro Alves <palves@redhat.com>
6002
6003 PR server/17487
6004 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6005 parameter.
6006 (arm_set_thread_context): Delete.
6007 (the_low_target): Adjust.
6008 * win32-i386-low.c (debug_registers_changed)
6009 (debug_registers_used): Delete.
6010 (update_debug_registers_callback): New function.
6011 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6012 needing to update their debug registers.
6013 (win32_get_current_dr): New function.
6014 (x86_dr_low_get_addr, x86_dr_low_get_control)
6015 (x86_dr_low_get_status): Fetch the debug register from the thread
6016 record's context.
6017 (i386_initial_stuff): Adjust.
6018 (i386_get_thread_context): Remove current_event parameter. Don't
6019 clear debug_registers_changed nor copy DR values to
6020 debug_reg_state.
6021 (i386_set_thread_context): Delete.
6022 (i386_prepare_to_resume): New function.
6023 (i386_thread_added): Mark the thread as needing to update irs
6024 debug registers.
6025 (the_low_target): Remove i386_set_thread_context and install
6026 i386_prepare_to_resume.
6027 * win32-low.c (win32_get_thread_context): Adjust.
6028 (win32_set_thread_context): Use SetThreadContext
6029 directly.
6030 (win32_prepare_to_resume): New function.
6031 (win32_require_context): New function, factored out from ...
6032 (thread_rec): ... this.
6033 (continue_one_thread): Call win32_prepare_to_resume on each thread
6034 we're about to continue.
6035 (win32_resume): Call win32_prepare_to_resume on the event thread.
6036 * win32-low.h (struct win32_thread_info)
6037 <debug_registers_changed>: New field.
6038 (struct win32_target_ops): Change prototype of set_thread_context,
6039 delete set_thread_context and add prepare_to_resume.
6040 (win32_require_context): New declaration.
6041
6042 2014-10-08 Gary Benson <gbenson@redhat.com>
6043
6044 * server.h: Do not include common-exceptions.h.
6045
6046 2014-10-08 Gary Benson <gbenson@redhat.com>
6047
6048 * server.h: Do not include cleanups.h.
6049
6050 2014-09-30 James Hogan <james.hogan@imgtec.com>
6051
6052 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6053 mips64-dsp-linux.c.
6054
6055 2014-09-23 Yao Qi <yao@codesourcery.com>
6056
6057 * linux-low.c (lp_status_maybe_breakpoint): New function.
6058 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6059 (count_events_callback): Likewise.
6060 (select_event_lwp_callback): Likewise.
6061 (cancel_breakpoints_callback): Likewise.
6062
6063 2014-09-19 Don Breazeal <donb@codesourcery.com>
6064
6065 * linux-low.c (handle_extended_wait): Call
6066 linux_ptrace_get_extended_event.
6067 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6068 linux_is_extended_waitstatus.
6069
6070 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6071
6072 * Makefile.in (CPPFLAGS): Define.
6073 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6074 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6075
6076 2014-09-16 Gary Benson <gbenson@redhat.com>
6077
6078 * inferiors.h (current_inferior): Renamed as...
6079 (current_thread): New variable. All uses updated.
6080 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6081 (maybe_move_out_of_jump_pad): Likewise.
6082 (cancel_breakpoint): Likewise.
6083 (linux_low_filter_event): Likewise.
6084 (wait_for_sigstop): Likewise.
6085 (linux_resume_one_lwp): Likewise.
6086 (need_step_over_p): Likewise.
6087 (start_step_over): Likewise.
6088 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6089 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6090 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6091 and save_inferior as saved_thread.
6092 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6093 saved_thread.
6094 (regcache_invalidate_thread): Likewise.
6095 * remote-utils.c (prepare_resume_reply): Likewise.
6096 * thread-db.c (thread_db_get_tls_address): Likewise.
6097 (disable_thread_event_reporting): Likewise.
6098 (remove_thread_event_breakpoints): Likewise.
6099 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6100 as saved_thread.
6101 * target.h (set_desired_inferior): Renamed as...
6102 (set_desired_thread): New declaration. All uses updated.
6103 * server.c (myresume): Updated comment to reference thread instead
6104 of inferior.
6105 (handle_serial_event): Likewise.
6106 (handle_target_event): Likewise.
6107
6108 2014-09-12 Tom Tromey <tromey@redhat.com>
6109 Gary Benson <gbenson@redhat.com>
6110
6111 * regcache.h: Include common-regcache.h.
6112 (regcache_read_pc): Don't declare.
6113 * regcache.c (get_thread_regcache_for_ptid): New function.
6114
6115 2014-09-11 Tom Tromey <tromey@redhat.com>
6116 Gary Benson <gbenson@redhat.com>
6117
6118 * symbol.c: New file.
6119 * Makefile.in (SFILES): Add symbol.c.
6120 (OBS): Add symbol.o.
6121
6122 2014-09-11 Gary Benson <gbenson@redhat.com>
6123
6124 * target.c (target_stop_ptid, target_continue_ptid): New
6125 functions.
6126
6127 2014-09-11 Tom Tromey <tromey@redhat.com>
6128 Gary Benson <gbenson@redhat.com>
6129
6130 * target.h: Include target/target.h.
6131 * target.c (target_read_memory, target_read_uint32)
6132 (target_write_memory): New functions.
6133
6134 2014-09-11 Gary Benson <gbenson@redhat.com>
6135
6136 * server.h (debug_hw_points): Don't declare.
6137 * server.c (debug_hw_points): Don't define. Replace all uses
6138 with show_debug_regs.
6139 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6140 all uses with show_debug_regs.
6141
6142 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6143
6144 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6145 endianness into account.
6146 (ppc_supply_ptrace_register): Likewise.
6147
6148 2014-09-03 James Hogan <james.hogan@imgtec.com>
6149
6150 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6151 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6152
6153 2014-09-03 Gary Benson <gbenson@redhat.com>
6154
6155 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6156 ALL_DEBUG_ADDRESS_REGISTERS.
6157
6158 2014-09-02 Gary Benson <gbenson@redhat.com>
6159
6160 * i386-low.h: Renamed as...
6161 * x86-low.h: New file. All type, function and variable name
6162 prefixes changed from "i386_" to "x86_". All references updated.
6163 * i386-low.c: Renamed as...
6164 * x86-low.c: New file. All type, function and variable name
6165 prefixes changed from "i386_" to "x86_". All references updated.
6166
6167 2014-09-02 Gary Benson <gbenson@redhat.com>
6168
6169 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6170 (x86_linux_new_thread): Likewise.
6171
6172 2014-08-29 Gary Benson <gbenson@redhat.com>
6173
6174 * server.h (setjmp.h): Do not include.
6175 (toplevel): Do not declare.
6176 (common-exceptions.h): Include.
6177 (cleanups.h): Likewise.
6178 * server.c (toplevel): Do not define.
6179 (exit_code): New static global.
6180 (detach_or_kill_for_exit_cleanup): New function.
6181 (main): New function. Original main renamed to...
6182 (captured_main): New function.
6183 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6184
6185 2014-08-29 Gary Benson <gbenson@redhat.com>
6186
6187 * Makefile.in (SFILES): Add common/common-exceptions.c.
6188 (OBS): Add common-exceptions.o.
6189 (common-exceptions.o): New rule.
6190 * utils.c (prepare_to_throw_exception): New function.
6191
6192 2014-08-29 Gary Benson <gbenson@redhat.com>
6193
6194 * config.in: Regenerate.
6195 * configure: Likewise.
6196
6197 2014-08-29 Gary Benson <gbenson@redhat.com>
6198
6199 * Makefile.in (SFILES): Add common/cleanups.c.
6200 (OBS): cleanups.o.
6201 (cleanups.o): New rule.
6202
6203 2014-08-29 Gary Benson <gbenson@redhat.com>
6204
6205 * utils.c (internal_vwarning): New function.
6206
6207 2014-08-28 Gary Benson <gbenson@redhat.com>
6208
6209 * utils.h (fatal): Remove declaration.
6210 * utils.c (fatal): Remove function.
6211
6212 2014-08-28 Gary Benson <gbenson@redhat.com>
6213
6214 * tracepoint.c (gdb_agent_init): Replace fatal with
6215 perror_with_name.
6216 (initialize_tracepoint): Likewise.
6217
6218 2014-08-28 Gary Benson <gbenson@redhat.com>
6219
6220 * remote-utils.c (remote_prepare): Replace fatal with error.
6221
6222 2014-08-28 Gary Benson <gbenson@redhat.com>
6223
6224 * linux-low.c (linux_async): Replace fatal with warning.
6225 Tidy up and return.
6226 (linux_start_non_stop): Return -1 if linux_async failed.
6227
6228 2014-08-28 Gary Benson <gbenson@redhat.com>
6229
6230 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6231 gdb_assert.
6232 (i386_dr_low_get_addr): Remove vague comment.
6233 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6234 gdb_assert.
6235
6236 2014-08-28 Gary Benson <gbenson@redhat.com>
6237
6238 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6239 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6240 internal_error.
6241 (linux_resume_one_lwp): Likewise.
6242 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6243 gdb_assert.
6244 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6245 with internal_error.
6246 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6247 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6248 (find_register_by_name): Replace fatal with internal_error.
6249 (find_regno): Likewise.
6250 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6251 * thread-db.c (thread_db_create_event): Likewise.
6252 (thread_db_load_search): Likewise.
6253 (try_thread_db_load_1): Likewise.
6254 * tracepoint.c (get_jump_space_head): Replace fatal with
6255 internal_error.
6256 (claim_trampoline_space): Likewise.
6257 (have_fast_tracepoint_trampoline_buffer): Likewise.
6258 (cmd_qtstart): Likewise.
6259 (stop_tracing): Likewise.
6260 (fast_tracepoint_collecting): Likewise.
6261 (target_malloc): Likewise.
6262 (download_tracepoint): Likewise.
6263 (download_trace_state_variables): Replace check with gdb_assert.
6264 (upload_fast_traceframes): Replace fatal with internal_error.
6265
6266 2014-08-19 Tom Tromey <tromey@redhat.com>
6267 Gary Benson <gbenson@redhat.com>
6268
6269 * Makefile.in (SFILES): Add common/common-debug.c.
6270 (OBS): Add common-debug.o.
6271 (common-debug.o): New rule.
6272 * debug.h (debug_printf): Don't declare.
6273 * debug.c (debug_printf): Renamed and rewritten as...
6274 (debug_vprintf): New function.
6275
6276 2014-08-19 Gary Benson <gbenson@redhat.com>
6277
6278 * utils.h: Do not include print-utils.h.
6279
6280 2014-08-19 Tom Tromey <tromey@redhat.com>
6281 Gary Benson <gbenson@redhat.com>
6282
6283 * server.h: Add static assertion.
6284 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6285
6286 2014-08-19 Tom Tromey <tromey@redhat.com>
6287 Gary Benson <gbenson@redhat.com>
6288
6289 * Makefile.in (SFILES): Add common/errors.c.
6290 (OBS): Add errors.o.
6291 (IPA_OBS): Add errors-ipa.o.
6292 (errors.o): New rule.
6293 (errors-ipa.o): Likewise.
6294 * utils.h (perror_with_name, error, warning): Don't declare.
6295 * utils.c (warning): Renamed and rewritten as...
6296 (vwarning): New function.
6297 (error): Renamed and rewritten as...
6298 (verror): New function.
6299 (internal_error): Renamed and rewritten as...
6300 (internal_verror): New function.
6301
6302 2014-08-07 Gary Benson <gbenson@redhat.com>
6303
6304 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6305 * configure: Regenerate.
6306 * config.in: Likewise.
6307 * server.h: Do not include errno.h.
6308 * event-loop.c: Likewise.
6309 * hostio-errno.c: Likewise.
6310 * linux-low.c: Likewise.
6311 * remote-utils.c: Likewise.
6312 * spu-low.c: Likewise.
6313 * utils.c: Likewise.
6314 * gdbreplay.c: Unconditionally include errno.h.
6315
6316 2014-08-07 Gary Benson <gbenson@redhat.com>
6317
6318 * server.h: Do not include string.h.
6319 * event-loop.c: Likewise.
6320 * linux-low.c: Likewise.
6321 * regcache.c: Likewise.
6322 * remote-utils.c: Likewise.
6323 * spu-low.c: Likewise.
6324 * utils.c: Likewise.
6325
6326 2014-08-07 Gary Benson <gbenson@redhat.com>
6327
6328 * server.h: Do not include gdb_assert.h.
6329
6330 2014-08-07 Gary Benson <gbenson@redhat.com>
6331
6332 * server.h: Do not include common-utils.h.
6333
6334 2014-08-07 Gary Benson <gbenson@redhat.com>
6335
6336 * server.h: Do not include ptid.h.
6337 * notif.h: Likewise.
6338
6339 2014-08-07 Gary Benson <gbenson@redhat.com>
6340
6341 * server.h: Do not include gdb_locale.h.
6342
6343 2014-08-07 Gary Benson <gbenson@redhat.com>
6344
6345 * server.h: Do not include gdb/signals.h.
6346 * win32-low.c: Likewise.
6347
6348 2014-08-07 Gary Benson <gbenson@redhat.com>
6349
6350 * server.h: Do not include pathmax.h.
6351
6352 2014-08-07 Gary Benson <gbenson@redhat.com>
6353
6354 * server.h: Do not include libiberty.h.
6355 * linux-bfin-low.c: Likewise.
6356
6357 2014-08-07 Gary Benson <gbenson@redhat.com>
6358
6359 * server.h: Do not include ansidecl.h.
6360
6361 2014-08-07 Gary Benson <gbenson@redhat.com>
6362
6363 * linux-x86-low.c: Do not include stddef.h.
6364 * lynx-ppc-low.c: Likewise.
6365 * tracepoint.c: Likewise.
6366
6367 2014-08-07 Gary Benson <gbenson@redhat.com>
6368
6369 * server.h: Do not include stdarg.h.
6370 * nto-low.c: Likewise.
6371
6372 2014-08-07 Gary Benson <gbenson@redhat.com>
6373
6374 * server.h: Do not include stdlib.h.
6375 * inferiors.c: Likewise.
6376 * linux-low.c: Likewise.
6377 * regcache.c: Likewise.
6378 * spu-low.c: Likewise.
6379 * tracepoint.c: Likewise.
6380 * utils.c: Likewise.
6381
6382 2014-08-07 Gary Benson <gbenson@redhat.com>
6383
6384 * server.h: Do not include stdio.h.
6385 * linux-low.c: Likewise.
6386 * remote-utils.c: Likewise.
6387 * spu-low.c: Likewise.
6388 * utils.c: Likewise.
6389 * wincecompat.c: Likewise.
6390
6391 2014-08-06 Gary Benson <gbenson@redhat.com>
6392
6393 * regcache.c (init_register_cache): Move conditionals inside if.
6394
6395 2014-08-06 Gary Benson <gbenson@redhat.com>
6396
6397 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6398
6399 2014-07-31 Gary Benson <gbenson@redhat.com>
6400
6401 * ax.h: Do not include server.h.
6402 * gdbthread.h: Likewise.
6403 * lynx-low.h: Likewise.
6404 * notif.h: Likewise.
6405
6406 2014-07-30 Gary Benson <gbenson@redhat.com>
6407
6408 * server.h: Include common-defs.h.
6409 Do not include config.h or build-gnulib-gdbserver/config.h.
6410
6411 2014-07-30 Gary Benson <gbenson@redhat.com>
6412
6413 * hostio-errno.c: Move server.h to top of includes list.
6414 * inferiors.c: Likewise.
6415 * linux-x86-low.c: Likewise.
6416 * notif.c: Include server.h.
6417
6418 2014-07-24 Tom Tromey <tromey@redhat.com>
6419 Gary Benson <gbenson@redhat.com>
6420
6421 * server.h (CORE_ADDR): Now unsigned.
6422
6423 2014-07-16 Pedro Alves <palves@redhat.com>
6424
6425 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6426
6427 2014-07-15 Pedro Alves <palves@redhat.com>
6428
6429 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6430 copy.
6431
6432 2014-07-11 Pedro Alves <palves@redhat.com>
6433
6434 * linux-low.c (kill_wait_lwp): New function, based on
6435 kill_one_lwp_callback, but use my_waitpid directly.
6436 (kill_one_lwp_callback, linux_kill): Use it.
6437
6438 2014-06-23 Pedro Alves <palves@redhat.com>
6439
6440 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6441 before setting DR0..DR3.
6442
6443 2014-06-20 Gary Benson <gbenson@redhat.com>
6444
6445 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6446 * configure: Regenerated.
6447 * config.in: Likewise.
6448
6449 2014-06-20 Gary Benson <gbenson@redhat.com>
6450
6451 * Makefile.in (SFILES): Update locations for files moved
6452 from common to nat.
6453 (object file files): Reordered.
6454
6455 2014-06-20 Gary Benson <gbenson@redhat.com>
6456
6457 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6458 (i386_dr_low_set_addr): Likewise.
6459 (i386_dr_low_get_addr): Likewise.
6460 (i386_dr_low_can_set_control): Likewise.
6461 (i386_dr_low_set_control): Likewise.
6462 (i386_dr_low_get_control): Likewise.
6463 (i386_dr_low_get_status): Likewise.
6464 (i386_get_debug_register_length): Likewise.
6465 * linux-x86-low.c (i386_dr_low_set_addr):
6466 Changed signature. Made static.
6467 (i386_dr_low_get_addr): Likewise.
6468 (i386_dr_low_set_control): Likewise.
6469 (i386_dr_low_get_control): Likewise.
6470 (i386_dr_low_get_status): Likewise.
6471 (i386_dr_low): New global variable.
6472 * win32-i386-low.c (i386_dr_low_set_addr):
6473 Changed signature. Made static.
6474 (i386_dr_low_get_addr): Likewise.
6475 (i386_dr_low_set_control): Likewise.
6476 (i386_dr_low_get_control): Likewise.
6477 (i386_dr_low_get_status): Likewise.
6478 (i386_dr_low): New global variable.
6479
6480 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6481
6482 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6483 * Makefile.in (AR, AR_FLAGS): Define.
6484 * configure: Regenerate.
6485
6486 2014-06-19 Gary Benson <gbenson@redhat.com>
6487
6488 * Makefile.in (i386-dregs.o): New rule.
6489 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6490 * i386-low.c (target.h): Remove include.
6491 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6492 (DR_CONTROL_SHIFT): Likewise.
6493 (DR_CONTROL_SIZE): Likewise.
6494 (DR_RW_EXECUTE): Likewise.
6495 (DR_RW_WRITE): Likewise.
6496 (DR_RW_READ): Likewise.
6497 (DR_RW_IORW): Likewise.
6498 (DR_LEN_1): Likewise.
6499 (DR_LEN_2): Likewise.
6500 (DR_LEN_4): Likewise.
6501 (DR_LEN_8): Likewise.
6502 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6503 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6504 (DR_ENABLE_SIZE): Likewise.
6505 (DR_LOCAL_SLOWDOWN): Likewise.
6506 (DR_GLOBAL_SLOWDOWN): Likewise.
6507 (DR_CONTROL_RESERVED): Likewise.
6508 (I386_DR_CONTROL_MASK): Likewise.
6509 (I386_DR_VACANT): Likewise.
6510 (I386_DR_LOCAL_ENABLE): Likewise.
6511 (I386_DR_GLOBAL_ENABLE): Likewise.
6512 (I386_DR_DISABLE): Likewise.
6513 (I386_DR_SET_RW_LEN): Likewise.
6514 (I386_DR_GET_RW_LEN): Likewise.
6515 (I386_DR_WATCH_HIT): Likewise.
6516 (i386_wp_op_t): Likewise.
6517 (i386_show_dr): Likewise.
6518 (i386_length_and_rw_bits): Likewise.
6519 (i386_insert_aligned_watchpoint): Likewise.
6520 (i386_remove_aligned_watchpoint): Likewise.
6521 (i386_handle_nonaligned_watchpoint): Likewise.
6522 i386_update_inferior_debug_regs(): Likewise.
6523 (i386_dr_insert_watchpoint): Likewise.
6524 (i386_dr_remove_watchpoint): Likewise.
6525 (i386_dr_region_ok_for_watchpoint): Likewise.
6526 (i386_dr_stopped_data_address): Likewise.
6527 (i386_dr_stopped_by_watchpoint): Likewise.
6528
6529 2014-06-19 Gary Benson <gbenson@redhat.com>
6530
6531 * i386-low.c (i386_dr_show): Renamed to
6532 i386_show_dr and made static. All uses updated.
6533 (i386_dr_length_and_rw_bits): Renamed to
6534 i386_length_and_rw_bits and made static.
6535 All uses updated.
6536 (i386_dr_insert_aligned_watchpoint): Renamed to
6537 i386_insert_aligned_watchpoint and made static.
6538 All uses updated.
6539 (i386_dr_remove_aligned_watchpoint): Renamed to
6540 i386_remove_aligned_watchpoint and made static.
6541 All uses updated.
6542 (i386_dr_update_inferior_debug_regs): Renamed to
6543 i386_update_inferior_debug_regs and made static.
6544 All uses updated.
6545
6546 2014-06-18 Gary Benson <gbenson@redhat.com>
6547
6548 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6549 (i386_dr_low_can_set_control): Likewise.
6550 (i386_get_debug_register_length): Likewise.
6551 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6552 (i386_dr_low_can_set_control): Likewise.
6553 (i386_get_debug_register_length): Likewise.
6554
6555 2014-06-17 Gary Benson <gbenson@redhat.com>
6556
6557 * i386-low.h (i386-dregs.h): New include.
6558 (DR_FIRSTADDR): Now in i386-dregs.h.
6559 (DR_LASTADDR): Likewise.
6560 (DR_NADDR): Likewise.
6561 (DR_STATUS): Likewise.
6562 (DR_CONTROL): Likewise.
6563 (i386_debug_reg_state): Likewise.
6564 (i386_dr_insert_watchpoint): Likewise.
6565 (i386_dr_remove_watchpoint): Likewise.
6566 (i386_dr_region_ok_for_watchpoint): Likewise.
6567 (i386_dr_stopped_data_address): Likewise.
6568 (i386_dr_stopped_by_watchpoint): Likewise.
6569 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6570
6571 2014-06-18 Gary Benson <gbenson@redhat.com>
6572
6573 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6574 i386_dr_insert_watchpoint.
6575 (i386_low_remove_watchpoint): Renamed to
6576 i386_dr_remove_watchpoint.
6577 (i386_low_region_ok_for_watchpoint): Renamed to
6578 i386_dr_region_ok_for_watchpoint.
6579 (i386_low_stopped_data_address): Renamed to
6580 i386_dr_stopped_data_address.
6581 (i386_low_stopped_by_watchpoint): Renamed to
6582 i386_dr_stopped_by_watchpoint.
6583 * i386-low.c (i386_show_dr): Renamed to
6584 i386_dr_show and made nonstatic. All uses updated.
6585 (i386_length_and_rw_bits): Renamed to
6586 i386_dr_length_and_rw_bits and made nonstatic.
6587 All uses updated.
6588 (i386_insert_aligned_watchpoint): Renamed to
6589 i386_dr_insert_aligned_watchpoint and made nonstatic.
6590 All uses updated.
6591 (i386_remove_aligned_watchpoint): Renamed to
6592 i386_dr_remove_aligned_watchpoint and made nonstatic.
6593 All uses updated.
6594 (i386_update_inferior_debug_regs): Renamed to
6595 i386_dr_update_inferior_debug_regs and made nonstatic.
6596 All uses updated.
6597 (i386_low_insert_watchpoint): Renamed to
6598 i386_dr_insert_watchpoint. All uses updated.
6599 (i386_low_remove_watchpoint): Renamed to
6600 i386_dr_remove_watchpoint. All uses updated.
6601 (i386_low_region_ok_for_watchpoint): Renamed to
6602 i386_dr_region_ok_for_watchpoint. All uses updated.
6603 (i386_low_stopped_data_address): Renamed to
6604 i386_dr_stopped_data_address. All uses updated.
6605 (i386_low_stopped_by_watchpoint): Renamed to
6606 i386_dr_stopped_by_watchpoint. All uses updated.
6607
6608 2014-06-18 Gary Benson <gbenson@redhat.com>
6609
6610 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6611 (i386_dr_low_can_set_control): Likewise.
6612 (i386_insert_aligned_watchpoint): New check.
6613
6614 2014-06-18 Gary Benson <gbenson@redhat.com>
6615
6616 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6617 Renamed to state.
6618
6619 2014-06-18 Gary Benson <gbenson@redhat.com>
6620
6621 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6622 instead of fatal and error.
6623 (i386_handle_nonaligned_watchpoint): Likewise.
6624
6625 2014-06-18 Gary Benson <gbenson@redhat.com>
6626
6627 * i386-low.c (i386_get_debug_register_length): New macro.
6628 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6629 (i386_show_dr): Use debug_printf instead of fprintf. Use
6630 phex to format values.
6631
6632 2014-06-18 Gary Benson <gbenson@redhat.com>
6633
6634 * i386-low.h: Comment changes.
6635 * i386-low.c: Likewise.
6636
6637 2014-06-18 Gary Benson <gbenson@redhat.com>
6638
6639 * i386-low.c: Whitespace changes.
6640
6641 2014-06-12 Tom Tromey <tromey@redhat.com>
6642
6643 * utils.c (freeargv): Remove.
6644
6645 2014-06-12 Tom Tromey <tromey@redhat.com>
6646
6647 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6648 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6649 (parse_debug_format_options): Likewise.
6650 (gdbserver_usage): Likewise.
6651 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6652 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6653 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6654 against libiberty.
6655 ($(LIBGNU)): Depend on libiberty.
6656 (all-lib): Recurse into all subdirs.
6657 (install-only): Invoke "install" target in subdirs.
6658 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6659 targets.
6660 * configure: Rebuild.
6661 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6662 for vasprintf, vsnprintf, or gettimeofday.
6663 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6664 srv_tgtobj.
6665
6666 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6667
6668 * development.sh: Delete.
6669 * Makefile.in (config.status): Adjust dependency on development.sh.
6670 * configure.ac: Adjust development.sh source call.
6671 * configure: Regenerate.
6672
6673 2014-06-02 Pedro Alves <palves@redhat.com>
6674
6675 * ax.c (gdb_free_agent_expr): New function.
6676 * ax.h (gdb_free_agent_expr): New declaration.
6677 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6678 list.
6679 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6680 static.
6681 (clear_breakpoint_conditions_and_commands): New function.
6682 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6683 (clear_breakpoint_conditions_and_commands): New declaration.
6684
6685 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6686
6687 * linux-aarch64-low.c (asm/ptrace.h): Include.
6688
6689 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6690
6691 Fix TLS access for -static -pthread.
6692 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6693 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6694 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6695
6696 2014-05-20 Pedro Alves <palves@redhat.com>
6697
6698 * linux-aarch64-low.c (aarch64_insert_point)
6699 (aarch64_remove_point): No longer check whether the type is
6700 supported here. Adjust to new interface.
6701 (the_low_target): Install aarch64_supports_z_point_type as
6702 supports_z_point_type method.
6703 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6704 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6705 instead of a Z packet char. Adjust.
6706 (arm_supports_z_point_type): New function.
6707 (arm_insert_point, arm_remove_point): Adjust to new interface.
6708 (the_low_target): Install arm_supports_z_point_type.
6709 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6710 (cris_insert_point, cris_remove_point): Adjust to new interface.
6711 Don't check whether the type is supported here.
6712 (the_low_target): Install cris_supports_z_point_type.
6713 * linux-low.c (linux_supports_z_point_type): New function.
6714 (linux_insert_point, linux_remove_point): Adjust to new interface.
6715 * linux-low.h (struct linux_target_ops) <insert_point,
6716 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6717 raw_breakpoint pointer parameter.
6718 <supports_z_point_type>: New method.
6719 * linux-mips-low.c (mips_supports_z_point_type): New function.
6720 (mips_insert_point, mips_remove_point): Adjust to new interface.
6721 Use mips_supports_z_point_type.
6722 (the_low_target): Install mips_supports_z_point_type.
6723 * linux-ppc-low.c (the_low_target): Install NULL as
6724 supports_z_point_type method.
6725 * linux-s390-low.c (the_low_target): Install NULL as
6726 supports_z_point_type method.
6727 * linux-sparc-low.c (the_low_target): Install NULL as
6728 supports_z_point_type method.
6729 * linux-x86-low.c (x86_supports_z_point_type): New function.
6730 (x86_insert_point): Adjust to new insert_point interface. Use
6731 insert_memory_breakpoint. Adjust to new
6732 i386_low_insert_watchpoint interface.
6733 (x86_remove_point): Adjust to remove_point interface. Use
6734 remove_memory_breakpoint. Adjust to new
6735 i386_low_remove_watchpoint interface.
6736 (the_low_target): Install x86_supports_z_point_type.
6737 * lynx-low.c (lynx_target_ops): Install NULL as
6738 supports_z_point_type callback.
6739 * nto-low.c (nto_supports_z_point_type): New.
6740 (nto_insert_point, nto_remove_point): Adjust to new interface.
6741 (nto_target_ops): Install nto_supports_z_point_type.
6742 * mem-break.c: Adjust intro comment.
6743 (struct raw_breakpoint) <raw_type, size>: New fields.
6744 <inserted>: Update comment.
6745 <shlib_disabled>: Delete field.
6746 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6747 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6748 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6749 (raw_bkpt_type_to_target_hw_bp_type): New function.
6750 (find_enabled_raw_code_breakpoint_at): New function.
6751 (find_raw_breakpoint_at): New type and size parameters. Use them.
6752 (insert_memory_breakpoint): New function, based off
6753 set_raw_breakpoint_at.
6754 (remove_memory_breakpoint): New function.
6755 (set_raw_breakpoint_at): Reimplement.
6756 (set_breakpoint): New, based on set_breakpoint_at.
6757 (set_breakpoint_at): Reimplement.
6758 (delete_raw_breakpoint): Go through the_target->remove_point
6759 instead of assuming memory breakpoints.
6760 (find_gdb_breakpoint_at): Delete.
6761 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6762 (find_gdb_breakpoint): New function.
6763 (set_gdb_breakpoint_at): Delete.
6764 (z_type_supported): New function.
6765 (set_gdb_breakpoint_1): New function, loosely based off
6766 set_gdb_breakpoint_at.
6767 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6768 (delete_gdb_breakpoint_at): Delete.
6769 (delete_gdb_breakpoint_1): New function, loosely based off
6770 delete_gdb_breakpoint_at.
6771 (delete_gdb_breakpoint): New function.
6772 (clear_gdb_breakpoint_conditions): Rename to ...
6773 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6774 breakpoint.
6775 (add_condition_to_breakpoint): Make static.
6776 (add_breakpoint_condition): Take a struct breakpoint pointer
6777 instead of an address. Adjust.
6778 (gdb_condition_true_at_breakpoint): Rename to ...
6779 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6780 z_type parameter.
6781 (gdb_condition_true_at_breakpoint): Reimplement.
6782 (add_breakpoint_commands): Take a struct breakpoint pointer
6783 instead of an address. Adjust.
6784 (gdb_no_commands_at_breakpoint): Rename to ...
6785 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6786 parameter. Return true if no breakpoint was found. Change debug
6787 output.
6788 (gdb_no_commands_at_breakpoint): Reimplement.
6789 (run_breakpoint_commands): Rename to ...
6790 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6791 and change return type to boolean.
6792 (run_breakpoint_commands): New function.
6793 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6794 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6795 breakpoint. Go through the_target->remove_point instead of
6796 assuming memory breakpoint.
6797 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6798 software and hardware breakpoints.
6799 (reinsert_raw_breakpoint): Go through the_target->insert_point
6800 instead of assuming memory breakpoint.
6801 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6802 software and hardware breakpoints.
6803 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6804 Check both software and hardware breakpoints.
6805 (validate_inserted_breakpoint): Assert the breakpoint is a
6806 software breakpoint. Set the inserted flag to -1 instead of
6807 setting shlib_disabled.
6808 (delete_disabled_breakpoints): Adjust.
6809 (validate_breakpoints): Only validate software breakpoints.
6810 Adjust to inserted flag change.
6811 (check_mem_read, check_mem_write): Skip breakpoint types other
6812 than software breakpoints. Adjust to inserted flag change.
6813 * mem-break.h (enum raw_bkpt_type): New enum.
6814 (raw_breakpoint, struct process_info): Forward declare.
6815 (Z_packet_to_target_hw_bp_type): Delete declaration.
6816 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6817 (set_gdb_breakpoint, delete_gdb_breakpoint)
6818 (clear_breakpoint_conditions): New declarations.
6819 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6820 (breakpoint_inserted_here): Update comment.
6821 (add_breakpoint_condition, add_breakpoint_commands): Replace
6822 address parameter with a breakpoint pointer parameter.
6823 (gdb_breakpoint_here): Update comment.
6824 (delete_gdb_breakpoint_at): Delete.
6825 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6826 * server.c (process_point_options): Take a struct breakpoint
6827 pointer instead of an address. Adjust.
6828 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6829 delete_gdb_breakpoint.
6830 * spu-low.c (spu_target_ops): Install NULL as
6831 supports_z_point_type method.
6832 * target.h: Include mem-break.h.
6833 (struct target_ops) <prepare_to_access_memory>: Update comment.
6834 <supports_z_point_type>: New field.
6835 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6836 instead of a char. Also take a raw breakpoint pointer.
6837 * win32-arm-low.c (the_low_target): Install NULL as
6838 supports_z_point_type.
6839 * win32-i386-low.c (i386_supports_z_point_type): New function.
6840 (i386_insert_point, i386_remove_point): Adjust to new interface.
6841 (the_low_target): Install i386_supports_z_point_type.
6842 * win32-low.c (win32_supports_z_point_type): New function.
6843 (win32_insert_point, win32_remove_point): Adjust to new interface.
6844 (win32_target_ops): Install win32_supports_z_point_type.
6845 * win32-low.h (struct win32_target_ops):
6846 <supports_z_point_type>: New method.
6847 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6848 instead of a char. Also take a raw breakpoint pointer.
6849
6850 2014-05-20 Pedro Alves <palves@redhat.com>
6851
6852 * mem-break.h: Include break-common.h.
6853 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6854 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6855 (Z_packet_to_target_hw_bp_type): New declaration.
6856 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6857 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6858 (Z_PACKET_ACCESS_WP): Delete macros.
6859 (Z_packet_to_hw_type): Delete function.
6860 * i386-low.h: Don't include break-common.h here.
6861 (Z_packet_to_hw_type): Delete declaration.
6862 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6863 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6864 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6865 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6866 * linux-aarch64-low.c: Don't include break-common.h here.
6867 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6868 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6869 (Z_packet_to_target_hw_bp_type): Delete function.
6870 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6871 function.
6872 (mips_insert_point, mips_remove_point): Use
6873 Z_packet_to_target_hw_bp_type.
6874
6875 2014-05-20 Pedro Alves <palves@redhat.com>
6876
6877 * linux-aarch64-low.c: Include break-common.h.
6878 (enum target_point_type): Delete.
6879 (Z_packet_to_point_type): Rename to ...
6880 (Z_packet_to_target_hw_bp_type): ... this, and return a
6881 target_hw_bp_type instead.
6882 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6883 instead of an enum target_point_type.
6884 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6885 breakpoint type.
6886 (aarch64_dr_state_insert_one_point)
6887 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6888 (aarch64_handle_aligned_watchpoint)
6889 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6890 Take an enum target_hw_bp_type instead of an enum
6891 target_point_type.
6892 (aarch64_supports_z_point_type): New function.
6893 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6894 use Z_packet_to_target_hw_bp_type.
6895
6896 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6897
6898 * configure.ac: Only use -Werror by default when DEVELOPMENT
6899 is true.
6900 * configure: Regenerate.
6901
6902 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6903
6904 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6905 * linux-x86-low.c (X86_64_USER_REGS): New.
6906 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6907
6908 2014-04-28 Yao Qi <yao@codesourcery.com>
6909
6910 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6911 name.
6912
6913 2014-04-25 Pedro Alves <palves@redhat.com>
6914
6915 PR server/16255
6916 * linux-low.c (linux_attach_fail_reason_string): New function.
6917 (linux_attach_lwp): Delete.
6918 (linux_attach_lwp_1): Rename to ...
6919 (linux_attach_lwp): ... this. 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): Adjust to call linux_attach_lwp. Call error on
6923 failure to attach to the tgid. Call warning when failing to
6924 attach to an lwp.
6925 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6926 argument. Remove "initial" parameter. Return int instead of
6927 void. Don't error or warn here.
6928 (linux_attach_fail_reason_string): New declaration.
6929 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6930 interface change. Use linux_attach_fail_reason_string.
6931
6932 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6933 Walfred Tedeschi <walfred.tedeschi@intel.com>
6934
6935 * Makefile.in: Added rules to handle new files
6936 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6937 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6938 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6939 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6940 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6941 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6942 x32-avx512-linux.o.
6943 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6944 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6945 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6946 i386/x32-avx512.xml.
6947 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6948 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6949 i386/x32-avx512-linux.xml.
6950 * i387-fp.c (num_avx512_k_registers): New constant for number
6951 of K registers.
6952 (num_avx512_zmmh_low_registers): New constant for number of
6953 lower ZMM registers (0-15).
6954 (num_avx512_zmmh_high_registers): New constant for number of
6955 higher ZMM registers (16-31).
6956 (num_avx512_ymmh_registers): New contant for number of higher
6957 YMM registers (ymm16-31 added by avx521 on x86_64).
6958 (num_avx512_xmm_registers): New constant for number of higher
6959 XMM registers (xmm16-31 added by AVX512 on x86_64).
6960 (struct i387_xsave): Add space for AVX512 registers.
6961 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6962 Add code to handle AVX512 registers.
6963 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6964 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6965 prototypei from generated file.
6966 (tdesc_amd64_avx512_linux): Likewise.
6967 (init_registers_x32_avx512_linux): Likewise.
6968 (tdesc_x32_avx512_linux): Likewise.
6969 (init_registers_i386_avx512_linux): Likewise.
6970 (tdesc_i386_avx512_linux): Likewise.
6971 (x86_64_regmap): Add AVX512 registers.
6972 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6973 mask.
6974 (initialize_low_arch): Add code to initialize AVX512 registers.
6975
6976 2014-04-23 Pedro Alves <palves@redhat.com>
6977
6978 * mem-break.c (find_gdb_breakpoint_at): Make static.
6979 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6980
6981 2014-04-23 Pedro Alves <palves@redhat.com>
6982
6983 * i386-low.c: Don't include break-common.h here.
6984 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6985 prototype to take target_hw_bp_type as argument instead of a Z
6986 packet char.
6987 * i386-low.h: Include break-common.h here.
6988 (Z_packet_to_hw_type): Declare.
6989 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6990 prototypes.
6991 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6992 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6993 (x86_remove_point): Convert the packet number to a
6994 target_hw_bp_type before calling i386_low_remove_watchpoint.
6995 * win32-i386-low.c (i386_insert_point): Convert the packet number
6996 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6997 (i386_remove_point): Convert the packet number to a
6998 target_hw_bp_type before calling i386_low_remove_watchpoint.
6999
7000 2014-04-23 Pedro Alves <palves@redhat.com>
7001
7002 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7003
7004 2014-04-10 Pedro Alves <palves@redhat.com>
7005
7006 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7007 Check if the condition or command is NULL before checking if the
7008 breakpoint is known. On success, return true.
7009 * mem-break.h (add_breakpoint_condition): Document return.
7010 (add_breakpoint_commands): Add describing comment.
7011 * server.c (skip_to_semicolon): New function.
7012 (process_point_options): Use it.
7013
7014 2014-04-09 Pedro Alves <palves@redhat.com>
7015
7016 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7017 to lwpid_of.
7018
7019 2014-02-27 Pedro Alves <palves@redhat.com>
7020
7021 PR 12702
7022 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7023 macros.
7024 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7025 output.
7026 (last_thread_of_process_p): Take a PID argument instead of a
7027 thread pointer.
7028 (linux_wait_for_lwp): Delete.
7029 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7030 functions.
7031 (linux_low_filter_event): New function, party factored out from
7032 linux_wait_for_event.
7033 (linux_wait_for_event): Rename to ...
7034 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7035 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7036 sigsuspend. Check for zombie leaders.
7037 (linux_wait_for_event): Reimplement as wrapper around
7038 linux_wait_for_event_filtered.
7039 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7040 a normal or signal exit is seen, it's the whole process exiting.
7041 (wait_for_sigstop): No longer a for_each_inferior callback.
7042 Rewrite on top of linux_wait_for_event_filtered.
7043 (stop_all_lwps): Call wait_for_sigstop directly.
7044 * server.c (resume, handle_target_event): Handle
7045 TARGET_WAITKIND_NO_RESUMED.
7046
7047 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7048
7049 * win32-low.c (psapi_get_dll_name,
7050 * win32_CreateToolhelp32Snapshot): Delete.
7051 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7052 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7053 Delete.
7054 (handle_load_dll): Add function description.
7055 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7056
7057 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7058
7059 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7060 Add comment.
7061 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7062 base address when calling win32_add_one_solib.
7063 (handle_load_dll): Delete local variable load_addr.
7064 Remove 0x1000 offset applied to DLL base address when calling
7065 win32_add_one_solib.
7066 (handle_unload_dll): Add comment.
7067
7068 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7069
7070 * win32-low.c (win32_add_all_dlls): Renames
7071 win32_ensure_ntdll_loaded. Rewrite function documentation.
7072 Adjust implementation to always load all DLLs.
7073 Add 0x1000 offset to DLL base address when calling
7074 win32_add_one_solib.
7075 (child_initialization_done): New static global.
7076 (do_initial_child_stuff): Set child_initialization_done to
7077 zero during child initialization, and 1 after. Replace call
7078 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7079 Add comment.
7080 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7081 (handle_unload_dll): Add function documentation.
7082 (get_child_debug_event): Ignore load and unload DLL events
7083 during child initialization.
7084
7085 2014-02-20 Doug Evans <dje@google.com>
7086
7087 Remove global all_lwps.
7088 * inferiors.h (ptid_of): Move here from linux-low.h.
7089 (pid_of, lwpid_of): Ditto.
7090 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7091 parameter is a struct thread_info * now.
7092 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7093 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7094 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7095 directly.
7096 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7097 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7098 * linux-arm-low.c (update_registers_callback): Update, "entry"
7099 parameter is a struct thread_info * now.
7100 Fetch lwpid from current_inferior directly.
7101 (arm_insert_point): Pass &all_threads to find_inferior instead of
7102 &all_lwps.
7103 (arm_remove_point): Ditto.
7104 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7105 (arm_prepare_to_resume): Fetch pid from thread.
7106 (arm_read_description): Fetch lwpid from current_inferior directly.
7107 * linux-low.c (all_lwps): Delete.
7108 (delete_lwp): Delete call to remove_inferior.
7109 (handle_extended_wait): Fetch lwpid from thread.
7110 (add_lwp): Don't set lwp->entry.id. Remove call to
7111 add_inferior_to_list.
7112 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7113 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7114 (kill_one_lwp_callback): Ditto.
7115 (linux_kill): Don't dereference NULL pointer.
7116 Fetch ptid,lwpid from thread.
7117 (get_detach_signal): Fetch ptid from thread.
7118 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7119 Simplify call to regcache_invalidate_thread.
7120 (delete_lwp_callback): Update, "entry" parameter is a
7121 struct thread_info * now. Fetch pid from thread.
7122 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7123 (status_pending_p_callback): Update, "entry" parameter is a
7124 struct thread_info * now. Fetch ptid from thread.
7125 (find_lwp_pid): Update, "entry" parameter is a
7126 struct thread_info * now.
7127 (linux_wait_for_lwp): Fetch pid from thread.
7128 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7129 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7130 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7131 (dequeue_one_deferred_signal): Ditto.
7132 (cancel_breakpoint): Fetch ptid from current_inferior.
7133 (linux_wait_for_event): Pass &all_threads to find_inferior,
7134 not &all_lwps. Fetch ptid, lwpid from thread.
7135 (count_events_callback): Update, "entry" parameter is a
7136 struct thread_info * now.
7137 (select_singlestep_lwp_callback): Ditto.
7138 (select_event_lwp_callback): Ditto.
7139 (cancel_breakpoints_callback): Ditto.
7140 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7141 not &all_lwps.
7142 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7143 (unsuspend_one_lwp): Update, "entry" parameter is a
7144 struct thread_info * now.
7145 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7146 not &all_lwps.
7147 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7148 Fetch lwpid from thread, not lwp.
7149 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7150 Pass &all_threads to find_inferior, not &all_lwps.
7151 (send_sigstop): Fetch lwpid from thread, not lwp.
7152 (send_sigstop_callback): Update, "entry" parameter is a
7153 struct thread_info * now.
7154 (suspend_and_send_sigstop_callback): Ditto.
7155 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7156 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7157 struct thread_info * now.
7158 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7159 from thread, lwp.
7160 (lwp_running): Update, "entry" parameter is a
7161 struct thread_info * now.
7162 (stop_all_lwps): Fetch ptid from thread.
7163 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7164 (linux_resume_one_lwp): Fetch lwpid from thread.
7165 (linux_set_resume_request): Update, "entry" parameter is a
7166 struct thread_info * now. Fetch pid, lwpid from thread.
7167 (resume_status_pending_p): Update, "entry" parameter is a
7168 struct thread_info * now.
7169 (need_step_over_p): Ditto. Fetch lwpid from thread.
7170 (start_step_over): Fetch lwpid from thread.
7171 (linux_resume_one_thread): Update, "entry" parameter is a
7172 struct thread_info * now. Fetch lwpid from thread.
7173 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7174 (proceed_one_lwp): Update, "entry" parameter is a
7175 struct thread_info * now. Fetch lwpid from thread.
7176 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7177 struct thread_info * now.
7178 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7179 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7180 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7181 directly.
7182 (regsets_store_inferior_registers): Ditto.
7183 (fetch_register, store_register): Ditto.
7184 (linux_read_memory, linux_write_memory): Ditto.
7185 (linux_request_interrupt): Ditto.
7186 (linux_read_auxv): Ditto.
7187 (linux_xfer_siginfo): Ditto.
7188 (linux_qxfer_spu): Ditto.
7189 (linux_qxfer_libraries_svr4): Ditto.
7190 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7191 moved to inferiors.h.
7192 (get_lwp): Delete.
7193 (get_thread_lwp): Update.
7194 (struct lwp_info): Delete member "entry". Simplify comment for
7195 member "thread".
7196 (all_lwps): Delete.
7197 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7198 current_inferior directly.
7199 (update_watch_registers_callback): Update, "entry" parameter is a
7200 struct thread_info * now. Fetch pid from thread.
7201 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7202 (mips_insert_point): Fetch lwpid from current_inferior.
7203 Pass &all_threads to find_inferior, not &all_lwps.
7204 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7205 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7206 directly.
7207 (mips_stopped_data_address): Ditto.
7208 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7209 directly.
7210 * linux-tile-low.c (tile_arch_setup): Ditto.
7211 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7212 (update_debug_registers_callback): Update, "entry" parameter is a
7213 struct thread_info * now. Fetch pid from thread.
7214 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7215 Pass &all_threads to find_inferior, not &all_lwps.
7216 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7217 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7218 Pass &all_threads to find_inferior, not &all_lwps.
7219 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7220 (i386_dr_low_get_status): Ditto.
7221 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7222 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7223 (x86_linux_read_description): Ditto.
7224 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7225
7226 2014-02-20 Doug Evans <dje@google.com>
7227
7228 * inferiors.c (get_first_inferior): Fix buglet.
7229
7230 2014-02-19 Doug Evans <dje@google.com>
7231
7232 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7233 * inferiors.c (add_thread): Change result type to struct thread_info *.
7234 All callers updated.
7235 (add_lwp): Call add_thread here instead of in callers.
7236 All callers updated.
7237 * linux-low.h (get_lwp_thread): Rewrite.
7238 (struct lwp_info): New member "thread".
7239
7240 2014-02-19 Doug Evans <dje@google.com>
7241
7242 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7243 All callers updated.
7244
7245 2014-02-19 Doug Evans <dje@google.com>
7246
7247 * inferiors.c (add_thread): Fix whitespace.
7248
7249 2014-02-19 Doug Evans <dje@google.com>
7250
7251 * dll.c (clear_dlls): Replace accessing list implemention details
7252 with API function.
7253 * gdbthread.h (get_first_thread): Declare.
7254 * inferiors.c (for_each_inferior_with_data): New function.
7255 (get_first_thread): New function.
7256 (find_thread_ptid): Simplify.
7257 (get_first_inferior): New function.
7258 (clear_list): Delete.
7259 (one_inferior_p): New function.
7260 (clear_inferior_list): New function.
7261 (clear_inferiors): Update.
7262 * inferiors.h (for_each_inferior_with_data): Declare.
7263 (clear_inferior_list): Declare.
7264 (one_inferior_p): Declare.
7265 (get_first_inferior): Declare.
7266 * linux-low.c (linux_wait_for_event): Replace accessing list
7267 implemention details with API function.
7268 * server.c (target_running): Ditto.
7269 (accumulate_file_name_length): New function.
7270 (emit_dll_description): New function.
7271 (handle_qxfer_libraries): Replace accessing list implemention
7272 details with API function.
7273 (handle_qxfer_threads_worker): New function.
7274 (handle_qxfer_threads_proper): Replace accessing list implemention
7275 details with API function.
7276 (handle_query): Ditto.
7277 (visit_actioned_threads_callback_ftype): New typedef.
7278 (visit_actioned_threads_data): New struct.
7279 (visit_actioned_threads): Rewrite to be find_inferior callback.
7280 (resume): Call find_inferior.
7281 (handle_status): Replace accessing list implemention
7282 details with API function.
7283 (process_serial_event): Replace accessing list implemention details
7284 with API function.
7285 * target.c (set_desired_inferior): Replace accessing list implemention
7286 details with API function.
7287 * tracepoint.c (same_process_p): New function.
7288 (gdb_agent_about_to_close): Replace accessing list implemention
7289 details with API function.
7290 * win32-low.c (child_delete_thread): Replace accessing list
7291 implemention details with API function.
7292 (match_dll_by_basename): New function.
7293 (dll_is_loaded_by_basename): New function.
7294 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7295 details call to dll_is_loaded_by_basename.
7296
7297 2014-02-19 Doug Evans <dje@google.com>
7298
7299 * dll.h (struct dll_info): Add comment.
7300 * gdbthread.h (struct thread_info): Add comment.
7301 (current_ptid): Simplify.
7302 * inferiors.c (add_process): Update.
7303 (remove_process): Update.
7304 * inferiors.h (struct process_info): Rename member "head" to "entry".
7305 * linux-low.c (delete_lwp): Update.
7306 (add_lwp): Update.
7307 (last_thread_of_process_p): Update.
7308 (kill_one_lwp_callback, linux_kill): Update.
7309 (status_pending_p_callback): Update.
7310 (wait_for_sigstop): Update. Simplify read of ptid.
7311 (start_step_over): Update.
7312 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7313 (get_lwp_thread): Update.
7314 (struct lwp_info): Rename member "head" to "entry".
7315 * regcache.h (inferior_list_entry): Delete.
7316 * server.c (kill_inferior_callback): Update.
7317 (detach_or_kill_inferior_callback): Update.
7318 (print_started_pid): Update.
7319 (print_attached_pid): Update.
7320 (process_serial_event): Simplify read of ptid.
7321 * thread-db.c (thread_db_create_event): Update.
7322 (thread_db_get_tls_address): Update.
7323 * win32-low.c (current_inferior_ptid): Simplify.
7324
7325 2014-02-19 Tom Tromey <tromey@redhat.com>
7326
7327 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7328 argument.
7329 (target_supports_btrace): Update.
7330
7331 2014-02-14 Yao Qi <yao@codesourcery.com>
7332
7333 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7334 (rsp-low-ipa.o): New target.
7335
7336 2014-02-12 Tom Tromey <tromey@redhat.com>
7337
7338 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7339 convert_ascii_to_int.
7340 * regcache.c (registers_to_string): Likewise.
7341 * remote-utils.c (decode_M_packet): Likewise.
7342 * server.c (process_serial_event): Likewise.
7343
7344 2014-02-12 Tom Tromey <tromey@redhat.com>
7345
7346 * server.c (handle_query, handle_v_run): Use hex2bin, not
7347 unhexify.
7348 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7349
7350 2014-02-12 Tom Tromey <tromey@redhat.com>
7351
7352 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7353 convert_int_to_ascii.
7354 * regcache.c (registers_to_string, collect_register_as_string):
7355 Likewise.
7356 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7357 Likewise.
7358 * server.c (process_serial_event): Likewise.
7359 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7360 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7361
7362 2014-02-12 Tom Tromey <tromey@redhat.com>
7363
7364 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7365 bin2hex, not hexify.
7366 * tracepoint.c (cmd_qtstatus): Likewise.
7367
7368 2014-02-12 Tom Tromey <tromey@redhat.com>
7369
7370 * remote-utils.c (monitor_output): Pass explicit length to
7371 hexify.
7372
7373 2014-02-12 Tom Tromey <tromey@redhat.com>
7374
7375 * tracepoint.c: Include rsp-low.h.
7376 * server.c: Include rsp-low.h.
7377 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7378 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7379 declare.
7380 * remote-utils.c: Include rsp-low.h.
7381 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7382 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7383 (convert_int_to_ascii, convert_ascii_to_int): Move to
7384 common/rsp-low.c.
7385 * regcache.c: Include rsp-low.h.
7386 * ax.c: Include rsp-low.h.
7387 * Makefile.in (SFILES): Add common/rsp-low.c.
7388 (OBS): Add rsp-low.o.
7389 (rsp-low.o): New target.
7390
7391 2014-02-12 Tom Tromey <tromey@redhat.com>
7392
7393 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7394 Include print-utils.h.
7395 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7396 (plongest, thirty_two, phex_nz): Remove.
7397 * Makefile.in (SFILES): Add common/print-utils.c.
7398 (OBS): Add print-utils.o.
7399 (print-utils-ipa.o): New target.
7400 (print-utils.o): New target.
7401 (IPA_OBJS): Add print-utils-ipa.o.
7402
7403 2014-02-06 Tom Tromey <tromey@redhat.com>
7404
7405 * Makefile.in (SFILES): Fix indentation.
7406
7407 2014-02-05 Doug Evans <dje@google.com>
7408
7409 * linux-low.c (linux_wait_for_event): Improve comment.
7410 (linux_wait_1): Keep current_inferior in sync with event_child.
7411
7412 2014-01-22 Doug Evans <dje@google.com>
7413
7414 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7415
7416 2014-01-22 Doug Evans <dje@google.com>
7417
7418 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7419 * configure: Regenerate.
7420 * config.in: Regenerate.
7421 * Makefile.in (SFILES): Add debug.c.
7422 (OBS): Add debug.o.
7423 * debug.c: New file.
7424 * debug.h: New file.
7425 * linux-aarch64-low.c (*): Update all debugging printfs to use
7426 debug_printf instead of fprintf.
7427 * linux-arm-low.c (*): Ditto.
7428 * linux-cris-low.c (*): Ditto.
7429 * linux-crisv32-low.c (*): Ditto.
7430 * linux-m32r-low.c (*): Ditto.
7431 * linux-sparc-low.c (*): Ditto.
7432 * linux-x86.c (*): Ditto.
7433 * linux-low.c (*): Ditto.
7434 (linux_wait_1): Add calls to debug_enter, debug_exit.
7435 (linux_wait): Remove redundant debugging printf.
7436 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7437 (linux_resume, unstop_all_lwps): Ditto.
7438 * mem-break.c (*): Update all debugging printfs to use
7439 debug_printf instead of fprintf.
7440 * remote-utils.c (*): Ditto.
7441 * thread-db.c (*): Ditto.
7442 * server.c #include <ctype.h>, "gdb_vecs.h".
7443 (debug_threads): Moved to debug.c.
7444 (*): Update all debugging printfs to use debug_printf instead of
7445 fprintf.
7446 (start_inferior): Replace call to fflush with call to debug_flush.
7447 (monitor_show_help): Mention set debug-format.
7448 (parse_debug_format_options): New function.
7449 (handle_monitor_command): Handle "monitor set debug-format".
7450 (gdbserver_usage): Mention --debug-format.
7451 (main): Parse --debug-format.
7452 * server.h (debug_threads): Declaration moved to debug.h.
7453 #include "debug.h".
7454 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7455 trace_debug_1 that uses debug_printf.
7456 (tracepoint_look_up_symbols): Update all debugging printfs to use
7457 debug_printf instead of fprintf.
7458
7459 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7460
7461 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7462 sys/ptrace.h.
7463
7464 2014-01-17 Pedro Alves <palves@redhat.com>
7465
7466 PR build/16445
7467 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7468 defined after including gdb_proc_service.h.
7469
7470 2014-01-16 Doug Evans <dje@google.com>
7471
7472 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7473 (match_dll): Use it.
7474
7475 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7476
7477 * target.h (target_ops) <read_btrace>: Change parameters and
7478 return type to allow error reporting.
7479 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7480 trace reading errors on.
7481 * linux-low.c (linux_low_read_btrace): Pass trace reading
7482 errors on.
7483 (linux_low_disable_btrace): New.
7484
7485 2014-01-15 Doug Evans <dje@google.com>
7486
7487 * inferiors.c (thread_id_to_gdb_id): Delete.
7488 * inferiors.h (thread_id_to_gdb_id): Delete.
7489
7490 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7491
7492 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7493 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7494 versions.
7495
7496 2014-01-08 Pedro Alves <palves@redhat.com>
7497
7498 * server.c (handle_status): Don't discard previous queued stop
7499 replies or thread's pending status here.
7500 (main) <disconnection>: Do it here instead.
7501
7502 2014-01-08 Pedro Alves <palves@redhat.com>
7503
7504 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7505 * server.c (visit_actioned_threads, handle_pending_status): New
7506 function.
7507 (handle_v_cont): Factor out parts to ...
7508 (resume): ... this new function. If in all-stop, and a thread
7509 being resumed has a pending status, report it without actually
7510 resuming.
7511 (myresume): Adjust to use the new 'resume' function.
7512 (clear_pending_status_callback, set_pending_status_callback)
7513 (find_status_pending_thread_callback): New functions.
7514 (handle_status): Handle the case of multiple threads having
7515 interesting statuses to report. Report threads' real last signal
7516 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7517 with an interesting thread to report the status for, instead of
7518 always reporting the status of the first thread.
7519
7520 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7521
7522 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7523 * gdbreplay.c (gdbreplay_version): Likewise.
7524
7525 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7526
7527 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7528 iov.iov_len with the real length in use.
7529
7530 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7531
7532 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7533 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7534 for all targets that use win32-low.c.
7535 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7536 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7537
7538 2013-12-13 Pedro Alves <palves@redhat.com>
7539
7540 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7541 if equal to TARGET_WAITKIND_LOADED.
7542 * win32-low.c (cached_status): New static global.
7543 (win32_wait): Add declaration.
7544 (do_initial_child_stuff): Flush all initial pending debug events
7545 up to the initial breakpoint.
7546 (win32_wait): If CACHED_STATUS was set, return that instead
7547 of doing a real wait. Remove the code resuming the execution
7548 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7549 during the initial phase. Also remove the code changing
7550 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7551 TARGET_WAITKIND_STOPPED.
7552
7553 2013-12-11 Yao Qi <yao@codesourcery.com>
7554
7555 * notif.c (handle_notif_ack): Return 0 if no notification
7556 matches.
7557
7558 2013-11-20 Doug Evans <dje@google.com>
7559
7560 * linux-low.c (linux_set_resume_request): Fix comment.
7561
7562 2013-11-20 Doug Evans <dje@google.com>
7563
7564 * linux-low.c (resume_status_pending_p): Tweak comment.
7565
7566 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7567
7568 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7569 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7570 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7571 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7572 (srv_amd64_regobj): Add amd64-mpx.o.
7573 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7574 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7575 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7576 * i387-fp.c (num_pl_bnd_register) Added constant.
7577 (num_pl_bnd_cfg_registers) Added constant.
7578 (struct i387_xsave) Added reserved area and MPX fields.
7579 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7580 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7581 function.
7582 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7583 (init_registers_amd64_mpx_linux): Declare new function.
7584 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7585 (x86_64_regmap): Add MPX registers.
7586 (x86_linux_read_description): Add MPX case.
7587 (initialize_low_arch): Initialize MPX targets.
7588
7589 2013-11-18 Tom Tromey <tromey@redhat.com>
7590
7591 * configure: Rebuild.
7592 * configure.ac: Don't check for stdlib.h.
7593 * gdbreplay.c: Unconditionally include stdlib.h.
7594
7595 2013-11-18 Tom Tromey <tromey@redhat.com>
7596
7597 * config.in: Rebuild.
7598 * configure: Rebuild.
7599 * configure.ac: Don't use AC_HEADER_DIRENT.
7600
7601 2013-11-18 Tom Tromey <tromey@redhat.com>
7602
7603 * server.h: Don't check HAVE_STRING_H.
7604 * gdbreplay.c: Don't check HAVE_STRING_H.
7605 * configure: Rebuild.
7606
7607 2013-11-18 Tom Tromey <tromey@redhat.com>
7608
7609 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7610 LIBGNU.
7611
7612 2013-11-08 Tom Tromey <tromey@redhat.com>
7613
7614 * configure, config.in: Rebuild.
7615 * configure.ac: Remove unused configury.
7616
7617 2013-11-08 Tom Tromey <tromey@redhat.com>
7618
7619 * acinclude.m4: Include common.m4, codeset.m4.
7620 * configure, config.in: Rebuild.
7621 * configure.ac: Use GDB_AC_COMMON.
7622
7623 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7624
7625 * linux-s390-low.c (HWCAP_S390_TE): New define.
7626 (s390_arch_setup): Consider the TE field in the HWCAP for
7627 determining 'have_regset_tdb'.
7628
7629 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7630
7631 PR gdb/16014
7632 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7633 call to sizeof.
7634
7635 2013-10-02 Pedro Alves <palves@redhat.com>
7636
7637 * server.c (process_serial_event): Don't output "GDBserver
7638 exiting" if GDB is connected through stdio.
7639 * target.c (mywait): Likewise, be silent if GDB is connected
7640 through stdio.
7641
7642 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7643
7644 * lynx-low.c (lynx_add_threads_after_attach): New function.
7645 (lynx_attach): Remove call to add_thread. Add call to
7646 lynx_add_threads_after_attach instead.
7647
7648 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7649
7650 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7651 * config.in, configure: Regenerated.
7652
7653 2013-09-18 Yao Qi <yao@codesourcery.com>
7654
7655 PR server/15959
7656 * server.c (start_inferior): Clear 'resume_info'.
7657
7658 2013-09-16 Jiong Wang <jiwang@tilera.com>
7659
7660 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7661 for each register.
7662
7663 2013-09-16 Jiong Wang <jiwang@tilera.com>
7664
7665 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7666 linux-tile-low.o to srv_tgtobj.
7667
7668 2013-09-16 Will Newton <will.newton@linaro.org>
7669
7670 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7671 out regs.
7672
7673 2013-09-06 Pedro Alves <palves@redhat.com>
7674
7675 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7676 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7677 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7678 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7679 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7680 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7681
7682 2013-09-06 Pedro Alves <palves@redhat.com>
7683
7684 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7685 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7686
7687 2013-09-06 Pedro Alves <palves@redhat.com>
7688
7689 * linux-amd64-ipa.c: Include tracepoint.h.
7690 * linux-i386-ipa.c: Include tracepoint.h.
7691
7692 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7693
7694 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7695 (ps_get_thread_area): New function.
7696
7697 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7698
7699 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7700 (initialize_low_arch): Call init_registers_crisv32 rather than
7701 init_register_crisv32.
7702
7703 2013-09-05 Pedro Alves <palves@redhat.com>
7704
7705 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7706 to ...
7707 * hostio.h: ... this new file.
7708 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7709 win32-low.c: Include hostio.h.
7710
7711 2013-09-05 Pedro Alves <palves@redhat.com>
7712
7713 * server.h (gdb_client_data, handler_func, callback_handler_func)
7714 (delete_file_handler, add_file_handler, append_callback_event)
7715 (delete_callback_event, start_event_loop, initialize_event_loop):
7716 Move to event-loop.h and include it.
7717 * event-loop.h: New file.
7718
7719 2013-09-05 Pedro Alves <palves@redhat.com>
7720
7721 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7722 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7723 (loaded_dll, unloaded_dll): Move to ...
7724 * dll.h: ... this new file.
7725 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7726
7727 2013-09-05 Pedro Alves <palves@redhat.com>
7728
7729 * server.h (current_process, get_thread_process, all_processes)
7730 (add_inferior_to_list, for_each_inferior, current_inferior)
7731 (remove_inferior, add_process, remove_process, find_process_pid)
7732 (have_started_inferiors_p, have_attached_inferiors_p)
7733 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7734 (clear_inferiors, find_inferior, find_inferior_id)
7735 (inferior_target_data, set_inferior_target_data)
7736 (inferior_regcache_data, set_inferior_regcache_data): Move to
7737 inferiors.h, and include it.
7738 * inferiors.h: New file.
7739
7740 2013-09-05 Pedro Alves <palves@redhat.com>
7741
7742 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7743 Move ...
7744 * ax.h: ... here.
7745
7746 2013-09-05 Pedro Alves <palves@redhat.com>
7747
7748 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7749 tracepoint.h.
7750 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7751 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7752 (handle_tracepoint_general_set, handle_tracepoint_query)
7753 (tracepoint_finished_step, tracepoint_was_hit)
7754 (release_while_stepping_state_list, current_traceframe)
7755 (in_readonly_region, traceframe_read_mem)
7756 (fetch_traceframe_registers, traceframe_read_sdata)
7757 (traceframe_read_info, struct fast_tpoint_collect_status)
7758 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7759 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7760 (supply_fast_tracepoint_registers)
7761 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7762 (ipa_tdesc, claim_trampoline_space)
7763 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7764 (agent_mem_read, agent_get_trace_state_variable_value)
7765 (agent_set_trace_state_variable_value, agent_tsv_read)
7766 (agent_mem_read_string, get_raw_reg_func_addr)
7767 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7768 * tracepoint.h: ... this new file.
7769
7770 2013-09-05 Pedro Alves <palves@redhat.com>
7771
7772 * server.h (perror_with_name, error, fatal, warning, paddress)
7773 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7774 include it.
7775 * utils.h: New file.
7776
7777 2013-09-05 Pedro Alves <palves@redhat.com>
7778
7779 * server.h (remote_debug, noack_mode, transport_is_reliable)
7780 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7781 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7782 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7783 (write_enn, initialize_async_io, enable_async_io)
7784 (disable_async_io, check_remote_input_interrupt_request)
7785 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7786 (dead_thread_notify, prepare_resume_reply)
7787 (decode_address_to_semicolon, decode_address, decode_m_packet)
7788 (decode_M_packet, decode_X_packet, decode_xfer_write)
7789 (decode_search_memory_packet, unhexify, hexify)
7790 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7791 (look_up_one_symbol, relocate_instruction)
7792 (monitor_output): Move to remote-utils.h, and include it.
7793 * remote-utils.h: New file.
7794
7795 2013-09-05 Pedro Alves <palves@redhat.com>
7796
7797 * server.h (_): Delete.
7798
7799 2013-09-02 Pedro Alves <palves@redhat.com>
7800
7801 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7802 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7803 allocated.
7804 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7805
7806 2013-09-02 Pierre Muller <muller@sourceware.org>
7807
7808 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7809 or WriteProcessMemory complete successfully and handle
7810 ERROR_PARTIAL_COPY error.
7811
7812 2013-09-02 Pedro Alves <palves@redhat.com>
7813
7814 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7815 error instead of EIO.
7816
7817 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7818
7819 PR server/15604
7820 * linux-low.c: Include filestuff.h.
7821 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7822 * lynx-low.c: Include filestuff.h.
7823 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7824 * server.c: Include filestuff.h.
7825 (main): Call notice_open_fds.
7826 * spu-low.c: Include filestuff.h.
7827 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7828
7829 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7830
7831 * Makefile.in: Explain why ../target and ../nat are not
7832 listed as include file search paths.
7833 (linux-waitpid.o): New object file rule.
7834 * configure.srv (srv_native_linux_obj): New variable.
7835 Replace all occurrences of linux native object files with
7836 $srv_native_linux_obj.
7837 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7838 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7839 (linux_enable_event_reporting): Remove declaration.
7840 (my_waitpid): Moved to common/linux-waitpid.c.
7841 (linux_wait_for_event): Pass ptid when calling
7842 linux_enable_event_reporting.
7843 (linux_supports_tracefork_flag): Remove.
7844 (linux_enable_event_reporting): Likewise.
7845 (linux_tracefork_grandchild): Remove.
7846 (STACK_SIZE): Moved to common/linux-ptrace.c.
7847 (linux_tracefork_child): Remove.
7848 (linux_test_for_tracefork): Remove.
7849 (linux_look_up_symbols): Call linux_supports_traceclone.
7850 (initialize_low): Remove call to linux_test_for_tracefork.
7851 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7852 common/linux-ptrace.h.
7853 (PTRACE_TYPE_ARG4): Likewise.
7854 Include linux-ptrace.h.
7855
7856 2013-08-21 Pedro Alves <palves@redhat.com>
7857
7858 * config.in: Renegerate.
7859
7860 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7861
7862 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7863 (SFILES): Remove $(srcdir)/common/target-common.c and
7864 add $(srcdir)/target/waitstatus.c.
7865 (OBS): Remove target-common.o and add waitstatus.o.
7866 (server_h): Remove $(srcdir)/../common/target-common.h and
7867 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7868 and $(srcdir)/../target/waitstatus.h.
7869 (target-common.o): Remove.
7870 (waitstatus.o): New target object file.
7871 * target.h: Do not include target-common.h and
7872 include target/resume.h, target/wait.h and
7873 target/waitstatus.h.
7874
7875 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7876
7877 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7878 to PTRACE_TYPE_ARG3.
7879 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7880 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7881 PTRACE_TYPE_ARG4.
7882 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7883 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7884
7885 2013-07-27 Jie Zhang <jie@codesourcery.com>
7886 Daniel Jacobowitz <dan@codesourcery.com>
7887 Yao Qi <yao@codesourcery.com>
7888
7889 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7890 (mips-linux-watch.o): New rule.
7891 (mips_linux_watch_h): New variable.
7892 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7893 srv_tgtobj.
7894 * linux-mips-low.c: Include mips-linux-watch.h.
7895 (struct arch_process_info, struct arch_lwp_info): New.
7896 (update_watch_registers_callback): New function.
7897 (mips_linux_new_process, mips_linux_new_thread) New functions.
7898 (mips_linux_prepare_to_resume, mips_insert_point): New
7899 functions.
7900 (mips_remove_point, mips_stopped_by_watchpoint): New
7901 functions.
7902 (rsp_bp_type_to_target_hw_bp_type): New function.
7903 (mips_stopped_data_address): New function.
7904 (the_low_target): Add watchpoint support functions.
7905
7906 2013-07-27 Yao Qi <yao@codesourcery.com>
7907
7908 * i386-low.c: Include break-common.h.
7909 (enum target_hw_bp_type): Remove.
7910
7911 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7912
7913 * Makefile.in (SFILES): /common/target-common.c.
7914 (OBS): Add target-common.o.
7915 (server_h): Add $(srcdir)/../common/target-common.h.
7916 (target-common.o): New target.
7917 * server.c (queue_stop_reply_callback): Free
7918 status string after use.
7919 * target.c (target_waitstatus_to_string): Remove.
7920 * target.h: Include target-common.h.
7921 (resume_kind): Likewise.
7922 (target_waitkind): Likewise.
7923 (target_waitstatus): Likewise.
7924 (TARGET_WNOHANG): Likewise.
7925
7926 2013-07-04 Yao Qi <yao@codesourcery.com>
7927
7928 * Makefile.in (host_alias): Use @host_noncanonical@.
7929 (target_alias): Use @target_noncanonical@.
7930 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7931 ACX_NONCANONICAL_HOST.
7932 * configure: Regenerated.
7933
7934 Revert:
7935 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7936
7937 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7938 * configure: Rebuild.
7939 * Makefile.in (version_host, version_target): Get from configure.
7940 (version.c): Use $(version_host) and $(version_target).
7941
7942 2013-07-03 Pedro Alves <palves@redhat.com>
7943
7944 * Makefile.in (config.status): Depend on development.sh.
7945 * acinclude.m4: Include libmcheck.m4.
7946 * configure: Regenerate.
7947
7948 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7949
7950 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7951 attribute inside the parentheses.
7952 (winapi_DebugSetProcessKillOnExit): Ditto.
7953 (winapi_DebugBreakProcess): Ditto.
7954 (winapi_GenerateConsoleCtrlEvent): Ditto.
7955
7956 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7957
7958 * notif.h (notif_event): Add a dummy member to avoid compiler
7959 errors.
7960
7961 2013-07-01 Pedro Alves <palves@redhat.com>
7962
7963 * hostio.c (HOSTIO_PATH_MAX): Define.
7964 (require_filename, handle_open, handle_unlink, handle_readlink):
7965 Use it.
7966
7967 2013-07-01 Pedro Alves <palves@redhat.com>
7968
7969 * server.h: Include "pathmax.h".
7970 * linux-low.c: Don't include sys/param.h.
7971 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7972 MAXPATHLEN.
7973 * win32-low.c: Don't include sys/param.h.
7974 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7975
7976 2013-07-01 Pedro Alves <palves@redhat.com>
7977
7978 * event-loop.c: Don't check HAVE_UNISTD_H before including
7979 <unistd.h>.
7980 * gdbreplay.c: Likewise.
7981 * remote-utils.c: Likewise.
7982 * server.c: Likewise.
7983 * configure.ac: Don't check for unistd.h.
7984 * configure: Regenerate.
7985
7986 2013-06-28 Tom Tromey <tromey@redhat.com>
7987
7988 * Makefile.in (version.c): Use version.in, not
7989 common/version.in.
7990
7991 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7992
7993 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7994 * configure: Rebuild.
7995 * Makefile.in (version_host, version_target): Get from configure.
7996 (version.c): Use $(version_host) and $(version_target).
7997
7998 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7999
8000 Fix trace-status to output user name without trailing colon.
8001 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8002
8003 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8004
8005 Fix trace-status to output proper start-time and stop-time.
8006 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8007 output start time and stop time in hex as gdb expects.
8008
8009 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8010
8011 * tracepoint.c (build_traceframe_info_xml): Output trace state
8012 variables present in the trace buffer.
8013
8014 2013-06-24 Tom Tromey <tromey@redhat.com>
8015
8016 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8017 create-version.sh.
8018 (version.o): Remove.
8019 * gdbreplay.c: Include version.h.
8020 (version, host_name): Don't declare.
8021 * server.h: Include version.h.
8022 (version, host_name): Don't declare.
8023
8024 2013-06-12 Pedro Alves <palves@redhat.com>
8025
8026 * linux-x86-low.c (linux_is_elf64): Delete global.
8027 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8028 with local linux_pid_exe_is_elf_64_file use.
8029
8030 2013-06-11 Pedro Alves <palves@redhat.com>
8031
8032 * linux-low.c (regset_disabled, disable_regset): New functions.
8033 (regsets_fetch_inferior_registers)
8034 (regsets_store_inferior_registers): Use them.
8035 (initialize_regsets_info); Don't allocate the disabled_regsets
8036 array here.
8037 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8038 comment.
8039
8040 2013-06-11 Pedro Alves <palves@redhat.com>
8041
8042 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8043 xmalloc.
8044
8045 2013-06-11 Pedro Alves <palves@redhat.com>
8046
8047 * linux-x86-low.c (initialize_low_arch): Call
8048 init_registers_x32_avx_linux.
8049
8050 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8051
8052 Fix compatibility with Android Bionic.
8053 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8054 it is not empty.
8055
8056 2013-06-07 Pedro Alves <palves@redhat.com>
8057
8058 PR server/14823
8059 * Makefile.in (OBS): Add tdesc.o.
8060 (IPA_OBJS): Add tdesc-ipa.o.
8061 (tdesc-ipa.o): New rule.
8062 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8063 interface.
8064 * linux-low.c (new_inferior): Delete.
8065 (disabled_regsets, num_regsets): Delete.
8066 (linux_add_process): Adjust to set the new per-process
8067 new_inferior flag.
8068 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8069 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8070 was a stop. When calling arch_setup, switch the current inferior
8071 to the thread that got an event.
8072 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8073 (regsets_fetch_inferior_registers)
8074 (regsets_store_inferior_registers): New regsets_info parameter.
8075 Adjust to use it.
8076 (linux_register_in_regsets): New regs_info parameter. Adjust to
8077 use it.
8078 (register_addr, fetch_register, store_register): New usrregs_info
8079 parameter. Adjust to use it.
8080 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8081 parameter regs_info. Adjust to use it.
8082 (linux_fetch_registers): Get the current inferior's regs_info, and
8083 adjust to use it.
8084 (linux_store_registers): Ditto.
8085 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8086 (initialize_low): Don't initialize the target_regsets here. Call
8087 initialize_low_arch.
8088 * linux-low.h (target_regsets): Delete declaration.
8089 (struct regsets_info): New.
8090 (struct usrregs_info): New.
8091 (struct regs_info): New.
8092 (struct process_info_private) <new_inferior>: New field.
8093 (struct linux_target_ops): Delete the num_regs, regmap, and
8094 regset_bitmap fields. New field regs_info.
8095 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8096 * i387-fp.c (num_xmm_registers): Delete.
8097 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8098 calls to new interface.
8099 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8100 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8101 Infer the number of xmm registers from the regcache's target
8102 description.
8103 * i387-fp.h (num_xmm_registers): Delete.
8104 * inferiors.c (add_thread): Don't install the thread's regcache
8105 here.
8106 * proc-service.c (gregset_info): Fetch the current inferior's
8107 regs_info. Adjust to use it.
8108 * regcache.c: Include tdesc.h.
8109 (register_bytes, reg_defs, num_registers)
8110 (gdbserver_expedite_regs): Delete.
8111 (get_thread_regcache): If the thread doesn't have a regcache yet,
8112 create one, instead of aborting gdbserver.
8113 (regcache_invalidate_one): Rename to ...
8114 (regcache_invalidate_thread): ... this.
8115 (regcache_invalidate_one): New.
8116 (regcache_invalidate): Only invalidate registers of the current
8117 process.
8118 (init_register_cache): Add target_desc parameter, and use it.
8119 (new_register_cache): Ditto. Assert the target description has a
8120 non zero registers_size.
8121 (regcache_cpy): Add assertions. Adjust.
8122 (realloc_register_cache, set_register_cache): Delete.
8123 (registers_to_string, registers_from_string): Adjust.
8124 (find_register_by_name, find_regno, find_register_by_number)
8125 (register_cache_size): Add target_desc parameter, and use it.
8126 (free_register_cache_thread, free_register_cache_thread_one)
8127 (regcache_release, register_cache_size): New.
8128 (register_size): Add target_desc parameter, and use it.
8129 (register_data, supply_register, supply_register_zeroed)
8130 (supply_regblock, supply_register_by_name, collect_register)
8131 (collect_register_as_string, collect_register_by_name): Adjust.
8132 * regcache.h (struct target_desc): Forward declare.
8133 (struct regcache) <tdesc>: New field.
8134 (init_register_cache, new_register_cache): Add target_desc
8135 parameter.
8136 (regcache_invalidate_thread): Declare.
8137 (regcache_invalidate_one): Delete declaration.
8138 (regcache_release): Declare.
8139 (find_register_by_number, register_cache_size, register_size)
8140 (find_regno): Add target_desc parameter.
8141 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8142 declarations.
8143 * remote-utils.c: Include tdesc.h.
8144 (outreg, prepare_resume_reply): Adjust.
8145 * server.c: Include tdesc.h.
8146 (gdbserver_xmltarget): Delete declaration.
8147 (get_features_xml, process_serial_event): Adjust.
8148 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8149 declare.
8150 (struct process_info) <tdesc>: New field.
8151 (ipa_tdesc): Declare.
8152 * tdesc.c: New file.
8153 * tdesc.h: New file.
8154 * tracepoint.c: Include tdesc.h.
8155 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8156 (get_context_regcache): Adjust to pass ipa_tdesc down.
8157 (do_action_at_tracepoint): Adjust to get the register cache size
8158 from the context regcache's description.
8159 (traceframe_walk_blocks): Adjust to get the register cache size
8160 from the current trace frame's description.
8161 (traceframe_get_pc): Adjust to get current trace frame's
8162 description and pass it down.
8163 (gdb_collect): Adjust to get the register cache size from the
8164 IPA's description.
8165 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8166 (gdbserver_xmltarget): Delete.
8167 (initialize_low_tracepoint): Set the ipa's target description.
8168 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8169 (initialize_low_tracepoint): Set the ipa's target description.
8170 * linux-x86-low.c: Include tdesc.h.
8171 [__x86_64__] (is_64bit_tdesc): New.
8172 (ps_get_thread_area, x86_get_thread_area): Use it.
8173 (i386_cannot_store_register): Rename to ...
8174 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8175 (i386_cannot_fetch_register): Rename to ...
8176 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8177 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8178 to new interface.
8179 (target_regsets): Rename to ...
8180 (x86_regsets): ... this.
8181 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8182 interface.
8183 (x86_siginfo_fixup): Use is_64bit_tdesc.
8184 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8185 (tdesc_x32_avx_linux, tdesc_x32_linux)
8186 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8187 Declare.
8188 (x86_linux_update_xmltarget): Delete.
8189 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8190 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8191 (AMD64_LINUX_USER64_CS): New.
8192 (x86_linux_read_description): New, based on
8193 x86_linux_update_xmltarget.
8194 (same_process_callback): New.
8195 (x86_arch_setup_process_callback): New.
8196 (x86_linux_update_xmltarget): New.
8197 (x86_regsets_info): New.
8198 (amd64_linux_regs_info): New.
8199 (i386_linux_usrregs_info): New.
8200 (i386_linux_regs_info): New.
8201 (x86_linux_regs_info): New.
8202 (x86_arch_setup): Reimplement.
8203 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8204 (x86_emit_ops): Ditto.
8205 (the_low_target): Adjust. Install x86_linux_regs_info,
8206 x86_cannot_fetch_register, and x86_cannot_store_register.
8207 (initialize_low_arch): New.
8208 * linux-ia64-low.c (tdesc_ia64): Declare.
8209 (ia64_fetch_register): Adjust.
8210 (ia64_usrregs_info, regs_info): New globals.
8211 (ia64_regs_info): New function.
8212 (the_low_target): Adjust.
8213 (initialize_low_arch): New function.
8214 * linux-sparc-low.c (tdesc_sparc64): Declare.
8215 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8216 Adjust.
8217 (sparc_arch_setup): New function.
8218 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8219 (the_low_target): Adjust.
8220 (initialize_low_arch): New function.
8221 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8222 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8223 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8224 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8225 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8226 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8227 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8228 (tdesc_powerpc_isa205_vsx64l): Declare.
8229 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8230 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8231 (ppc_set_pc, ppc_get_hwcap): Adjust.
8232 (ppc_usrregs_info): Forward declare.
8233 (!__powerpc64__) ppc_regmap_adjusted: New global.
8234 (ppc_arch_setup): Adjust to the current process'es target
8235 description.
8236 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8237 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8238 (ppc_store_evrregset): Adjust.
8239 (target_regsets): Rename to ...
8240 (ppc_regsets): ... this, and make static.
8241 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8242 (ppc_regs_info): New function.
8243 (the_low_target): Adjust.
8244 (initialize_low_arch): New function.
8245 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8246 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8247 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8248 (tdesc_s390x_linux64v2): Declare.
8249 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8250 (s390_fill_gregset, s390_store_last_break): Adjust.
8251 (target_regsets): Rename to ...
8252 (s390_regsets): ... this, and make static.
8253 (s390_get_pc, s390_set_pc): Adjust.
8254 (s390_get_hwcap): New target_desc parameter, and use it.
8255 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8256 (s390_arch_setup): Adjust to set the current process'es target
8257 description. Don't adjust the regmap.
8258 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8259 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8260 (regs_info_3264): New globals.
8261 (s390_regs_info): New function.
8262 (the_low_target): Adjust.
8263 (initialize_low_arch): New function.
8264 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8265 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8266 [__mips64] (init_registers_mips_linux)
8267 (init_registers_mips_dsp_linux): Delete defines.
8268 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8269 (have_dsp): New global.
8270 (mips_read_description): New, based on mips_arch_setup.
8271 (mips_arch_setup): Reimplement.
8272 (get_usrregs_info): New function.
8273 (mips_cannot_fetch_register, mips_cannot_store_register)
8274 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8275 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8276 (target_regsets): Rename to ...
8277 (mips_regsets): ... this, and make static.
8278 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8279 (dsp_regs_info, regs_info): New globals.
8280 (mips_regs_info): New function.
8281 (the_low_target): Adjust.
8282 (initialize_low_arch): New function.
8283 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8284 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8285 Declare.
8286 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8287 (arm_read_description): New, with bits factored from
8288 arm_arch_setup.
8289 (arm_arch_setup): Reimplement.
8290 (target_regsets): Rename to ...
8291 (arm_regsets): ... this, and make static.
8292 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8293 (arm_regs_info): New function.
8294 (the_low_target): Adjust.
8295 (initialize_low_arch): New function.
8296 * linux-m68k-low.c (tdesc_m68k): Declare.
8297 (target_regsets): Rename to ...
8298 (m68k_regsets): ... this, and make static.
8299 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8300 (m68k_regs_info): New function.
8301 (m68k_arch_setup): New function.
8302 (the_low_target): Adjust.
8303 (initialize_low_arch): New function.
8304 * linux-sh-low.c (tdesc_sharch): Declare.
8305 (target_regsets): Rename to ...
8306 (sh_regsets): ... this, and make static.
8307 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8308 (sh_regs_info, sh_arch_setup): New functions.
8309 (the_low_target): Adjust.
8310 (initialize_low_arch): New function.
8311 * linux-bfin-low.c (tdesc_bfin): Declare.
8312 (bfin_arch_setup): New function.
8313 (bfin_usrregs_info, regs_info): New globals.
8314 (bfin_regs_info): New function.
8315 (the_low_target): Adjust.
8316 (initialize_low_arch): New function.
8317 * linux-cris-low.c (tdesc_cris): Declare.
8318 (cris_arch_setup): New function.
8319 (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-cris-low.c (tdesc_crisv32): Declare.
8324 (cris_arch_setup): New function.
8325 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8326 (cris_regs_info): New function.
8327 (the_low_target): Adjust.
8328 (initialize_low_arch): New function.
8329 * linux-m32r-low.c (tdesc_m32r): Declare.
8330 (m32r_arch_setup): New function.
8331 (m32r_usrregs_info, regs_info): New globals.
8332 (m32r_regs_info): Adjust.
8333 (initialize_low_arch): New function.
8334 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8335 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8336 (tic6x_usrregs_info): Forward declare.
8337 (tic6x_read_description): New function, based on ...
8338 (tic6x_arch_setup): ... this. Reimplement.
8339 (target_regsets): Rename to ...
8340 (tic6x_regsets): ... this, and make static.
8341 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8342 (tic6x_regs_info): New function.
8343 (the_low_target): Adjust.
8344 (initialize_low_arch): New function.
8345 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8346 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8347 (target_regsets): Rename to ...
8348 (xtensa_regsets): ... this, and make static.
8349 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8350 globals.
8351 (xtensa_arch_setup, xtensa_regs_info): New functions.
8352 (the_low_target): Adjust.
8353 (initialize_low_arch): New function.
8354 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8355 (nios2_arch_setup): Set the current process'es tdesc.
8356 (target_regsets): Rename to ...
8357 (nios2_regsets): ... this.
8358 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8359 (nios2_regs_info): New function.
8360 (the_low_target): Adjust.
8361 (initialize_low_arch): New function.
8362 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8363 (aarch64_arch_setup): Set the current process'es tdesc.
8364 (target_regsets): Rename to ...
8365 (aarch64_regsets): ... this.
8366 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8367 (aarch64_regs_info): New function.
8368 (the_low_target): Adjust.
8369 (initialize_low_arch): New function.
8370 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8371 globals.
8372 (target_regsets): Rename to ...
8373 (tile_regsets): ... this.
8374 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8375 (tile_regs_info): New function.
8376 (tile_arch_setup): Set the current process'es tdesc.
8377 (the_low_target): Adjust.
8378 (initialize_low_arch): New function.
8379 * spu-low.c (tdesc_spu): Declare.
8380 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8381 * win32-arm-low.c (tdesc_arm): Declare.
8382 (arm_arch_setup): New function.
8383 (the_low_target): Install arm_arch_setup instead of
8384 init_registers_arm.
8385 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8386 (init_windows_x86): Rename to ...
8387 (i386_arch_setup): ... this. Set `win32_tdesc'.
8388 (the_low_target): Adjust.
8389 * win32-low.c (win32_tdesc): New global.
8390 (child_add_thread): Don't create the thread cache here.
8391 (do_initial_child_stuff): Set the new process'es tdesc.
8392 * win32-low.h (struct target_desc): Forward declare.
8393 (win32_tdesc): Declare.
8394 * lynx-i386-low.c (tdesc_i386): Declare global.
8395 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8396 * lynx-low.c (lynx_tdesc): New global.
8397 (lynx_add_process): Set the new process'es tdesc.
8398 * lynx-low.h (struct target_desc): Forward declare.
8399 (lynx_tdesc): Declare global.
8400 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8401 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8402 * nto-low.c (nto_tdesc): New global.
8403 (do_attach): Set the new process'es tdesc.
8404 * nto-low.h (struct target_desc): Forward declare.
8405 (nto_tdesc): Declare.
8406 * nto-x86-low.c (tdesc_i386): Declare.
8407 (nto_x86_arch_setup): Set `nto_tdesc'.
8408
8409 2013-06-04 Gary Benson <gbenson@redhat.com>
8410
8411 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8412 to qSupported response when appropriate.
8413 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8414 with nonzero-length annex.
8415 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8416 arguments supplied in annex.
8417
8418 2013-05-31 Doug Evans <dje@google.com>
8419
8420 PR server/15594
8421 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8422 64 bits in 64-cross-32 environment.
8423
8424 2013-05-28 Pedro Alves <palves@redhat.com>
8425
8426 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8427 (aarch64-without-fpu.c): Delete rule.
8428 * configure.srv (aarch64*-*-linux*): Remove references to
8429 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8430 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8431 declaration.
8432
8433 2013-05-24 Pedro Alves <palves@redhat.com>
8434
8435 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8436 instead of strchr/decode_address. Error if the range isn't split
8437 with a ','. Don't assume there's be a ':' in the action.
8438
8439 2013-05-23 Yao Qi <yao@codesourcery.com>
8440 Pedro Alves <palves@redhat.com>
8441
8442 * linux-low.c (lwp_in_step_range): New function.
8443 (linux_wait_1): If the thread was range stepping and stopped
8444 outside the stepping range, report the stop to GDB. Otherwise,
8445 continue stepping. Add range stepping debug output.
8446 (linux_set_resume_request): Copy the step range from the resume
8447 request to the lwp.
8448 (linux_supports_range_stepping): New.
8449 (linux_target_ops) <supports_range_stepping>: Set to
8450 linux_supports_range_stepping.
8451 * linux-low.h (struct linux_target_ops)
8452 <supports_range_stepping>: New field.
8453 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8454 * linux-x86-low.c (x86_supports_range_stepping): New.
8455 (the_low_target) <supports_range_stepping>: Set to
8456 x86_supports_range_stepping.
8457 * server.c (handle_v_cont): Handle 'r' action.
8458 (handle_v_requests): Append ";r" if the target supports range
8459 stepping.
8460 * target.h (struct thread_resume) <step_range_start,
8461 step_range_end>: New fields.
8462 (struct target_ops) <supports_range_stepping>:
8463 New field.
8464 (target_supports_range_stepping): New macro.
8465
8466 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8467
8468 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8469 confusion in comment.
8470
8471 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8472
8473 * lynx-low.c (struct process_info_private): New type.
8474 (lynx_add_process): New function.
8475 (lynx_create_inferior, lynx_attach): Replace calls to
8476 add_process by calls to lynx_add_process.
8477 (lynx_resume): If PTID is null, then try using
8478 current_process()->private->last_wait_event_ptid.
8479 Add comments.
8480 (lynx_clear_inferiors): Delete. The contents of that function
8481 has been inlined in lynx_mourn;
8482 (lynx_wait_1): Save the ptid in the process's private data.
8483 (lynx_mourn): Free the process' private data. Replace call
8484 to lynx_clear_inferiors by call to clear_inferiors.
8485
8486 2013-05-17 Yao Qi <yao@codesourcery.com>
8487
8488 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8489 the right place.
8490
8491 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8492
8493 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8494 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8495 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8496 PT_TEXT_END_ADDR guards. Update comments.
8497 (linux_target_op) <read_offsets>: Conditionally define to
8498 linux_read_offsets if the target is UCLIBC and if it defines
8499 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8500
8501 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8502 Andrew Jenner <andrew@codesourcery.com>
8503
8504 * Makefile.in (SFILES): Add linux-nios2-low.c.
8505 (clean): Add action to delete nios2-linux.c.
8506 (nios2-linux.c): New rule.
8507 * configure.srv: Add nios2*-*-linux*.
8508 * linux-nios2-low.c: New.
8509
8510 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8511
8512 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8513
8514 2013-04-25 Hui Zhu <hui@codesourcery.com>
8515
8516 PR gdb/15186
8517 * ax.c (ax_printf): Add fflush.
8518
8519 2013-04-22 Tom Tromey <tromey@redhat.com>
8520
8521 * Makefile.in (SFILES): Add filestuff.c.
8522 (OBS): Add filestuff.o.
8523 (filestuff.o): New target.
8524 * config.in, configure: Rebuild.
8525 * configure.ac: Check for fdwalk, pipe2.
8526
8527 2013-04-17 Pedro Alves <palves@redhat.com>
8528
8529 * configure.ac (USE_THREAD_DB): Delete variable.
8530 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8531 Don't AC_SUBST USE_THREAD_DB.
8532 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8533 * config.in, configure: Regenerate.
8534
8535 2013-04-16 Pedro Alves <palves@redhat.com>
8536
8537 * linux-low.h (struct lwp_info) <thread_known>: Move under
8538 the USE_THREAD_DB #ifdef.
8539
8540 2013-04-16 Pedro Alves <palves@redhat.com>
8541
8542 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8543 (linux-low.o): Delete rule.
8544 * linux-low.h: Always include "gdb_thread_db.h" instead of
8545 conditionally including thread_db.h.
8546 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8547 HAVE_THREAD_DB_H.
8548
8549 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8550
8551 * Makefile.in (install-only): Fix make install regression.
8552
8553 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8554
8555 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8556 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8557 installation.
8558 * gdbserver.1: Remove.
8559
8560 2013-03-22 Pedro Alves <palves@redhat.com>
8561
8562 * linux-low.c (handle_extended_wait): Don't call
8563 linux_enable_event_reporting.
8564
8565 2013-03-15 Tony Theodore <tonyt@logyst.com>
8566
8567 PR build/9098:
8568 * Makefile.in (SHELL): Use @SHELL@.
8569
8570 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8571
8572 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8573 compiler warning.
8574
8575 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8576
8577 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8578 Remove extraneous NULL element.
8579
8580 2013-03-13 Yao Qi <yao@codesourcery.com>
8581
8582 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8583 'V' block in trace frame.
8584
8585 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8586
8587 * target.h (struct target_ops): Add btrace ops.
8588 (target_supports_btrace): New macro.
8589 (target_enable_btrace): New macro.
8590 (target_disable_btrace): New macro.
8591 (target_read_btrace): New macro.
8592 * gdbthread.h (struct thread_info): Add btrace field.
8593 * server.c: Include btrace-common.h.
8594 (handle_btrace_general_set): New function.
8595 (handle_btrace_enable): New function.
8596 (handle_btrace_disable): New function.
8597 (handle_general_set): Call handle_btrace_general_set.
8598 (handle_qxfer_btrace): New function.
8599 (struct qxfer qxfer_packets[]): Add btrace entry.
8600 * inferiors.c (remove_thread): Disable btrace.
8601 * linux-low: Include linux-btrace.h.
8602 (linux_low_enable_btrace): New function.
8603 (linux_low_read_btrace): New function.
8604 (linux_target_ops): Add btrace ops.
8605 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8606 Add srv_linux_btrace=yes.
8607 (x86_64-*-linux*): Add linux-btrace.o.
8608 Add srv_linux_btrace=yes.
8609 * configure.ac: Define HAVE_LINUX_BTRACE.
8610 * config.in: Regenerated.
8611 * configure: Regenerated.
8612
8613 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8614
8615 * server.c (handle_qxfer): Preserve error message if -3 is
8616 returned.
8617 (qxfer): Document the -3 return value.
8618
8619 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8620
8621 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8622 (linux_btrace_h): New variable.
8623 (linux-btrace.o): New rule.
8624
8625 2013-03-08 Stan Shebs <stan@codesourcery.com>
8626 Hafiz Abid Qadeer <abidh@codesourcery.com>
8627
8628 * tracepoint.c (trace_buffer_size): New global.
8629 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8630 (init_trace_buffer): Change to one-argument function. Allocate
8631 trace buffer memory.
8632 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8633 handle QTBuffer:size packet.
8634 (cmd_bigqtbuffer_size): New function.
8635 (initialize_tracepoint): Call init_trace_buffer with
8636 DEFAULT_TRACE_BUFFER_SIZE.
8637 * server.c (handle_query): Add QTBuffer:size in the
8638 supported packets.
8639
8640 2013-03-07 Yao Qi <yao@codesourcery.com>
8641
8642 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8643 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8644 of -1.
8645 (cmd_qtsp): Adjust condition. Do post increment.
8646 Set cur_action and cur_step_action back to 0.
8647
8648 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8649
8650 PR server/15236
8651 * linux-low.c (linux_write_memory): Return early success if LEN is
8652 zero.
8653
8654 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8655
8656 * configure.srv: Add x86_64-*-cygwin* as target.
8657
8658 2013-02-28 Tom Tromey <tromey@redhat.com>
8659
8660 * configure.ac: Invoke AC_SYS_LARGEFILE.
8661 * configure, config.in: Rebuild.
8662
8663 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8664
8665 * win32-low.c: Throughout, fix format strings and casts of
8666 printf-like functions to avoid type related warnings on all
8667 platforms.
8668 (get_child_debug_event): Print dwDebugEventCode as hex since
8669 that's how it's usually documented.
8670
8671 2013-02-28 Yao Qi <yao@codesourcery.com>
8672
8673 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8674 pulongest.
8675
8676 2013-02-27 Jiong Wang <jiwang@tilera.com>
8677
8678 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8679 (reg-tilegx32.c): New rule.
8680 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8681 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8682 different register info initializer according to elf class.
8683 (init_registers_tilgx32): New function. The tilegx32 register info
8684 initializer.
8685 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8686 (tile_store_gregset): Likewise.
8687
8688 2013-02-27 Yao Qi <yao@codesourcery.com>
8689
8690 * server.c (process_point_options): Print debug message when
8691 debug_threads is true.
8692
8693 2013-02-26 Yao Qi <yao@codesourcery.com>
8694
8695 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8696
8697 2013-02-19 Pedro Alves <palves@redhat.com>
8698 Kai Tietz <ktietz@redhat.com>
8699
8700 PR gdb/15161
8701
8702 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8703 instead of strtoul to extract address from packet.
8704 (process_serial_event) <'z'>: Likewise.
8705
8706 2013-02-18 Yao Qi <yao@codesourcery.com>
8707
8708 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8709
8710 2013-02-14 Pedro Alves <palves@redhat.com>
8711
8712 Plug memory leak.
8713
8714 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8715 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8716
8717 2013-02-14 Pedro Alves <palves@redhat.com>
8718
8719 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8720
8721 2013-02-14 Pedro Alves <palves@redhat.com>
8722
8723 * tracepoint.c (save_string): Delete.
8724 (add_tracepoint_action): Use savestring instead of save_string.
8725
8726 2013-02-12 Pedro Alves <palves@redhat.com>
8727
8728 * linux-xtensa-low.c: Ditto.
8729 * xtensa-xtregs.c: Ditto.
8730
8731 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8732
8733 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8734 thread_db.
8735
8736 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8737
8738 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8739 aarch64_num_wp_regs and aarch64_num_bp_regs to
8740 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8741
8742 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8743
8744 * linux-aarch64-low.c (ps_get_thread_area): Replace
8745 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8746
8747 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8748 Marcus Shawcroft <marcus.shawcroft@arm.com>
8749 Nigel Stephens <nigel.stephens@arm.com>
8750 Yufeng Zhang <yufeng.zhang@arm.com>
8751
8752 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8753 (aarch64.c, aarch64-without-fpu.c): New targets.
8754 * configure.srv (aarch64*-*-linux*): New.
8755 * linux-aarch64-low.c: New file.
8756
8757 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8758
8759 * linux-low.c (handle_extended_wait, linux_create_inferior)
8760 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8761 (dequeue_one_deferred_signal, linux_resume_one_thread)
8762 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8763 (linux_tracefork_grandchild, linux_test_for_tracefork)
8764 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8765 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8766 where the argument is 0.
8767
8768 2013-01-25 Yao Qi <yao@codesourcery.com>
8769
8770 * event-loop.c: Include "queue.h".
8771 (gdb_event_p): New typedef.
8772 (struct gdb_event) <next_event>: Remove.
8773 (event_queue): Change to QUEUE(gdb_event_p).
8774 (async_queue_event): Remove.
8775 (gdb_event_xfree): New.
8776 (initialize_event_loop): New.
8777 (process_event): Use API from QUEUE.
8778 (wait_for_event): Likewise.
8779 * server.c (main): Call initialize_event_loop.
8780 * server.h (initialize_event_loop): Declare.
8781
8782 2013-01-18 Yao Qi <yao@codesourcery.com>
8783
8784 * ax.h (struct eval_agent_expr_context): New.
8785 (gdb_eval_agent_expr): Update declaration.
8786 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8787 TFRAME. Add new argument CTX.
8788 * server.h (struct eval_agent_expr_context): Declare.
8789 (agent_mem_read, agent_tsv_read): Update declaration.
8790 (agent_mem_read_string): Likewise.
8791 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8792 (add_traceframe_block): Add new argument TPOINT.
8793 Increase TPOINT->traceframe_usage.
8794 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8795 eval_tracepoint_agent_expr.
8796 (condition_true_at_tracepoint): Likewise.
8797 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8798 (agent_mem_read_string, agent_tsv_read): Likewise.
8799
8800 2013-01-16 Yao Qi <yao@codesourcery.com>
8801
8802 * linux-low.c (linux_resume_one_lwp): Don't check
8803 'lwp->bp_reinsert != 0'.
8804
8805 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8806 Pedro Alves <palves@redhat.com>
8807
8808 * lynx-low.c (ptrace_request_to_str): Define a temporary
8809 macro and use it to simplify this function's implementation.
8810
8811 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8812
8813 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8814 sets errno.
8815
8816 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8817
8818 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8819
8820 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8821
8822 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8823
8824 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8825
8826 * lynx-low.c (lynx_resume): Use the resume_info parameter
8827 to determine the ptid for the lynx_ptrace call, unless
8828 it is equal to minus_one_ptid, in which case we use the
8829 ptid of the current_inferior.
8830 (lynx_wait_1): After having received a thread create/exit
8831 event, resume the inferior's execution using the signaling
8832 thread's ptid, rather than the old ptid.
8833
8834 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8835
8836 * lynx-low.c (lynx_resume): Delete variable ret.
8837
8838 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8839
8840 * gdbreplay.c (gdbreplay_version): Update copyright year.
8841 * server.c (gdbserver_version): Likewise.
8842
8843 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8844
8845 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8846 new thread.
8847
8848 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8849
8850 * lynx-low.c (ptrace_request_to_str): Add handling for
8851 PTRACE_GETTRACESIG.
8852
8853 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8854
8855 * lynx-low.c (lynx_attach): Delete variable new_process.
8856
8857 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8858
8859 * lynx-low.c (lynx_create_inferior): Delete variable
8860 new_process.
8861
8862 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8863
8864 * lynx-low.c (ptrace_request_to_str): Do not handle
8865 PTRACE_GETTHREADLIST if this macro does not exist.
8866
8867 2012-12-15 Yao Qi <yao@codesourcery.com>
8868
8869 * Makefile.in (OBS): Add notif.o.
8870 * notif.c, notif.h: New.
8871 * server.c: Include "notif.h".
8872 (struct vstop_notif) <next>: Remove.
8873 <base>: New field.
8874 (queue_stop_reply): Update.
8875 (push_event, send_next_stop_reply): Remove.
8876 (discard_queued_stop_replies): Update.
8877 (notif_stop): New variable.
8878 (handle_v_stopped): Remove.
8879 (handle_v_requests): Don't call handle_v_stopped. Call
8880 handle_ack_notif instead.
8881 (queue_stop_reply_callback): Call notif_event_enque instead
8882 of queue_stop_reply.
8883 (handle_status): Don't call send_next_stop_reply, call
8884 notif_write_event instead.
8885 (kill_inferior_callback): Likewise.
8886 (detach_or_kill_inferior_callback): Likewise.
8887 (main): Call initialize_notif.
8888 (process_serial_event): Call QUEUE_is_empty.
8889 (handle_target_event): Call notif_push instead of push event.
8890 * server.h (push_event): Remove declaration.
8891
8892 2012-12-10 Tom Tromey <tromey@redhat.com>
8893
8894 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8895 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8896 macros.
8897 (.c.o): Rewrite.
8898 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8899 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8900 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8901 (amd64-linux-ipa.o, ax.o): Rewrite.
8902 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8903 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8904 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8905 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8906 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8907 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8908 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8909 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8910 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8911 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8912 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8913 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8914 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8915 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8916 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8917 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8918 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8919 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8920 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8921 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8922 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8923 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8924 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8925 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8926 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8927 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8928 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8929 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8930 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8931 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8932 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8933 (reg-tilegx.o): Remove.
8934 (all_object_files): New macro.
8935 Include .deps files.
8936 * aclocal.m4, configure: Rebuild.
8937 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8938 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8939 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8940
8941 2012-12-05 Tom Tromey <tromey@redhat.com>
8942
8943 PR gdb/14917:
8944 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8945
8946 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8947
8948 * configure.ac: Check for linux/perf_event.h.
8949 * config.in: Regenerated.
8950 * configure: Regenerated.
8951
8952 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8953
8954 * hostio.c (handle_readlink): Decrease buffer size
8955 parameter passed to readlink by one byte.
8956
8957 2012-11-26 Yao Qi <yao@codesourcery.com>
8958
8959 * configure.ac (build_warnings): Append '-Wempty-body'.
8960 * configure: Regenerated.
8961 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8962 body.
8963
8964 2012-11-15 Pierre Muller <muller@sourceware.org>
8965
8966 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8967 * config.in: Regenerate.
8968 * configure: Regenerate.
8969 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8970 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8971 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8972 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8973 header.
8974 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8975 instead of <sys/wait.h> header.
8976 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8977
8978 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8979
8980 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8981 (various make rules): Remove -DGDBSERVER
8982
8983 2012-11-09 Yao Qi <yao@codesourcery.com>
8984
8985 * spu-low.c (current_ptid): Move it to ..
8986 * gdbthread.h: ... here. New.
8987 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8988 * server.c (myresume, process_serial_event): Likewise.
8989 * thread-db.c (thread_db_find_new_threads): Likewise.
8990 * tracepoint.c (run_inferior_command): Likewise.
8991
8992 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8993
8994 * server.c (handle_search_memory_1): Include access length in
8995 warning message.
8996
8997 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8998
8999 * linux-crisv32-low.c: Fix compile errors.
9000
9001 2012-09-04 Yao Qi <yao@codesourcery.com>
9002
9003 * tracepoint.c (cmd_qtsv): Adjust debug message.
9004 Don't check CUR_TPOINT.
9005
9006 2012-08-28 Yao Qi <yao@codesourcery.com>
9007
9008 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9009 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9010 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9011 Remove declarations of xmalloc, xreallloc, xstrdup and
9012 freeargv.
9013 * Makefile.in (libiberty_h): New.
9014 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9015 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9016
9017 2012-08-23 Yao Qi <yao@codesourcery.com>
9018
9019 * server.h: Remove declaration of 'xsnprintf'.
9020
9021 2012-08-22 Keith Seitz <keiths@redhat.com>
9022
9023 * server.h: Include build-gnulib-gbserver/config.h.
9024 * gdbreplay.c: Likewise.
9025
9026 2012-08-08 Doug Evans <dje@google.com>
9027
9028 * Makefile.in (SFILES): Add gdb_vecs.c.
9029 (OBS): Add gdb_vecs.o.
9030 (gdb_vecs_h, host_defs_h): New variables.
9031 (thread-db.o): Add $(gdb_vecs_h) dependency.
9032 (gdb_vecs.o): New rule.
9033 * thread-db.c: #include "gdb_vecs.h".
9034 (thread_db_load_search): Use a vector to iterate over path elements.
9035 Handle text appearing after "$pdir".
9036
9037 * configure.ac: Add check for strstr.
9038 * config.in: Regenerate.
9039 * configure: Regenerate.
9040
9041 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9042
9043 * hostio.c (handle_pread): If pread fails, fall back to attempting
9044 lseek/read.
9045 (handle_pwrite): Likewise for pwrite.
9046
9047 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9048
9049 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9050 between unsupported TYPE and unimplementable ADDR/LEN combination.
9051 (arm_insert_point): Act on new return value.
9052
9053 2012-07-31 Pedro Alves <palves@redhat.com>
9054
9055 * server.c (process_point_options): Only skip tokens if we find
9056 one that is unrecognized. Don't treat 'X' specially while
9057 skipping unrecognized tokens.
9058
9059 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9060
9061 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9062 to 4-byte-align HW breakpoint addresses for Thumb.
9063
9064 2012-07-27 Yao Qi <yao@codesourcery.com>
9065
9066 PR remote/14161.
9067
9068 * server.h: Declare gdb_agent_about_to_close.
9069 * target.c (kill_inferior): Include "agent.h".
9070 New. Send command 'kill'.
9071 * target.h (kill_inferior): Removed macro.
9072 * tracepoint.c (gdb_agent_about_to_close): New.
9073 (gdb_agent_helper_thread): Handle command 'close'.
9074 Wait endlessly until the inferior stops.
9075 Install gdb_agent_remove_socket to atexit hook.
9076 (agent_socket_name): New static variable.
9077 (gdb_agent_socket_init): Replace local variable 'name' with
9078 'agent_socket_name'.
9079 (gdb_agent_remove_socket): New.
9080
9081 2012-07-27 Yao Qi <yao@codesourcery.com>
9082
9083 * server.c (process_point_options): Stop at 'X' when parsing.
9084
9085 2012-07-19 Michael Eager <eager@eagercon.com>
9086
9087 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9088 to hw_execute.
9089 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9090 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9091 hardware breakpoint.
9092
9093 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9094
9095 * gdbserver/linux-low.c (initialize_low): Call
9096 linux_ptrace_init_warnings.
9097
9098 2012-07-02 Doug Evans <dje@google.com>
9099
9100 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9101 pointer to int.
9102
9103 2012-07-02 Stan Shebs <stan@codesourcery.com>
9104
9105 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9106 (ax.o): Add it to build rule.
9107 (ax-ipa.o): Ditto.
9108 (OBS): Add format.o.
9109 (IPA_OBS): Add format.o.
9110 * server.c (handle_query): Claim support for breakpoint commands.
9111 (process_point_options): Add command case.
9112 (process_serial_event): Leave running if there are printfs in
9113 effect.
9114 * mem-break.h (any_persistent_commands): Declare.
9115 (add_breakpoint_commands): Declare.
9116 (gdb_no_commands_at_breakpoint): Declare.
9117 (run_breakpoint_commands): Declare.
9118 * mem-break.c (struct point_command_list): New struct.
9119 (struct breakpoint): New field command_list.
9120 (any_persistent_commands): New function.
9121 (add_commands_to_breakpoint): New function.
9122 (add_breakpoint_commands): New function.
9123 (gdb_no_commands_at_breakpoint): New function.
9124 (run_breakpoint_commands): New function.
9125 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9126 locally.
9127 * ax.c: Include format.h.
9128 (ax_printf): New function.
9129 (gdb_eval_agent_expr): Add printf opcode.
9130
9131 2012-06-13 Yao Qi <yao@codesourcery.com>
9132
9133 * server.c (start_inferior): Remove duplicated writes to fields
9134 'last_resume_kind' and 'last_status' of 'current_inferior'.
9135
9136 2012-06-12 Yao Qi <yao@codesourcery.com>
9137 Pedro Alves <palves@redhat.com>
9138
9139 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9140 comment.
9141 * server.c (handle_v_cont): Extend comment.
9142
9143 2012-06-11 Yao Qi <yao@codesourcery.com>
9144
9145 * linux-low.c (linux_attach): Add 'static'.
9146
9147 2012-06-06 Yao Qi <yao@codesourcery.com>
9148
9149 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9150
9151 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9152
9153 Fix gcc -flto compilation warning.
9154 * server.c (main): Make variable multi_mode and attach volatile.
9155
9156 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9157
9158 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9159 if the platform doesn't know about it.
9160
9161 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9162
9163 * Makefile.in (SFILES): Add linux-tile-low.c.
9164 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9165 * configure.srv: Handle tilegx-*-linux*.
9166 * linux-tile-low.c: New file.
9167
9168 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9169
9170 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
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-24 Pedro Alves <palves@redhat.com>
9179
9180 PR gdb/7205
9181
9182 Replace target_signal with gdb_signal throughout.
9183
9184 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9185
9186 * linux-low.c (linux_store_registers): Avoid the copying sequence
9187 when no data has been retrieved by ptrace.
9188
9189 2012-05-22 Will Deacon <will.deacon@arm.com>
9190
9191 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9192 Include asm/ptrace.h.
9193 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9194 already defined.
9195
9196 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9197
9198 * linux-low.c (linux_store_registers): Don't re-retrieve data
9199 with ptrace that has already been obtained from /proc. Always
9200 copy any data retrieved with ptrace to the buffer supplied.
9201
9202 2012-05-11 Yao Qi <yao@codesourcery.com>
9203 Pedro Alves <palves@redhat.com>
9204
9205 * linux-low.c (enum stopping_threads_kind): New.
9206 (stopping_threads): Change type to `enum stopping_threads_kind'.
9207 (handle_extended_wait): If stopping and suspending threads, leave
9208 the new_lwp suspended too.
9209 (linux_wait_for_event): Adjust.
9210 (stop_all_lwps): Set `stopping_threads' to
9211 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9212 whether we're suspending threads or just stopping them. Assert no
9213 recursion happens.
9214
9215 2012-04-29 Yao Qi <yao@codesourcery.com>
9216
9217 * server.h: Move some code to ...
9218 * gdbthread.h: ... here. New.
9219 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9220 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9221 (nto-low.o, win32-low.o): Likewise.
9222 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9223 * regcache.c, remote-utils.c, server.c: Likewise.
9224 * target.c, tracepoint.c, win32-low.c: Likewise.
9225
9226 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9227
9228 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9229 (PTRACE_ARG4_TYPE): Likewise.
9230 (PTRACE_XFER_TYPE): Likewise.
9231 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9232 ptrace to PTRACE_ARG3_TYPE.
9233 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9234 (PTRACE_ARG4_TYPE): Likewise.
9235 (PTRACE_XFER_TYPE): Likewise.
9236 (linux_detach_one_lwp): Cast fourth argument of
9237 ptrace to long then PTRACE_ARG4_TYPE.
9238 (regsets_fetch_inferior_registers): Cast third argument of
9239 ptrace to long then PTRACE_ARG3_TYPE.
9240 (regsets_store_inferior_registers): Likewise.
9241
9242 2012-04-20 Pedro Alves <palves@redhat.com>
9243
9244 * configure: Regenerate.
9245
9246 2012-04-19 Pedro Alves <palves@redhat.com>
9247
9248 * Makefile.in (GNULIB_BUILDDIR): New.
9249 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9250 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9251 (all, install-only, uninstall, clean-info, all-lib, clean): No
9252 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9253 (maintainer-clean realclean distclean): Use subdir_do.
9254 (subdir_do): New.
9255 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9256 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9257 * acinclude.m4: Include acx_configure_dir.m4.
9258 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9259 calls. Call AC_PROG_RANLIB. Configure gnulib using
9260 ACX_CONFIGURE_DIR.
9261 (GNULIB): New.
9262 (GNULIB_STDINT_H): Adjust.
9263 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9264 * gdbreplay.c: Include build-gnulib/config.h.
9265 * server.h: Likewise.
9266 * aclocal.m4: Regenerate.
9267 * config.in: Regenerate.
9268 * configure: Regenerate.
9269
9270 2012-04-19 Pedro Alves <palves@redhat.com>
9271
9272 * Makefile.in (LIBGNU, INCGNU): Adjust.
9273 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9274 (all, install-only, uninstall, clean-info, all-lib, clean)
9275 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9276 * configure.ac: Adjust AC_OUTPUT output.
9277 * aclocal.m4: Regenerate.
9278 * configure: Regenerate.
9279
9280 2012-04-19 Pedro Alves <palves@redhat.com>
9281
9282 * Makefile.in (generated_files): New.
9283 (server_h): Remove the explicit dependency on config.h, and depend
9284 on $generated_files.
9285
9286 2012-04-19 Pedro Alves <palves@redhat.com>
9287
9288 * Makefile.in (INCGNU): Add -Ignulib.
9289
9290 2012-04-19 Pedro Alves <palves@redhat.com>
9291
9292 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9293 (INCGNU): ... this, and spell out -I here.
9294 (GNULIB_LIB): Rename to ...
9295 (LIBGNU): ... this.
9296 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9297
9298 2012-04-19 Pedro Alves <palves@redhat.com>
9299
9300 * config.in: Regenerate.
9301
9302 2012-04-19 Pedro Alves <palves@redhat.com>
9303
9304 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9305 * server.h (memmem): Remove declaration.
9306 * config.in: Regenerate.
9307 * configure: Regenerate.
9308
9309 2012-04-19 Yao Qi <yao@codesourcery.com>
9310
9311 * Makefile.in (SFILES): Add common/vec.c.
9312 (OBS): Add vec.o.
9313 (vec.o): New rule.
9314
9315 2012-04-19 Yao Qi <yao@codesourcery.com>
9316
9317 * remote-utils.c (prepare_resume_reply): Replace with macro
9318 target_core_of_thread.
9319 * server.c (handle_qxfer_threads_proper): Likewise.
9320 * target.h (traget_core_of_thread): New macro.
9321
9322 2012-04-18 Pedro Alves <palves@redhat.com>
9323
9324 * aclocal.m4: Regenerate.
9325 * configure: Regenerate.
9326
9327 2012-04-16 Yao Qi <yao@codesourcery.com>
9328
9329 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9330 duplicated on address.
9331
9332 2012-04-16 Yao Qi <yao@codesourcery.com>
9333
9334 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9335 (struct tracepoint_action_ops) <send>: New field.
9336 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9337 (agent_expr_send, x_tracepoint_action_send): New.
9338 (l_tracepoint_action_send): New.
9339 (cmd_qtdp): Download and install tracepoint
9340 according to `use_agent'.
9341 (run_inferior_command): Add one more parameter `len'.
9342 Update callers.
9343 (tracepoint_send_agent): New.
9344 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9345
9346 2012-04-16 Yao Qi <yao@codesourcery.com>
9347
9348 * tracepoint.c (download_tracepoints): Moved to ...
9349 (cmd_qtstart): ... here.
9350
9351 2012-04-14 Yao Qi <yao@codesourcery.com>
9352
9353 * tracepoint.c: Include inttypes.h.
9354 (struct collect_memory_action): Use sized types.
9355 (struct tracepoint): Likewise.
9356 (cmd_qtdp, stop_tracing): Update print specifiers.
9357 (cmd_qtp, response_tracepoint): Likewise.
9358 (collect_data_at_tracepoint): Likewise.
9359 (collect_data_at_step): Likewise.
9360
9361 2012-04-14 Yao Qi <yao@codesourcery.com>
9362
9363 Import gnulib module inttypes.
9364 * aclocal.m4, config.in, configure: Regenerated.
9365
9366 2012-04-14 Yao Qi <yao@codesourcery.com>
9367
9368 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9369 Makefile and config.status at last.
9370
9371 2012-04-13 Yao Qi <yao@codesourcery.com>
9372
9373 * tracepoint.c: Include stdint.h unconditionally.
9374
9375 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9376
9377 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9378 on BFD_HAVE_SYS_PROCFS_TYPE.
9379 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9380 * configure: Regenerate.
9381 * config.in: Likewise.
9382
9383 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9384
9385 * Makefile.in (clean): Also remove x32.c x32-linux.c
9386 x32-avx.c x32-avx-linux.c.
9387 (x32.o): New target.
9388 (x32.c): Likewise.
9389 (x32-linux.o): Likewise.
9390 (x32-linux.c): Likewise.
9391 (x32-avx.o): Likewise.
9392 (x32-avx.c): Likewise.
9393 (x32-avx-linux.o): Likewise.
9394 (x32-avx-linux.c): Likewise.
9395
9396 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9397 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9398 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9399 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9400 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9401 i386/x32-avx-linux.xml.
9402
9403 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9404 (init_registers_x32_avx_linux): Likwise.
9405 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9406 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9407
9408 2012-04-13 Pedro Alves <palves@redhat.com>
9409
9410 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9411 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9412 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9413 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9414 the sub-make.
9415
9416 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9417
9418 * linux-x86-low.c (compat_x32_clock_t): New.
9419 (compat_x32_siginfo_t): Likewise.
9420 (compat_x32_siginfo_from_siginfo): Likewise.
9421 (siginfo_from_compat_x32_siginfo): Likewise.
9422 (linux_is_elf64): Likewise.
9423 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9424 and siginfo_from_compat_x32_siginfo for x32.
9425 (x86_arch_setup): Set linux_is_elf64.
9426
9427 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9428
9429 PR gdb/13969
9430 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9431 e_machine field.
9432 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9433 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9434 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9435 compatible with process.
9436
9437 2012-04-12 Yao Qi <yao@codesourcery.com>
9438
9439 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9440 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9441 (install-only, install-info, clean): Handle sub dir gnulib.
9442 (all-lib, am--refresh): New targets.
9443 (memmem.o): Remove target.
9444 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9445 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9446 (AC_REPLACE_FUNCS): Remove memmem.
9447 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9448 (AC_OUTPUT): Generate Makefile in gnulib/.
9449 * aclocal.m4, config.in, configure: Regenerated.
9450
9451 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9452
9453 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9454
9455 2012-04-05 Pedro Alves <palves@redhat.com>
9456
9457 -Werror=strict-aliasing
9458
9459 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9460 pointer.
9461
9462 2012-04-04 Pedro Alves <palves@redhat.com>
9463
9464 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9465 (sparc_store_gregset_from_stack, sparc_store_gregset)
9466 (sparc_breakpoint_at): Fix formatting.
9467
9468 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9469
9470 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9471 are available.
9472 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9473 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9474 * config.in: Regenerate.
9475 * configure: Likewise.
9476
9477 2012-03-29 Pedro Alves <palves@redhat.com>
9478
9479 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9480 Correct ptrace arguments.
9481
9482 2012-03-28 Pedro Alves <palves@redhat.com>
9483
9484 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9485 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9486 (IA64_FR1_REGNUM): New defines.
9487 (ia64_fetch_register): New.
9488 (the_low_target): Install it.
9489 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9490 field.
9491 * linux-low.c (linux_fetch_registers): Try the
9492 the_low_target.fetch_register hook first.
9493
9494 * linux-arm-low.c (the_low_target): Adjust.
9495 * linux-bfin-low.c (the_low_target): Adjust.
9496 * linux-cris-low.c (the_low_target): Adjust.
9497 * linux-crisv32-low.c (the_low_target): Adjust.
9498 * linux-m32r-low.c (the_low_target): Adjust.
9499 * linux-m68k-low.c (the_low_target): Adjust.
9500 * linux-mips-low.c (the_low_target): Adjust.
9501 * linux-ppc-low.c (the_low_target): Adjust.
9502 * linux-s390-low.c (the_low_target): Adjust.
9503 * linux-sh-low.c (the_low_target): Adjust.
9504 * linux-sparc-low.c (the_low_target): Adjust.
9505 * linux-tic6x-low.c (the_low_target): Adjust.
9506 * linux-x86-low.c (the_low_target): Adjust.
9507 * linux-xtensa-low.c (the_low_target): Adjust.
9508
9509 2012-03-26 Pedro Alves <palves@redhat.com>
9510
9511 * server.c (handle_qxfer_libraries): Don't bail early if
9512 the_target->qxfer_libraries_svr4 is not NULL.
9513
9514 2012-03-26 Pedro Alves <palves@redhat.com>
9515
9516 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9517
9518 2012-03-23 Pedro Alves <palves@redhat.com>
9519
9520 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9521 "library-list-svr4" element's start tag when the the DSO list is
9522 empty.
9523
9524 2012-03-23 Pedro Alves <palves@redhat.com>
9525
9526 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9527 a variable whose type size is the same as the inferior's pointer
9528 size.
9529
9530 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9531
9532 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9533 struct siginfo.
9534 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9535 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9536 * linux-low.h: Include <signal.h>.
9537 (struct siginfo): Remove forward declaration.
9538 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9539 struct siginfo.
9540
9541 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9542
9543 * .gitignore: Ignore more files.
9544
9545 2012-03-19 Pedro Alves <palves@redhat.com>
9546 Jan Kratochvil <jan.kratochvil@redhat.com>
9547
9548 * server.c (cont_thread, general_thread): Add describing comments.
9549 (start_inferior): Clear `cont_thread'.
9550 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9551 of a process.
9552
9553 2012-03-15 Yao Qi <yao@codesourcery.com>
9554
9555 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9556 handling to ...
9557 (cmd_qtdp): ... here.
9558
9559 2012-03-15 Yao Qi <yao@codesourcery.com>
9560
9561 * tracepoint.c (struct tracepoint_action_ops): New.
9562 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9563 (m_tracepoint_action_download): New.
9564 (r_tracepoint_action_download): New.
9565 (x_tracepoint_action_download): New.
9566 (l_tracepoint_action_download): New.
9567 (add_tracepoint_action): Install `action->ops' according type.
9568 (download_tracepoint_1): Move code `download' function pointer
9569 of various tracepoint_action_ops.
9570
9571 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9572
9573 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9574 linux_ptrace_attach_warnings.
9575
9576 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9577
9578 * Makefile.in (linux-ptrace.o): New.
9579 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9580 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9581 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9582 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9583 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9584 of these targets.
9585 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9586
9587 2012-03-08 Yao Qi <yao@codesourcery.com>
9588 Pedro Alves <palves@redhat.com>
9589
9590 Fix PR server/13392.
9591 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9592 offset of JMP insn.
9593 * tracepoint.c (remove_tracepoint): New.
9594 (cmd_qtdp): Call remove_tracepoint when failed to install.
9595
9596 2012-03-07 Pedro Alves <palves@redhat.com>
9597
9598 * linux-low.c (get_detach_signal): New.
9599 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9600 Pass on pending signals to PTRACE_DETACH. Check the result of the
9601 ptrace call.
9602 * server.c (program_signals, program_signals_p): New.
9603 (handle_general_set): Handle QProgramSignals.
9604 * server.h (program_signals, program_signals_p): Declare.
9605
9606 2012-03-05 Pedro Alves <palves@redhat.com>
9607 Jan Kratochvil <jan.kratochvil@redhat.com>
9608
9609 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9610 New comment why.
9611
9612 2012-03-03 Yao Qi <yao@codesourcery.com>
9613
9614 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9615 agent_look_up_symbols.
9616
9617 2012-03-03 Yao Qi <yao@codesourcery.com>
9618
9619 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9620 (linux-x86-low.o): Likewise.
9621 * server.h: Remove in_process_agent_loaded.
9622 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9623 common/agent.c.
9624 Update callers.
9625
9626 2012-03-03 Yao Qi <yao@codesourcery.com>
9627
9628 * tracepoint.c (gdb_agent_capability): New global.
9629 (in_process_agent_loaded_ust): Renamed to
9630 `in_process_agent_supports_ust'.
9631 Update callers.
9632 (in_process_agent_supports_ust): Call agent_capability_check.
9633 (clear_installed_tracepoints): Assert that agent supports
9634 agent.
9635
9636 2012-03-03 Yao Qi <yao@codesourcery.com>
9637
9638 * linux-low.c (linux_supports_agent): New.
9639 (linux_target_ops): Initialize field `supports_agent' with
9640 linux_supports_agent.
9641 * target.h (struct target_ops) <supports_agent>: New.
9642 (target_supports_agent): New macro.
9643 * server.c (handle_general_set): Handle packet 'QAgent'.
9644 (handle_query): Send `QAgent+'.
9645 * Makefile.in (server.o): Depends on agent.h.
9646
9647 2012-03-03 Yao Qi <yao@codesourcery.com>
9648
9649 * Makefile.in (OBS): Add agent.o.
9650 Add new rule for agent.o.
9651 Track dependence of tracepoint.c on agent.h.
9652 * tracepoint.c (run_inferior_command_1):
9653 (run_inferior_command): Call agent_run_command.
9654 (gdb_ust_connect_sync_socket): Deleted. Move it to
9655 common/agent.c.
9656 (resume_thread, stop_thread): Likewise.
9657 (gdb_ust_socket_init): Renamed to ...
9658 (gdb_agent_socket_init): ... New.
9659 (gdb_ust_thread): Renamed to ...
9660 (gdb_agent_helper_thread): ... New.
9661 (gdb_ust_init): Move some code to ...
9662 (gdb_agent_init): ... here. New.
9663 [HAVE_UST]: Call gdb_ust_init.
9664 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9665 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9666 * config.in, configure: Regenerated.
9667
9668 2012-03-02 Pedro Alves <palves@redhat.com>
9669
9670 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9671 * linux-low.c (struct simple_pid_list): New.
9672 (stopped_pids): New a struct simple_pid_list pointer.
9673 (add_to_pid_list, pull_pid_from_list): New.
9674 (handle_extended_wait): Don't assume the first signal new children
9675 report is SIGSTOP. Adjust call to pull_pid_from_list.
9676 (linux_wait_for_lwp): Adjust.
9677
9678 2012-03-02 Yao Qi <yao@codesourcery.com>
9679
9680 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9681 debug log.
9682
9683 2012-03-02 Yao Qi <yao@codesourcery.com>
9684
9685 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9686 `stop_pc' and `tpoint'. Update caller.
9687
9688 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9689
9690 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9691 * linux-low.c (use_linux_regsets): New macro.
9692 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9693 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9694 (linux_register_in_regsets): New function.
9695 (usr_fetch_inferior_registers): Skip registers covered by
9696 regsets.
9697 (usr_store_inferior_registers): Likewise.
9698 (usr_fetch_inferior_registers): New macro.
9699 (usr_store_inferior_registers): Likewise.
9700 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9701 (linux_store_registers): Likewise.
9702 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9703 prototype.
9704 (init_registers_mips64_dsp_linux): Likewise.
9705 (init_registers_mips_linux): New macro.
9706 (init_registers_mips_dsp_linux): Likewise.
9707 (mips_dsp_num_regs): Likewise.
9708 (DSP_BASE, DSP_CONTROL): New fallback macros.
9709 (mips_base_regs): New macro.
9710 (mips_regmap): Use it. Fix the size.
9711 (mips_dsp_regmap): New variable.
9712 (mips_dsp_regset_bitmap): Likewise.
9713 (mips_arch_setup): New function.
9714 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9715 than mips_regmap.
9716 (mips_cannot_store_register): Likewise.
9717 (the_low_target): Update .arch_setup, .num_regs and .regmap
9718 initializers. Add .regset_bitmap initializer.
9719 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9720 initializer.
9721 * linux-bfin-low.c (the_low_target): Likewise.
9722 * linux-cris-low.c (the_low_target): Likewise.
9723 * linux-crisv32-low.c (the_low_target): Likewise.
9724 * linux-ia64-low.c (the_low_target): Likewise.
9725 * linux-m32r-low.c (the_low_target): Likewise.
9726 * linux-m68k-low.c (the_low_target): Likewise.
9727 * linux-ppc-low.c (the_low_target): Likewise.
9728 * linux-s390-low.c (the_low_target): Likewise.
9729 * linux-sh-low.c (the_low_target): Likewise.
9730 * linux-sparc-low.c (the_low_target): Likewise.
9731 * linux-tic6x-low.c (the_low_target): Likewise.
9732 * linux-x86-low.c (the_low_target): Likewise.
9733 * linux-xtensa-low.c (the_low_target): Likewise.
9734 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9735 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9736 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9737 srv_xmlfiles.
9738 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9739 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9740
9741 2012-02-29 Yao Qi <yao@codesourcery.com>
9742 Pedro Alves <palves@redhat.com>
9743
9744 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9745 `step_over_finished' is true.
9746
9747 2012-02-27 Pedro Alves <palves@redhat.com>
9748
9749 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9750 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9751
9752 2012-02-27 Pedro Alves <palves@redhat.com>
9753
9754 PR server/9684
9755 * linux-low.c (pid_is_stopped): New.
9756 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9757
9758 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9759
9760 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9761 of conditions.
9762
9763 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9764
9765 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9766
9767 2012-02-24 Luis Machado <lgustavo@codesourcery>
9768
9769 * server.c (handle_query): Advertise support for target-side
9770 breakpoint condition evaluation.
9771 (process_point_options): New function.
9772 (process_serial_event): When inserting a breakpoint, check for
9773 a target-side condition that should be evaluated.
9774
9775 * mem-break.c: Include regcache.h and ax.h.
9776 (point_cond_list_t): New data structure.
9777 (breakpoint) <cond_list>: New field.
9778 (find_gdb_breakpoint_at): Make non-static.
9779 (delete_gdb_breakpoint_at): Clear any target-side
9780 conditions.
9781 (clear_gdb_breakpoint_conditions): New function.
9782 (add_condition_to_breakpoint): Likewise.
9783 (add_breakpoint_condition): Likewise.
9784 (gdb_condition_true_at_breakpoint): Likewise.
9785 (gdb_breakpoint_here): Return result directly instead
9786 of going through a local variable.
9787
9788 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9789 (clear_gdb_breakpoint_conditions): Likewise.
9790 (add_breakpoint_condition): Likewise.
9791 (gdb_condition_true_at_breakpoint): Likewise.
9792
9793 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9794 (need_step_over_p): Take target-side breakpoint condition into
9795 consideration.
9796
9797 2012-02-24 Luis Machado <lgustavo@codesourcery>
9798
9799 * server.h: Include tracepoint.h.
9800 (agent_mem_read, agent_get_trace_state_variable_value,
9801 agent_set_trace_state_variable_value,
9802 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9803 get_set_tsv_func_addr): New prototypes.
9804
9805 * ax.h: New include file.
9806 * ax.c: New source file.
9807
9808 * tracepoint.c: Include ax.h.
9809 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9810 agent_expr, eval_result_type): Move to ax.h.
9811 (parse_agent_expr): Rename to ...
9812 (gdb_parse_agent_expr): ... this, make it non-static and move
9813 to ax.h.
9814 (unparse_agent_expr) Rename to ...
9815 (gdb_unparse_agent_expr): ... this, make it non-static and move
9816 to ax.h.
9817 (eval_agent_expr): Rename to ...
9818 (eval_tracepoint_agent_expr): ... this.
9819 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9820 forward declarations.
9821 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9822 (agent_get_trace_state_variable_value): New function.
9823 (agent_set_trace_state_variable_value): New function.
9824 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9825 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9826 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9827 (condition_true_at_tracepoint): Likewise.
9828 (parse_agent_expr): Rename to ...
9829 (gdb_parse_agent_expr): ... this and move to ax.c.
9830 (unparse_agent_expr): Rename to ...
9831 (gdb_unparse_agent_expr): ... this and move to ax.c.
9832 (gdb_agent_op_name): Move to ax.c.
9833 (eval_agent_expr): Rename to ...
9834 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9835 and move to ax.c.
9836 (eval_tracepoint_agent_expr): New function.
9837 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9838 non-static.
9839 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9840 ax.c.
9841 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9842 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9843 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9844 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9845 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9846 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9847 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9848 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9849 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9850 (compile_bytecodes): Remove forward declaration.
9851 (is_goto_target): Move to ax.c.
9852 (compile_bytecodes): Move to ax.c and call
9853 agent_get_trace_state_variable_value (...) and
9854 agent_set_trace_state_variable_value (...).
9855
9856 * Makefile.in: Update ax.c and IPA dependencies.
9857
9858 2012-02-24 Pedro Alves <palves@redhat.com>
9859
9860 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9861 (cmd_bigqtbuffer_circular): ... this. Only handle
9862 'QTBuffer:circular:'.
9863 (handle_tracepoint_general_set): Adjust.
9864
9865 2012-02-16 Yao Qi <yao@codesourcery.com>
9866
9867 * inferiors.c: Move code to ...
9868 * dll.c: .... here. New.
9869 * server.h: Declare clear_dlls.
9870 * Makefile.in (SFILES): Add dll.c.
9871 (OBS): Add dll.o
9872 (dll.o): New rule.
9873
9874 2012-02-11 Yao Qi <yao@codesourcery.com>
9875
9876 * server.c: (handle_monitor_command): Add a new parameter
9877 `own_buf'.
9878 (handle_query): Update caller.
9879
9880 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9881
9882 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9883 * configure, config.in: Regenerate.
9884 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9885 is not defined.
9886
9887 2012-02-02 Pedro Alves <palves@redhat.com>
9888
9889 Try SIGKILL first, then PTRACE_KILL.
9890 * linux-low.c (linux_kill_one_lwp): New.
9891 (linux_kill_one_lwp): Rename to ...
9892 (kill_one_lwp_callback): ... this. Use the new
9893 linux_kill_one_lwp.
9894
9895 2012-02-02 Pedro Alves <palves@redhat.com>
9896
9897 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9898 inferior.
9899
9900 2012-01-27 Pedro Alves <palves@redhat.com>
9901
9902 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9903 (elf_64_file_p): Make static.
9904 (linux_pid_exe_is_elf_64_file): New.
9905 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9906 Delete declarations.
9907 (linux_pid_exe_is_elf_64_file): Declare.
9908 * linux-x86-low.c (x86_arch_setup): Use
9909 linux_pid_exe_is_elf_64_file.
9910
9911 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9912
9913 * linux-low.c (linux_wait_for_event_1): Rename to ...
9914 (linux_wait_for_event): ... here and merge it with former
9915 linux_wait_for_event - new variable wait_ptid, use it.
9916 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9917
9918 2012-01-23 Pedro Alves <palves@redhat.com>
9919
9920 * server.c (main): Avoid yet another case of infinite loop while
9921 detaching/killing after a longjmp.
9922
9923 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9924
9925 Code cleanup.
9926 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9927
9928 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9929
9930 * hostio.c (handle_readlink): New function.
9931 (handle_vFile): Call it to handle "vFile:readlink" packets.
9932
9933 2012-01-20 Pedro Alves <palves@redhat.com>
9934 Ulrich Weigand <ulrich.weigand@linaro.org>
9935
9936 * server.c (handle_v_requests): Only support vAttach and vRun to
9937 start multiple processes when in extended protocol mode.
9938
9939 2012-01-17 Pedro Alves <palves@redhat.com>
9940
9941 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9942 memalign plus mprotect to allocate the scratch buffer.
9943
9944 2012-01-13 Pedro Alves <palves@redhat.com>
9945
9946 * server.c (attach_inferior): Clear `cont_thread'.
9947
9948 2012-01-13 Pedro Alves <palves@redhat.com>
9949
9950 * server.c (main): Avoid infinite loop while detaching/killing
9951 after a longjmp.
9952
9953 2012-01-09 Doug Evans <dje@google.com>
9954
9955 * server.c (start_inferior): Set last_ptid in --wrapper case.
9956
9957 2012-01-06 Yao Qi <yao@codesourcery.com>
9958
9959 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9960 defined.
9961 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9962
9963 2012-01-04 Yao Qi <yao@codesourcery.com>
9964
9965 * tracepoint.c (cmd_qtdp): Print debug message
9966 for static tracepoint.
9967
9968 2012-01-04 Yao Qi <yao@codesourcery.com>
9969
9970 * tracepoint.c (trace_vdebug): Differentiate debug message
9971 between gdbserver and IPA.
9972
9973 2012-01-03 Yao Qi <yao@codesourcery.com>
9974
9975 * tracepoint.c (tracepoint_was_hit): Don't collect for
9976 static tracepoint.
9977
9978 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9979
9980 * terminal.h: Reformat copyright header.
9981
9982 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9983
9984 * server.c (gdbserver_version): Update copyright year.
9985 * gdbreplay.c (gdbreplay_version): Likewise.
9986
9987 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9988
9989 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9990
9991 Revert:
9992 2011-12-18 Hui Zhu <teawater@gmail.com>
9993 * linux-low.c (linux_create_inferior): Save return value to ret.
9994
9995 2011-12-18 Hui Zhu <teawater@gmail.com>
9996
9997 * linux-low.c (linux_create_inferior): Save return value to ret.
9998
9999 2011-12-16 Doug Evans <dje@google.com>
10000
10001 * linux-low.c (linux_create_inferior): If stdio connection,
10002 redirect stdin from /dev/null, stdout to stderr.
10003 * remote-utils.c (remote_is_stdio): New static global.
10004 (remote_connection_is_stdio): New function.
10005 (remote_prepare): Handle stdio connection.
10006 (remote_open): Ditto.
10007 (remote_close): Don't close stdin for stdio connections.
10008 (read_prim,write_prim): New functions. Replace all calls to
10009 read/write to these.
10010 * server.c (main): Watch for "-" argument. Move call to
10011 remote_prepare before start_inferior.
10012 * server.h (STDIO_CONNECTION_NAME): New macro.
10013 (remote_connection_is_stdio): Declare.
10014
10015 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10016 in debugging output.
10017
10018 2011-12-15 Yao Qi <yao@codesourcery.com>
10019
10020 * tracepoint.c: Include sys/syscall.h.
10021 (gdb_ust_thread): Remove preprocessor conditional.
10022
10023 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10024
10025 * linux-low.c (linux_detach_one_lwp): Call
10026 the_low_target.prepare_to_resume before detaching.
10027
10028 2011-12-14 Yao Qi <yao@codesourcery.com>
10029
10030 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10031 of write.
10032
10033 2011-12-14 Yao Qi <yao@codesourcery.com>
10034
10035 * i386-low.c (i386_low_stopped_data_address): Initialize local
10036 variable `control'.
10037
10038 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10039
10040 PR remote/13492
10041
10042 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10043 DR_CONTROL unless necessary. Extend comments.
10044 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10045 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10046
10047 2011-12-13 Yao Qi <yao@codesourcery.com>
10048
10049 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10050 macros.
10051 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10052
10053 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10054
10055 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10056 Print new debug message for such case.
10057
10058 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10059
10060 Fix overlapping memcpy.
10061 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10062 the read_inferior_memory transfer.
10063 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10064 write_inferior_memory transfer.
10065 (set_fast_tracepoint_jump): New variable buf. Use it for the
10066 read_inferior_memory and write_inferior_memory transfers.
10067 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10068 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10069 Use it for the write_inferior_memory transfer.
10070 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10071 buffers.
10072
10073 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10074
10075 * linux-low.c (fetch_register, store_register): Make code
10076 consistent, fix formatting.
10077
10078 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10079
10080 * linux-low.c (usr_store_inferior_registers): Factor out code
10081 to handle individual registers into...
10082 (store_register): ... this new function.
10083
10084 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10085
10086 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10087 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10088 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10089 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10090 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10091 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10092 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10093 (srv_xmlfiles): Add new XML files.
10094
10095 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10096 and <sys/uio.h>.
10097 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10098 (init_registers_s390_linux32v1): Add prototype.
10099 (init_registers_s390_linux32v2): Likewise.
10100 (init_registers_s390_linux64v1): Likewise.
10101 (init_registers_s390_linux64v2): Likewise.
10102 (init_registers_s390x_linux64v1): Likewise.
10103 (init_registers_s390x_linux64v2): Likewise.
10104 (s390_num_regs): Increment to 52.
10105 (s390_regmap): Add orig_r2 register.
10106 (s390_num_regs_3264): Increment to 68.
10107 (s390_regmap_3264): Add orig_r2 register.
10108 (s390_collect_ptrace_register): Handle orig_r2 register.
10109 (s390_supply_ptrace_register): Likewise.
10110 (s390_fill_last_break): New function.
10111 (s390_store_last_break): Likewise.
10112 (s390_fill_system_call): New function.
10113 (s390_store_system_call): Likewise.
10114 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10115 register sets.
10116 (s390_check_regset): New function.
10117 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10118 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10119 Update target_regsets for available register sets.
10120
10121 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10122 Jan Kratochvil <jan.kratochvil@redhat.com>
10123
10124 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10125 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10126 New.
10127 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10128 * linux-low.h (struct process_info_private): New member r_debug.
10129 * server.c (handle_qxfer_libraries): Call
10130 the_target->qxfer_libraries_svr4.
10131 (handle_qxfer_libraries_svr4): New function.
10132 (qxfer_packets): New entry "libraries-svr4".
10133 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10134 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10135 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10136 PACKET_qXfer_libraries_svr4.
10137
10138 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10139
10140 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10141 PSW address/mask between 8-byte and 16-byte formats.
10142 (s390_supply_ptrace_register): Likewise.
10143 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10144 basic addressing mode bit.
10145
10146 2011-11-24 Stan Shebs <stan@codesourcery.com>
10147
10148 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10149
10150 2011-11-17 Stan Shebs <stan@codesourcery.com>
10151
10152 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10153 (tracing_start_time): New global.
10154 (tracing_stop_time): New global.
10155 (tracing_user_name): New global.
10156 (tracing_notes): New global.
10157 (tracing_stop_note): New global.
10158 (cmd_qtstart): Set traceframe_usage, start_time.
10159 (stop_tracing): Set stop_time.
10160 (cmd_qtstatus): Report additional status.
10161 (cmd_qtp): New function.
10162 (handle_tracepoint_query): Call it.
10163 (cmd_qtnotes): New function.
10164 (handle_tracepoint_general_set): Call it.
10165 (get_timestamp): Rename from tsv_get_timestamp.
10166
10167 2011-11-14 Stan Shebs <stan@codesourcery.com>
10168 Kwok Cheung Yeung <kcy@codesourcery.com>
10169
10170 * linux-x86-low.c (small_jump_insn): New.
10171 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10172 trampoline and error message, build a trampoline and issue a small
10173 jump instruction to it.
10174 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10175 trampoline and error message.
10176 (x86_get_min_fast_tracepoint_insn_len): New.
10177 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10178 * linux-low.h (struct linux_target_ops): Add arguments to
10179 install_fast_tracepoint_jump_pad operation, add new operation.
10180 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10181 arguments.
10182 (linux_get_min_fast_tracepoint_insn_len): New function.
10183 (linux_target_op): Add new operation.
10184 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10185 (gdb_trampoline_buffer_end): Ditto.
10186 (gdb_trampoline_buffer_error): Ditto.
10187 (struct ipa_sym_addresses): Add fields for new IPA variables.
10188 (symbol_list): Add entries for new IPA variables.
10189 (struct tracepoint): Add fields to hold the address range of the
10190 trampoline used by the tracepoint.
10191 (trampoline_buffer_head): New static variable.
10192 (trampoline_buffer_tail): Ditto.
10193 (claim_trampoline_space): New function.
10194 (have_fast_tracepoint_trampoline_buffer): New function.
10195 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10196 structure.
10197 (install_fast_tracepoint): Ditto, also add error buffer argument.
10198 (cmd_qtminftpilen): New function.
10199 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10200 (fast_tracepoint_from_trampoline_address): New function.
10201 (fast_tracepoint_collecting): Handle trampoline as part of jump
10202 pad space.
10203 (set_trampoline_buffer_space): New function.
10204 (initialize_tracepoint): Initialize new IPA variables.
10205 * target.h (struct target_ops): Add arguments to
10206 install_fast_tracepoint_jump_pad operation, add new
10207 get_min_fast_tracepoint_insn_len operation.
10208 (target_get_min_fast_tracepoint_insn_len): New.
10209 (install_fast_tracepoint_jump_pad): Add arguments.
10210 * server.h (IPA_BUFSIZ): Define.
10211 * linux-i386-ipa.c: Include extra header files.
10212 (initialize_fast_tracepoint_trampoline_buffer): New function.
10213 (initialize_low_tracepoint): Call it.
10214 * server.h (set_trampoline_buffer_space): Declare.
10215 (claim_trampoline_space): Ditto.
10216 (have_fast_tracepoint_trampoline_buffer): Ditto.
10217
10218 2011-11-14 Yao Qi <yao@codesourcery.com>
10219
10220 * server.c (handle_query): Handle InstallInTrace for qSupported.
10221 * tracepoint.c (add_tracepoint): Sort list.
10222 (install_tracepoint, download_tracepoint): New.
10223 (cmd_qtdp): Call them to install and download tracepoints.
10224 (sort_tracepoints): Removed.
10225 (cmd_qtstart): Update.
10226
10227 2011-11-14 Yao Qi <yao@codesourcery.com>
10228
10229 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10230 * mem-break.h: Declare.
10231 * tracepoint.c (cmd_qtstart): Move some code to ...
10232 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10233 New.
10234 (download_tracepoints): Move some code to ...
10235 (download_tracepoint_1): ... here. New.
10236
10237 2011-11-08 Yao Qi <yao@codesourcery.com>
10238
10239 * remote-utils.c (relocate_instruction): A comment fix.
10240
10241 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10242
10243 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10244 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10245 dr_status_mirror and dr_control_mirror from debug_reg_state.
10246 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10247 (i386_initial_stuff): Remove use of deleted globals.
10248 (i386_get_thread_context, i386_set_thread_context,
10249 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10250 from debug_reg_state.
10251
10252 2011-11-05 Yao Qi <yao@codesourcery.com>
10253
10254 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10255 address as TPOINT's.
10256
10257 2011-11-02 Stan Shebs <stan@codesourcery.com>
10258
10259 * tracepoint.c (agent_mem_read_string): New function.
10260 (eval_agent_expr): Call it for tracenz.
10261 * server.c (handle_query): Report support for tracenz.
10262
10263 2011-11-02 Yao Qi <yao@codesourcery.com>
10264
10265 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10266
10267 2011-11-02 Yao Qi <yao@codesourcery.com>
10268
10269 * target.h: Fix a typo in comment.
10270
10271 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10272
10273 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10274 clobber the breakpoints' shadows with fast tracepoint jumps.
10275 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10276 * target.c (write_inferior_memory): Also pass MYADDR down to
10277 check_mem_write.
10278
10279 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10280
10281 * configure.ac: Check support for personality routine.
10282 * configure: Regenerate.
10283 * config.in: Likewise.
10284 * linux-low.c: Include <sys/personality.h>.
10285 Define ADDR_NO_RANDOMIZE if necessary.
10286 (linux_create_inferior): Disable address space randomization when
10287 forking inferior, if requested.
10288 (linux_supports_disable_randomization): New function.
10289 (linux_target_ops): Install it.
10290 * server.h (disable_randomization): Declare.
10291 * server.c (disable_randomization): New global variable.
10292 (handle_general_set): Handle QDisableRandomization.
10293 (handle_query): Likewise for qSupported.
10294 (main): Support --disable-randomization and --no-disable-randomization
10295 command line arguments.
10296 * target.h (struct target_ops): Add supports_disable_randomization.
10297 (target_supports_disable_randomization): New macro.
10298
10299 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10300
10301 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10302 ifdef check.
10303 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10304 [!PT_GETDSBT] (target_loadmap): New definition.
10305 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10306 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10307 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10308 and PT_GETDSBT to LINUX_LOADMAP.
10309 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10310 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10311
10312 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10313
10314 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10315 (arm_linux_hwbp_cap): New static variable.
10316 (arm_linux_get_hwbp_cap): Replace by ...
10317 (arm_linux_init_hwbp_cap): ... this new function.
10318 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10319 (arm_linux_get_hw_watchpoint_count): Likewise.
10320 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10321 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10322 (arm_prepare_to_resume): Use perror_with_name instead of error.
10323
10324 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10325
10326 * linux-arm-low.c: Include <signal.h>.
10327 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10328 (struct arm_linux_hwbp_cap): New data type.
10329 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10330 (struct arm_linux_hw_breakpoint): New data type.
10331 (MAX_BPTS, MAX_WPTS): Define.
10332 (struct arch_process_info, struct arch_lwp_info): New data types.
10333 (arm_linux_get_hwbp_cap): New function.
10334 (arm_linux_get_hw_breakpoint_count): Likewise.
10335 (arm_linux_get_hw_watchpoint_count): Likewise.
10336 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10337 (arm_hwbp_control_initialize): Likewise.
10338 (arm_hwbp_control_is_enabled): Likewise.
10339 (arm_hwbp_control_is_initialized): Likewise.
10340 (arm_hwbp_control_disable): Likewise.
10341 (arm_linux_hw_breakpoint_equal): Likewise.
10342 (arm_linux_hw_point_initialize): Likewise.
10343 (struct update_registers_data): New data structure.
10344 (update_registers_callback: New function.
10345 (arm_insert_point): Likewise.
10346 (arm_remove_point): Likewise.
10347 (arm_stopped_by_watchpoint): Likewise.
10348 (arm_stopped_data_address): Likewise.
10349 (arm_new_process): Likewise.
10350 (arm_new_thread): Likewise.
10351 (arm_prepare_to_resume): Likewise.
10352 (the_low_target): Register arm_insert_point, arm_remove_point,
10353 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10354 arm_new_thread, and arm_prepare_to_resume.
10355
10356 2011-09-15 Stan Shebs <stan@codesourcery.com>
10357
10358 * server.h (struct emit_ops): Add compare-goto fields.
10359 * tracepoint.c (gdb_agent_op_sizes): New table.
10360 (emit_eq_goto): New function.
10361 (emit_ne_goto): New function.
10362 (emit_lt_goto): New function.
10363 (emit_le_goto): New function.
10364 (emit_gt_goto): New function.
10365 (emit_ge_goto): New function.
10366 (is_goto_target): New function.
10367 (compile_bytecodes): Recognize special cases of compare-goto
10368 combinations and call specialized emitters for them.
10369 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10370 (amd64_emit_ne_goto): New function.
10371 (amd64_emit_lt_goto): New function.
10372 (amd64_emit_le_goto): New function.
10373 (amd64_emit_gt_goto): New function.
10374 (amd64_emit_ge_goto): New function.
10375 (amd64_emit_ops): Add the new functions.
10376 (i386_emit_eq_goto): New function.
10377 (i386_emit_ne_goto): New function.
10378 (i386_emit_lt_goto): New function.
10379 (i386_emit_le_goto): New function.
10380 (i386_emit_gt_goto): New function.
10381 (i386_emit_ge_goto): New function.
10382 (i386_emit_ops): Add the new functions.
10383
10384 2011-09-08 Stan Shebs <stan@codesourcery.com>
10385
10386 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10387 (i386_emit_epilogue): Restore %ebx.
10388
10389 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10390
10391 * server.c (step_thread): Remove definition.
10392 (process_serial_event): Don't handle Hs.
10393 * server.h (step_thread): Remove declaration.
10394 * target.c (set_desired_inferior): Remove use of step_thread.
10395
10396 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10397
10398 * linux-low.c: Include linux-procfs.h.
10399 (linux_attach_lwp_1): Update comments.
10400 (linux_attach): Scan for existing threads when attaching to a
10401 process that is the tgid.
10402 * Makefile.in: Update dependencies.
10403
10404 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10405
10406 * configure.srv: Add linux-procfs.o dependencies.
10407
10408 2011-08-14 Yao Qi <yao@codesourcery.com>
10409
10410 * target.h (struct target_ops): Fix indent.
10411 * win32-low.c (win32_target_ops): Fix comment.
10412
10413 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10414 Yao Qi <yao@codesourcery.com>
10415
10416 * Makefile.in (clean): Remove tic6x-*.c files.
10417 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10418 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10419 (tic6x-c64xp-linux.c): Likewise.
10420 * configure.srv: Add support for tic6x-*-uclinux.
10421 * linux-tic6x-low.c: New.
10422 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10423
10424 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10425 Yao Qi <yao@codesourcery.com>
10426
10427 * target.h (struct target_ops): Add read_loadmap.
10428 * linux-low.c (struct target_loadseg): New type.
10429 (struct target_loadmap): New type.
10430 (linux_read_loadmap): New function.
10431 (linux_target_ops): Add linux_read_loadmap.
10432 * server.c (handle_query): Support qXfer:fdpic:read packet.
10433 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10434 to NULL.
10435
10436 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10437
10438 * win32-low.c: Include <stdint.h>.
10439
10440 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10441
10442 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10443 to the inferior here.
10444 (i386_remove_aligned_watchpoint): Ditto.
10445 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10446 fit part of the watchpoint in the debug registers.
10447 (i386_update_inferior_debug_regs): New.
10448 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10449 registers, and only update the inferior on success.
10450 (i386_low_remove_watchpoint): Ditto.
10451
10452 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10453
10454 * linux-low.c (compare_ints, unique, list_threads, show_process,
10455 linux_core_of_thread): Delete.
10456 (linux_target_ops): Change linux_core_of_thread to
10457 linux_common_core_of_thread.
10458 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10459 * utils.c (malloc_failure): Change type of argument.
10460 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10461 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10462 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10463 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10464 (IPA_OBJS): Add common-utils-ipa.o.
10465 (ptid_h, linux_osdata_h): New macros.
10466 (server_h): Add common/common-utils.h, common/xml-utils.h,
10467 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10468 common/ptid.h.
10469 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10470 ptid.o, buffer.o): New rules.
10471 (linux-low.o): Add common/linux-osdata.h as a dependency.
10472 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10473 * configure.ac: Add AC_HEADER_DIRENT check.
10474 * config.in: Regenerate.
10475 * configure: Regenerate.
10476 * remote-utils.c (xml_escape_text): Delete.
10477 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10478 buffer_xml_printf): Move to common/buffer.c.
10479 * server.c (main): Remove call to initialize_inferiors.
10480 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10481 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10482 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10483 internal_error, gdb_assert, gdb_assert_fail): Delete.
10484 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10485 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10486 common/buffer.h.
10487 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10488 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10489 initialize_inferiors): Delete.
10490
10491 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10492
10493 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10494 symbol error.
10495
10496 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10497
10498 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10499 assertion.
10500 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10501
10502 2011-05-26 Yao Qi <yao@codesourcery.com>
10503
10504 * Makefile.in (thread-db.o): Track dependence to
10505 common/gdb_thread_db.h.
10506 * thread-db.c: include gdb_thread_db.h from right place.
10507
10508 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10509
10510 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10511 __FILE__ and __LINE__ to internal_error.
10512
10513 2011-05-13 Doug Evans <dje@google.com>
10514
10515 * thread-db.c (try_thread_db_load_from_sdir): New function.
10516 (try_thread_db_load_from_dir): New function.
10517 (thread_db_load_search): Handle $sdir, ignore $pdir.
10518 Remove trying of system directories if search of
10519 libthread-db-search-path fails, that is now done via $sdir.
10520
10521 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10522
10523 * server.c (handle_query): Add EnableDisableTracepoints to the list
10524 of supported features.
10525 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10526 tracepoints.
10527 (cmd_qtenable_disable): New.
10528 (cmd_qtstart): Install tracepoints even if disabled.
10529 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10530 receiving a QTEnable or QTDisable packet.
10531 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10532 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10533 tracepoints.
10534 (gdb_probe): Skip data collection if static tracepoint is disabled.
10535
10536 2011-05-10 Doug Evans <dje@google.com>
10537
10538 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10539
10540 2011-05-04 Doug Evans <dje@google.com>
10541
10542 * linux-low.c (linux_join): Skip process lookup.
10543 * spu-low.c (spu_join): Ditto.
10544 * server.c (join_inferiors_callback): Delete.
10545 (process_serial_event): For 'D' packet (detach) call join_inferior
10546 directly.
10547
10548 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10549
10550 * README: Don't mention xscale*-*-linux*.
10551 * configure.srv (xscale*-*-linux*): Don't handle target.
10552
10553 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10554
10555 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10556 casting pointers.
10557 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10558 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10559 (i386_emit_void_call_2): Likewise.
10560
10561 2011-04-26 Yao Qi <yao@codesourcery.com>
10562
10563 * linux-low.c: Move common macros to linux-ptrace.h.
10564 Include linux-ptrace.h.
10565 * Makefile.in (linux_ptrace_h): New.
10566 (linux-low.o): Depends on linux-ptrace.h.
10567
10568 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10569
10570 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10571 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10572 (remote_prepare): New function with most of the TCP code from ...
10573 (remote_open): ... here. Detect PORT here unconditionally. Move also
10574 setting transport_is_reliable.
10575 * server.c (run_once): New variable.
10576 (gdbserver_usage): Document it.
10577 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10578 the first run if RUN_ONCE.
10579 * server.h (run_once, remote_prepare): New declarations.
10580
10581 2011-04-19 Tom Tromey <tromey@redhat.com>
10582
10583 * win32-low.c (handle_load_dll): Remove duplicate "the".
10584
10585 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10586
10587 Remove support for old Cygwin 1.5 versions.
10588 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10589 function to avoid warning.
10590 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10591 warning.
10592
10593 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10594
10595 * gdbserver/server.h (Macro _): Define it if not available.
10596
10597 2011-03-14 Michael Snyder <msnyder@vmware.com>
10598
10599 * hostio.c (handle_close): Remove unnecessary null test.
10600
10601 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10602
10603 * Makefile.in (maintainer-clean realclean distclean): Remove
10604 "make ... subdir_do" command.
10605
10606 2011-03-10 Michael Snyder <msnyder@vmware.com>
10607
10608 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10609
10610 * server.c (handle_v_run): Free alloced buffer on early return.
10611
10612 2011-03-09 Yao Qi <yao@codesourcery.com>
10613
10614 Revert:
10615 2011-03-04 Yao Qi <yao@codesourcery.com>
10616
10617 * Makefile.in: Remove GNU make feature --directory.
10618
10619 2011-03-05 Yao Qi <yao@codesourcery.com>
10620
10621 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10622 (subdir_do): New make target. Copied from gdb/Makefile.
10623 (maintainer-clean, realclean, distclean, clean): Call corresponding
10624 make targets in common/Makefile.
10625
10626 2011-02-11 Yao Qi <yao@codesourcery.com>
10627
10628 * configure.ac: Call AC_PROG_RANLIB.
10629 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10630 * configure: Regenerate.
10631
10632 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10633
10634 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10635
10636 2011-03-06 Yao Qi <yao@codesourcery.com>
10637
10638 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10639
10640 2011-03-05 Yao Qi <yao@codesourcery.com>
10641
10642 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10643 (subdir_do): New make target. Copied from gdb/Makefile.
10644 (maintainer-clean, realclean, distclean, clean): Call corresponding
10645 make targets in common/Makefile.
10646
10647 2011-03-04 Yao Qi <yao@codesourcery.com>
10648
10649 * Makefile.in: Remove GNU make feature --directory.
10650
10651 2011-03-04 Michael Snyder <msnyder@vmware.com>
10652
10653 * server.c (queue_stop_reply): Call xmalloc not malloc.
10654
10655 2011-03-02 Michael Snyder <msnyder@vmware.com>
10656
10657 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10658
10659 2011-02-28 Michael Snyder <msnyder@vmware.com>
10660
10661 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10662 (cmd_qtframe): Ditto.
10663 (cmd_qtbuffer): Ditto.
10664 (cmd_bigqtbuffer): Ditto.
10665
10666 * utils.c (decimal2str): Initialize 'width' to nine, then
10667 don't mess with it.
10668
10669 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10670
10671 * hostio.c (require_data): Free *data, not data.
10672
10673 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10674
10675 * hostio.c (require_data): Use free, not xfree.
10676
10677 2011-02-27 Michael Snyder <msnyder@vmware.com>
10678
10679 * server.c (handle_query): Discard unused value.
10680
10681 * hostio.c (require_data): Free malloc memory before returning
10682 error.
10683
10684 2011-02-26 Michael Snyder <msnyder@vmware.com>
10685
10686 * linux-low.c (list_threads): Call closedir for dirent.
10687
10688 2011-02-27 Michael Snyder <msnyder@vmware.com>
10689
10690 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10691 a case statement falls through.
10692
10693 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10694
10695 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10696 in comparison.
10697
10698 2011-02-26 Michael Snyder <msnyder@vmware.com>
10699
10700 * utils.c (decimal2str): Eliminate dead code and dead param.
10701 (pulongest): Drop dead param from call to decimal2str.
10702 (plongest): Ditto.
10703
10704 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10705
10706 Revert the following patch (not approved yet):
10707 2011-02-21 Hui Zhu <teawater@gmail.com>
10708 * tracepoint.c (tp_printf): New function.
10709 (eval_agent_expr): Handle gdb_agent_op_printf.
10710
10711 2011-02-21 Hui Zhu <teawater@gmail.com>
10712
10713 * tracepoint.c (tp_printf): New function.
10714 (eval_agent_expr): Handle gdb_agent_op_printf.
10715
10716 2011-02-18 Tom Tromey <tromey@redhat.com>
10717
10718 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10719 (tracepoint.o): Likewise.
10720 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10721 (gdb_agent_op_names): Likewise.
10722
10723 2011-02-18 Tom Tromey <tromey@redhat.com>
10724
10725 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10726 gdb_agent_op_rot>: New constants.
10727 (gdb_agent_op_names): Add pick and roll.
10728 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10729 cases.
10730
10731 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10732
10733 * aclocal.m4: Regenerated with aclocal-1.11.1.
10734
10735 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10736
10737 * server.c (handle_qxfer_traceframe_info): New.
10738 (qxfer_packets): Register "traceframe-info".
10739 (handle_query): Report support for qXfer:traceframe-info:read+.
10740 * tracepoint.c (match_blocktype): New.
10741 (traceframe_find_block_type): Rename to ...
10742 (traceframe_walk_blocks): ... this. Add callback filter argument,
10743 and use it.
10744 (traceframe_find_block_type): New, reimplemented on top of
10745 traceframe_walk_blocks.
10746 (build_traceframe_info_xml): New.
10747 (traceframe_read_info): New.
10748 * server.h (traceframe_read_info): Declare.
10749
10750 2011-02-11 Yao Qi <yao@codesourcery.com>
10751
10752 * configure.ac: Call AC_PROG_RANLIB.
10753 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10754 * configure: Regenerate.
10755
10756 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10757
10758 * server.c (gdb_read_memory): Change return semantics to allow
10759 partial transfers.
10760 (handle_search_memory_1): Adjust.
10761 (process_serial_event) <'m' packet>: Handle partial transfers.
10762 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10763
10764 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10765
10766 * regcache.c (init_register_cache): Initialize
10767 regcache->register_status.
10768 (free_register_cache): Release regcache->register_status.
10769 (regcache_cpy): Copy register_status.
10770 (registers_to_string): Print 'x's for unavailable registers.
10771 (supply_register): Mark the register's status valid or
10772 unavailable, depending on whether a buffer was passed in or not.
10773 (supply_register_zeroed): New.
10774 (supply_regblock): Mark the registers' status valid or
10775 unavailable, depending on whether a buffer was passed in or not.
10776 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10777 (struct regcache): New `register_status' field.
10778 (supply_register_zeroed): Declare.
10779 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10780 supply_register_zeroed, rather than passing a NULL buffer to
10781 supply_register.
10782 * tracepoint.c (fetch_traceframe_registers): Update comment.
10783
10784 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10785
10786 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10787 buffer explicit.
10788
10789 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10790
10791 * server.h (decode_xfer_write): Change prototype.
10792 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10793 and don't extract the annex here.
10794 * server.c (decode_xfer_read): Remove `annex' parameter,
10795 and don't extract the annex here.
10796 (decode_xfer): New.
10797 (struct qxfer): New.
10798 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10799 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10800 (handle_qxfer_statictrace): New functions, abstracted out from
10801 handle_query, and made to use the struct qxfer interface.
10802 (handle_threads_qxfer_proper): Rename to ...
10803 (handle_qxfer_threads_proper): ... this.
10804 (handle_threads_qxfer): Rename to ...
10805 (handle_qxfer_threads): ... this. Adjust.
10806 (qxfer_packets): New array.
10807 (handle_qxfer): New function.
10808 (handle_query): Use handle_qxfer.
10809
10810 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10811
10812 * gdbreplay.c: Shorten lines of >= 80 columns.
10813 * linux-low.c: Ditto.
10814 * linux-ppc-low.c: Ditto.
10815 * linux-s390-low.c: Ditto.
10816 * linux-sparc-low.c: Ditto.
10817 * linux-x86-low.c: Ditto.
10818 * linux-xtensa-low.c: Ditto.
10819 * mem-break.c: Ditto.
10820 * nto-low.c: Ditto.
10821 * regcache.h: Ditto.
10822 * remote-utils.c: Ditto.
10823 * server.c: Ditto.
10824 * server.h: Ditto.
10825 * thread-db.c: Ditto.
10826 * tracepoint.c: Ditto.
10827 * utils.c: Ditto.
10828 * win32-low.h: Ditto.
10829
10830 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10831
10832 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10833 update.
10834
10835 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10836
10837 * server.c (gdbserver_version): Update copyright year in version
10838 output.
10839 * gdbreplay.c (gdbreplay_version): Ditto.
10840
10841 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10842
10843 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10844 * linux-bfin-low.c: New file.
10845 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10846 PT_DATA_ADDR for BFIN targets.
10847 * Makefile.in (SFILES): Add linux-bfin-low.c.
10848 (clean): Remove reg-bfin.c.
10849 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10850 * README: Mention supported Blackfin targets.
10851
10852 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10853
10854 * .gitignore: New file.
10855
10856 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10857
10858 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10859
10860 2010-10-22 Jie Zhang <jie@codesourcery.com>
10861
10862 * Makefile.in: Add FLAGS_TO_PASS variable.
10863 (install): Remove dependency of install-only and recursively
10864 invoke make for install-only.
10865
10866 2010-10-04 Doug Evans <dje@google.com>
10867
10868 * Makefile.in (uninstall): Use $(DESTDIR).
10869
10870 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10871
10872 PR gdb/11842
10873
10874 * linux-x86-low.c (compat_siginfo_from_siginfo)
10875 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10876 si_code is < 0. Check for si_code == SI_TIMER before checking for
10877 si_code < 0.
10878
10879 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10880
10881 * lynx-i386-low.c: New file.
10882 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10883
10884 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10885
10886 * lynx-low.c (ptrace_request_to_str): Remove handling for
10887 request values that have been removed in LynxOS 5.x.
10888
10889 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10890
10891 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10892 <ptrace.h>
10893
10894 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10895
10896 * configure.ac: Add --enable-inprocess-agent option.
10897 * configure: Rebuilt.
10898
10899 2010-09-06 Yao Qi <yao@codesourcery.com>
10900
10901 * linux-low.c (linux_kill): Remove unused variable.
10902 (linux_stabilize_threads): Likewise.
10903 * server.c (start_inferior): Likewise.
10904 (queue_stop_reply_callback): Likewise.
10905 * tracepoint.c (do_action_at_tracepoint): Likewise.
10906
10907 2010-09-06 Yao Qi <yao@codesourcery.com>
10908
10909 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10910 on return.
10911
10912 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10913
10914 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10915
10916 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10917
10918 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10919 "$(IPA_DEPFILES)".
10920
10921 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10922
10923 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10924 gdbserver/lynx-ppc-low.c: New files.
10925 * Makefile.in (lynx_low_h): New variable.
10926 (lynx-low.o, lynx-ppc-low.o): New rules.
10927 * configure.ac: On LynxOS, link with -lnetinet.
10928 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10929 * configure: regenerate.
10930
10931 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10932
10933 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10934 * configure.ac: Add check for vasprintf and vsnprintf.
10935 * configure, config.in: Regenerate.
10936 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10937
10938 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10939
10940 * gdbreplay.c: Move include of alloca.h up, next to include of
10941 malloc.h.
10942 * server.h: Add include of malloc.h.
10943 * mem-break.c: Remove include of malloc.h.
10944 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10945
10946 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10947
10948 * Makefile.in (memmem.o): Build with -Wno-error.
10949
10950 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10951
10952 * utils.c (xsnprintf): Make non-static.
10953 * server.h: Add xsnprintf declaration.
10954 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10955 replace calls to snprintf by calls to xsnprintf throughout.
10956
10957 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10958
10959 * configure.ac: Add configure check for alloca.
10960 * configure, config.in: Regenerate.
10961 * server.h: Include alloca.h if it exists.
10962 * gdbreplay.c: Include alloca.h if it exists.
10963
10964 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10965
10966 * linux-low.c (__SIGRTMIN): Define if not already defined.
10967 (linux_create_inferior): Check for __ANDROID__ rather than
10968 __SIGRTMIN.
10969 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10970 are already deferred.
10971 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10972 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10973 stopped and already has a pending signal to report.
10974 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10975 a pending signal to report or is moving out of a jump pad.
10976 (linux_init_signals): Check for __ANDROID__ rather than
10977 __SIGRTMIN.
10978
10979 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10980
10981 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10982 debug_threads check. Avoid a linear search when not doing debug
10983 output.
10984
10985 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10986
10987 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10988 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10989 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10990 (process_event): Change local fd's type to gdb_fildes_t.
10991 (create_file_handler): Adjust prototype.
10992 (delete_file_handler): Adjust prototype.
10993 (handle_file_event): Adjust prototype. Use pfildes.
10994 (create_file_event): Adjsut prototype.
10995 * remote-utils.c (remote_desc, listen_desc): Change type to
10996 gdb_fildes_t.
10997 * server.h: New gdb_fildes_t typedef.
10998 [USE_WIN32API]: Include winsock2.h.
10999 (delete_file_handler, add_file_handler): Adjust prototypes.
11000 (pfildes): Declare.
11001 * utils.c (pfildes): New.
11002
11003 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11004
11005 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11006 * configure: Regenerate.
11007
11008 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11009
11010 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11011 (linux_done_accessing_memory): ... this.
11012 (linux_target_ops): Adjust.
11013 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11014 * nto-low.c (nto_target_ops): Adjust comment.
11015 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11016 * spu-low.c (spu_target_ops): Adjust comment.
11017 * target.h (target_ops): Rename unprepare_to_access_memory field
11018 to done_accessing_memory.
11019 (unprepare_to_access_memory): Rename to ...
11020 (done_accessing_memory): ... this.
11021
11022 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11023
11024 * linux-low.c (linux_prepare_to_access_memory): New.
11025 (linux_unprepare_to_access_memory): New.
11026 (linux_target_ops): Install them.
11027 * server.c (read_memory): Rename to ...
11028 (gdb_read_memory): ... this. Use
11029 prepare_to_access_memory/prepare_to_access_memory.
11030 (write_memory): Rename to ...
11031 (gdb_write_memory): ... this. Use
11032 prepare_to_access_memory/prepare_to_access_memory.
11033 (handle_search_memory_1): Adjust.
11034 (process_serial_event): Adjust.
11035 * target.h (struct target_ops): New fields
11036 prepare_to_access_memory and unprepare_to_access_memory.
11037 (prepare_to_access_memory, unprepare_to_access_memory): New.
11038 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11039 prepare_to_access_memory/prepare_to_access_memory.
11040 * nto-low.c (nto_target_ops): Adjust.
11041 * spu-low.c (spu_target_ops): Adjust.
11042 * win32-low.c (win32_target_ops): Adjust.
11043
11044 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11045
11046 * Makefile.in (WARN_CFLAGS): Get it from configure.
11047 (WERROR_CFLAGS): New.
11048 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11049 * configure.ac: Introduce --enable-werror, which adds -Werror to
11050 the compiler command line. Enabled by default. Disable with
11051 --disable-werror. Add -Wdeclaration-after-statement
11052 Wpointer-arith and -Wformat-nonliteral to warning flags.
11053 * configure: Regenerate.
11054
11055 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11056
11057 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11058
11059 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11060
11061 * gdbreplay.c (remote_error): New.
11062 (gdbchar): New.
11063 (expect): Use gdbchar. Check for error reading from GDB.
11064 Clarify sync error output.
11065 (play): Check for errors writing to GDB.
11066 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11067 * remote-utils.c (getpkt): Check for errors writing to the remote
11068 descriptor.
11069
11070 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11071
11072 * linux-low.c (linux_wait_1): Move non-debugging code out of
11073 `debug_threads' control.
11074
11075 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11076
11077 * linux-low.c (linux_wait_1): Don't set last_status here.
11078 * server.c (push_event, queue_stop_reply_callback): Assert we're
11079 not pushing a TARGET_WAITKIND_IGNORE event.
11080 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11081 (myresume, handle_target_event): Set the thread's last_resume_kind
11082 and last_status from the target returned status.
11083
11084 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11085
11086 PR threads/10729
11087
11088 * linux-x86-low.c (update_debug_registers_callback): New.
11089 (i386_dr_low_set_addr): Use it.
11090 (i386_dr_low_get_addr): New.
11091 (i386_dr_low_set_control): Use update_debug_registers_callback.
11092 (i386_dr_low_get_control): New.
11093 (i386_dr_low_get_status): Adjust.
11094 * linux-low.c (linux_stop_lwp): New.
11095 * linux-low.h (linux_stop_lwp): Declare.
11096
11097 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11098 argument instead of a i386_debug_reg_state.
11099 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11100 a i386_debug_reg_state.
11101 (i386_insert_aligned_watchpoint): Adjust.
11102 (i386_remove_aligned_watchpoint): Adjust.
11103 (i386_low_stopped_data_address): Read the debug registers from the
11104 inferior instead of from the mirrors.
11105 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11106 (i386_dr_low_get_addr): Declare.
11107 (i386_dr_low_get_control): Declare.
11108 (i386_dr_low_get_status): Change prototype.
11109
11110 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11111 (i386_dr_low_get_addr): New.
11112 (i386_dr_low_get_control): New.
11113 (i386_dr_low_get_status): Adjust prototype. Return
11114 dr_status_mirror.
11115 (i386_initial_stuff): Clear dr_status_mirror and
11116 dr_control_mirror.
11117 (i386_get_thread_context): Adjust.
11118 (i386_set_thread_context): Adjust.
11119 (i386_thread_added): Adjust.
11120
11121 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11122
11123 * linux-low.h (linux_thread_area): Delete declaration.
11124
11125 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11126
11127 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11128 after its termination.
11129
11130 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11131
11132 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11133 (gdb_wants_all_stopped): Delete.
11134 (linux_wait_1): Don't call them.
11135 * server.c (handle_v_cont): Tag all threads as want-stopped.
11136 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11137 stopped as "client-wants-stopped".
11138
11139 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11140
11141 * Makefile.in (signals_h): New.
11142 (server_h): Depend on it.
11143 (server.o): Don't depend on $(signals_def).
11144 (signals.o): Depend on $(signals_def).
11145
11146 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11147
11148 * Makefile.in (signals_def): New.
11149 (server_h): Append include/gdb/signals.h and signals_def.
11150 (server.o): Append signals_def.
11151
11152 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11153
11154 * server.c (handle_target_event): Use target_signal_to_host for
11155 resume_info.sig initialization.
11156 * target.h (struct thread_resume) <sig>: New comment.
11157
11158 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11159
11160 * server.c (handle_query): strcpy() the returned string from paddress()
11161 instead of sprintf().
11162 * utils.c (paddress): Return phex_nz().
11163
11164 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11165
11166 * server.c (handle_v_cont): Call mourn_inferior if process
11167 just exited.
11168 (myresume): Likewise.
11169
11170 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11171
11172 Static tracepoints, and integration with UST.
11173
11174 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11175 * mem-break.c (uninsert_all_breakpoints)
11176 (reinsert_all_breakpoints): New.
11177 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11178 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11179 (gdb_agent_ust_loaded, helper_thread_id)
11180 (gdb_agent_helper_thread_id): New macros.
11181 (struct ipa_sym_addresses): Add addr_ust_loaded,
11182 addr_helper_thread_id, addr_cmd_buf.
11183 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11184 (in_process_agent_loaded_ust): New.
11185 (write_e_ust_not_loaded): New.
11186 (maybe_write_ipa_ust_not_loaded): New.
11187 (struct collect_static_trace_data_action): New.
11188 (enum tracepoint_type) <static_tracepoint>: New.
11189 (struct tracepoint) <handle>: Mention static tracepoints.
11190 (struct static_tracepoint_ctx): New.
11191 (CMD_BUF_SIZE): New.
11192 (add_tracepoint_action): Handle static tracepoint actions.
11193 (unprobe_marker_at): New.
11194 (clear_installed_tracepoints): Handle static tracepoints.
11195 (cmd_qtdp): Handle static tracepoints.
11196 (probe_marker_at): New.
11197 (cmd_qtstart): Handle static tracepoints.
11198 (response_tracepoint): Handle static tracepoints.
11199 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11200 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11201 (get_context_regcache): Handle static tracepoints.
11202 (do_action_at_tracepoint): Handle static tracepoint actions.
11203 (traceframe_find_block_type): Handle static trace data blocks.
11204 (traceframe_read_sdata): New.
11205 (download_tracepoints): Download static tracepoint actions.
11206 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11207 (GDB_PROBE_NAME): New.
11208 (ust_ops): New.
11209 (GET_UST_SYM): New.
11210 (USTF): New.
11211 (dlsym_ust): New.
11212 (ust_marker_to_static_tracepoint): New.
11213 (gdb_probe): New.
11214 (collect_ust_data_at_tracepoint): New.
11215 (gdb_ust_probe): New.
11216 (UNIX_PATH_MAX, SOCK_DIR): New.
11217 (gdb_ust_connect_sync_socket): New.
11218 (resume_thread, stop_thread): New.
11219 (run_inferior_command): New.
11220 (init_named_socket): New.
11221 (gdb_ust_socket_init): New.
11222 (cstr_to_hexstr): New.
11223 (next_st): New.
11224 (first_marker, next_marker): New.
11225 (response_ust_marker): New.
11226 (cmd_qtfstm, cmd_qtsstm): New.
11227 (unprobe_marker_at, probe_marker_at): New.
11228 (cmd_qtstmat, gdb_ust_thread): New.
11229 (gdb_ust_init): New.
11230 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11231 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11232 (ST_REGENTRY): New.
11233 (x86_64_st_collect_regmap): New.
11234 (X86_64_NUM_ST_COLLECT_GREGS): New.
11235 (AMD64_RIP_REGNUM): New.
11236 (supply_static_tracepoint_registers): New.
11237 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11238 (ST_REGENTRY): New.
11239 (i386_st_collect_regmap): New.
11240 (i386_NUM_ST_COLLECT_GREGS): New.
11241 (supply_static_tracepoint_registers): New.
11242 * server.c (handle_query): Handle qXfer:statictrace:read.
11243 <qSupported>: Report support for StaticTracepoints, and
11244 qXfer:statictrace:read features.
11245 * server.h (traceframe_read_sdata)
11246 (supply_static_tracepoint_registers): Declare.
11247 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11248 (unpack_varlen_hex): Include in IPA build.
11249 * Makefile.in (ustlibs, ustinc): New.
11250 (IPA_OBJS): Add remote-utils-ipa.o.
11251 ($(IPA_LIB)): Link -ldl and -lpthread.
11252 (UST_CFLAGS): New.
11253 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11254 * config.in, configure: Regenerate.
11255
11256 2010-06-20 Ian Lance Taylor <iant@google.com>
11257 Pedro Alves <pedro@codesourcery.com>
11258
11259 * linux-x86-low.c (always_true): Delete.
11260 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11261 trying to fool the compiler with always_true.
11262
11263 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11264
11265 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11266 conditions in gdbserver.
11267
11268 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11269
11270 * spu-low.c (spu_read_memory): Wrap around local store limit.
11271 (spu_write_memory): Likewise.
11272
11273 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11274
11275 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11276 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11277 LONGEST uses.
11278 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11279 uses.
11280 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11281 uses with LONGEST uses.
11282
11283 2010-06-14 Stan Shebs <stan@codesourcery.com>
11284 Pedro Alves <pedro@codesourcery.com>
11285
11286 Bytecode compiler.
11287
11288 * linux-x86-low.c: Include limits.h.
11289 (add_insns): New.
11290 (always_true): New.
11291 (EMIT_ASM): New.
11292 (EMIT_ASM32): New.
11293 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11294 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11295 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11296 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11297 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11298 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11299 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11300 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11301 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11302 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11303 (amd64_emit_void_call_2): New.
11304 (amd64_emit_ops): New.
11305 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11306 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11307 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11308 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11309 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11310 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11311 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11312 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11313 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11314 (i386_emit_stack_adjust, i386_emit_int_call_1)
11315 (i386_emit_void_call_2): New.
11316 (i386_emit_ops): New.
11317 (x86_emit_ops): New.
11318 (the_low_target): Install x86_emit_ops.
11319 * server.h (struct emit_ops): New.
11320 (get_raw_reg_func_addr): Declare.
11321 (current_insn_ptr, emit_error): Declare.
11322 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11323 (set_trace_state_variable_value): New defines.
11324 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11325 addr_get_trace_state_variable_value and
11326 addr_set_trace_state_variable_value.
11327 (symbol_list): New fields for get_raw_reg,
11328 get_trace_state_variable_value and set_trace_state_variable_value.
11329 (condfn): New typedef.
11330 (struct tracepoint): New field `compiled_cond'.
11331 (do_action_at_tracepoint): Clear compiled_cond.
11332 (get_trace_state_variable_value, set_trace_state_variable_value):
11333 Export in the IPA.
11334 (condition_true_at_tracepoint): If there's a compiled condition,
11335 run that.
11336 (current_insn_ptr, emit_error): New globals.
11337 (struct bytecode_address): New.
11338 (get_raw_reg_func_addr): New.
11339 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11340 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11341 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11342 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11343 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11344 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11345 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11346 (compile_tracepoint_condition, compile_bytecodes): New.
11347 * target.h (emit_ops): Forward declare.
11348 (struct target_ops): New field emit_ops.
11349 (target_emit_ops): New.
11350 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11351 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11352 * linux-low.c (linux_emit_ops): New.
11353 (linux_target_ops): Install it.
11354 * linux-low.h (struct linux_target_ops): New field emit_ops.
11355
11356 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11357
11358 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11359 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11360
11361 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11362 Stan Shebs <stan@codesourcery.com>
11363
11364 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11365 (all): Depend on $(extra_libraries).
11366 (install-only): Install the IPA.
11367 (IPA_OBJS, IPA_LIB): New.
11368 (clean): Remove the IPA lib.
11369 (IPAGENT_CFLAGS): New.
11370 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11371 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11372 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11373 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11374 * configure.ac: Check for atomic builtins support in the compiler.
11375 (IPA_DEPFILES, extra_libraries): Define.
11376 * configure.srv (ipa_obj): Add description.
11377 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11378 (i[34567]86-*-linux*): Set ipa_obj.
11379 (x86_64-*-linux*): Set ipa_obj.
11380 * linux-low.c (stabilizing_threads): New.
11381 (supports_fast_tracepoints): New.
11382 (linux_detach): Stabilize threads before detaching.
11383 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11384 the lwp is either not stabilizing, or is moving out of a jump pad.
11385 (linux_fast_tracepoint_collecting): New.
11386 (maybe_move_out_of_jump_pad): New.
11387 (enqueue_one_deferred_signal): New.
11388 (dequeue_one_deferred_signal): New.
11389 (linux_wait_for_event_1): If moving out of a jump pad, defer
11390 pending signals to later.
11391 (linux_stabilize_threads): New.
11392 (linux_wait_1): Check if threads need moving out of jump pads, and
11393 do it if so.
11394 (stuck_in_jump_pad_callback): New.
11395 (move_out_of_jump_pad_callback): New.
11396 (lwp_running): New.
11397 (linux_resume_one_lwp): Handle moving out of jump pads.
11398 (linux_set_resume_request): Dequeue deferred signals.
11399 (need_step_over_p): Also step over fast tracepoint jumps.
11400 (start_step_over): Also uninsert fast tracepoint jumps.
11401 (finish_step_over): Also reinsert fast tracepoint jumps.
11402 (linux_install_fast_tracepoint_jump): New.
11403 (linux_target_ops): Install linux_stabilize_threads and
11404 linux_install_fast_tracepoint_jump_pad.
11405 * linux-low.h (linux_target_ops) <get_thread_area,
11406 install_fast_tracepoint_jump_pad>: New fields.
11407 (struct lwp_info) <collecting_fast_tracepoint,
11408 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11409 (linux_get_thread_area): Declare.
11410 * linux-x86-low.c (jump_insn): New.
11411 (x86_get_thread_area): New.
11412 (append_insns): New.
11413 (push_opcode): New.
11414 (amd64_install_fast_tracepoint_jump_pad): New.
11415 (i386_install_fast_tracepoint_jump_pad): New.
11416 (x86_install_fast_tracepoint_jump_pad): New.
11417 (the_low_target): Install x86_get_thread_area and
11418 x86_install_fast_tracepoint_jump_pad.
11419 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11420 (struct fast_tracepoint_jump): New.
11421 (fast_tracepoint_jump_insn): New.
11422 (fast_tracepoint_jump_shadow): New.
11423 (find_fast_tracepoint_jump_at): New.
11424 (fast_tracepoint_jump_here): New.
11425 (delete_fast_tracepoint_jump): New.
11426 (set_fast_tracepoint_jump): New.
11427 (uninsert_fast_tracepoint_jumps_at): New.
11428 (reinsert_fast_tracepoint_jumps_at): New.
11429 (set_breakpoint_at): Use write_inferior_memory.
11430 (uninsert_raw_breakpoint): Use write_inferior_memory.
11431 (check_mem_read): Mask out fast tracepoint jumps.
11432 (check_mem_write): Mask out fast tracepoint jumps.
11433 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11434 (set_fast_tracepoint_jump): Declare.
11435 (delete_fast_tracepoint_jump)
11436 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11437 (reinsert_fast_tracepoint_jumps_at): Declare.
11438 * regcache.c: Don't compile many functions when building the
11439 in-process agent library.
11440 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11441 the register buffer in the heap.
11442 (free_register_cache): If the register buffer isn't owned by the
11443 regcache, don't free it.
11444 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11445 pre-existing register caches.
11446 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11447 type.
11448 (convert_ascii_to_int): : Constify `from' parameter type.
11449 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11450 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11451 the needed buffer in-place.
11452 (relocate_instruction): New.
11453 * server.c (handle_query) <qSymbols>: If the target supports
11454 tracepoints, give it a chance of looking up symbols. Report
11455 support for fast tracepoints.
11456 (handle_status): Stabilize threads.
11457 (process_serial_event): Adjust.
11458 * server.h (struct fast_tracepoint_jump): Forward declare.
11459 (struct process_info) <fast_tracepoint_jumps>: New field.
11460 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11461 (decode_X_packet, decode_M_packet): Adjust.
11462 (relocate_instruction): Declare.
11463 (in_process_agent_loaded): Declare.
11464 (tracepoint_look_up_symbols): Declare.
11465 (struct fast_tpoint_collect_status): Declare.
11466 (fast_tracepoint_collecting): Declare.
11467 (force_unlock_trace_buffer): Declare.
11468 (handle_tracepoint_bkpts): Declare.
11469 (initialize_low_tracepoint)
11470 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11471 * target.h (struct target_ops) <stabilize_threads,
11472 install_fast_tracepoint_jump_pad>: New fields.
11473 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11474 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11475 [HAVE_STDINT_H]: Include stdint.h.
11476 (trace_debug_1): Rename to ...
11477 (trace_vdebug): ... this.
11478 (trace_debug): Rename to ...
11479 (trace_debug_1): ... this. Add `level' parameter.
11480 (trace_debug): New.
11481 (ATTR_USED, ATTR_NOINLINE): New.
11482 (IP_AGENT_EXPORT): New.
11483 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11484 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11485 (about_to_request_buffer_space, trace_buffer_is_full)
11486 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11487 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11488 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11489 (traceframe_write_count, traceframes_created)
11490 (trace_state_variables)
11491 New renaming defines.
11492 (struct ipa_sym_addresses): New.
11493 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11494 (symbol_list): New.
11495 (ipa_sym_addrs): New.
11496 (all_tracepoint_symbols_looked_up): New.
11497 (in_process_agent_loaded): New.
11498 (write_e_ipa_not_loaded): New.
11499 (maybe_write_ipa_not_loaded): New.
11500 (tracepoint_look_up_symbols): New.
11501 (debug_threads) [IN_PROCESS_AGENT]: New.
11502 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11503 (UNKNOWN_SIDE_EFFECTS): New.
11504 (stop_tracing): New.
11505 (flush_trace_buffer): New.
11506 (stop_tracing_bkpt): New.
11507 (flush_trace_buffer_bkpt): New.
11508 (read_inferior_integer): New.
11509 (read_inferior_uinteger): New.
11510 (read_inferior_data_pointer): New.
11511 (write_inferior_data_pointer): New.
11512 (write_inferior_integer): New.
11513 (write_inferior_uinteger): New.
11514 (struct collect_static_trace_data_action): Delete.
11515 (enum tracepoint_type): New.
11516 (struct tracepoint) <type>: New field `type'.
11517 <actions_str, step_actions, step_actions_str>: Only include in
11518 GDBserver.
11519 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11520 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11521 (tracepoints): Use IP_AGENT_EXPORT.
11522 (last_tracepoint): Don't include in the IPA.
11523 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11524 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11525 (alloced_trace_state_variables): New.
11526 (trace_state_variables): Use IP_AGENT_EXPORT.
11527 (traceframe_t): Delete unused variable.
11528 (circular_trace_buffer): Don't include in the IPA.
11529 (trace_buffer_start): Delete.
11530 (struct trace_buffer_control): New.
11531 (trace_buffer_free): Delete.
11532 (struct ipa_trace_buffer_control): New.
11533 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11534 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11535 New.
11536 (trace_buffer_ctrl): New.
11537 (TRACE_BUFFER_CTRL_CURR): New.
11538 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11539 Reimplement as macros.
11540 (trace_buffer_wrap): Delete.
11541 (traceframe_write_count, traceframe_read_count)
11542 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11543 (struct tracepoint_hit_ctx) <type>: New field.
11544 (struct fast_tracepoint_ctx): New.
11545 (memory_barrier): New.
11546 (cmpxchg): New.
11547 (record_tracepoint_error): Update atomically in the IPA.
11548 (clear_inferior_trace_buffer): New.
11549 (about_to_request_buffer_space): New.
11550 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11551 updating the same buffer.
11552 (add_tracepoint): Default the tracepoint's type to trap
11553 tracepoint, and orig_size to -1.
11554 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11555 internal variables.
11556 (create_trace_state_variable): New parameter `gdb'. Handle it.
11557 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11558 (cmd_qtdp): Handle fast tracepoints.
11559 (cmd_qtdv): Adjust.
11560 (max_jump_pad_size): New.
11561 (gdb_jump_pad_head): New.
11562 (get_jump_space_head): New.
11563 (claim_jump_space): New.
11564 (sort_tracepoints): New.
11565 (MAX_JUMP_SIZE): New.
11566 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11567 IPA.
11568 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11569 support. Upload fast traceframes, and delete internal IPA
11570 breakpoints.
11571 (stop_tracing_handler): New.
11572 (flush_trace_buffer_handler): New.
11573 (cmd_qtstop): Upload fast tracepoints.
11574 (response_tracepoint): Handle fast tracepoints.
11575 (tracepoint_finished_step): Upload fast traceframes. Set the
11576 tracepoint hit context's tracepoint type.
11577 (handle_tracepoint_bkpts): New.
11578 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11579 type. Add comment about fast tracepoints.
11580 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11581 non-existing action_str field.
11582 (get_context_regcache): Handle fast tracepoints.
11583 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11584 to the regcache.
11585 (fast_tracepoint_from_jump_pad_address): New.
11586 (fast_tracepoint_from_ipa_tpoint_address): New.
11587 (collecting_t): New.
11588 (force_unlock_trace_buffer): New.
11589 (fast_tracepoint_collecting): New.
11590 (collecting): New.
11591 (gdb_collect): New.
11592 (write_inferior_data_ptr): New.
11593 (target_tp_heap): New.
11594 (target_malloc): New.
11595 (download_agent_expr): New.
11596 (UALIGN): New.
11597 (download_tracepoints): New.
11598 (download_trace_state_variables): New.
11599 (upload_fast_traceframes): New.
11600 (IPA_FIRST_TRACEFRAME): New.
11601 (IPA_NEXT_TRACEFRAME_1): New.
11602 (IPA_NEXT_TRACEFRAME): New.
11603 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11604 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11605 (gdb_jump_pad_buffer_end): New.
11606 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11607 (initialize_tracepoint): Adjust.
11608 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11609 buffer. Initialize the low module.
11610 * utils.c (PREFIX, TOOLNAME): New.
11611 (malloc_failure): Use PREFIX.
11612 (error): In the IPA, an error causes an exit.
11613 (fatal, warning): Use PREFIX.
11614 (internal_error): Use TOOLNAME.
11615 (NUMCELLS): Increase to 10.
11616 * configure, config.in: Regenerate.
11617
11618 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11619
11620 * server.c (handle_query) <qSupported>: Do two passes over the
11621 qSupported string to avoid nesting strtok.
11622
11623 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11624
11625 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11626 (CDEPS): New.
11627 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11628 -Wl,--dynamic-list.
11629 * configure: Regenerate.
11630 * proc-service.list: New.
11631
11632 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11633
11634 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11635 New comment.
11636
11637 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11638
11639 * gdbreplay.c (remote_open): Check error return from socket() call by
11640 its equality to -1 not by it being negative.
11641 * remote-utils.c (remote_open): Likewise.
11642
11643 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11644
11645 * config.h: Regenerate.
11646
11647 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11648
11649 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11650 doesn't provide PTRACE_GET_THREAD_AREA.
11651
11652 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11653
11654 * linux-m68k-low.c: Include <asm/ptrace.h>
11655 (ps_get_thread_area): Implement.
11656
11657 2010-05-03 Doug Evans <dje@google.com>
11658
11659 * event-loop.c (struct callback_event): New struct.
11660 (callback_list): New global.
11661 (append_callback_event, delete_callback_event): New functions.
11662 (process_callback): New function.
11663 (start_event_loop): Call it.
11664 * remote-utils.c (NOT_SCHEDULED): Define.
11665 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11666 moved out of readchar.
11667 (readchar): Rewrite. Call reschedule before returning.
11668 (reset_readchar): New function.
11669 (remote_close): Call it.
11670 (process_remaining, reschedule): New functions.
11671 * server.h (callback_handler_func): New typedef.
11672 (append_callback_event, delete_callback_event): Declare.
11673
11674 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11675
11676 * proc-service.c (ps_pglobal_lookup): Use
11677 thread_db_look_up_one_symbol.
11678 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11679 parameter. Use it instead of all_symbols_looked_up.
11680 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11681 field.
11682 (all_symbols_looked_up): Don't declare.
11683 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11684 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11685 field.
11686 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11687 Set all_symbols_looked_up here.
11688 (thread_db_look_up_one_symbol): New.
11689 (thread_db_get_tls_address): Adjust.
11690 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11691 thread_db object on the heap, and tentatively set it in the
11692 process structure.
11693 (thread_db_init): Don't set all_symbols_looked_up here.
11694 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11695
11696 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11697
11698 * linux-low.c (linux_kill, linux_detach): Adjust.
11699 (status_pending_p_callback): Remove redundant statement. Check
11700 for !TARGET_WAITIKIND_IGNORE, instead of
11701 TARGET_WAITKIND_STOPPED.
11702 (handle_tracepoints): Make sure LWP is locked. Adjust.
11703 (linux_wait_for_event_1): Adjust.
11704 (linux_cancel_breakpoints): New.
11705 (unsuspend_one_lwp): New.
11706 (unsuspend_all_lwps): New.
11707 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11708 (send_sigstop_callback): Change return type to int, add new
11709 `except' parameter and handle it.
11710 (suspend_and_send_sigstop_callback): New.
11711 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11712 pass them down. If SUSPEND, also increment the lwp's suspend
11713 count.
11714 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11715 (need_step_over_p): Don't consider suspended LWPs.
11716 (start_step_over): Adjust.
11717 (proceed_one_lwp): Change return type to int, add new `except'
11718 parameter and handle it.
11719 (unsuspend_and_proceed_one_lwp): New.
11720 (proceed_all_lwps): Use find_inferior instead of
11721 for_each_inferior.
11722 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11723 also decrement the suspend count of LWPs. Pass `except' down,
11724 instead of hacking its suspend count.
11725 (linux_pause_all): Add `freeze' parameter. Adjust.
11726 (linux_unpause_all): New.
11727 (linux_target_ops): Install linux_unpause_all.
11728 * server.c (handle_status): Adjust.
11729 * target.h (struct target_ops): New fields `unpause_all' and
11730 `cancel_breakpoints'. Add new parameter to `pause_all'.
11731 (pause_all): Add new `freeze' parameter.
11732 (unpause_all): New.
11733 (cancel_breakpoints): New.
11734 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11735 cancel breakpoints.
11736 (cmd_qtstart): Pause threads.
11737 (stop_tracing): Pause threads, and cancel breakpoints.
11738 * win32-low.c (win32_target_ops): Adjust.
11739
11740 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11741
11742 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11743 the inferior right away from here...
11744 (linux_wait_1): ... to here, and adjust to check the thread's
11745 last_resume_kind instead of the lwp's step or stop_expected flags.
11746
11747 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11748
11749 * README: Use consistent `GDB' and `GDBserver' spellings.
11750
11751 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11752
11753 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11754 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11755 (linux_detach_one_lwp): Assume the lwp is stopped.
11756 (any_thread_of): Delete.
11757 (linux_detach): Stop all lwps here. Don't blindly delete all
11758 breakpoints.
11759 (delete_lwp_callback): New.
11760 (linux_mourn): Delete all lwps of the process that is gone.
11761 (linux_wait_1): Don't delete the last lwp of the process here.
11762 * mem-break.h (mark_breakpoints_out): Declare.
11763 * mem-break.c (mark_breakpoints_out): New.
11764 (free_all_breakpoints): Use it.
11765 * server.c (handle_target_event): If the process is gone, mark
11766 breakpoints out.
11767 * thread-db.c (struct thread_db) <create_bp>: New field.
11768 (thread_db_enable_reporting): Fix prototype. Store a thread event
11769 breakpoint reference in the thread_db struct.
11770 (thread_db_load_search): Clear the thread_db object.
11771 (try_thread_db_load_1): Ditto.
11772 (switch_to_process): New.
11773 (disable_thread_event_reporting): Use it.
11774 (remove_thread_event_breakpoints): New.
11775 (thread_db_detach, thread_db_mourn): Use it.
11776
11777 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11778
11779 * linux-low.c (linux_enable_event_reporting): New.
11780 (linux_wait_for_event_1, handle_extended_wait): Use it.
11781
11782 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11783
11784 * linux-low.c (linux_kill_one_lwp, linux_kill)
11785 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11786 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11787 SIGSTOP even if the LWP is stopped.
11788 (send_sigstop_callback): New.
11789 (stop_all_lwps): Use send_sigstop_callback instead.
11790 (linux_resume_one_thread): Adjust.
11791 (proceed_one_lwp): Still proceed an LWP that the client has
11792 requested to stop, if we haven't reported it as stopped yet. Make
11793 sure that LWPs the client want stopped, have a pending SIGSTOP.
11794
11795 2010-04-26 Doug Evans <dje@google.com>
11796
11797 * server.c (handle_general_set): Make static.
11798
11799 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11800 Print received char after testing for error/eof instead of before.
11801 (input_interrupt): Tweak comment.
11802
11803 2010-04-23 Doug Evans <dje@google.com>
11804
11805 * server.c (start_inferior): Print inferior argv if --debug.
11806
11807 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11808
11809 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11810 * nto-x86-low.c: Include server.h
11811
11812 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11813
11814 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11815 be consistent with other sources of this directory.
11816 (init_registers_amd64): Correct name of source file of this function
11817 in the comment.
11818
11819 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11820
11821 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11822 64-bit executables.
11823
11824 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11825
11826 * win32-i386-low.c: Add 64-bit support.
11827 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11828 (init_registers_amd64): Declare.
11829 (mappings): Add 64-bit version of array.
11830 (init_windows_x86): New function.
11831 (the_low_target): Change init_arch field to init_windows_x86.
11832
11833 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11834
11835 * win32-low.c: Adapt to support also 64-bit architecture.
11836 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11837 (get_image_name): Use SIZE_T type for local variable `done'.
11838 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11839 (toolhelp_get_dll_name): Idem.
11840 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11841 Use uintptr_t typecast to avoid warning.
11842 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11843 (handle_exception): Use phex_nz to avoid warning.
11844 (win32_wait): Remove unused local variable `process'.
11845
11846 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11847
11848 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11849 `amd64-avx.o'.
11850
11851 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11852
11853 * configure.ac: Use `ws2_32' library for srv_mingw.
11854 * configure: Regenerate.
11855 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11856 * remote-utils.c: Likewise.
11857
11858 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11859
11860 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11861 if __x86_64__ is defined.
11862
11863 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11864
11865 * configure: Regenerate.
11866
11867 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11868
11869 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11870 * target.h (target_ops): New get_tib_address field.
11871 * win32-low.h (win32_thread_info): Add thread_local_base field.
11872 * win32-low.c (child_add_thread): Add tlb argument.
11873 Set thread_local_base field to TLB.
11874 (get_child_debug_event): Adapt to child_add_thread change.
11875 (win32_get_tib_address): New function.
11876 (win32_target_ops): Set get_tib_address field to
11877 win32_get_tib_address.
11878 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11879
11880 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11881
11882 * linux-low.c (linux_mourn): Also remove the process.
11883 * server.c (handle_target_event): Don't remove the process here.
11884 * nto-low.c (nto_mourn): New.
11885 (nto_target_ops): Install it.
11886 * spu-low.c (spu_mourn): New.
11887 (spu_target_ops): Install it.
11888 * win32-low.c (win32_mourn): New.
11889 (win32_target_ops): Install it.
11890
11891 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11892
11893 * server.h (buffer_xml_printf): Remove redundant `;'.
11894
11895 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11896
11897 * regcache.c (set_register_cache): Invalidate regcaches before
11898 changing the register cache layout.
11899 (regcache_invalidate_one): Allow a NULL regcache.
11900 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11901 regcaches before changing the register cache layout or the target
11902 regsets.
11903
11904 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11905
11906 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11907 variable warning on Linux/x86-64.
11908
11909 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11910
11911 GDBserver disconnected tracing support.
11912
11913 * linux-low.c (linux_remove_process): Delete.
11914 (add_lwp): Don't set last_resume_kind here.
11915 (linux_kill): Use `mourn'.
11916 (linux_detach): Use `thread_db_detach', and `mourn'.
11917 (linux_mourn): New.
11918 (linux_attach_lwp_1): Adjust comment.
11919 (linux_attach): last_resume_kind moved the thread_info; adjust.
11920 (status_pending_p_callback): Adjust.
11921 (linux_wait_for_event_1): Adjust.
11922 (count_events_callback, select_singlestep_lwp_callback)
11923 (select_event_lwp_callback, cancel_breakpoints_callback)
11924 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11925 (proceed_one_lwp): Adjust.
11926 (linux_async): Add debug output.
11927 (linux_thread_stopped): New.
11928 (linux_pause_all): New.
11929 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11930 linux_pause_all.
11931 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11932 (thread_db_free): Delete declaration.
11933 (thread_db_detach, thread_db_mourn): Declare.
11934 * thread-db.c (thread_db_init): Use thread_db_mourn.
11935 (thread_db_free): Delete, split in two.
11936 (disable_thread_event_reporting): New.
11937 (thread_db_detach): New.
11938 (thread_db_mourn): New.
11939
11940 * server.h (struct thread_info) <last_resume_kind>: New field.
11941 <attached>: Add comment.
11942 <gdb_detached>: New field.
11943 (handler_func): Change return type to int.
11944 (handle_serial_event, handle_target_event): Ditto.
11945 (gdb_connected): Declare.
11946 (tracing): Delete.
11947 (disconnected_tracing): Declare.
11948 (stop_tracing): Declare.
11949
11950 * server.c (handle_query) <qSupported>: Report support for
11951 disconnected tracing.
11952 (queue_stop_reply_callback): Account for running threads.
11953 (gdb_wants_thread_stopped): New.
11954 (gdb_wants_all_threads_stopped): New.
11955 (gdb_reattached_process): New.
11956 (handle_status): Clear the `gdb_detached' flag of all processes.
11957 In all-stop, stop all threads.
11958 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11959 (process_serial_event): If the remote connection breaks, or if an
11960 exit was forced with "monitor exit", force an event loop exit.
11961 Handle disconnected tracing on detach.
11962 (handle_serial_event): Adjust.
11963 (handle_target_event): If GDB isn't connected, forward events back
11964 to the inferior, unless the last process exited, in which case,
11965 exit gdbserver. Adjust interface.
11966
11967 * remote-utils.c (remote_open): Don't block in accept. Instead
11968 register an event loop source on the listen socket file
11969 descriptor. Refactor bits into ...
11970 (listen_desc): ... this new global.
11971 (gdb_connected): ... this new function.
11972 (enable_async_notification): ... this new function.
11973 (handle_accept_event): ... this new function.
11974 (remote_close): Clear remote_desc.
11975
11976 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11977
11978 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11979 New fields.
11980 (mourn_inferior): Define.
11981 (target_process_qsupported): Avoid the dangling else problem.
11982 (thread_stopped): Define.
11983 (pause_all): Define.
11984 (target_waitstatus_to_string): Declare.
11985 * target.c (target_waitstatus_to_string): New.
11986
11987 * tracepoint.c (tracing): Make extern.
11988 (disconnected_tracing): New.
11989 (stop_tracing): Make extern. Handle tracing stops due to GDB
11990 disconnecting.
11991 (cmd_qtdisconnected): New.
11992 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11993 (handle_tracepoint_general_set): Handle QTDisconnected.
11994
11995 * event-loop.c (event_handler_func): Change return type to int.
11996 (process_event): Bail out if the event handler wants the event
11997 loop to stop.
11998 (handle_file_event): Ditto.
11999 (start_event_loop): Bail out if the event handler wants the event
12000 loop to stop.
12001
12002 * nto-low.c (nto_target_ops): Adjust.
12003 * spu-low.c (spu_wait): Don't remove the process here.
12004 (spu_target_ops): Adjust.
12005 * win32-low.c (win32_wait): Don't remove the process here.
12006 (win32_target_ops): Adjust.
12007
12008 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12009
12010 * regcache.c (realloc_register_cache): Invalidate inferior's
12011 regcache before recreating it.
12012
12013 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12014
12015 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12016
12017 2010-04-09 Stan Shebs <stan@codesourcery.com>
12018 Pedro Alves <pedro@codesourcery.com>
12019
12020 * server.h (LONGEST): New.
12021 (struct thread_info) <while_stepping>: New field.
12022 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12023 Declare.
12024 (initialize_tracepoint, handle_tracepoint_general_set)
12025 (handle_tracepoint_query, tracepoint_finished_step)
12026 (tracepoint_was_hit, release_while_stepping_state_list):
12027 (current_traceframe): Declare.
12028 * server.c (handle_general_set): Handle tracepoint packets.
12029 (read_memory): New.
12030 (write_memory): New.
12031 (handle_search_memory_1): Use read_memory.
12032 (handle_query): Report support for conditional tracepoints, trace
12033 state variables, and tracepoint sources. Handle tracepoint
12034 queries.
12035 (main): Initialize the tracepoints module.
12036 (process_serial_event): Handle traceframe reads/writes.
12037
12038 * linux-low.c (handle_tracepoints): New.
12039 (linux_wait_1): Call it.
12040 (linux_resume_one_lwp): Handle while-stepping.
12041 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12042 (linux_target_ops): Install them.
12043 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12044 New field.
12045 * linux-x86-low.c (x86_supports_tracepoints): New.
12046 (the_low_target). Install it.
12047
12048 * mem-break.h (delete_breakpoint): Declare.
12049 * mem-break.c (delete_breakpoint): Make external.
12050
12051 * target.h (struct target_ops): Add `supports_tracepoints',
12052 `read_pc', and `write_pc' fields.
12053 (target_supports_tracepoints): Define.
12054 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12055 (phex_nz): New.
12056
12057 * regcache.h (struct regcache) <registers_owned>: New field.
12058 (init_register_cache, regcache_cpy): Declare.
12059 (regcache_read_pc, regcache_write_pc): Declare.
12060 (register_cache_size): Declare.
12061 (supply_regblock): Declare.
12062 * regcache.c (init_register_cache): New.
12063 (new_register_cache): Use it.
12064 (regcache_cpy): New.
12065 (register_cache_size): New.
12066 (supply_regblock): New.
12067 (regcache_read_pc, regcache_write_pc): New.
12068
12069 * tracepoint.c: New.
12070
12071 * Makefile.in (OBS): Add tracepoint.o.
12072 (tracepoint.o): New rule.
12073
12074 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12075
12076 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12077 (i386-mmx.o): New.
12078 (i386-mmx.c): Likewise.
12079 (i386-mmx-linux.o): Likewise.
12080 (i386-mmx-linux.c): Likewise.
12081
12082 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12083 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12084 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12085 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12086
12087 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12088 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12089 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12090
12091 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12092
12093 * Makefile.in (clean): Updated.
12094 (i386-avx.o): New.
12095 (i386-avx.c): Likewise.
12096 (i386-avx-linux.o): Likewise.
12097 (i386-avx-linux.c): Likewise.
12098 (amd64-avx.o): Likewise.
12099 (amd64-avx.c): Likewise.
12100 (amd64-avx-linux.o): Likewise.
12101 (amd64-avx-linux.c): Likewise.
12102
12103 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12104 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12105 (srv_amd64_regobj): Add amd64-avx.o.
12106 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12107 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12108 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12109 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12110 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12111 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12112 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12113
12114 * i387-fp.c: Include "i386-xstate.h".
12115 (i387_xsave): New.
12116 (i387_cache_to_xsave): Likewise.
12117 (i387_xsave_to_cache): Likewise.
12118 (x86_xcr0): Likewise.
12119
12120 * i387-fp.h (i387_cache_to_xsave): Likewise.
12121 (i387_xsave_to_cache): Likewise.
12122 (x86_xcr0): Likewise.
12123
12124 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12125 * linux-crisv32-low.c (target_regsets): Likewise.
12126 * linux-m68k-low.c (target_regsets): Likewise.
12127 * linux-mips-low.c (target_regsets): Likewise.
12128 * linux-ppc-low.c (target_regsets): Likewise.
12129 * linux-s390-low.c (target_regsets): Likewise.
12130 * linux-sh-low.c (target_regsets): Likewise.
12131 * linux-sparc-low.c (target_regsets): Likewise.
12132 * linux-xtensa-low.c (target_regsets): Likewise.
12133
12134 * linux-low.c: Include <sys/uio.h>.
12135 (regsets_fetch_inferior_registers): Support nt_type.
12136 (regsets_store_inferior_registers): Likewise.
12137 (linux_process_qsupported): New.
12138 (linux_target_ops): Add linux_process_qsupported.
12139
12140 * linux-low.h (regset_info): Add nt_type.
12141 (linux_target_ops): Add process_qsupported.
12142
12143 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12144 and <sys/uio.h>.
12145 (init_registers_i386_avx_linux): New.
12146 (init_registers_amd64_avx_linux): Likewise.
12147 (xmltarget_i386_linux_no_xml): Likewise.
12148 (xmltarget_amd64_linux_no_xml): Likewise.
12149 (PTRACE_GETREGSET): Likewise.
12150 (PTRACE_SETREGSET): Likewise.
12151 (x86_fill_xstateregset): Likewise.
12152 (x86_store_xstateregset): Likewise.
12153 (use_xml): Likewise.
12154 (x86_linux_update_xmltarget): Likewise.
12155 (x86_linux_process_qsupported): Likewise.
12156 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12157 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12158 init_registers_i386_linux here. Call
12159 x86_linux_update_xmltarget.
12160 (the_low_target): Add x86_linux_process_qsupported.
12161
12162 * server.c (handle_query): Call target_process_qsupported.
12163
12164 * target.h (target_ops): Add process_qsupported.
12165 (target_process_qsupported): New.
12166
12167 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12168
12169 * inferiors.c (add_thread): Set last_status kind to
12170 TARGET_WAITKIND_IGNORE.
12171 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12172 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12173 (linux_wait_1): Move `thread' local definition to block that uses
12174 it. Don't NULL initialize `event_child'.
12175 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12176 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12177 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12178
12179 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12180
12181 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12182 an extended waitstatus, or by a watchpoint.
12183 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12184 thread was stepping or has been stopped by a watchpoint.
12185
12186 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12187
12188 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12189 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12190 of another, then delete the previous, and validate all
12191 breakpoints.
12192 (validate_inserted_breakpoint): New.
12193 (delete_disabled_breakpoints): New.
12194 (validate_breakpoints): New.
12195 (check_mem_read): Validate breakpoints before trusting their
12196 shadow. Delete disabled breakpoints.
12197 (check_mem_write): Validate breakpoints before trusting they
12198 should be inserted. Delete disabled breakpoints.
12199 * mem-break.h (validate_breakpoints):
12200 * server.c (handle_query): Validate breakpoints when we see a
12201 qSymbol query.
12202
12203 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12204
12205 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12206 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12207 if we could tell there's a GDB breakpoint at stop_pc.
12208 (need_step_over_p): Don't do a step over if we find a GDB
12209 breakpoint at the resume PC.
12210
12211 * mem-break.c (struct raw_breakpoint): New.
12212 (enum bkpt_type): New type `gdb_breakpoint'.
12213 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12214 fields. New field `raw'.
12215 (find_raw_breakpoint_at): New.
12216 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12217 breakpoint instead.
12218 (set_breakpoint_at): Adjust.
12219 (delete_raw_breakpoint): New.
12220 (release_breakpoint): New.
12221 (delete_breakpoint): Rename to...
12222 (delete_breakpoint_1): ... this. Add proc parameter. Use
12223 release_breakpoint. Return ENOENT.
12224 (delete_breakpoint): Reimplement.
12225 (find_breakpoint_at): Delete.
12226 (find_gdb_breakpoint_at): New.
12227 (delete_breakpoint_at): Delete.
12228 (set_gdb_breakpoint_at): New.
12229 (delete_gdb_breakpoint_at): New.
12230 (gdb_breakpoint_here): New.
12231 (set_reinsert_breakpoint): Use release_breakpoint.
12232 (uninsert_breakpoint): Rename to ...
12233 (uninsert_raw_breakpoint): ... this.
12234 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12235 (reinsert_raw_breakpoint): Change parameter type to
12236 raw_breakpoint.
12237 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12238 instead.
12239 (check_breakpoints): Adjust. Use release_breakpoint.
12240 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12241 (breakpoint_inserted_here): Ditto.
12242 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12243 Don't trust the breakpoint's shadow if it is not inserted.
12244 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12245 (delete_all_breakpoints): Adjust.
12246 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12247 use delete_breakpoint_1.
12248
12249 * mem-break.h (breakpoints_supported): Delete declaration.
12250 (set_gdb_breakpoint_at): Declare.
12251 (gdb_breakpoint_here): Declare.
12252 (delete_breakpoint_at): Delete.
12253 (delete_gdb_breakpoint_at): Declare.
12254
12255 * server.h (struct raw_breakpoint): Forward declare.
12256 (struct process_info): New field `raw_breakpoints'.
12257
12258 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12259 breakpoints.
12260
12261 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12262
12263 * linux-low.c (status_pending_p_callback): Fix comment.
12264 (linux_wait_for_event_1): Move most of the internal breakpoint
12265 handling from here...
12266 (linux_wait_1): ... to here.
12267 (count_events_callback): New.
12268 (select_singlestep_lwp_callback): New.
12269 (select_event_lwp_callback): New.
12270 (cancel_breakpoints_callback): New.
12271 (select_event_lwp): New.
12272 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12273 priority to all LWPs that have had events that should be reported
12274 to the client. Cancel breakpoints when about to reporting the
12275 event to the client, not while stopping lwps. No longer cancel
12276 finished single-steps here.
12277 (cancel_finished_single_step): Delete.
12278 (cancel_finished_single_steps): Delete.
12279
12280 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12281
12282 * mem-break.c (enum bkpt_type): New.
12283 (struct breakpoint): New field `type'.
12284 (set_breakpoint_at): Change return type to struct breakpoint
12285 pointer. Set type to `other_breakpoint' by default.
12286 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12287 in the breakpoint list.
12288 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12289 (reinsert_breakpoint): Rename to ...
12290 (reinsert_raw_breakpoint): ... this.
12291 (reinsert_breakpoints_at): Adjust.
12292 * mem-break.h (struct breakpoint): Declare.
12293 (set_breakpoint_at): Change return type to struct breakpoint
12294 pointer.
12295
12296 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12297
12298 * server.c (handle_query): Assign, not compare.
12299
12300 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12301
12302 Teach linux gdbserver to step-over-breakpoints.
12303
12304 * linux-low.c (can_hardware_single_step): New.
12305 (supports_breakpoints): New.
12306 (handle_extended_wait): If stopping threads, read the stop pc of
12307 the new cloned LWP.
12308 (get_pc): New.
12309 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12310 low target doesn't support retrieving the PC.
12311 (add_lwp): Set last_resume_kind to resume_continue.
12312 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12313 (linux_attach): Don't clear stop_expected. Set the lwp's
12314 last_resume_kind to resume_stop.
12315 (linux_detach_one_lwp): Don't check for removed breakpoints.
12316 (check_removed_breakpoint): Delete.
12317 (status_pending_p): Rename to ...
12318 (status_pending_p_callback): ... this. Don't check for removed
12319 breakpoints. Don't consider threads that are stopped from GDB's
12320 perspective.
12321 (linux_wait_for_lwp): Always read the stop_pc here.
12322 (cancel_breakpoint): New.
12323 (step_over_bkpt): New global.
12324 (linux_wait_for_event_1): Implement stepping over breakpoints.
12325 (gdb_wants_lwp_stopped): New.
12326 (gdb_wants_all_stopped): New.
12327 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12328 single-step traps here. Store the thread's last reported target
12329 wait status.
12330 (send_sigstop): Don't clear stop_expected. Always set it,
12331 instead.
12332 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12333 (cancel_finished_single_step): New.
12334 (cancel_finished_single_steps): New.
12335 (wait_for_sigstop): Don't cancel finished single-step traps here.
12336 (linux_resume_one_lwp): Don't check for removed breakpoints.
12337 Don't set `step' on non-hardware step archs.
12338 (linux_set_resume_request): Ignore resume_stop requests if already
12339 stopping or stopped. Set the lwp's last_resume_kind.
12340 (resume_status_pending_p): Don't check for removed breakpoints.
12341 (need_step_over_p): New.
12342 (start_step_over): New.
12343 (finish_step_over): New.
12344 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12345 requests. Clear the thread's last reported target waitstatus.
12346 Don't use the `suspended' flag. Don't consider pending breakpoints.
12347 (linux_resume): Start a step-over if necessary.
12348 (proceed_one_lwp): New.
12349 (proceed_all_lwps): New.
12350 (unstop_all_lwps): New.
12351 * linux-low.h (struct lwp_info): Rewrite comment for the
12352 `suspended' flag. Add the `stop_pc' field. Delete the
12353 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12354 Add `'last_resume_kind' and `need_step_over' fields.
12355 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12356 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12357 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12358 (set_raw_breakpoint_at): New.
12359 (set_breakpoint_at): Rewrite to use it.
12360 (reinsert_breakpoint_handler): Delete.
12361 (set_reinsert_breakpoint): New.
12362 (reinsert_breakpoint_by_bp): Delete.
12363 (delete_reinsert_breakpoints): New.
12364 (uninsert_breakpoint): Rewrite.
12365 (uninsert_breakpoints_at): New.
12366 (reinsert_breakpoint): Rewrite.
12367 (reinsert_breakpoints_at): New.
12368 (check_breakpoints): Rewrite.
12369 (breakpoint_here): New.
12370 (breakpoint_inserted_here): New.
12371 (check_mem_read): Adjust.
12372 * mem-break.h (breakpoints_supported, breakpoint_here)
12373 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12374 (reinsert_breakpoint_by_bp): Delete declaration.
12375 (delete_reinsert_breakpoints): Declare.
12376 (reinsert_breakpoint): Delete declaration.
12377 (reinsert_breakpoints_at): Declare.
12378 (uninsert_breakpoint): Delete declaration.
12379 (uninsert_breakpoints_at): Declare.
12380 (check_breakpoints): Adjust prototype.
12381 * server.h: Adjust include order.
12382 (struct thread_info): Declare here. Add a `last_status' field.
12383
12384 2010-03-23 Michael Snyder <msnyder@vmware.com>
12385
12386 * server.c (crc32): New function.
12387 (handle_query): Add handling for 'qCRC:' request.
12388
12389 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12390
12391 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12392 lwp had been stopped by a watchpoint.
12393
12394 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12395
12396 * server.h (internal_error): Declare.
12397 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12398 * utils.c (internal_error): New function.
12399
12400 2010-03-15 Andreas Schwab <schwab@redhat.com>
12401
12402 * configure.srv: Fix typo setting srv_regobj.
12403
12404 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12405
12406 * linux-low.c (fetch_register): Avoid passing a non string literal
12407 format to `error'.
12408 (usr_store_inferior_registers): Ditto.
12409
12410 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12411
12412 * linux-low.c (linux_write_memory): Bail out early if peeking
12413 memory failed.
12414
12415 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12416
12417 * linux-low.h (struct lwp_info): New fields
12418 `stopped_by_watchpoint' and `stopped_data_address'.
12419 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12420 here, and cache them in the lwp object.
12421 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12422 directly.
12423 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12424 field.
12425 (linux_stopped_by_watchpoint): Rewrite.
12426 (linux_stopped_data_address): Rewrite.
12427
12428 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12429
12430 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12431 switching the current inferior, not before.
12432
12433 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12434
12435 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12436 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12437 i386-linux.c and amd64-linux.c.
12438 (reg-i386.o): Removed.
12439 (reg-i386.c): Likewise.
12440 (reg-i386-linux.o): Likewise.
12441 (reg-i386-linux.c): Likewise.
12442 (reg-x86-64.o): Likewise.
12443 (reg-x86-64.c): Likewise.
12444 (reg-x86-64-linux.o): Likewise.
12445 (reg-x86-64-linux.c): Likewise.
12446 (i386.o): New.
12447 (i386.c): Likewise.
12448 (i386-linux.o): Likewise.
12449 (i386-linux.c): Likewise.
12450 (amd64.o): Likewise.
12451 (amd64.c): Likewise.
12452 (amd64-linux.o): Likewise.
12453 (amd64-linux.c): Likewise.
12454
12455 * configure.srv (srv_i386_regobj): New.
12456 (srv_i386_linux_regobj): Likewise.
12457 (srv_amd64_regobj): Likewise.
12458 (srv_amd64_linux_regobj): Likewise.
12459 (srv_i386_32bit_xmlfiles): Likewise.
12460 (srv_i386_64bit_xmlfiles): Likewise.
12461 (srv_i386_xmlfiles): Likewise.
12462 (srv_amd64_xmlfiles): Likewise.
12463 (srv_i386_linux_xmlfiles): Likewise.
12464 (srv_amd64_linux_xmlfiles): Likewise.
12465 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12466 srv_xmlfiles to $srv_i386_xmlfiles.
12467 (i[34567]86-*-mingw32ce*): Likewise.
12468 (i[34567]86-*-mingw*): Likewise.
12469 (i[34567]86-*-nto*): Likewise.
12470 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12471 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12472 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12473 (x86_64-*-linux*): Likewise.
12474
12475 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12476 (init_registers_amd64_linux): New.
12477 (x86_arch_setup): Replace init_registers_x86_64_linux with
12478 init_registers_amd64_linux.
12479
12480 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12481
12482 * configure.ac: Check for libdl. If it is not available link against
12483 static libthread_db.
12484 * configure: Regenerate.
12485
12486 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12487
12488 PR9605
12489
12490 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12491 handing a read watchpoint.
12492 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12493
12494 2010-02-12 Doug Evans <dje@google.com>
12495
12496 * linux-low.c (linux_supports_tracefork_flag): Document.
12497 (linux_look_up_symbols): Add comment.
12498
12499 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12500
12501 * regcache.c (supply_register): Clear regcache if buf is NULL.
12502
12503 2010-02-02 Nicolas Roche <roche@sourceware.org>
12504 Joel Brobecker <brobecker@adacore.com>
12505
12506 * inferiors.c (find_inferior): Add function documentation.
12507 (unloaded_dll): Handle the case where the unloaded dll has not
12508 been previously registered in the dll list.
12509
12510 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12511
12512 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12513 (thumb2_breakpoint): New.
12514 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12515
12516 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12517
12518 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12519 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12520 breakpoints.
12521
12522 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12523
12524 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12525
12526 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12527
12528 * linux-s390-low.c (s390_collect_ptrace_register)
12529 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12530
12531 2010-01-21 Doug Evans <dje@google.com>
12532
12533 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12534 (PTRACE_ARG4_TYPE): New macro.
12535 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12536 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12537 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12538 (usr_store_inferior_registers): Ditto.
12539 (linux_read_memory, linux_write_memory): Ditto.
12540 (linux_test_for_tracefork): Ditto.
12541
12542 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12543 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12544
12545 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12546
12547 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12548 target.
12549
12550 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12551
12552 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12553 prototype to take a regcache. Adjust.
12554
12555 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12556
12557 * regcache.h (struct thread_info): Forward declare.
12558 (struct regcache): New.
12559 (new_register_cache): Adjust prototype.
12560 (get_thread_regcache): Declare.
12561 (free_register_cache): Adjust prototype.
12562 (registers_to_string, registers_from_string): Ditto.
12563 (supply_register, supply_register_by_name, collect_register)
12564 (collect_register_as_string, collect_register_by_name): Ditto.
12565 * regcache.c (struct inferior_regcache_data): Delete.
12566 (get_regcache): Rename to ...
12567 (get_thread_regcache): ... this. Adjust. Switch inferior before
12568 fetching registers.
12569 (regcache_invalidate_one): Adjust.
12570 (regcache_invalidate): Fix prototype.
12571 (new_register_cache): Return the new register cache.
12572 (free_register_cache): Change prototype.
12573 (realloc_register_cache): Adjust.
12574 (registers_to_string): Change prototype to take a regcache. Adjust.
12575 (registers_from_string): Ditto.
12576 (register_data): Ditto.
12577 (supply_register): Ditto.
12578 (supply_register_by_name): Ditto.
12579 (collect_register): Ditto.
12580 (collect_register_as_string): Ditto.
12581 (collect_register_by_name): Ditto.
12582 * server.c (process_serial_event): Adjust.
12583 * linux-low.h (regset_fill_func, regset_store_func): Change
12584 prototype.
12585 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12586 Change prototype.
12587 * linux-low.c (get_stop_pc): Adjust.
12588 (check_removed_breakpoint): Adjust.
12589 (linux_wait_for_event): Adjust.
12590 (linux_resume_one_lwp): Adjust.
12591 (fetch_register): Add regcache parameter. Adjust.
12592 (usr_store_inferior_registers): Ditto.
12593 (regsets_fetch_inferior_registers): Ditto.
12594 (regsets_store_inferior_registers): Ditto.
12595 (linux_fetch_registers, linux_store_registers): Ditto.
12596 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12597 regcache. Adjust.
12598 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12599 Ditto.
12600 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12601 prototype to take a regcache.
12602 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12603 * remote-utils.c (convert_ascii_to_int, outreg)
12604 (prepare_resume_reply): Change prototype to take a regcache.
12605 Adjust.
12606 * target.h (struct target_ops) <fetch_registers, store_registers>:
12607 Change prototype to take a regcache.
12608 (fetch_inferior_registers, store_inferior_registers): Change
12609 prototype to take a regcache. Adjust.
12610 * proc-service.c (ps_lgetregs): Adjust.
12611 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12612 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12613 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12614 take a regcache. Adjust.
12615 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12616 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12617 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12618 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12619 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12620 (cris_cannot_fetch_register):
12621 (cris_breakpoint_at): Change prototype to take a regcache.
12622 Adjust.
12623 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12624 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12625 to take a regcache. Adjust.
12626 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12627 Adjust.
12628 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12629 take a regcache. Adjust.
12630 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12631 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12632 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12633 * linux-mips-low.c (mips_get_pc):
12634 (mips_set_pc): Change prototype to take a regcache. Adjust.
12635 (mips_reinsert_addr): Adjust.
12636 (mips_collect_register): Change prototype to take a regcache.
12637 Adjust.
12638 (mips_supply_register):
12639 (mips_collect_register_32bit, mips_supply_register_32bit)
12640 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12641 (mips_store_fpregset): Ditto.
12642 * linux-ppc-low.c (ppc_supply_ptrace_register)
12643 (ppc_supply_ptrace_register): Ditto.
12644 (parse_spufs_run): Adjust.
12645 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12646 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12647 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12648 take a regcache. Adjust.
12649 * linux-s390-low.c (s390_collect_ptrace_register)
12650 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12651 (s390_set_pc): Change prototype to take a regcache. Adjust.
12652 (s390_arch_setup): Adjust.
12653 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12654 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12655 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12656 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12657 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12658 regcache. Adjust.
12659 (sparc_breakpoint_at): Adjust.
12660 * linux-xtensa-low.c (xtensa_fill_gregset):
12661 (xtensa_store_gregset):
12662 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12663 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12664 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12665 prototype to take a regcache. Adjust.
12666 * win32-arm-low.c (arm_fetch_inferior_register)
12667 (arm_store_inferior_register): Change prototype to take a
12668 regcache. Adjust.
12669 * win32-i386-low.c (i386_fetch_inferior_register)
12670 (i386_store_inferior_register): Change prototype to take a
12671 regcache. Adjust.
12672 * win32-low.c (child_fetch_inferior_registers)
12673 (child_store_inferior_registers): Change prototype to take a
12674 regcache. Adjust.
12675 (win32_wait): Adjust.
12676 (win32_fetch_inferior_registers): Change prototype to take a
12677 regcache. Adjust.
12678 (win32_store_inferior_registers): Adjust.
12679 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12680 store_inferior_register>: Change prototype to take a regcache.
12681
12682 2010-01-20 Doug Evans <dje@google.com>
12683
12684 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12685 #ifdef.
12686 (linux_wait_for_event1, linux_init_signals): Ditto.
12687 (W_STOPCODE): Provide definition if missing.
12688
12689 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12690
12691 * linux-low.c (linux_core_of_thread): New.
12692 (compare_ints, show_process, list_threads): New.
12693 (linux_qxfer_osdata): Report threads and cores.
12694 (linux_target_op): Register linux_core_of_thread.
12695 * remote-utils.c (prepare_resume_reply): Report the core.
12696 (buffer_xml_printf): Support %d specifier.
12697 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12698 New.
12699 (handle_query): Handle qXfer:threads. Announce availability
12700 thereof.
12701 * target.h (struct target_ops): New field core_of_thread.
12702
12703 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12704
12705 * Makefile.in (clean): Remove new generated files.
12706 (reg-s390.o, reg-s390.c): Remove rules.
12707 (reg-s390x.o, reg-s390x.c): Likewise.
12708 (s390-linux32.o, s390-linux32.c): Add rules.
12709 (s390-linux64.o, s390-linux64.c): Likewise.
12710 (s390x-linux64.o, s390x-linux64.c): Likewise.
12711 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12712 * linux-s390-low.c: Include <elf.h>.
12713 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12714 (init_registers_s390): Remove prototype.
12715 (init_registers_s390x): Likewise.
12716 (init_registers_s390_linux32): Add prototype.
12717 (init_registers_s390_linux64): Likewise.
12718 (init_registers_s390x_linux64): Likewise.
12719 (s390_num_regs_3264): New define.
12720 (s390_regmap_3264): New global variable.
12721 (s390_cannot_fetch_register): Remove obsolete check.
12722 (s390_cannot_store_register): Likewise.
12723 (s390_collect_ptrace_register): Handle upper/lower register halves.
12724 (s390_supply_ptrace_register): Likewise.
12725 (s390_fill_gregset): Update to register number changes.
12726 (s390_get_hwcap): New routine.
12727 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12728 Install appropriate regmap and register set.
12729
12730 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12731
12732 * server.c (gdbserver_version): Update copyright year to 2010.
12733 * gdbreplay.c (gdbreplay_version): Likewise.
12734
12735 2009-12-28 Doug Evans <dje@google.com>
12736
12737 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12738 elf/external.h. Include <elf.h> instead but only if necessary.
12739
12740 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12741
12742 * linux-low.c (linux_remove_process): Remove `detaching'
12743 parameter. Don't release/detach from thread_db here.
12744 (linux_kill): Release/detach from thread_db here, ...
12745 (linux_detach): ... and here, before actually detaching.
12746 (linux_wait_1): ... and here, when a process exits.
12747 * thread-db.c (any_thread_of): New.
12748 (thread_db_free): Switch the current inferior to a thread of the
12749 passed in process.
12750
12751 2009-12-21 Doug Evans <dje@google.com>
12752
12753 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12754
12755 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12756 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12757 warning ifndef __NR_tkill. Move setting of errno there too.
12758 Delete unnecessary resetting of errno after syscall.
12759 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12760
12761 * configure.ac: Check for dladdr.
12762 * config.in: Regenerate.
12763 * configure: Regenerate.
12764 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12765 (try_thread_db_load): Update.
12766
12767 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12768
12769 2009-12-18 Doug Evans <dje@google.com>
12770
12771 * event-loop.c: Include unistd.h if it exists.
12772
12773 * linux-low.c (my_waitpid): Move definition away from being in
12774 between linux_tracefork_child/linux_test_for_tracefork.
12775
12776 * gdb_proc_service.h (psaddr_t): Fix type.
12777 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12778 signature to match glibc.
12779
12780 2009-12-16 Doug Evans <dje@google.com>
12781
12782 * linux-low.c (linux_read_memory): Fix argument to read.
12783
12784 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12785
12786 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12787 events, don't leave current_inferior pointing at null.
12788
12789 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12790
12791 * win32-low.c (LOG): Delete.
12792 (OUTMSG): Output to stderr.
12793 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12794 on compile time LOG macro.
12795 (win32_wait): Fix debug output.
12796
12797 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12798
12799 * win32-low.c (win32_add_one_solib): If the dll name is
12800 "ntdll.dll", prepend the system directory to the dll path.
12801
12802 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12803
12804 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12805
12806 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12807 Vladimir Prus <vladimir@codesourcery.com>
12808
12809 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12810 * configure.ac: Check for __mcoldfire__ and set
12811 gdb_cv_m68k_is_coldfire.
12812 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12813 reg-cf.o and reg-m68k.o.
12814 * configure: Regenerated.
12815
12816 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12817
12818 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12819 Pass it to thread_db_free.
12820 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12821 proper `detaching' argument to linux_remove_process.
12822 * linux-low.h (thread_db_free): Add `detaching' parameter.
12823 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12824 to thread_db_free.
12825 (thread_db_free): Add `detaching' parameter. Only
12826 call td_ta_clear_event if detaching from process.
12827
12828 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12829
12830 * thread-db.c (thread_db_free): Fix typo.
12831
12832 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12833
12834 PR gdb/10838
12835 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12836
12837 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12838
12839 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12840 with an i686 compiler.
12841 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12842 needed.
12843 * configure: Rebuilt.
12844
12845 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12846
12847 PR gdb/10783
12848
12849 * server.c (handle_search_memory_1): Correct read_addr initialization
12850 in loop for searching subsequent chunks.
12851
12852 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12853
12854 * configure.ac: New --with-libthread-db option.
12855 * thread-db.c: Allow direct dependence on libthread_db.
12856 (thread_db_free): Adjust.
12857 * config.in: Regenerate.
12858 * configure: Likewise.
12859
12860 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12861
12862 PR gdb/10757
12863 * thread-db.c (attach_thread): New function.
12864 (maybe_attach_thread): Return success/failure.
12865 (find_new_threads_callback): Adjust.
12866 (thread_db_find_new_threads): Loop until no new threads.
12867
12868 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12869
12870 * proc-service.c (ps_lgetregs): Formatting.
12871
12872 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12873
12874 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12875 * configure.ac: Adjust.
12876 * linux-low.h (struct process_info_private): Move members to struct
12877 thread_db.
12878 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12879 * linux-low.c (linux_remove_process): Adjust.
12880 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12881 * server.c (handle_query): Move code ...
12882 (handle_monitor_command): ... here. New function.
12883 * target.h (struct target_ops): New member.
12884 * thread-db.c (struct thread_db): New.
12885 (libthread_db_search_path): New variable.
12886 (thread_db_create_event, thread_db_enable_reporting)
12887 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12888 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12889 (try_thread_db_load_1, dladdr_to_soname): New functions.
12890 (try_thread_db_load, thread_db_load_search): New functions.
12891 (thread_db_init): Search for libthread_db.
12892 (thread_db_free): New function.
12893 (thread_db_handle_monitor_command): Likewise.
12894 * config.in: Regenerate.
12895 * configure: Regenerate.
12896
12897 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12898
12899 * spu-low.c (spu_kill): Wait for inferior to terminate.
12900 Call clear_inferiors.
12901 (spu_detach): Call clear_inferiors.
12902
12903 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12904
12905 * aclocal.m4: Regenerate.
12906 * config.in: Likewise.
12907 * configure: Likewise.
12908
12909 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12910
12911 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12912 (parse_spufs_run): New function.
12913 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12914 (ppc_breakpoint_at): Handle SPU breakpoints.
12915
12916 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12917
12918 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12919 (SPUFS_MAGIC): Define.
12920 (spu_enumerate_spu_ids): New function.
12921 (linux_qxfer_spu): New function.
12922 (linux_target_ops): Install linux_qxfer_spu.
12923
12924 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12925
12926 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12927 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12928 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12929 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12930 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12931 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12932 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12933 (init_registers_powerpc_cell32l): Add prototype.
12934 (init_registers_powerpc_cell64l): Likewise.
12935 (ppc_arch_setup): Detect Cell/B.E. architecture.
12936
12937 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12938
12939 * Makefile.in (datarootdir): New variable.
12940
12941 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12942
12943 * linux-low.c (linux_write_memory): Update debugging output.
12944 * Makefile.in (clean): Add new descriptions.
12945 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12946 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12947 * configure.srv: Add new files for arm*-*-linux*.
12948 * linux-arm-low.c: Add new declarations.
12949 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12950 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12951 (HWCAP_VFPv3D16): New.
12952 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12953 instead of __IWMMXT__.
12954 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12955 (arm_arch_setup): New.
12956 (target_regsets): Remove #ifdef. Add VFP regset.
12957 (the_low_target): Use arm_arch_setup.
12958
12959 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12960
12961 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12962 the main thread again.
12963
12964 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12965
12966 Adding Neutrino gdbserver.
12967 * configure: Regenerated.
12968 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12969 * configure.srv (i[34567]86-*-nto*): New target.
12970 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12971 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12972 (nto_comctrl) [__QNX__]: New function.
12973 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12974
12975 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12976
12977 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12978 srv_tgtobj.
12979
12980 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12981 Pedro Alves <pedro@codesourcery.com>
12982
12983 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12984 don't support CONTEXT_EXTENDED_REGISTERS.
12985 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12986 (the_low_target): Install them.
12987 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12988 failing with ERROR_PIPE_NOT_CONNECTED.
12989
12990 2009-06-30 Doug Evans <dje@google.com>
12991 Pierre Muller <muller@ics.u-strasbg.fr>
12992
12993 Add h/w watchpoint support to x86-linux, win32-i386.
12994 * Makefile.in (SFILES): Add i386-low.c
12995 (i386_low_h): Define.
12996 (i386-low.o): Add dependencies.
12997 (linux-x86-low.o): Add i386-low.h dependency.
12998 (win32-i386-low.o): Ditto.
12999 * i386-low.c: New file.
13000 * i386-low.h: New file.
13001 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13002 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13003 * linux-low.c (linux_add_process): Initialize arch_private.
13004 (linux_remove_process): Free arch_private.
13005 (add_lwp): Initialize arch_private.
13006 (delete_lwp): Free arch_private.
13007 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13008 provided.
13009 * linux-low.h (process_info_private): New member arch_private.
13010 (lwp_info): New member arch_private.
13011 (linux_target_ops): New members new_process, new_thread,
13012 prepare_to_resume.
13013 (ptid_of): New macro.
13014 * linux-x86-low.c: Include stddef.h, i386-low.h.
13015 (arch_process_info): New struct.
13016 (arch_lwp_info): New struct.
13017 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13018 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13019 (i386_dr_low_get_status): New function.
13020 (x86_insert_point, x86_remove_point): New functions.
13021 (x86_stopped_by_watchpoint): New function.
13022 (x86_stopped_data_address): New function.
13023 (x86_linux_new_process, x86_linux_new_thread): New functions.
13024 (x86_linux_prepare_to_resume): New function.
13025 (the_low_target): Add entries for insert_point, remove_point,
13026 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13027 prepare_to_resume.
13028 * server.c (debug_hw_points): New global.
13029 (monitor_show_help): Document set debug-hw-points.
13030 (handle_query): Process "set debug-hw-points".
13031 * server.h (debug_hw_points): Declare.
13032 (paddress): Declare.
13033 * utils.c (NUMCELLS, CELLSIZE): New macros.
13034 (get_sell, xsnprintf, paddress): New functions.
13035 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13036 remove_point, stopped_by_watchpoint, stopped_data_address.
13037 * win32-i386-low.c: Include i386-low.h.
13038 (debug_reg_state): Replaces dr.
13039 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13040 (i386_dr_low_get_status): New function.
13041 (i386_insert_point, i386_remove_point): New functions.
13042 (i386_stopped_by_watchpoint): New function.
13043 (i386_stopped_data_address): New function.
13044 (i386_initial_stuff): Update.
13045 (get_thread_context,set_thread_context,i386_thread_added): Update.
13046 (the_low_target): Add entries for insert_point,
13047 remove_point, stopped_by_watchpoint, stopped_data_address.
13048 * win32-low.c (win32_insert_watchpoint): New function.
13049 (win32_remove_watchpoint): New function.
13050 (win32_stopped_by_watchpoint): New function.
13051 (win32_stopped_data_address): New function.
13052 (win32_target_ops): Add entries for insert_watchpoint,
13053 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13054 * win32-low.h (win32_target_ops): New members insert_point,
13055 remove_point, stopped_by_watchpoint, stopped_data_address.
13056
13057 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13058
13059 * server.c (process_serial_event): Re-return unsupported, not
13060 error, if the type isn't recognized. Re-allow supporting only
13061 insert or remove packets. Also call require_running for
13062 breakpoints. Add missing break statement to default case. Tidy.
13063 * target.h (struct target_ops): Rename insert_watchpoint to
13064 insert_point, and remove_watchpoint to remove_point.
13065
13066 * linux-low.h (struct linux_target_ops): Likewise.
13067 * linux-low.c (linux_insert_watchpoint): Rename to ...
13068 (linux_insert_point): ... this. Adjust.
13069 (linux_remove_watchpoint): Rename to ...
13070 (linux_remove_point): ... this. Adjust.
13071 (linux_target_ops): Adjust.
13072 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13073 (cris_insert_point): ... this.
13074 (cris_remove_watchpoint): Rename to ...
13075 (cris_remove_point): ... this.
13076 (the_low_target): Adjust.
13077
13078 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13079
13080 * server.c (handle_v_kill): Pass signal_pid to
13081 kill_inferior if multi_process is zero.
13082
13083 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13084
13085 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13086 * target.h (target_ops): Comment for *_watchpoint to make it clear
13087 the functions can get types '0' and '1'.
13088
13089 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13090
13091 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13092 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13093 * regcache.c (get_regcache): Likewise.
13094 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13095 * win32-low.c (child_fetch_inferior_registers): Remove check for
13096 regno 0.
13097
13098 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13099 Pedro Alves <pedro@codesourcery.com>
13100
13101 * target.h (struct target_ops) <supports_multi_process>: New
13102 callback.
13103 (target_supports_multi_process): New.
13104 * server.c (handle_query): Even if GDB reports support, only
13105 enable multi-process if the target also supports it. Report
13106 multi-process support only if the target backend supports it.
13107 * linux-low.c (linux_supports_multi_process): New function.
13108 (linux_target_ops): Install it as target_supports_multi_process
13109 callback.
13110
13111 2009-05-24 Doug Evans <dje@google.com>
13112
13113 Global renaming of find_thread_pid to find_thread_ptid.
13114 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13115 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13116 All callers updated.
13117
13118 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13119 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13120 directly.
13121
13122 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13123 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13124 (linux_resume_one_lwp): Ditto.
13125
13126 2009-05-23 Doug Evans <dje@google.com>
13127
13128 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13129 from struct inferior_list_entry * to struct lwp_info *.
13130 All callers updated.
13131
13132 2009-05-13 Doug Evans <dje@google.com>
13133
13134 * linux-x86-low.c: Don't include assert.h.
13135 (x86_siginfo_fixup): Use fatal, not assert.
13136 (x86_arch_setup): Fix comment.
13137
13138 2009-05-12 Doug Evans <dje@google.com>
13139
13140 Biarch support for i386/amd64 gdbserver.
13141 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13142 Add linux-x86-low.c.
13143 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13144 (linux-x86-low.o): Add.
13145 * linux-x86-64-low.c: Delete.
13146 * linux-i386-low.c: Delete.
13147 * linux-x86-low.c: New file.
13148 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13149 linux-x86-low.o.
13150 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13151 linux-x86-low.o.
13152 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13153 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13154 (linux_child_pid_to_exec_file): New function.
13155 (elf_64_header_p, elf_64_file_p): New functions.
13156 (siginfo_fixup): New function.
13157 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13158 give target a chance to convert layout.
13159 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13160 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13161
13162 2009-05-07 Doug Evans <dje@google.com>
13163
13164 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13165 (regsets_store_inferior_registers): Ditto.
13166
13167 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13168
13169 PR server/10048
13170
13171 * linux-low.c (must_set_ptrace_flags): Delete.
13172 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13173 of the global.
13174 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13175 `lwp->must_set_ptrace_flags' instead.
13176 (linux_wait_for_event_1): Set ptrace options here.
13177 (linux_wait_1): ... not here.
13178
13179 2009-04-30 Doug Evans <dje@google.com>
13180
13181 * inferiors.c (started_inferior_callback): New function.
13182 (attached_inferior_callback): New function.
13183 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13184 * server.c (print_started_pid, print_attached_pid): New functions.
13185 (detach_or_kill_for_exit): New function.
13186 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13187 * server.h (have_started_inferiors_p): Declare.
13188 (have_attached_inferiors_p): Declare.
13189
13190 * inferiors.c (remove_process): Fix memory leak, free process.
13191 * linux-low.c (linux_remove_process): New function.
13192 (linux_kill): Call it instead of remove_process.
13193 (linux_detach, linux_wait_1): Ditto.
13194
13195 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13196
13197 * configure.srv: Add x86 Windows CE target.
13198
13199 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13200
13201 * inferiors.c (get_thread_process): Make global.
13202 * server.h (get_thread_process): Add prototype.
13203 * thread-db.c (find_one_thread): Use get_thread_process
13204 instead of current_process.
13205 (thread_db_get_tls_address): Do not crash if called when
13206 thread layer is not yet initialized.
13207
13208 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13209
13210 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13211 * spu-low.c (current_tid): Rename to ...
13212 (current_ptid): ... this.
13213 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13214 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13215 ptid_get_lwp (current_ptid) instead of current_tid.
13216 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13217 instead of current_tid. Use find_process_pid to verify pid
13218 argument is valid. Pass proper argument to remove_process.
13219 (spu_thread_alive): Compare current_ptid instead of current_tid.
13220 (spu_resume): Likewise.
13221
13222 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13223
13224 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13225 variable.
13226
13227 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13228
13229 Implement the multiprocess extensions, and add linux multiprocess
13230 support.
13231
13232 * server.h (ULONGEST): Declare.
13233 (struct ptid, ptid_t): New.
13234 (minus_one_ptid, null_ptid): Declare.
13235 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13236 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13237 (struct inferior_list_entry): Change `id' type from unsigned from
13238 to ptid_t.
13239 (struct sym_cache, struct breakpoint, struct
13240 process_info_private): Forward declare.
13241 (struct process_info): Declare.
13242 (current_process): Declare.
13243 (all_processes): Declare.
13244 (initialize_inferiors): Declare.
13245 (add_thread): Adjust to use ptid_t.
13246 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13247 (add_process, remove_process, find_thread_pid): Declare.
13248 (find_inferior_id): Adjust to use ptid_t.
13249 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13250 (multi_process): Declare.
13251 (push_event): Adjust to use ptid_t.
13252 (read_ptid, write_ptid): Declare.
13253 (prepare_resume_reply): Adjust to use ptid_t.
13254 (clear_symbol_cache): Declare.
13255 * inferiors.c (all_processes): New.
13256 (null_ptid, minus_one_ptid): New.
13257 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13258 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13259 (add_thread): Change unsigned long to ptid. Remove gdb_id
13260 parameter. Adjust.
13261 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13262 (gdb_id_to_thread): Rename to ...
13263 (find_thread_pid): ... this. Change unsigned long to ptid.
13264 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13265 (loaded_dll, pull_pid_from_list): Adjust.
13266 (add_process, remove_process, find_process_pid)
13267 (get_thread_process, current_process, initialize_inferiors): New.
13268 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13269 (struct target_waitstatus) <related_pid>: Ditto.
13270 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13271 return type to int.
13272 (struct target_ops) <join>: Add `pid' argument.
13273 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13274 (struct target_ops) <wait>: Add `ptid' field. Change return type
13275 to ptid.
13276 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13277 (mywait): Add `ptid' argument. Change return type to ptid_t.
13278 (target_pid_to_str): Declare.
13279 * target.c (set_desired_inferior): Adjust to use ptids.
13280 (mywait): Add new `ptid' argument. Adjust.
13281 (target_pid_to_str): New.
13282 * mem-break.h (free_all_breakpoints): Declare.
13283 * mem-break.c (breakpoints): Delelete.
13284 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13285 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13286 to use per-process breakpoint list.
13287 (free_all_breakpoints): New.
13288 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13289 (symbol_cache, all_symbols_looked_up): Delete.
13290 (hexchars): New.
13291 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13292 read_ptid): New.
13293 (prepare_resume_reply): Change ptid argument's type from unsigned
13294 long to ptid_t. Adjust. Implement W;process and X;process.
13295 (free_sym_cache, clear_symbol_cache): New.
13296 (look_up_one_symbol): Adjust to per-process symbol cache. *
13297 * server.c (cont_thread, general_thread, step_thread): Change type
13298 to ptid_t.
13299 (attached): Delete.
13300 (multi_process): New.
13301 (last_ptid): Change type to ptid_t.
13302 (struct vstop_notif) <ptid>: Change type to ptid_t.
13303 (queue_stop_reply, push_event): Change `ptid' argument's type to
13304 ptid_t.
13305 (discard_queued_stop_replies): Add `pid' argument.
13306 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13307 changes. Don't reference the `attached' global.
13308 (attach_inferior): Adjust to mywait interface changes.
13309 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13310 features. Handle and report "multiprocess+". Handle
13311 "qAttached:PID".
13312 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13313 changes.
13314 (handle_v_kill): New.
13315 (handle_v_stopped): Adjust to use target_pid_to_str.
13316 (handle_v_requests): Allow multiple attaches and runs when
13317 multiprocess extensions are in effect. Handle "vKill".
13318 (myresume): Adjust to use ptids.
13319 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13320 (handle_status): Adjust to discard_queued_stop_replies interface
13321 change.
13322 (first_thread_of, kill_inferior_callback)
13323 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13324 (main): Call initialize_inferiors. Adjust to use ptids, killing
13325 and detaching from all inferiors. Handle multiprocess packet
13326 variants.
13327 * linux-low.h: Include gdb_proc_service.h.
13328 (struct process_info_private): New.
13329 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13330 <lwpid_of>: Use ptid_get_lwp.
13331 (get_lwp_thread): Adjust.
13332 (struct lwp_info): Add `dead' member.
13333 (find_lwp_pid): Declare.
13334 * linux-low.c (thread_db_active): Delete.
13335 (new_inferior): Adjust comment.
13336 (inferior_pid): Delete.
13337 (linux_add_process): New.
13338 (handle_extended_wait): Adjust.
13339 (add_lwp): Change unsigned long to ptid.
13340 (linux_create_inferior): Add process to processes table. Adjust
13341 to use ptids. Don't set new_inferior here.
13342 (linux_attach_lwp): Rename to ...
13343 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13344 it. Adjust to use ptids.
13345 (linux_attach_lwp): New.
13346 (linux_attach): Add process to processes table. Don't set
13347 new_inferior here.
13348 (struct counter): New.
13349 (second_thread_of_pid_p, last_thread_of_process_p): New.
13350 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13351 multiple processes.
13352 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13353 processes. Remove process from process table.
13354 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13355 to multiple processes.
13356 (any_thread_of): New.
13357 (linux_detach): Add `pid' argument, and handle it. Remove process
13358 from processes table.
13359 (linux_join): Add `pid' argument. Handle it.
13360 (linux_thread_alive): Change unsighed long argument to ptid_t.
13361 Consider dead lwps as not being alive.
13362 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13363 threads we're not interested in.
13364 (same_lwp, find_lwp_pid): New.
13365 (linux_wait_for_lwp): Change `pid' argument's type from int to
13366 ptid_t. Adjust.
13367 (linux_wait_for_event): Rename to ...
13368 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13369 from int to ptid_t. Adjust.
13370 (linux_wait_for_event): New.
13371 (linux_wait_1): Add `ptid' argument. Change return type to
13372 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13373 that exit from the process table.
13374 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13375 Adjust.
13376 (mark_lwp_dead): New.
13377 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13378 stopping all threads, mark its main lwp as dead.
13379 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13380 ptids.
13381 (fetch_register, usr_store_inferior_registers)
13382 (regsets_fetch_inferior_registers)
13383 (regsets_store_inferior_registers, linux_read_memory)
13384 (linux_write_memory): Inline `inferior_pid'.
13385 (linux_look_up_symbols): Adjust to use per-process
13386 `thread_db_active'.
13387 (linux_request_interrupt): Adjust to use ptids.
13388 (linux_read_auxv): Inline `inferior_pid'.
13389 (initialize_low): Don't reference thread_db_active.
13390 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13391 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13392 (ps_getpid): Return the pid of the current inferior.
13393 * thread-db.c (proc_handle, thread_agent): Delete.
13394 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13395 per-process data.
13396 (find_one_thread): Change argument type to ptid_t. Adjust to
13397 per-process data.
13398 (maybe_attach_thread): Adjust to per-process data and ptids.
13399 (thread_db_find_new_threads): Ditto.
13400 (thread_db_init): Ditto.
13401 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13402 processes table. Adjust to use ptids.
13403 (spu_kill, spu_detach): Adjust interface. Remove process from
13404 processes table.
13405 (spu_join, spu_thread_alive): Adjust interface.
13406 (spu_wait): Adjust interface. Remove process from processes
13407 table. Adjust to use ptids.
13408 * win32-low.c (current_inferior_tid): Delete.
13409 (current_inferior_ptid): New.
13410 (debug_event_ptid): New.
13411 (thread_rec): Take a ptid. Adjust.
13412 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13413 (child_delete_thread): Ditto.
13414 (do_initial_child_stuff): Add `attached' argument. Add process to
13415 processes table.
13416 (child_fetch_inferior_registers, child_store_inferior_registers):
13417 Adjust.
13418 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13419 (win32_attach): Pass 1 to do_initial_child_stuff.
13420 (win32_kill): Adjust interface. Remove process from processes
13421 table.
13422 (win32_detach): Ditto.
13423 (win32_join): Adjust interface.
13424 (win32_thread_alive): Take a ptid.
13425 (win32_resume): Adjust to use ptids.
13426 (get_child_debug_event): Ditto.
13427 (win32_wait): Adjust interface. Remove exiting process from
13428 processes table.
13429
13430 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13431
13432 Non-stop mode support.
13433
13434 * server.h (non_stop): Declare.
13435 (gdb_client_data, handler_func): Declare.
13436 (delete_file_handler, add_file_handler, start_event_loop):
13437 Declare.
13438 (handle_serial_event, handle_target_event, push_event)
13439 (putpkt_notif): Declare.
13440 * target.h (enum resume_kind): New.
13441 (struct thread_resume): Replace `step' field by `kind' field.
13442 (TARGET_WNOHANG): Define.
13443 (struct target_ops) <wait>: Add `options' argument.
13444 <supports_non_stop, async, start_non_stop>: New fields.
13445 (target_supports_non_stop, target_async): New.
13446 (start_non_stop): Declare.
13447 (mywait): Add `options' argument.
13448 * target.c (mywait): Add `options' argument. Print child exit
13449 notifications here.
13450 (start_non_stop): New.
13451 * server.c (non_stop, own_buf, mem_buf): New globals.
13452 (struct vstop_notif): New.
13453 (notif_queue): New global.
13454 (queue_stop_reply, push_event, discard_queued_stop_replies)
13455 (send_next_stop_reply): New.
13456 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13457 interface changes.
13458 (attach_inferior): In non-stop mode, don't wait for the target
13459 here.
13460 (handle_general_set): Handle QNonStop.
13461 (handle_query): When handling qC, return the current general
13462 thread, instead of the first thread of the list.
13463 (handle_query): If the backend supports non-stop mode, include
13464 QNonStop+ in the qSupported query response.
13465 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13466 and non-stop mode.
13467 (handle_v_attach, handle_v_run): Handle non-stop mode.
13468 (handle_v_stopped): New.
13469 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13470 (myresume): Adjust to use resume_kind. Handle non-stop.
13471 (queue_stop_reply_callback): New.
13472 (handle_status): Handle non-stop mode.
13473 (main): Clear non_stop flag on reconnection. Use the event-loop.
13474 Refactor serial protocol handling from here ...
13475 (process_serial_event): ... to this new function. When GDB
13476 selects any thread, select one here. In non-stop mode, wait until
13477 GDB acks all pending events before exiting.
13478 (handle_serial_event, handle_target_event): New.
13479 * remote-utils.c (remote_open): Install remote_desc in the event
13480 loop.
13481 (remote_close): Remove remote_desc from the event loop.
13482 (putpkt_binary): Rename to...
13483 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13484 (putpkt_binary): New as wrapper around putpkt_binary_1.
13485 (putpkt_notif): New.
13486 (prepare_resume_reply): In non-stop mode, don't change the
13487 general_thread.
13488 * event-loop.c: New.
13489 * Makefile.in (OBJ): Add event-loop.o.
13490 (event-loop.o): New rule.
13491
13492 * linux-low.h (pid_of): Moved here.
13493 (lwpid_of): New.
13494 (get_lwp_thread): Use lwpid_of.
13495 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13496 * linux-low.c (pid_of): Delete.
13497 (inferior_pid): Use lwpid_of.
13498 (linux_event_pipe): New.
13499 (target_is_async_p): New.
13500 (delete_lwp): New.
13501 (handle_extended_wait): Use lwpid_of.
13502 (add_lwp): Don't set lwpid field.
13503 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13504 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13505 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13506 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13507 first. Adjust to linux_wait_for_event interface changes. Use
13508 lwpid_of.
13509 (linux_detach): Don't delete the main lwp here.
13510 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13511 (status_pending_p): Don't consider explicitly suspended lwps.
13512 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13513 pointer. Add OPTIONS argument. Change return type to int. Use
13514 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13515 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13516 pointer. Add status pointer argument. Return a pid instead of a
13517 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13518 changes. In non-stop mode, don't switch to a random thread.
13519 (linux_wait): Rename to...
13520 (linux_wait_1): ... this. Add target_options argument, and handle
13521 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13522 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13523 clean exit and signal exit code. Don't stop all threads in
13524 non-stop mode. In all-stop mode, only stop all threads when
13525 reporting a stop to GDB. Handle explicit thread stop requests.
13526 (async_file_flush, async_file_mark): New.
13527 (linux_wait): New.
13528 (send_sigstop): Use lwpid_of.
13529 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13530 interface changes. In non-stop mode, don't switch to a random
13531 thread.
13532 (linux_resume_one_lwp): Use lwpid_of.
13533 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13534 (linux_resume_one_thread): ... this. Handle resume_stop. In
13535 non-stop mode, don't look for pending flag in all threads.
13536 (resume_status_pending_p): Don't consider explicitly suspended
13537 threads.
13538 (my_waitpid): Reimplement. Emulate __WALL.
13539 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13540 Use lwpid_of.
13541 (sigchld_handler, linux_supports_non_stop, linux_async)
13542 (linux_start_non_stop): New.
13543 (linux_target_ops): Register linux_supports_non_stop, linux_async
13544 and linux_start_non_stop.
13545 (initialize_low): Install SIGCHLD handler.
13546 * thread-db.c (thread_db_create_event, find_one_thread)
13547 (thread_db_get_tls_address): Use lwpid_of.
13548 * win32-low.c (win32_detach): Adjust to use resume_kind.
13549 (win32_wait): Add `options' argument.
13550 * spu-low.c (spu_resume): Adjust to use resume_kind.
13551 (spu_wait): Add `options' argument.
13552
13553 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13554
13555 Decouple target code from remote protocol.
13556
13557 * target.h (enum target_waitkind): New.
13558 (struct target_waitstatus): New.
13559 (struct target_ops) <wait>: Return an unsigned long. Take a
13560 target_waitstatus pointer instead of a char pointer.
13561 (mywait): Likewise.
13562 * target.c (mywait): Change prototype to return an unsigned long.
13563 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13564 * server.h (thread_from_wait, old_thread_from_wait): Delete
13565 declarations.
13566 (prepare_resume_reply): Change prototype to take a
13567 target_waitstatus.
13568 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13569 (last_status, last_ptid): New.
13570 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13571 pid instead of a signal.
13572 (attach_inferior): Remove "status" and "signal" parameters.
13573 Adjust.
13574 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13575 not as an address.
13576 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13577 (handle_v_requests, myresume): Remove "status" and "signal"
13578 parameters. Adjust.
13579 (handle_status): New.
13580 (main): Delete local `status'. Adjust.
13581 * remote-utils.c: Include target.h.
13582 (prepare_resume_reply): Change prototype to take a
13583 target_waitstatus. Adjust.
13584
13585 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13586 interface.
13587 * spu-low.c (spu_wait): Adjust.
13588 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13589 Delete.
13590 (win32_wait): Adjust.
13591
13592 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13593
13594 * target.h (struct thread_resume): Delete leave_stopped member.
13595 (struct target_ops): Add a `n' argument to the `resume' callback.
13596 * server.c (start_inferior): Adjust.
13597 (handle_v_cont, myresume): Adjust.
13598 * linux-low.c (check_removed_breakpoint): Adjust to resume
13599 interface change, and to removed leave_stopped field.
13600 (resume_ptr): Delete.
13601 (struct thread_resume_array): New.
13602 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13603 resume interface change.
13604 (linux_continue_one_thread, linux_queue_one_thread)
13605 (resume_status_pending_p): Check if the resume field is NULL
13606 instead of checking the leave_stopped member.
13607 (linux_resume): Adjust to the target resume interface change.
13608 * spu-low.c (spu_resume): Adjust to the target resume interface
13609 change.
13610 * win32-low.c (win32_detach, win32_resume): Ditto.
13611
13612 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13613
13614 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13615 flag.
13616 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13617 pending.
13618 (linux_continue_one_thread): Only preserve the stepping flag if
13619 there's a pending breakpoint.
13620
13621 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13622
13623 * server.c (main): After the inferior having exited, call
13624 remote_close before exiting gdbserver.
13625
13626 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13627
13628 Fix size of FPSCR in Power 7 processors.
13629 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13630 (PPC_FEATURE_HAS_DFP): New #define.
13631 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13632 size of the FPSCR.
13633
13634 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13635
13636 * server.c (handle_query) Whitespace and formatting.
13637
13638 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13639
13640 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13641 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13642 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13643 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13644 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13645 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13646 Makefile.in, configure.ac: Fix whitespace throughout.
13647 * configure: Regenerate.
13648
13649 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13650
13651 * inferiors.c (find_inferior): Make it safe for the callback
13652 function to delete the currently iterated inferior.
13653
13654 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13655
13656 * Makefile.in (linuw_low_h): Move higher.
13657 (thread-db.o): Depend on $(linux_low_h).
13658
13659 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13660
13661 Rename "process" to "lwp" throughout.
13662
13663 * linux-low.c (all_processes): Rename to...
13664 (all_lwps): ... this.
13665 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13666 (add_process): Rename to ...
13667 (add_lwp): ... this. Adjust.
13668 (linux_create_inferior): Adjust.
13669 (linux_attach_lwp): Adjust.
13670 (linux_attach): Adjust.
13671 (linux_kill_one_process): Rename to ...
13672 (linux_kill_one_lwp): ... this. Adjust.
13673 (linux_kill): Adjust.
13674 (linux_detach_one_process): Rename to ...
13675 (linux_detach_one_lwp): ... this. Adjust.
13676 (linux_detach): Adjust.
13677 (check_removed_breakpoint): Adjust.
13678 (status_pending_p): Adjust.
13679 (linux_wait_for_process): Rename to ...
13680 (linux_wait_for_lwp): ... this. Adjust.
13681 (linux_wait_for_event): Adjust.
13682 (send_sigstop): Adjust.
13683 (wait_for_sigstop): Adjust.
13684 (stop_all_processes): Rename to ...
13685 (stop_all_lwps): ... this.
13686 (linux_resume_one_process): Rename to ...
13687 (linux_resume_one_lwp): ... this. Adjust.
13688 (linux_set_resume_request, linux_continue_one_thread)
13689 (linux_queue_one_thread, resume_status_pending_p)
13690 (usr_store_inferior_registers, regsets_store_inferior_registers)
13691 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13692 Adjust.
13693 * linux-low.h (get_process): Rename to ...
13694 (get_lwp): ... this. Adjust.
13695 (get_thread_process): Rename to ...
13696 (get_thread_lwp): ... this. Adjust.
13697 (get_process_thread): Rename to ...
13698 (get_lwp_thread): ... this. Adjust.
13699 (struct process_info): Rename to ...
13700 (struct lwp_info): ... this.
13701 (all_processes): Rename to ...
13702 (all_lwps): ... this.
13703 * proc-service.c (ps_lgetregs): Adjust.
13704 * thread-db.c (thread_db_create_event, find_one_thread)
13705 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13706
13707 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13708
13709 * server.c (handle_query): Handle "qAttached".
13710
13711 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13712
13713 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13714 GPLv3, update license URL.
13715
13716 2009-03-01 Doug Evans <dje@google.com>
13717
13718 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13719 (server_h): Add gdb_signals.h.
13720 (signals.o): Update.
13721 * server.h (target_signal_from_host,target_signal_to_host_p)
13722 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13723
13724 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13725
13726 * remote-utils.c (getpkt): Also generate remote-debug
13727 information if noack_mode is set.
13728
13729 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13730
13731 * server.c (handle_query): Report qXfer:siginfo:read and
13732 qXfer:siginfo:write as supported and handle them.
13733 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13734 * linux-low.c (linux_xfer_siginfo): New.
13735 (linux_target_ops): Set it.
13736
13737 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13738
13739 * server.c (gdbserver_usage): Mention --remote-debug.
13740 (main): Accept '--remote-debug' switch.
13741
13742 2009-01-18 Doug Evans <dje@google.com>
13743
13744 * regcache.c (new_register_cache): No need to check result of xcalloc.
13745 * server.c (handle_search_memory): Back out calls to xmalloc,
13746 result is checked and error is returned to user upon failure.
13747 (handle_query): Ditto. Add more checks for result of malloc.
13748 (handle_v_cont): Check result of malloc, report error back to
13749 user upon failure.
13750 (handle_v_run): Ditto. Call freeargv.
13751 * server.h (freeargv): Declare.
13752 * utils.c (freeargv): New fn.
13753
13754 2009-01-15 Doug Evans <dje@google.com>
13755
13756 * gdbreplay.c (perror_with_name): Make arg const char *.
13757 * server.h (target_signal_to_name): Make return type const char *.
13758 * thread-db.c (thread_db_err_str): Make return type const char *.
13759 * utils.c (perror_with_name): Make arg const char *.
13760
13761 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13762
13763 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13764 when handling a EXIT_PROCESS_DEBUG_EVENT.
13765
13766 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13767
13768 * gdbreplay.c (gdbreplay_version): Update copyright year.
13769 * server.c (gdbserver_version): Likewise.
13770
13771 2009-01-05 Doug Evans <dje@google.com>
13772
13773 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13774 (handle_extended_wait): Improve comment.
13775
13776 2008-12-13 Doug Evans <dje@google.com>
13777
13778 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13779 * server.h (ATTR_MALLOC): New macro.
13780 (xmalloc,xcalloc,xstrdup): Declare.
13781 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13782 * inferiors.c: Ditto.
13783 * linux-low.c: Ditto.
13784 * mem-break.c: Ditto.
13785 * regcache.c: Ditto.
13786 * remote-utils.c: Ditto.
13787 * server.c: Ditto.
13788 * target.c: Ditto.
13789 * win32-low.c: Ditto.
13790
13791 2008-12-12 Doug Evans <dje@google.com>
13792
13793 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13794 in debugging printf.
13795
13796 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13797
13798 2008-12-09 Doug Evans <dje@google.com>
13799
13800 * linux-low.h (struct process_info): Delete member tid, unused.
13801 * thread-db.c (find_one_thread): Update.
13802 (maybe_attach_thread): Update.
13803
13804 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13805
13806 * target.h (struct target_ops): Add qxfer_osdata member.
13807 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13808 and dirent.h.
13809 (linux_qxfer_osdata): New functions.
13810 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13811 callback.
13812 * server.c (handle_query): Handle "qXfer:osdata:read:".
13813 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13814 (buffer_xml_printf): New functions.
13815 * server.h (struct buffer): New.
13816 (buffer_grow_str, buffer_grow_str0): New macros.
13817 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13818 (buffer_xml_printf): Declare.
13819
13820 2008-11-24 Doug Evans <dje@google.com>
13821
13822 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13823
13824 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13825
13826 * server.c (handle_v_run): Always use the supplied argument list.
13827
13828 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13829
13830 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13831 (xtensa_regmap_table): Add entry for scompare1.
13832
13833 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13834
13835 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13836 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13837 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13838 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13839 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13840 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13841 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13842 XML target descriptions.
13843 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13844 when inferior is running on an ISA 2.05 or later processor. Add
13845 special case to return offset for full 64-bit slot of FPSCR when
13846 in 32-bits.
13847
13848 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13849
13850 * Makefile.in (SFILES, clean): Added sparc64 files.
13851 (reg-sparc64.o, reg-sparc64.c): New.
13852 * configure.srv (sparc*-*-linux*): New configuration.
13853 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13854 syscall arguments for SPARC.
13855 (regsets_store_inferior_registers): Likewise.
13856 * linux-sparc-low.c: New file.
13857
13858 2008-10-21 Doug Evans <dje@google.com>
13859
13860 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13861 (READLINE_DIR,READLINE_DEP): Delete.
13862 (INTERNAL_CFLAGS): Update.
13863 (LINTFLAGS): Update.
13864
13865 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13866
13867 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13868 whole argv from the last run, not just argv[0].
13869
13870 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13871
13872 * regcache.c (new_register_cache): Return NULL if the register
13873 cache size isn't known yet.
13874 (free_register_cache): Avoid dereferencing a NULL regcache.
13875
13876 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13877
13878 * configure.srv: Merge MIPS and MIPS64.
13879
13880 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13881
13882 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13883
13884 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13885
13886 * Makefile.in: Add required vsx dependencies.
13887
13888 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13889 Declare init_registers_powerpc_vsx32l.
13890 Declare init_registers_powerpc_vsx64l.
13891 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13892 (ppc_arch_setup): Check for VSX in hwcap.
13893 (ppc_fill_vsxregset): New function.
13894 (ppc_store_vsxregset): New function.
13895 Add new VSX entry in regset_info target_regsets.
13896
13897 * configure.srv: Add new VSX dependencies.
13898
13899 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13900
13901 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13902 (remote_open): Set or clear transport_is_reliable.
13903 (putpkt_binary): Don't expect acks in noack mode.
13904 (getpkt): Don't send ack/nac in noack mode.
13905 * server.c (handle_general_set): Handle QStartNoAckMode.
13906 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13907 qSupported.
13908 (main): Reset noack_mode on every connection.
13909 * server.h (noack_mode): Declare.
13910
13911 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13912
13913 * Makefile.in (GDBREPLAY_OBS): New variable.
13914 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13915
13916 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13917 Daniel Jacobowitz <dan@codesourcery.com>
13918
13919 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13920 (usr_store_inferior_registers): Likewise.
13921 (regsets_store_inferior_registers): Likewise.
13922
13923 2008-07-31 Rolf Jansen <rj@surtec.com>
13924 Pedro Alves <pedro@codesourcery.com>
13925
13926 * configure.ac: Check for memmem declaration.
13927 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13928 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13929 (disable_packet_qfThreadInfo): Unconditionally compile.
13930 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13931 * configure, config.in: Regenerate.
13932
13933 2008-07-28 Doug Kwan <dougkwan@google.com>
13934
13935 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13936 (linux_write_memory): Remove declaration of errno.
13937
13938 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13939
13940 * linux-low.c (handle_extended_wait): Do not use "status"
13941 variable uninitialized.
13942
13943 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13944
13945 * server.c (handle_v_attach): Inhibit reporting dll changes.
13946
13947 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13948
13949 * remote-utils.c (prepare_resume_reply): If requested, don't
13950 output "thread:TID" in the T stop reply.
13951
13952 * server.c (disable_packet_vCont, disable_packet_Tthread)
13953 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13954 (handle_query): If requested, disable support for qC, qfThreadInfo
13955 and qsThreadInfo.
13956 (handle_v_requests): If requested, disable support for vCont.
13957 (gdbserver_show_disableable): New.
13958 (main): Handle --disable-packet and --disable-packet=LIST.
13959
13960 * server.h (disable_packet_vCont, disable_packet_Tthread)
13961 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13962
13963 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13964
13965 * server.c (gdbserver_usage): Mention --version.
13966
13967 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13968
13969 * Makefile.in (gdbreplay.o): New rule.
13970
13971 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13972
13973 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13974 message, not gdbserver.
13975
13976 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13977 Nathan Sidwell <nathan@codesourcery.com>
13978 Joseph Myers <joseph@codesourcery.com>
13979
13980 * acinclude.m4: Include ../../config/acx.m4.
13981 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13982 * configure, config.in: Regenerate.
13983 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13984 * server.c (gdbserver_version): Print PKGVERSION.
13985 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13986 (main): Adjust gdbserver_usage calls.
13987 * gdbreplay.c (version, host_name): Add declarations.
13988 (gdbreplay_version, gdbreplay_usage): New.
13989 (main): Accept --version and --help options.
13990
13991 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13992
13993 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13994 (arm_breakpoint_at): Handle Thumb.
13995 (the_low_target): Add comment.
13996
13997 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13998
13999 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14000
14001 2008-05-09 Doug Evans <dje@google.com>
14002
14003 * server.h (decode_search_memory_packet): Declare.
14004 * remote-utils.c (decode_search_memory_packet): New fn.
14005 * server.c (handle_search_memory_1): New fn.
14006 (handle_search_memory): New fn.
14007 (handle_query): Process qSearch:memory packets.
14008
14009 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14010
14011 * regcache.c (registers_length): Remove.
14012 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14013 full register packet.
14014 * regcache.h (registers_length): Remove prototype.
14015 * server.h (PBUFSIZ): Define to 16384.
14016
14017 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14018
14019 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14020 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14021 powerpc-64l.o, and powerpc-altivec64l.o.
14022 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14023 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14024 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14025 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14026 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14027 to srv_xmlfiles.
14028
14029 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14030 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14031 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14032 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14033 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14034 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14035 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14036 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14037 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14038 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14039 (clean): Update.
14040
14041 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14042 (init_registers_powerpc_32l): ... this new prototype.
14043 (init_registers_powerpc_32): Remove, replace by ...
14044 (init_registers_powerpc_altivec32l): ... this new prototype.
14045 (init_registers_powerpc_e500): Remove, replace by ...
14046 (init_registers_powerpc_e500l): ... this new prototype.
14047 (init_registers_ppc64): Remove, replace by ...
14048 (init_registers_powerpc_64l): ... this new prototype.
14049 (init_registers_powerpc_64): Remove, replace by ...
14050 (init_registers_powerpc_altivec64l): ... this new prototype.
14051 (ppc_num_regs): Set to 73.
14052 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14053 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14054 (ppc_cannot_store_register): Handle orig_r3 and trap.
14055 (ppc_arch_setup): Update init_registers_... calls.
14056 (ppc_fill_gregset): Handle orig_r3 and trap.
14057
14058 * inferiors.c (clear_inferiors): Reset current_inferior.
14059
14060 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14061
14062 * acinclude.m4: Add override.m4.
14063 * configure: Regenerate.
14064
14065 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14066
14067 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14068 initial call to init_register_ppc64.
14069
14070 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14071
14072 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14073 single powerpc*-*-linux* case.
14074 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14075
14076 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14077
14078 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14079 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14080 from reg_xmlfiles.
14081 * linux-ppc-low.c: Include <elf.h>.
14082 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14083 (ppc_hwcap): New global variable.
14084 (ppc_regmap): Remove __SPE__ #ifdef sections.
14085 (ppc_regmap_e500): New global variable.
14086 (ppc_cannot_store_register): Update __SPE__ special case.
14087 (ppc_get_hwcap): New function.
14088 (ppc_arch_setup): Use it to determine whether inferior supports
14089 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14090 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14091 Do not access registers if target does not support AltiVec.
14092 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14093 Do not access registers if target does not support SPE.
14094 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14095
14096 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14097
14098 * linux-low.c (disabled_regsets, num_regsets): New.
14099 (use_regsets_p): Delete.
14100 (linux_wait_for_process): Clear disabled_regsets.
14101 (regsets_fetch_inferior_registers): Check and set it.
14102 (regsets_store_inferior_registers): Likewise.
14103 (linux_fetch_registers, linux_store_registers): Do not use
14104 use_regsets_p.
14105 (initialize_low): Allocate disabled_regsets.
14106
14107 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14108
14109 * Makefile.in (LIBOBJS): New.
14110 (OBS): Use LIBOBJS.
14111 (memmem.o): New rule.
14112 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14113 * configure: Regenerated.
14114
14115 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14116
14117 * server.c (handle_query): Never return "unsupported" for
14118 qXfer:features:read queries.
14119
14120 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14121
14122 * server.c (get_features_xml): Fix inverted condition.
14123 (handle_query): Always support qXfer:feature:read.
14124
14125 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14126
14127 * server.c (wrapper_argv): New.
14128 (start_inferior): Handle wrapper_argv. If set, expect an extra
14129 trap.
14130 (gdbserver_usage): Document --wrapper.
14131 (main): Parse --wrapper.
14132
14133 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14134
14135 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14136 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14137 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14138 (ppc_set_pc): Likewise.
14139 (ppc_arch_setup): New function.
14140 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14141 of collect_register.
14142 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14143
14144 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14145
14146 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14147 instead of linux-ppc64-low.o.
14148 * linux-ppc64-low.c: Remove file.
14149 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14150 (linux-ppc64-low.o): Remove rule.
14151
14152 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14153 (init_registers_powerpc_64): Likewise.
14154 (ppc_regmap): Conditionally define depending on __powerpc64__.
14155 (ppc_cannot_store_register): Do not special-case "fpscr" when
14156 compiled on __powerpc64__.
14157 (ppc_collect_ptrace_register): New function.
14158 (ppc_supply_ptrace_register): New function.
14159 (ppc_breakpoint): Change type to "unsigned int".
14160 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14161 (the_low_target): Conditionally provide initializers for the
14162 arch_setup member depending on __powerpc64__. Install
14163 collect_ptrace_register and supply_ptrace_register members.
14164
14165 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14166
14167 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14168 * server.c (gdbserver_xmltarget): Define.
14169 (get_features_xml): Use it to replace "target.xml" and arch_string.
14170
14171 * configure.srv: Remove srv_xmltarget. Add XML files that were
14172 mentioned there to srv_xmlfiles instead. Remove conditional tests
14173 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14174 srv_xmlfiles and srv_regobj to include all possible choices.
14175 * configure.ac (srv_xmltarget): Remove.
14176 (srv_xmlfiles): Do not add "target.xml".
14177 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14178 checks for supplementary target information.
14179 * configure: Regenerate.
14180 * Makefile.in (XML_TARGET): Remove.
14181 (target.xml): Remove rule.
14182 (clean): Do not clean up target.xml.
14183 (.PRECIOUS): Do not mention target.xml.
14184
14185 * target.h (struct target_ops): Remove arch_string member.
14186 * linux-low.c (linux_arch_string): Remove.
14187 (linux_target_ops): Remove arch_string initializer.
14188 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14189 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14190 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14191 * spu-low.c (spu_arch_string): Remove.
14192 (spu_target_ops): Remove arch_string initializer.
14193 * win32-low.c (win32_arch_string): Remove.
14194 (win32_target_ops): Remove arch_string initializer.
14195 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14196 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14197 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14198
14199 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14200
14201 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14202 by collect_ptrace_register and supply_ptrace_register hooks.
14203 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14204 instead of checking for the_low_target.left_pad_xfer.
14205 (usr_store_inferior_registers): Use collect_ptrace_register callback
14206 instead of checking for the_low_target.left_pad_xfer.
14207
14208 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14209 (s390_supply_ptrace_register): Likewise.
14210 (s390_fill_gregset): Call s390_collect_ptrace_register.
14211 (the_low_target): Update.
14212
14213 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14214 (ppc_supply_ptrace_register): Likewise.
14215 (the_low_target): Update.
14216
14217 * linux-i386-low.c (the_low_target): Update.
14218 * linux-x86-64-low.c (the_low_target): Update.
14219
14220 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14221
14222 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14223 reg-s390.o and reg-s390x.o.
14224
14225 * linux-low.c (new_inferior): New global variable.
14226 (linux_create_inferior, linux_attach): Set it.
14227 (linux_wait_for_process): Call the_low_target.arch_setup after the
14228 target has stopped for the first time.
14229 (initialize_low): Do not call the_low_target.arch_setup.
14230
14231 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14232 (s390_set_pc): Likewise.
14233 (s390_arch_setup): New function.
14234 (the_low_target): Use s390_arch_setup as arch_setup routine.
14235
14236 * regcache.c (realloc_register_cache): New function.
14237 (set_register_cache): Call it for each existing regcache.
14238
14239 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14240
14241 * server.h (init_registers): Remove prototype.
14242
14243 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14244 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14245 instead of init_registers ().
14246 * linux-arm-low.c (init_registers_arm): Add prototype.
14247 (init_registers_arm_with_iwmmxt): Likewise.
14248 (the_low_target): Add initializer for arch_setup field.
14249 * linux-cris-low.c (init_registers_cris): Add prototype.
14250 (the_low_target): Add initializer for arch_setup field.
14251 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14252 (the_low_target): Add initializer for arch_setup field.
14253 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14254 (the_low_target): Add initializer for arch_setup field.
14255 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14256 (the_low_target): Add initializer for arch_setup field.
14257 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14258 (the_low_target): Add initializer for arch_setup field.
14259 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14260 (the_low_target): Add initializer for arch_setup field.
14261 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14262 (init_registers_mips64_linux): Likewise.
14263 (the_low_target): Add initializer for arch_setup field.
14264 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14265 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14266 (the_low_target): Add initializer for arch_setup field.
14267 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14268 (init_registers_powerpc_64): Likewise.
14269 (the_low_target): Add initializer for arch_setup field.
14270 * linux-s390-low.c (init_registers_s390): Add prototype.
14271 (init_registers_s390x): Likewise.
14272 (the_low_target): Add initializer for arch_setup field.
14273 * linux-sh-low.c (init_registers_sh): Add prototype.
14274 (the_low_target): Add initializer for arch_setup field.
14275 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14276 (the_low_target): Add initializer for arch_setup field.
14277 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14278 (the_low_target): Add initializer for arch_setup field.
14279
14280 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14281 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14282 instead of init_registers ().
14283 * win32-arm-low.c (init_registers_arm): Add prototype.
14284 (the_low_target): Add initializer for arch_setup field.
14285 * win32-i386-low.c (init_registers_i386): Add prototype.
14286 (the_low_target): Add initializer for arch_setup field.
14287
14288 * spu-low.c (init_registers_spu): Add prototype.
14289 (initialize_low): Call initialie_registers_spu () instead of
14290 initialize_registers ().
14291
14292 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14293
14294 * server.c (handle_v_requests): When handling the vRun and vAttach
14295 packets, if already debugging a process, don't kill it. Return an
14296 error instead.
14297
14298 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14299
14300 * server.c (handle_query): Correct length check.
14301
14302 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14303
14304 * win32-low.c (do_initial_child_stuff): Add process handle
14305 parameter. Set current_process_handle and current_process_id from the
14306 parameters. Clear globals.
14307 (win32_create_inferior): Don't set current_process_handle and
14308 current_process_id here. Instead pass them on the call to
14309 do_initial_child_stuff.
14310 (win32_attach): Likewise.
14311 (win32_clear_inferiors): New.
14312 (win32_kill): Don't close the current process handle or the
14313 current thread handle here. Instead call win32_clear_inferiors.
14314 (win32_detach): Don't open a new handle to the process. Call
14315 win32_clear_inferiors.
14316 (win32_join): Don't rely on current_process_handle; open a new
14317 handle using the process id.
14318 (win32_wait): Call win32_clear_inferiors when the inferior process
14319 has exited.
14320
14321 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14322
14323 * server.c (monitor_show_help): Add "exit".
14324
14325 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14326
14327 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14328 (clean): Add reg-xtensa.c.
14329 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14330 * configure.srv (xtensa*-*-linux*) New target.
14331 * linux-xtensa-low.c: New.
14332 * xtensa-xtregs.c: New.
14333
14334 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14335
14336 * hostio.c: Don't include errno.h.
14337 (errno_to_fileio_errno): Move to hostio-errno.
14338 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14339 error number outputting to the target->hostio_last_error callback.
14340 (hostio_packet_error): Use FILEIO_EINVAL directly.
14341 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14342 calls to hostio_error.
14343 * hostio-errno.c: New.
14344 * server.h (hostio_last_error_from_errno): Declare.
14345 * target.h (target_ops): Add hostio_last_error member.
14346 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14347 as hostio_last_error handler.
14348 * spu-low.c (spu_target_ops): Likewise.
14349 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14350 (wince_hostio_last_error): New functions.
14351 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14352 as hostio_last_error handler.
14353 (win32_target_ops) [!_WIN32_WCE]: Register
14354 hostio_last_error_from_errno as hostio_last_error handler.
14355 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14356 (hostio-errno.o): New rule.
14357 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14358 * configure.srv (srv_hostio_err_objs): New variable. Default to
14359 hostio-errno.o.
14360 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14361 * configure: Regenerate.
14362
14363 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14364
14365 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14366 (linux_kill, linux_detach): Clean up the process list.
14367 * remote-utils.c (remote_open): Improve port number parsing.
14368 (putpkt_binary, input_interrupt): Only send interrupts if the target
14369 is running.
14370 * server.c (extended_protocol): Make static.
14371 (attached): Define earlier.
14372 (exit_requested, response_needed, program_argv): New variables.
14373 (target_running): New.
14374 (start_inferior): Clear attached here.
14375 (attach_inferior): Set attached here.
14376 (require_running): Define.
14377 (handle_query): Use require_running and target_running. Implement
14378 "monitor exit".
14379 (handle_v_attach, handle_v_run): New.
14380 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14381 (gdbserver_usage): Update.
14382 (main): Redo argument parsing. Handle --debug and --multi. Handle
14383 --attach along with other options or after the port. Save
14384 program_argv. Support no initial program. Resynchronize
14385 communication with GDB after an error. Handle "monitor exit".
14386 Use require_running and target_running. Always allow the extended
14387 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14388 restart in extended mode.
14389 * README: Refer to the GDB manual. Update --attach usage.
14390
14391 2007-12-20 Andreas Schwab <schwab@suse.de>
14392
14393 * linux-low.c (STACK_SIZE): Define.
14394 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14395 (linux_test_for_tracefork): Likewise.
14396
14397 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * linux-low.c (linux_wait_for_event): Update messages. Do not
14400 reinsert auto-delete breakpoints.
14401 * mem-break.c (struct breakpoint): Change return type of handler to
14402 int.
14403 (set_breakpoint_at): Update handler type.
14404 (reinsert_breakpoint_handler): Return 1 instead of calling
14405 delete_breakpoint.
14406 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14407 setting a new one.
14408 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14409 * mem-break.h (set_breakpoint_at): Update handler type.
14410 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14411 * win32-low.c (auto_delete_breakpoint): New.
14412 (get_child_debug_event): Use it.
14413
14414 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14415
14416 * configure.ac: Check for pread and pwrite.
14417 * hostio.c (handle_pread): Fall back to lseek and read.
14418 (handle_pwrite): Fall back to lseek and write.
14419 * config.in, configure: Regenerated.
14420
14421 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14422
14423 * server.c (myresume): Add own_buf argument.
14424 (main): Update calls.
14425
14426 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14429 * remote-utils.c (remote_open): Do not call disable_async_io.
14430 (block_async_io): Delete.
14431 (unblock_async_io): Make static.
14432 (initialize_async_io): New.
14433 * server.c (handle_v_cont): Handle async I/O here.
14434 (myresume): Likewise. Move other common resume tasks here...
14435 (main): ... from here. Call initialize_async_io. Disable async
14436 I/O before the main loop.
14437 * server.h (initialize_async_io): Declare.
14438 (block_async_io, unblock_async_io): Delete prototypes.
14439 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14440
14441 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14442
14443 * remote-utils.c (readchar): Allow binary data in received messages.
14444
14445 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14446
14447 * win32-low.c (attaching): New global.
14448 (win32_create_inferior): Clear the `attaching' global.
14449 (win32_attach): Set the `attaching' global.
14450 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14451 attaching. Only set a breakpoint at the entry point if not
14452 attaching.
14453
14454 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14455
14456 * server.c (main): Don't report dll events on the initial
14457 connection on attaches.
14458
14459 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14460
14461 * server.c (main): Relax numerical bases supported for the pid of
14462 the --attach command line argument.
14463
14464 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14465
14466 * win32-low.c (win32_attach): Call OpenProcess before
14467 DebugActiveProcess, not after. Add last error output to error
14468 call.
14469
14470 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14471
14472 * win32-low.c (win32_get_thread_context)
14473 (win32_set_thread_context): New functions.
14474 (thread_rec): Use win32_get_thread_context.
14475 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14476 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14477 field.
14478
14479 2007-12-03 Leo Zayas
14480 Pedro Alves <pedro_alves@portugalmail.pt>
14481
14482 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14483 global variables.
14484 (child_add_thread): Minor cleanup.
14485 (child_continue): Resume artificially suspended threads before
14486 calling ContinueDebugEvent.
14487 (suspend_one_thread): New.
14488 (fake_breakpoint_event): New.
14489 (get_child_debug_event): Change return type to int. Check here if
14490 gdb sent an interrupt request. If a soft interrupt was requested,
14491 fake a breakpoint event. Return 0 if there is no event to handle,
14492 and 1 otherwise.
14493 (win32_wait): Don't check here if gdb sent an interrupt request.
14494 Ensure there is a valid event to handle.
14495 (win32_request_interrupt): Add soft interruption method as last
14496 resort.
14497
14498 2007-12-03 Leo Zayas
14499 Pedro Alves <pedro_alves@portugalmail.pt>
14500
14501 * win32-low.h (win32_thread_info): Add descriptions to the
14502 structure members. Replace `suspend_count' counter by a
14503 `suspended' flag.
14504 * win32-low.c (thread_rec): Update condition of when to get the
14505 context from the inferior. Rely on ContextFlags being set if it
14506 has already been retrieved. Only suspend the inferior thread if
14507 we haven't already. Warn if that fails.
14508 (continue_one_thread): s/suspend_count/suspended/. Only call
14509 ResumeThread once. Warn if that fails.
14510
14511 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14512
14513 * win32-low.c (win32_wait): Don't read from the inferior when it
14514 has already exited.
14515
14516 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14517
14518 * Makefile.in (win32_low_h): New variable.
14519 (win32-low.o): Add dependency on $(win32_low_h).
14520 (win32-arm-low.o, win32-i386-low.o): New rules.
14521
14522 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14523
14524 * hostio.c: Correct copyright year.
14525
14526 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14527
14528 * Makefile.in (OBS): Add hostio.o.
14529 (hostio.o): New rule.
14530 * server.h (handle_vFile): Declare.
14531 * hostio.c: New file.
14532 * server.c (handle_v_requests): Take packet_len and new_packet_len
14533 for binary packets. Call handle_vFile.
14534 (main): Update call to handle_v_requests.
14535
14536 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14537
14538 * linux-low.c: Include <sched.h>.
14539
14540 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14541
14542 * linux-low.c (linux_tracefork_grandchild): New.
14543 (linux_tracefork_child): Use clone.
14544 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14545
14546 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14547
14548 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14549
14550 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14551
14552 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14553
14554 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14555
14556 * inferiors.c (change_inferior_id): Delete.
14557 (add_pid_to_list, pull_pid_from_list): New.
14558 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14559 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14560 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14561 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14562 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14563 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14564 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14565 (using_threads): Always set to 1.
14566 (handle_extended_wait): New.
14567 (add_process): Do not set TID.
14568 (linux_create_inferior): Set must_set_ptrace_flags.
14569 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14570 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14571 (linux_thread_alive): Rename TID argument to LWPID.
14572 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14573 (linux_wait_for_event): Do not use TID or check using_threads. Update
14574 call to dead_thread_notify. Call handle_extended_wait.
14575 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14576 (send_sigstop): Delete sigstop_sent.
14577 (wait_for_sigstop): Avoid TID.
14578 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14579 (linux_test_for_tracefork): New.
14580 (linux_lookup_signals): Use thread_db_active and
14581 linux_supports_tracefork_flag.
14582 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14583 * linux-low.h (get_process_thread): Avoid TID.
14584 (struct process_ifo): Move thread_known and tid to the end. Remove
14585 sigstop_sent.
14586 (linux_attach_lwp, thread_db_init): Update prototypes.
14587 * server.h (change_inferior_id): Delete prototype.
14588 (add_pid_to_list, pull_pid_from_list): New prototypes.
14589 * thread-db.c (thread_db_use_events): New.
14590 (find_first_thread): Rename to...
14591 (find_one_thread): ...this. Update callers and messages. Do not
14592 call fatal. Check thread_db_use_events. Do not call
14593 change_inferior_id or new_thread_notify.
14594 (maybe_attach_thread): Update. Do not call new_thread_notify.
14595 (thread_db_init): Set thread_db_use_events. Check use_events.
14596 * utils.c (fatal, warning): Correct message prefix.
14597
14598 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14599
14600 * Makefile.in (clean): Remove new files.
14601 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14602 (powerpc-64.o, powerpc-64.c): New rules.
14603 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14604 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14605 with SPE.
14606 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14607 SPE targets.
14608 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14609 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14610 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14611 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14612 (target_regsets): Add AltiVec and SPE register sets.
14613 * configure.ac: Check for AltiVec and SPE.
14614 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14615 (ppc_fill_vrregset, ppc_store_vrregset): New.
14616 (target_regsets): Add AltiVec register set.
14617 * configure: Regenerated.
14618
14619 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * linux-low.c (O_LARGEFILE): Define.
14622 (linux_read_memory): Use /proc/PID/mem.
14623 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14624 * configure, config.in: Regenerated.
14625
14626 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14627
14628 * linux-low.c (linux_wait_for_event): Do not pass signals while
14629 single-stepping.
14630
14631 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14632
14633 * win32-low.c (create_process): New.
14634 (win32_create_inferior): Use create_process instead of
14635 CreateProcess. If create_process failed retry appending an ".exe"
14636 suffix. Store the GetLastError result immediatelly after
14637 create_process calls and use it on the call to error.
14638
14639 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14640
14641 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14642
14643 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14644
14645 * configure.ac: Switch license to GPLv3.
14646
14647 2007-08-01 Michael Snyder <msnyder@access-company.com>
14648
14649 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14650
14651 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14652
14653 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14654 typedef.
14655 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14656 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14657 CloseToolhelp32Snapshot.
14658 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14659 CloseToolhelp32Snapshot.
14660
14661 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14662
14663 * server.c (main): Check for inferior exit before main loop.
14664
14665 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14666
14667 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14668 instead of on tmp_desc.
14669
14670 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14671 Daniel Jacobowitz <dan@codesourcery.com>
14672
14673 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14674 (add_thread): Minor cleanups.
14675 (clear_inferiors): Move lower in the file. Clear the DLL
14676 list.
14677 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14678 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14679 (xml_escape_text): New.
14680 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14681 for qSupported.
14682 (handle_v_cont): Report errors.
14683 (gdbserver_version): Update.
14684 (main): Correct size of own_buf. Do not report initial DLL events.
14685 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14686 (unloaded_dll, xml_escape_text): New.
14687 * win32-low.c (enum target_waitkind): Update comments.
14688 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14689 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14690 (win32_EnumProcessModules, win32_GetModuleInformation)
14691 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14692 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14693 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14694 (win32_Module32First, win32_Module32Next, load_toolhelp)
14695 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14696 (get_child_debug_event): Handle DLL events.
14697 (win32_wait): Likewise.
14698
14699 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14700
14701 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14702 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14703
14704 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14705
14706 * win32-low.c (handle_output_debug_string): Ignore event if not
14707 waiting.
14708
14709 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14710
14711 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14712
14713 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14714
14715 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14716
14717 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14718
14719 * inferiors.c (change_inferior_id): Add comment.
14720 * linux-low.c (check_removed_breakpoint): Add an early
14721 prototype. Improve debug output.
14722 (linux_attach): Doc update.
14723 (linux_detach_one_process, linux_detach): Clean up before releasing
14724 each process.
14725 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14726 * linux-low.h (struct process_info): Doc improvement.
14727 * mem-break.c (delete_all_breakpoints): New.
14728 * mem-break.h (delete_all_breakpoints): New prototype.
14729 * thread-db.c (find_first_thread): New.
14730 (thread_db_create_event): Call it instead of
14731 thread_db_find_new_threads. Clean up unused variables.
14732 (maybe_attach_thread): Remove first thread handling.
14733 (thread_db_find_new_threads): Use find_first_thread.
14734 (thread_db_get_tls_address): Likewise.
14735
14736 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14737
14738 * thread-db.c (thread_db_find_new_threads): Add prototype.
14739 (thread_db_create_event): Check for the main thread before adding
14740 a new thread.
14741 (maybe_attach_thread): Only enable event reporting if TID == 0.
14742 (thread_db_get_tls_address): Check for new threads.
14743
14744 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14745
14746 * linux-low.c (linux_create_inferior): Try execv before execvp.
14747 * spu-low.c (spu_create_inferior): Likewise.
14748
14749 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14750
14751 * linux-low.c (linux_create_inferior): Change execv to execvp.
14752 * spu-low.c (spu_create_inferior): Likewies.
14753
14754 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14755
14756 * Makefile.in (clean): Clean new files instead of deleted ones.
14757 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14758 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14759 rules.
14760 * configure.srv: Specify XML files and new regformats for MIPS and
14761 MIPS64 GNU/Linux.
14762 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14763 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14764 an entry for the restart register.
14765 (mips_cannot_fetch_register, mips_cannot_store_register)
14766 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14767 register names to match the XML descriptions.
14768 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14769 restart register instead of $0.
14770
14771 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14772 Markus Deuling <deuling@de.ibm.com>
14773
14774 * remote-utils.c (decode_xfer_write): New function.
14775 * server.h (decode_xfer_write): Add prototype.
14776 * server.c (handle_query): Add PACKET_LEN argument. Support
14777 qXfer:spu:read and qXfer:spu:write packets.
14778 (main): Pass packet_len to handle_query.
14779 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14780 * target.h (target_ops): Add qxfer_spu.
14781
14782 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14783
14784 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14785 accessing non-seekable spufs files.
14786
14787 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14788
14789 * server.c (handle_query): Add reply for qC packet.
14790
14791 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14792 Leo Zayas <lerele@champenstudios@com>
14793
14794 * server.h (check_remote_input_interrupt_request): New function.
14795 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14796 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14797 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14798 (check_remote_input_interrupt_request): New function.
14799 * server.h (check_remote_input_interrupt_request): Declare.
14800 * win32-low.c (winapi_DebugBreakProcess,
14801 winapi_GenerateConsoleCtrlEvent): New typedefs.
14802 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14803 to 250 ms.
14804 (win32_wait): Check for remote interrupt request
14805 with check_remote_input_interrupt_request.
14806 (win32_request_interrupt): New function.
14807 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14808
14809 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14810
14811 * win32-low.c (debug_registers_changed,
14812 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14813 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14814 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14815 (thread_rec): Get context using the low target.
14816 (child_add_thread): Call thread_added on the low target,
14817 which does the same thing.
14818 (regptr): Delete.
14819 (do_initial_child_stuff): Remove debug registers references.
14820 Set context using the low target. Resume threads after
14821 setting the contexts.
14822 (child_continue): Remove dead variable. Remove debug
14823 registers references.
14824 (child_fetch_inferior_registers): Go through the low target.
14825 (do_child_store_inferior_registers): Remove.
14826 (child_store_inferior_registers): Go through the low target.
14827 (win32_resume): Remove debug registers references.
14828 Set context using the low target.
14829 (handle_exception): Change return type to void. Don't record
14830 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14831 first chance exception.
14832 (get_child_debug_event): Change return type to void. Remove
14833 goto loop. Always return after waiting for debug event.
14834 (win32_wait): Convert to switch statement. Handle spurious
14835 events.
14836
14837 * win32-i386-low.c (debug_registers_changed,
14838 debug_registers_used): New.
14839 (initial_stuff): Rename to ...
14840 (i386_initial_stuff): ... this. Clear debug registers
14841 state variables.
14842 (store_debug_registers): Delete.
14843 (i386_get_thread_context): New.
14844 (load_debug_registers): Delete.
14845 (i386_set_thread_context): New.
14846 (i386_thread_added): New.
14847 (single_step): Rename to ...
14848 (i386_single_step): ... this.
14849 (do_fetch_inferior_registers): Rename to ...
14850 (i386_fetch_inferior_register): ... this.
14851 (i386_store_inferior_register): New.
14852 (the_low_target): Adapt to new interface.
14853
14854 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14855 (arm_get_thread_context): New.
14856 (arm_set_thread_context): New.
14857 (regptr): New.
14858 (do_fetch_inferior_registers): Rename to ...
14859 (arm_fetch_inferior_register): ... this.
14860 (arm_store_inferior_register): New.
14861 (arm_wince_breakpoint): Reimplement as unsigned long.
14862 (arm_wince_breakpoint_len): Define.
14863 (the_low_target): Adapt to new interface.
14864
14865 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14866 load_debug_registers. Add get_thread_context, set_thread_context,
14867 thread_added and store_inferior_register. Rename
14868 fetch_inferior_registers to fetch_inferior_register.
14869 (regptr): Remove declaration.
14870
14871 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14872
14873 * linux-low.c (linux_detach): Change return type to int. Return 0.
14874 * spu-low.c (spu_detach): Likewise.
14875
14876 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14877
14878 * target.h (target_ops): Change return type of detach to int.
14879 Add join.
14880 (join_inferior): New.
14881 * server.c (main): Don't skip detach support on mingw32.
14882 If the inferior doesn't support detaching return error.
14883 Call join_inferior instead of using waitpid.
14884 * linux-low.c (linux_join): New.
14885 (linux_target_op): Add linux_join.
14886 * spu-low.c (spu_join): New.
14887 (spu_target_ops): Add spu_join.
14888 * win32-low.c (win32_detach): Adapt to new interface.
14889 Reopen current_process_handle before detaching. Issue a child
14890 resume before detaching.
14891 (win32_join): New.
14892 (win32_target_op): Add win32_join.
14893
14894 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14895
14896 * win32-low.c (win32-attach): Fix return value.
14897 * target.h (target_ops): Describe ATTACH return values.
14898
14899 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14900
14901 * win32-low.c (GETPROCADDRESS): Define.
14902 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14903 (winapi_DebugSetProcessKillOnExit): Likewise.
14904 (win32_create_inferior): Force usage of ansi CreateProcessA.
14905 (win32_attach): Use GETPROCADDRESS.
14906 (win32_detach): Likewise.
14907
14908 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14909
14910 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14911
14912 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14913
14914 * win32-low.c: Commit leftover changes from 2007-03-29.
14915
14916 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14917
14918 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14919 fields short instead of int. Add explicit padding.
14920 (i387_cache_to_fsave): Remove unnecessary casts.
14921 (i387_fsave_to_cache): Doc fix.
14922 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14923
14924 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14927 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14928
14929 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14930
14931 * configure.srv (arm*-*-mingw32ce*): Move near the other
14932 arm targets.
14933
14934 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14935
14936 * configure.ac: Add errno checking.
14937 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14938 sys/file.h and malloc.h.
14939 (AC_CHECK_DECLS): Add perror.
14940 (srv_mingwce): Handle.
14941 * configure.srv (i[34567]86-*-cygwin*): Add
14942 win32-i386-low.o to srv_tgtobj.
14943 (i[34567]86-*-mingw*): Likewise.
14944 (arm*-*-mingw32ce*): Add case.
14945 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14946 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14947 [__MINGW32CE__] (strerror): New function.
14948 [__MINGW32CE__] (errno): Define to GetLastError.
14949 [__MINGW32CE__] (COUNTOF): New macro.
14950 (remote_open): Remove extra close call.
14951 * mem-break.c (delete_breakpoint_at): New function.
14952 * mem-break.h (delete_breakpoint_at): Declare.
14953 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14954 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14955 [USE_WIN32API] (read, write): Add char* casts.
14956 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14957 * server.h: Include wincecompat.h on Windows CE.
14958 [HAVE_ERRNO_H]: Check.
14959 (perror): Declare if not declared.
14960 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14961 (perror_with_name): Remove errno declaration.
14962 * wincecompat.h: New.
14963 * wincecompat.c: New.
14964 * win32-low.h: New.
14965 * win32-arm-low.c: New.
14966 * win32-i386-low.c: New.
14967 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14968 (OUTMSG2): Make it safe.
14969 (_T): New macro.
14970 (COUNTOF): New macro.
14971 (NUM_REGS): Get it from the low target.
14972 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14973 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14974 (thread_rec): Let low target handle debug registers.
14975 (child_add_thread): Likewise.
14976 (child_init_thread_list): Likewise.
14977 (continue_one_thread): Likewise.
14978 (regptr): New.
14979 (do_child_fetch_inferior_registers): Move to ...
14980 * win32-i386-low.c: ... here, and rename to ...
14981 (do_fetch_inferior_registers): ... this.
14982 * win32-low.c (child_fetch_inferior_registers):
14983 Go through the low target.
14984 (do_child_store_inferior_registers): Use regptr.
14985 (strwinerror): New function.
14986 (win32_create_inferior): Handle Windows CE.
14987 Use strwinerror instead of strerror on Windows error
14988 codes. Add program to the error output.
14989 Don't close the main thread handle on Windows CE.
14990 (win32_attach): Use coredll.dll on Windows CE.
14991 (win32_kill): Close current process and current
14992 thread handles.
14993 (win32_detach): Use coredll.dll on Windows CE.
14994 (win32_resume): Let low target handle debug registers, and
14995 step request.
14996 (handle_exception): Add/Remove initial breakpoint. Avoid
14997 non-existant WSTOPSIG on Windows CE.
14998 (win32_read_inferior_memory): Cast to remove warning.
14999 (win32_arch_string): Go through the low target.
15000 (initialize_low): Call set_breakpoint_data with the low
15001 target's breakpoint.
15002 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15003 FOP_REGNUM, mappings): Move to ...
15004 * win32-i386-low.c: ... here.
15005 * win32-low.c (win32_thread_info): Move to ...
15006 * win32-low.h: ... here.
15007 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15008 win32-arm-low.c and wincecompat.c.
15009 (all:): Add $EXEEXT.
15010 (install-only:): Likewise.
15011 (gdbserver:): Likewise.
15012 (gdbreplay:): Likewise.
15013 * config.in: Regenerate.
15014 * configure: Regenerate.
15015
15016 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15017
15018 * win32-low.c: Rename typedef thread_info to
15019 win32_thread_info throughout.
15020
15021 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15022
15023 * win32-i386-low.c: Rename to ...
15024 * win32-low.c: ... this.
15025 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15026 * Makefile.in: Likewise.
15027
15028 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15029
15030 * remote-utils.c (monitor_output): Constify msg parameter.
15031 * server.h (monitor_output): Likewise.
15032 * win32-i386-low.c (handle_output_debug_string): New.
15033 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15034 handle_output_debug_string.
15035 (get_child_debug_event): Likewise.
15036
15037 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15038
15039 * server.c (main): Correct strtoul check.
15040
15041 2007-03-27 Jon Ringle <jon@ringle.org>
15042
15043 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15044
15045 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15046
15047 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15048
15049 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15050
15051 * terminal.h: Check HAVE_SGTTY_H.
15052
15053 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15054
15055 * remote-utils.c (remote_open): Print out the assigned port number.
15056
15057 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15058
15059 * remote-utils.c (monitor_output): New function.
15060 * server.c (debug_threads): Define here.
15061 (monitor_show_help): New function.
15062 (handle_query): Handle qRcmd.
15063 (main): Do not handle 'd' packet.
15064 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15065 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15066 of debug_threads.
15067
15068 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15069
15070 * Makefile.in (EXEEXT): New.
15071 (clean): Use $(EXEEXT).
15072
15073 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15074
15075 * target.h (target_ops): Rename send_signal to request_interrupt,
15076 and remove enum target_signal parameter.
15077 * linux-low.c (linux_request_interrupt): Rename from
15078 linux_send_signal, and always send SIGINT.
15079 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15080 and always send SIGINT.
15081 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15082 of send_signal.
15083 (input_interrupt): Likewise.
15084
15085 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15086
15087 * server.c (get_features_xml): Check if target implemented
15088 arch_string.
15089 * win32-i386-low.c (win32_arch_string): New.
15090 (win32_target_ops): Add win32_arch_string as arch_string member.
15091
15092 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15093
15094 * spu-low.c (spu_arch_string): New.
15095 (spu_target_ops): Add spu_arch_string.
15096
15097 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15098
15099 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15100 * configure.ac: Do not check for terminal.h.
15101 * configure, config.in: Regenerated.
15102
15103 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15104
15105 * Makefile.in (OBS): Add $(XML_BUILTIN).
15106 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15107 (clean): Update.
15108 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15109 (arm-with-iwmmxt.c): New.
15110 * config.in, configure: Regenerate.
15111 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15112 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15113 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15114 (arm*-*-linux*): Add iWMMXt and regset support.
15115 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15116 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15117 (arm_store_wmmxregset, target_regsets): New.
15118 * server.c (get_features_xml): Take annex argument. Check builtin
15119 XML documents.
15120 (handle_query): Handle multiple annexes.
15121
15122 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15123
15124 * remote-utils.c [USE_WIN32API] (read, write): Define.
15125 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15126 write.
15127
15128 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15129
15130 * linux-i386-low.c (the_low_target): Set arch_string.
15131 * linux-x86-64-low.c (the_low_target): Likewise.
15132 * linux-low.c (linux_arch_string): New.
15133 (linux_target_ops): Add it.
15134 * linux-low.h (struct linux_target_ops): Add arch_string.
15135 * server.c (write_qxfer_response): Use const void * for DATA.
15136 (get_features_xml): New.
15137 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15138 * target.h (struct target_ops): Add arch_string method.
15139
15140 2007-01-03 Denis Pilat <denis.pilat@st.com>
15141 Daniel Jacobowitz <dan@codesourcery.com>
15142
15143 * linux-low.c (linux_kill): Handle being called with no threads.
15144 * win32-i386-low.c (win32_kill): Likewise.
15145 (get_child_debug_event): Clear current_process_handle.
15146
15147 2006-12-30 Denis PILAT <denis.pilat@st.com>
15148 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * remote-utils.c (remote_open): Check the type of specified
15151 serial port devices before opening them.
15152 * server.c (main): Kill the inferior if an error occurs during
15153 the first remote_open.
15154
15155 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15156
15157 * README: Update supported targets.
15158
15159 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15160
15161 * Makefile.in (clean): Remove reg-mips64.c.
15162 (reg-mips64.c, reg-mips64.o): New rules.
15163 * configure.srv: Handle mips64. Include regset support for mips.
15164 * linux-mips-low.c (union mips_register): New.
15165 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15166 (mips_breakpoint, mips_breakpoint_at): Use int.
15167 (mips_collect_register, mips_supply_register)
15168 (mips_collect_register_32bit, mips_supply_register_32bit)
15169 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15170 (mips_store_fpregset, target_regsets): New.
15171 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15172
15173 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15174
15175 * configure.srv: Add target "spu*-*-*".
15176 * Makefile.in (clean): Remove reg-spu.c.
15177 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15178 * spu-low.c: New file.
15179
15180 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15181
15182 * configure.ac: Correct td_thr_tls_get_addr test.
15183 * configure: Regenerated.
15184
15185 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15186
15187 * linux-low.c (linux_wait_for_event): Reformat. Use the
15188 pass_signals array.
15189 * remote-utils.c (decode_address_to_semicolon): New.
15190 * server.c (pass_signals, handle_general_set): New.
15191 (handle_query): Mention QPassSignals for qSupported.
15192 (main): Call handle_general_set.
15193 * server.h (pass_signals, decode_address_to_semicolon): New.
15194
15195 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15196
15197 * server.c (handle_query): Correct error handling for read_auxv.
15198
15199 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15200
15201 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15202 and srv_linux_thread_db to yes.
15203 * linux-s390-low.c (s390_fill_gregset): New function.
15204 (target_regsets): Define data structure.
15205
15206 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15207
15208 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15209 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15210 * config.in, configure: Regenerated.
15211 * inferiors.c (gdb_id_to_thread): New function.
15212 (gdb_id_to_thread_id): Use it.
15213 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15214 * linux-low.h (struct process_info): Add th member.
15215 (thread_db_get_tls_address): New prototype.
15216 * remote-utils.c (decode_address): Make non-static.
15217 * server.c (handle_query): Handle qGetTLSAddr.
15218 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15219 * target.h (struct target_ops): Add get_tls_address.
15220 * thread-db.c (maybe_attach_thread): Save the thread handle.
15221 (thread_db_get_tls_address): New.
15222
15223 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15224
15225 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15226 (linux_resume_one_process): Take a siginfo_t *. Update all
15227 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15228 (struct pending_signals): Add a siginfo_t.
15229 (linux_wait_for_process): Always set last_status.
15230 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15231 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15232 * linux-low.h (struct process_info): Add last_status.
15233
15234 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15235
15236 * remote-utils.c (try_rle): New function.
15237 (putpkt_binary): Use it.
15238
15239 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15240
15241 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15242 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15243 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15244 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15245 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15246 point registers.
15247
15248 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15249
15250 * server.c (terminal_fd): New variable.
15251 (old_foreground_pgrp): Likewise.
15252 (restore_old_foreground_pgrp): New function.
15253 (start_inferior): Record the terminal file descriptor in terminal_fd
15254 and its original foreground group in old_foreground_pgrp. Register
15255 restore_old_foreground_pgrp with atexit().
15256
15257 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15258
15259 * server.c (handle_query): Correct qPart to qXfer.
15260
15261 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15262
15263 * configure.ac: Check for more headers which are missing on
15264 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15265 * configure.srv: Add Cygwin and mingw32.
15266 * remote-utils.c: Don't include headers unconditionally which
15267 are missing on mingw32. Include <winsock.h> for mingw32.
15268 (remote_open): Adjust for mingw32 support. Flush
15269 standard error after writing to it.
15270 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15271 (unblock_async_io, enable_async_io, disable_async_io)
15272 (readchar, getpkt): Update for Winsock support.
15273 (prepare_resume_reply): Expect a protocol signal number.
15274 * server.c: Disable <sys/wait.h> on mingw32.
15275 (start_inferior): Adjust for mingw32 support. Flush
15276 standard error after writing to it.
15277 (attach_inferior): Likewise. Use protocol signal
15278 numbers.
15279 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15280 and names.
15281 * win32-i386-low.c: New file.
15282 * Makefile.in (XM_CLIBS): Set.
15283 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15284 (win32-i386-low.o): New dependency rule.
15285 * linux-low.c (linux_wait): Use target signal numbers.
15286 * target.h (struct target_ops): Doc fix.
15287 * server.h (target_signal_to_name): New prototype.
15288 * gdbreplay.c: Don't include headers unconditionally which
15289 are missing on mingw32. Include <winsock.h> for mingw32.
15290 (remote_close, remote_open): Adjust for Winsock support.
15291 * configure, config.in: Regenerated.
15292
15293 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15294
15295 * server.c (decode_xfer_read, write_qxfer_response): New.
15296 (handle_query): Take a packet length argument. Handle
15297 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15298 the qSupported response.
15299 (main): Update call to handle_query.
15300
15301 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15302
15303 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15304 (putpkt_binary): Renamed from putpkt and adjusted for binary
15305 data.
15306 (putpkt): New wrapper for putpkt_binary.
15307 (readchar): Don't mask off the high bit.
15308 (decode_X_packet): New function.
15309 * server.c (main): Call putpkt_binary if a handler sets the packet
15310 length. Save the length of the incoming packet. Handle 'X'.
15311 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15312
15313 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15314
15315 * server.c (handle_query): Handle qSupported.
15316
15317 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15318
15319 * remote-utils.c (all_symbols_looked_up): New variable.
15320 (look_up_one_symbol): Check it.
15321 * server.h (look_up_one_symbol): New declaration.
15322 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15323
15324 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15325
15326 * Makefile.in (linux-arm-low.o): Update dependencies.
15327 * linux-arm-low.c: Include "gdb_proc_service.h".
15328 (PTRACE_GET_THREAD_AREA): Define.
15329 (ps_get_thread_area): New function.
15330
15331 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15332
15333 * configure.srv (m68k*-*-uclinux*): New target.
15334 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15335 (linux_resume_one_process): Remove extraneous cast.
15336 (linux_read_offsets): New.
15337 (linux_target_op): Add linux_read_offsets on mmuless systems.
15338 * server.c (handle_query): Add qOffsets logic.
15339 * target.h (struct target_ops): Add read_offsets.
15340
15341 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15342
15343 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15344 (PTRACE_GET_THREAD_AREA): Define.
15345 (ps_get_thread_area): New function.
15346 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15347 (linux-x86-64-low.o): Update.
15348
15349 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15350
15351 * configure.ac: Remove checks for prfpregset_t.
15352 * gdb_proc_service.h: New file.
15353 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15354 new "gdb_proc_service.h".
15355 * proc-service.c: Likewise.
15356 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15357 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15358 * Makefile.in (gdb_proc_service_h): Updated.
15359 * configure, config.in: Regenerated.
15360
15361 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15362
15363 * remote-utils.c (prepare_resume_reply): Move declaration
15364 of gdb_id_from_wait to the top of the block.
15365
15366 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15367
15368 * linux-low.c (regsets_store_inferior_registers): Read the regset
15369 from the target before filling it.
15370
15371 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15372
15373 * server.c (attach_inferior): Return SIGTRAP for a successful
15374 attach.
15375
15376 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15377
15378 * Makefile.in (OBS): Add version.o.
15379 (STAGESTUFF): Delete.
15380 (version.o): Add dependencies.
15381 (version.c): Replace rule.
15382 (clean): Remove version.c.
15383 * server.c (gdbserver_version): New.
15384 (gdbserver_usage): Use printf.
15385 (main): Handle --version and --help.
15386 * server.h (version, host_name): Add declarations.
15387
15388 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15389
15390 * linux-arm-low.c:
15391 * linux-arm-low.c:
15392 * inferiors.c:
15393 * i387-fp.h:
15394 * i387-fp.c:
15395 * gdbreplay.c:
15396 * regcache.c:
15397 * proc-service.c:
15398 * mem-break.h:
15399 * mem-break.c:
15400 * linux-x86-64-low.c:
15401 * linux-sh-low.c:
15402 * linux-s390-low.c:
15403 * linux-ppc64-low.c:
15404 * linux-ppc-low.c:
15405 * linux-mips-low.c:
15406 * linux-m68k-low.c:
15407 * linux-m32r-low.c:
15408 * linux-low.h:
15409 * linux-low.c:
15410 * linux-ia64-low.c:
15411 * linux-i386-low.c:
15412 * linux-crisv32-low.c:
15413 * thread-db.c:
15414 * terminal.h:
15415 * target.h:
15416 * target.c:
15417 * server.h:
15418 * server.c:
15419 * remote-utils.c:
15420 * regcache.h:
15421 * utils.c:
15422 * Makefile.in:
15423 * configure.ac:
15424 * gdbserver.1: Add (C) after Copyright. Update the FSF
15425 address.
15426
15427 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15428
15429 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15430 (arm_breakpoint_at): Recognize both breakpoints.
15431 (the_low_target): Use the correct breakpoint instruction.
15432
15433 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15434
15435 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15436 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15437 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15438 (the_low_target): Update.
15439
15440 2005-10-25 Andreas Schwab <schwab@suse.de>
15441
15442 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15443
15444 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15445 (ia64_num_regs): Reduce to 462.
15446
15447 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15448
15449 * acinclude.m4: Correct quoting.
15450 * aclocal.m4: Regenerated.
15451
15452 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15453 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15454 (thread_db_init): Call thread_db_err_str.
15455 * configure.ac: Check for TD_VERSION.
15456 * config.in, configure: Regenerated.
15457
15458 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15459
15460 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15461
15462 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15463
15464 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15465 is not available. Define HAVE_PTRACE_GETREGS if it is.
15466 * config.in, configure: Regenerated.
15467 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15468 * linux-i386-low.c, linux-m68k-low.c: Update to use
15469 HAVE_PTRACE_GETREGS.
15470 * linux-low.c (regsets_fetch_inferior_registers)
15471 (regsets_store_inferior_registers): Only return 0 if we processed
15472 GENERAL_REGS.
15473 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15474 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15475
15476 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15477
15478 * inferiors.c (struct thread_info): Add gdb_id.
15479 (add_thread): Add gdb_id argument.
15480 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15481 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15482 calls to add_thread.
15483 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15484 * server.c (handle_query): Use thread_to_gdb_id.
15485 (handle_v_cont, main): Use gdb_id_to_thread_id.
15486 * server.h (add_thread): Update prototype.
15487 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15488 prototypes.
15489
15490 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15491
15492 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15493 left-padded registers.
15494 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15495 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15496
15497 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15498
15499 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15500 * configure: Regenerate.
15501 * config.in: Regenerate.
15502 * server.h (NEED_DECLARATION_STRERROR):
15503 Replace with !HAVE_DECL_STRERROR.
15504
15505 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15506
15507 * linux-low.c (linux_wait, linux_send_signal): Don't test
15508 an unsigned long variable for > 0 if it could be MAX_ULONG.
15509 * server.c (myresume): Likewise.
15510 * target.c (set_desired_inferior): Likewise.
15511
15512 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15513
15514 * configure.ac: Simplify and improve check for socklen_t.
15515 * configure, config.in: Regenerate.
15516
15517 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15518
15519 * acconfig.h: Remove.
15520 * configure.ac: Add a test for socklen_t. Use three-argument
15521 AC_DEFINE throughout.
15522 * config.in: Regenerated using autoheader 2.59.
15523 * configure: Regenerated.
15524
15525 * gdbreplay.c (socklen_t): Provide a default.
15526 (remote_open): Use socklen_t.
15527 * remote-utils.c (socklen_t): Provide a default.
15528 (remote_open): Use socklen_t.
15529 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15530 unsigned char.
15531
15532 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15533 char for buffers.
15534 * linux-low.c (linux_read_memory, linux_write_memory)
15535 (linux_read_auxv): Likewise.
15536 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15537 (check_mem_write): Likewise.
15538 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15539 Likewise.
15540 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15541 (registers_from_string, register_data): Likewise.
15542 * server.c (handle_query, main): Likewise.
15543 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15544 (decode_M_packet): Likewise.
15545 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15546 * target.h (struct target_ops): Update read_memory, write_memory,
15547 and read_auxv.
15548 (read_inferior_memory, write_inferior_memory): Update.
15549 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15550 to unsigned char *.
15551 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15552 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15553 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15554 linux-s390-low.c, linux-sh-low.c: Update for changes in
15555 read_inferior_memory and the_low_target->breakpoint.
15556
15557 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15558
15559 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15560 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15561 * configure.srv: Add powerpc64-*-linux*.
15562 * linux-ppc64-low.c: New file.
15563
15564 2005-05-23 Orjan Friberg <orjanf@axis.com>
15565
15566 * linux-cris-low.c: New file with support for CRIS.
15567 * linux-crisv32-low.c: Ditto for CRISv32.
15568 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15569 (clean): Add reg-cris.c and reg-crisv32.c.
15570 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15571 reg-crisv32.o, and reg-crisv32.c to make rules.
15572 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15573 recognized targets.
15574
15575 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15576
15577 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15578 of sizeof (PTRACE_XFER_TYPE).
15579 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15580
15581 2005-05-12 Orjan Friberg <orjanf@axis.com>
15582
15583 * target.h (struct target_ops): Add insert_watchpoint,
15584 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15585 pointers for hardware watchpoint support.
15586 * linux-low.h (struct linux_target_ops): Ditto.
15587 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15588 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15589 to linux_target_ops.
15590 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15591 reply packet.
15592 * server.c (main): Recognize 'Z' and 'z' packets.
15593
15594 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15595
15596 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15597 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15598 (the_low_target): Add new members.
15599
15600 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15601
15602 * proc-service.c (ps_lgetregs): Search all_processes instead of
15603 all_threads.
15604
15605 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15606
15607 * server.c (start_inferior): Change return type to int.
15608 (attach_inferior): Change sigptr to int *.
15609 (handle_v_cont, handle_v_requests): Change signal to int *.
15610 (main): Change signal to int.
15611
15612 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15613
15614 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15615 * configure.srv: Add m32r*-*-linux*.
15616 * linux-m32r-low.c: New file.
15617
15618 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15619
15620 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15621
15622 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15623
15624 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15625 Take unsigned long arguments for PIDs.
15626 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15627 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15628 (wait_for_sigstop, linux_resume_one_process)
15629 (regsets_fetch_inferior_registers, linux_send_signal)
15630 (linux_read_auxv): Likewise. Update the types of variables holding
15631 PIDs. Update format string specifiers.
15632 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15633 * remote-utils.c (prepare_resume_reply): Likewise.
15634 * server.c (cont_thread, general_thread, step_thread)
15635 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15636 unsigned long.
15637 (handle_query): Update format specifiers.
15638 (handle_v_cont, main): Use strtoul for thread IDs.
15639 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15640 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15641 (general_thread, step_thread, thread_from_wait)
15642 (old_thread_from_wait): Update.
15643 * target.h (struct thread_resume): Use unsigned long for THREAD.
15644 (struct target_ops): Use unsigned long for arguments to attach and
15645 thread_alive.
15646
15647 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15648
15649 * acinclude.m4: Include bfd/bfd.m4 directly.
15650 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15651 <agriffis@toolchain.org>.
15652 * aclocal.m4, configure: Regenerated.
15653
15654 2005-01-07 Andrew Cagney <cagney@gnu.org>
15655
15656 * configure.ac: Rename configure.in, require autoconf 2.59.
15657 * configure: Re-generate.
15658
15659 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15660
15661 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15662 LIBS when finished.
15663 * aclocal.m4: Regenerated.
15664 * configure: Regenerated.
15665
15666 2004-11-21 Andreas Schwab <schwab@suse.de>
15667
15668 * linux-m68k-low.c (m68k_num_gregs): Define.
15669 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15670 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15671 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15672 (m68k_breakpoint_at): New. Add to the_low_target.
15673
15674 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15675 srv_linux_thread_db to yes.
15676
15677 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15678
15679 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15680 (ARCH_SET_FS): Likewise.
15681 (ARCH_GET_FS): Likewise.
15682 (ARCH_GET_GS): Likewise.
15683
15684 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15685
15686 * linux-i386-low.c (ps_get_thread_area): New.
15687 * linux-x86-64-low.c (ps_get_thread_area): New.
15688 * linux-low.c: Include <sys/syscall.h>.
15689 (linux_kill_one_process): Don't kill the first thread here.
15690 (linux_kill): Kill the first thread here.
15691 (kill_lwp): New function.
15692 (send_sigstop, linux_send_signal): Use it.
15693 * proc-service.c: Clean up #ifdefs.
15694 (fpregset_info): Delete.
15695 (ps_lgetregs): Update and enable implementation.
15696 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15697 implementations.
15698 * remote-utils.c (struct sym_cache, symbol_cache): New.
15699 (input_interrupt): Print a clearer message.
15700 (async_io_enabled): New variable.
15701 (enable_async_io, disable_async_io): Use it. Update comments.
15702 (look_up_one_symbol): Use the symbol cache.
15703 * thread-db.c (thread_db_look_up_symbols): New function.
15704 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15705
15706 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15707
15708 * configure.in: Test for -rdynamic.
15709 * configure: Regenerated.
15710 * Makefile (INTERNAL_LDFLAGS): New.
15711 (gdbserver, gdbreplay): Use it.
15712
15713 2004-09-02 Andrew Cagney <cagney@gnu.org>
15714
15715 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15716
15717 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15718
15719 * linux-low.c (linux_wait): Clear all_processes list also.
15720
15721 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15722
15723 * linux-low.c: Include <errno.h>. Remove extern declaration of
15724 errno.
15725
15726 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15727
15728 * gdbreplay.c, server.h, utils.c: Update copyright years.
15729
15730 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15731
15732 * server.c (main): Print child status or termination signal from
15733 variable 'signal', not 'sig'.
15734
15735 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15736
15737 * linux-low.c (linux_read_memory): Change return type to
15738 int. Check for and return error from ptrace().
15739 * target.c (read_inferior_memory): Change return type to int. Pass
15740 back return status from the_target->read_memory().
15741 * target.h (struct target_ops): Adapt *read_memory() prototype.
15742 Update comment.
15743 (read_inferior_memory): Adapt prototype.
15744 * server.c (main): Return an error packet if
15745 read_inferior_memory() returns an error.
15746
15747 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15748
15749 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15750 Unify with other clean targets.
15751
15752 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15753
15754 * server.c (handle_v_cont): Call set_desired_inferior.
15755
15756 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15757
15758 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15759
15760 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15761
15762 * linux-low.c (linux_wait): Unblock async I/O.
15763 (linux_resume): Block and enable async I/O.
15764 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15765 * server.h (block_async_io, unblock_async_io): Add prototypes.
15766
15767 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15768
15769 * remote-utils.c (remote_open): Print a status notice after
15770 opening a TCP port.
15771 * server.c (attach_inferior): Print a status notice after
15772 attaching.
15773
15774 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15775
15776 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15777
15778 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15779
15780 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15781 error packet.
15782 * server.c, target.h: Update copyright years.
15783
15784 2004-02-25 Roland McGrath <roland@redhat.com>
15785
15786 * target.h (struct target_ops): New member `read_auxv'.
15787 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15788 * linux-low.c (linux_read_auxv): New function.
15789 (linux_target_ops): Initialize `read_auxv' member to that.
15790
15791 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15792
15793 Committed by Jim Blandy <jimb@redhat.com>.
15794
15795 * linux-s390-low.c (s390_num_regs): Update.
15796 (s390_regmap): Remove control registers. Use __s390x__ predefine
15797 instead of GPR_SIZE to distiguish s390 and s390x targets.
15798
15799 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15800
15801 * linux-low.c: Update copyright year.
15802 (check_removed_breakpoint): Clear pending_is_breakpoint.
15803 (linux_set_resume_request, linux_queue_one_thread)
15804 (resume_status_pending_p): New functions.
15805 (linux_continue_one_thread): Use process->resume.
15806 (linux_resume): Only resume threads if there are no pending events.
15807 * linux-low.h (struct process_info): Add resume request
15808 pointer.
15809
15810 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15811
15812 * regcache.c (new_register_cache): Clear the allocated register
15813 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15814
15815 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15816
15817 * linux-low.c (linux_resume): Take a struct thread_resume *
15818 argument.
15819 (linux_wait): Update call.
15820 (resume_ptr): New static variable.
15821 (linux_continue_one_thread): Renamed from
15822 linux_continue_one_process. Use resume_ptr.
15823 (linux_resume): Use linux_continue_one_thread.
15824 * server.c (handle_v_cont, handle_v_requests): New functions.
15825 (myresume): New function.
15826 (main): Handle 'v' case.
15827 * target.h (struct thread_resume): New type.
15828 (struct target_ops): Change argument of "resume" to struct
15829 thread_resume *.
15830 (myresume): Delete macro.
15831
15832 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15833
15834 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15835 (uninstall): Support DESTDIR.
15836
15837 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15838
15839 * configure.srv: Add xscale*linux copy of arm*linux entry.
15840
15841 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15842
15843 * linux-arm-low.c (arm_reinsert_addr): New function.
15844 (the_low_target): Add arm_reinsert_addr.
15845
15846 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15847
15848 * mem-break.c: Remove whitespace at end of file.
15849
15850 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15851
15852 * configure.in: Check whether we need to prototype strerror.
15853 * server.h: Optionally prototype strerror.
15854 * gdbreplay.c (perror_with_name): Use strerror.
15855 * linux-low.c (linux_attach_lwp): Use strerror.
15856 * utils.c (perror_with_name): Use strerror.
15857 * config.in, configure: Regenerated.
15858
15859 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15860
15861 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15862 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15863
15864 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15865
15866 * Makefile.in (SFILES): Update.
15867 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15868 low-sun3.c: Remove files.
15869
15870 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15871
15872 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15873 (linux_detach_one_process, linux_detach): New functions.
15874 (linux_target_ops): Add linux_detach.
15875 * server.c (main): Handle 'D' packet.
15876 * target.h (struct target_ops): Add "detach" member.
15877 (detach_inferior): Define.
15878
15879 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15880
15881 From Kelley Cook <kelleycook@wideopenwest.com>:
15882 * configure.srv: Accept i[34567]86 variants.
15883
15884 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15885
15886 * linux-low.c (linux_wait_for_event): Correct comment typos.
15887 (linux_resume_one_process): Call check_removed_breakpoint.
15888 (linux_send_signal): New function.
15889 (linux_target_ops): Add linux_send_signal.
15890 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15891 of kill.
15892 * target.h (struct target_ops): Add send_signal.
15893
15894 2003-05-29 Jim Blandy <jimb@redhat.com>
15895
15896 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15897 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15898 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15899 away part of the register's value.
15900
15901 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15902
15903 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15904 (linux_wait_for_event, linux_init_signals): Likewise.
15905
15906 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15907
15908 * configure.in: Check for stdlib.h.
15909 * configure: Regenerated.
15910 * config.in: Regenerated.
15911
15912 2003-01-04 Andreas Schwab <schwab@suse.de>
15913
15914 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15915
15916 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15917
15918 * Makefile.in: Remove obsolete code.
15919
15920 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15921
15922 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15923 defined(PT_FPR0_HI).
15924
15925 2002-11-17 Stuart Hughes <seh@zee2.com>
15926
15927 * linux-arm-low.c (arm_num_regs): Increase.
15928 (arm_regmap): Include status register.
15929
15930 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15931
15932 * linux-low.c (register_addr): Remove incorrect -1 check.
15933
15934 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15935
15936 * linux-low.c (linux_create_inferior): Call setpgid. Return
15937 the new PID.
15938 (unstopped_p, linux_signal_pid): Remove.
15939 (linux_target_ops): Remove linux_signal_pid.
15940 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15941 global instead of target method.
15942 * target.h (struct target_ops): Remove signal_pid. Update comment
15943 for create_inferior.
15944 * server.c (signal_pid): New variable.
15945 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15946 gdbserver. Set the child to be the foreground process group.
15947 (attach_inferior): Set signal_pid.
15948
15949 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15950
15951 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15952
15953 2002-08-20 Jim Blandy <jimb@redhat.com>
15954
15955 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15956 default for this.
15957
15958 2002-08-01 Andrew Cagney <cagney@redhat.com>
15959
15960 * Makefile.in: Make chill references obsolete.
15961
15962 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15963
15964 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15965 * configure: Regenerate.
15966 * config.in: Regenerate.
15967
15968 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15969
15970 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15971 (perror_with_name, remote_close, remote_open, expect, play): Static.
15972
15973 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15974
15975 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15976 byte offsets instead of an array of indexes.
15977 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15978
15979 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15980
15981 * regcache.c: Add comment.
15982
15983 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15984
15985 * thread-db.c: New file.
15986 * proc-service.c: New file.
15987 * acinclude.m4: New file.
15988 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15989 proc-service.o, and thread-db.o.
15990 (linux-low.o): Add USE_THREAD_DB.
15991 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15992 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15993 * aclocal.m4: Regenerated.
15994 * config.in: Regenerated.
15995 * configure: Regenerated.
15996 * configure.in: Check for proc_service.h, sys/procfs.h,
15997 thread_db.h, and linux/elf.h headrs.
15998 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15999 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16000 Check for -lthread_db and thread support.
16001 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16002 PowerPC, and SuperH.
16003 * i387-fp.c: Constify arguments.
16004 * i387-fp.h: Likewise.
16005 * inferiors.c: (struct thread_info): Renamed from
16006 `struct inferior_info'. Remove PID member. Use generic inferior
16007 list header. All uses updated.
16008 (inferiors, signal_pid): Removed.
16009 (all_threads): New variable.
16010 (get_thread): Define.
16011 (add_inferior_to_list): New function.
16012 (for_each_inferior): New function.
16013 (change_inferior_id): New function.
16014 (add_inferior): Removed.
16015 (remove_inferior): New function.
16016 (add_thread): New function.
16017 (free_one_thread): New function.
16018 (remove_thread): New function.
16019 (clear_inferiors): Use for_each_inferior and free_one_thread.
16020 (find_inferior): New function.
16021 (find_inferior_id): New function.
16022 (inferior_target_data): Update argument type.
16023 (set_inferior_target_data): Likewise.
16024 (inferior_regcache_data): Likewise.
16025 (set_inferior_regcache_data): Likewise.
16026 * linux-low.c (linux_bp_reinsert): Remove.
16027 (all_processes, stopping_threads, using_thrads)
16028 (struct pending_signals, debug_threads, pid_of): New.
16029 (inferior_pid): Replace with macro.
16030 (struct inferior_linux_data): Remove.
16031 (get_stop_pc, add_process): New functions.
16032 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16033 Use add_process and add_thread.
16034 (linux_attach_lwp): New function, based on old linux_attach. Use
16035 add_process and add_thread. Set stop_expected for new threads.
16036 (linux_attach): New function.
16037 (linux_kill_one_process): New function.
16038 (linux_kill): Kill all LWPs.
16039 (linux_thread_alive): Use find_inferior_id.
16040 (check_removed_breakpoints, status_pending_p): New functions.
16041 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16042 Update. Use WNOHANG. Wait for cloned processes also. Update process
16043 struct for the found process.
16044 (linux_wait_for_event): New function.
16045 (linux_wait): Use it. Support LWPs.
16046 (send_sigstop, wait_for_sigstop, stop_all_processes)
16047 (linux_resume_one_process, linux_continue_one_process): New functions.
16048 (linux_resume): Support LWPs.
16049 (REGISTER_RAW_SIZE): Remove.
16050 (fetch_register): Use register_size instead. Call supply_register.
16051 (usr_store_inferior_registers): Likewise. Call collect_register.
16052 Fix recursive case.
16053 (regsets_fetch_inferior_registers): Improve error message.
16054 (regsets_store_inferior_registers): Add debugging.
16055 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16056 (unstopped_p, linux_signal_pid): New functions.
16057 (linux_target_ops): Add linux_signal_pid.
16058 (linux_init_signals): New function.
16059 (initialize_low): Call it. Initialize using_threads.
16060 * regcache.c (inferior_regcache_data): Add valid
16061 flag.
16062 (get_regcache): Fetch registers lazily. Add fetch argument
16063 and update all callers.
16064 (regcache_invalidate_one, regcache_invalidate): New
16065 functions.
16066 (new_register_cache): Renamed from create_register_cache.
16067 Return the new regcache.
16068 (free_register_cache): Change argument to a void *.
16069 (registers_to_string, registers_from_string): Call get_regcache
16070 with fetch flag set.
16071 (register_data): Make static. Pass fetch flag to get_regcache.
16072 (supply_register): Call get_regcache with fetch flag clear.
16073 (collect_register): Call get_regcache with fetch flag set.
16074 (collect_register_as_string): New function.
16075 * regcache.h: Update.
16076 * remote-utils.c (putpkt): Flush after debug output and use
16077 stderr.
16078 Handle input interrupts while waiting for an ACK.
16079 (input_interrupt): Use signal_pid method.
16080 (getpkt): Flush after debug output and use stderr.
16081 (outreg): Use collect_register_as_string.
16082 (new_thread_notify, dead_thread_notify): New functions.
16083 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16084 and general_thread.
16085 (look_up_one_symbol): Flush after debug output.
16086 * server.c (step_thread, server_waiting): New variables.
16087 (start_inferior): Don't use signal_pid. Update call to mywait.
16088 (attach_inferior): Update call to mywait.
16089 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16090 (main): Don't fetch/store registers explicitly. Use
16091 set_desired_inferior. Support proposed ``Hs'' packet. Update
16092 calls to mywait.
16093 * server.h: Update.
16094 (struct inferior_list, struct_inferior_list_entry): New.
16095 * target.c (set_desired_inferior): New.
16096 (write_inferior_memory): Constify.
16097 (mywait): New function.
16098 * target.h: Update.
16099 (struct target_ops): New signal_pid method.
16100 (mywait): Removed macro, added prototype.
16101
16102 * linux-low.h (regset_func): Removed.
16103 (regset_fill_func, regset_store_func): New.
16104 (enum regset_type): New.
16105 (struct regset_info): Add type field. Use new operation types.
16106 (struct linux_target_ops): stop_pc renamed to get_pc.
16107 Add decr_pc_after_break and breakpoint_at.
16108 (get_process, get_thread_proess, get_process_thread)
16109 (strut process_info, all_processes, linux_attach_lwp)
16110 (thread_db_init): New.
16111
16112 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16113 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16114 (the_low_target): Add new members.
16115 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16116 (i386_store_fpxregset): Constify.
16117 (target_regsets): Add new kind identifier.
16118 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16119 (i386_set_pc): Add debugging.
16120 (i386_breakpoint_at): New function.
16121 (the_low_target): Add new members.
16122 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16123 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16124 (mips_breakpoint_at): New.
16125 (the_low_target): Add new members.
16126 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16127 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16128 (the_low_target): Add new members.
16129 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16130 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16131 (the_low_target): Add new members.
16132 * linux-x86-64-low.c (target_regsets): Add new kind
16133 identifier.
16134
16135 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16136
16137 From Martin Pool <mbp@samba.org>:
16138 * server.c (gdbserver_usage): New function.
16139 (main): Call it.
16140
16141 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16142
16143 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16144 stop_at -> stop_pc.
16145
16146 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16147
16148 * Makefile.in: Remove obsolete code.
16149
16150 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16151
16152 * linux-low.c (regsets_fetch_inferior_registers),
16153 (regsets_store_inferior_registers): Removed cast to int from
16154 ptrace() calls.
16155 * regcache.h: Added declaration of struct inferior_info.
16156
16157 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16158
16159 * inferiors.c (struct inferior_info): Add regcache_data.
16160 (add_inferior): Call create_register_cache.
16161 (clear_inferiors): Call free_register_cache.
16162 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16163 * regcache.c (struct inferior_regcache_data): New.
16164 (registers): Remove.
16165 (get_regcache): New function.
16166 (create_register_cache, free_register_cache): New functions.
16167 (set_register_cache): Don't initialize the register cache here.
16168 (registers_to_string, registers_from_string, register_data): Call
16169 get_regcache.
16170 * regcache.h: Add prototypes.
16171 * server.h: Likewise.
16172
16173 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16174
16175 * mem-break.c: New file.
16176 * mem-break.h: New file.
16177 * Makefile.in: Add mem-break.o rule; update server.h
16178 dependencies.
16179 * inferiors.c (struct inferior_info): Add target_data
16180 member.
16181 (clear_inferiors): Free target_data member if set.
16182 (inferior_target_data, set_inferior_target_data): New functions.
16183 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16184 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16185 * linux-low.c (linux_bp_reinsert): New variable.
16186 (struct inferior_linux_data): New.
16187 (linux_create_inferior): Use set_inferior_target_data.
16188 (linux_attach): Likewise. Call add_inferior.
16189 (linux_wait_for_one_inferior): New function.
16190 (linux_wait): Call it.
16191 (linux_write_memory): Add const.
16192 (initialize_low): Call set_breakpoint_data.
16193 * linux-low.h (struct linux_target_ops): Add breakpoint
16194 handling members.
16195 * server.c (attach_inferior): Remove extra add_inferior
16196 call.
16197 * server.h: Include mem-break.h. Update inferior.c
16198 prototypes.
16199 * target.c (read_inferior_memory)
16200 (write_inferior_memory): New functions.
16201 * target.h (read_inferior_memory)
16202 (write_inferior_memory): Change macros to prototypes.
16203 (struct target_ops): Update comments. Add const to write_memory
16204 definition.
16205
16206 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16207
16208 * linux-low.c (usr_store_inferior_registers): Support
16209 registers which are allowed to fail to store.
16210 * linux-low.h (linux_target_ops): Likewise.
16211 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16212 (ppc_cannot_store_register): FPSCR may not be storable.
16213
16214 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16215
16216 * server.h: Include <string.h> if HAVE_STRING_H.
16217 * ChangeLog: Correct paths in last ChangeLog entry.
16218
16219 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16220
16221 * linux-low.h: Remove obsolete prototypes.
16222 (struct linux_target_ops): New.
16223 (extern the_low_target): New.
16224 * linux-low.c (num_regs, regmap): Remove declarations.
16225 (register_addr): Use the_low_target explicitly.
16226 (fetch_register): Likewise.
16227 (usr_fetch_inferior_registers): Likewise.
16228 (usr_store_inferior_registers): Likewise.
16229 * linux-arm-low.c (num_regs): Remove.
16230 (arm_num_regs): Define.
16231 (arm_regmap): Renamed from regmap, made static.
16232 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16233 made static.
16234 (arm_cannot_store_register): Renamed from cannot_store_register,
16235 made static.
16236 (the_low_target): New.
16237 * linux-i386-low.c (num_regs): Remove.
16238 (i386_num_regs): Define.
16239 (i386_regmap): Renamed from regmap, made static.
16240 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16241 made static.
16242 (i386_cannot_store_register): Renamed from cannot_store_register,
16243 made static.
16244 (the_low_target): New.
16245 * linux-ia64-low.c (num_regs): Remove.
16246 (ia64_num_regs): Define.
16247 (ia64_regmap): Renamed from regmap, made static.
16248 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16249 made static.
16250 (ia64_cannot_store_register): Renamed from cannot_store_register,
16251 made static.
16252 (the_low_target): New.
16253 * linux-m68k-low.c (num_regs): Remove.
16254 (m68k_num_regs): Define.
16255 (m68k_regmap): Renamed from regmap, made static.
16256 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16257 made static.
16258 (m68k_cannot_store_register): Renamed from cannot_store_register,
16259 made static.
16260 (the_low_target): New.
16261 * linux-mips-low.c (num_regs): Remove.
16262 (mips_num_regs): Define.
16263 (mips_regmap): Renamed from regmap, made static.
16264 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16265 made static.
16266 (mips_cannot_store_register): Renamed from cannot_store_register,
16267 made static.
16268 (the_low_target): New.
16269 * linux-ppc-low.c (num_regs): Remove.
16270 (ppc_num_regs): Define.
16271 (ppc_regmap): Renamed from regmap, made static.
16272 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16273 made static.
16274 (ppc_cannot_store_register): Renamed from cannot_store_register,
16275 made static.
16276 (the_low_target): New.
16277 * linux-s390-low.c (num_regs): Remove.
16278 (s390_num_regs): Define.
16279 (s390_regmap): Renamed from regmap, made static.
16280 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16281 made static.
16282 (s390_cannot_store_register): Renamed from cannot_store_register,
16283 made static.
16284 (the_low_target): New.
16285 * linux-sh-low.c (num_regs): Remove.
16286 (sh_num_regs): Define.
16287 (sh_regmap): Renamed from regmap, made static.
16288 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16289 made static.
16290 (sh_cannot_store_register): Renamed from cannot_store_register,
16291 made static.
16292 (the_low_target): New.
16293 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16294 (the_low_target): New.
16295
16296 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16297
16298 * Makefile.in: Add stamp-h target.
16299 * configure.in: Create stamp-h.
16300 * configure: Regenerated.
16301
16302 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16303
16304 * inferiors.c: New file.
16305 * target.c: New file.
16306 * target.h: New file.
16307 * Makefile.in: Add target.o and inferiors.o. Update
16308 dependencies.
16309 * linux-low.c (inferior_pid): New static variable,
16310 moved from server.c.
16311 (linux_create_inferior): Renamed from create_inferior.
16312 Call add_inferior. Return 0 on success instead of a PID.
16313 (linux_attach): Renamed from myattach.
16314 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16315 (linux_thread_alive): Renamed from mythread_alive.
16316 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16317 child dies.
16318 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16319 (regsets_store_inferior_registers): Correct error message.
16320 Add missing ``return 0''.
16321 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16322 (linux_store_registers): Renamed from store_inferior_registers.
16323 (linux_read_memory): Renamed from read_inferior_memory.
16324 (linux_write_memory): Renamed from write_inferior_memory.
16325 (linux_target_ops): New structure.
16326 (initialize_low): Call set_target_ops ().
16327 * remote-utils.c (unhexify): New function.
16328 (hexify): New function.
16329 (input_interrupt): Send signals to ``signal_pid''.
16330 * server.c (inferior_pid): Remove.
16331 (start_inferior): Update create_inferior call.
16332 (attach_inferior): Call add_inferior.
16333 (handle_query): New function.
16334 (main): Call handle_query for `q' packets.
16335 * server.h: Include "target.h". Remove obsolete prototypes.
16336 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16337
16338 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16339
16340 * Makefile.in: Add WARN_CFLAGS. Update configury
16341 dependencies.
16342 * configure.in: Check for <string.h>
16343 * configure: Regenerate.
16344 * config.in: Regenerate.
16345 * gdbreplay.c: Include needed system headers.
16346 (remote_open): Remove strchr prototype.
16347 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16348 * regcache.c (supply_register): Change buf argument to const void *.
16349 (supply_register_by_name): Likewise.
16350 (collect_register): Change buf argument to void *.
16351 (collect_register_by_name): Likewise.
16352 * regcache.h: Add missing prototypes.
16353 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16354 * server.c (handle_query): New function.
16355 (attached): New static variable, moved out of main.
16356 (main): Quiet longjmp clobber warnings.
16357 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16358 * utils.c (error): Remove NORETURN.
16359 (fatal): Likewise.
This page took 0.349871 seconds and 5 git commands to generate.