Special case NULL when using printf's %s format
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-03-14 Tom Tromey <tom@tromey.com>
2
3 PR cli/14977:
4 * ax.c (ax_printf): Special case for NULL.
5
6 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * linux-low.c (linux_qxfer_libraries_svr4): Use
9 xml_escape_text_append.
10
11 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
14
15 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
16
17 * server.c (handle_general_set): Remove unnecessary xstrdup.
18
19 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
20
21 * server.c (parse_debug_format_options): Adjust to
22 delim_string_to_char_ptr_vec changes.
23 * thread-db.c (thread_db_load_search): Adjust to
24 dirnames_to_char_ptr_vec changes.
25
26 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
27
28 * target.h (target_enable_btrace, target_disable_btrace)
29 (target_read_btrace, target_read_btrace_conf): Turn macro into
30 inline function. Throw error if target method is not defined.
31 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
32 check for btrace target method. Be prepared to handle exceptions
33 from btrace target methods.
34
35 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
36
37 * server.c (captured_main): Change order of error message printed
38 when the current working directory cannot be found.
39
40 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
41
42 * server.c: Include "filenames.h" and "pathstuff.h".
43 (program_name): Delete variable.
44 (program_path): New anonymous class.
45 (get_exec_wrapper): Use "program_path" instead of
46 "program_name".
47 (handle_v_run): Likewise.
48 (captured_main): Likewise.
49 (process_serial_event): Likewise.
50
51 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
52
53 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
54 (OBJS): Add "pathstuff.o".
55 * server.c (current_directory): New global variable.
56 (captured_main): Initialize "current_directory".
57
58 2018-02-26 Alan Hayward <alan.hayward@arm.com>
59
60 * tdesc.c: Use common/tdesc.h.
61 * tdesc.h: Likewise.
62
63 2018-02-20 Alan Hayward <alan.hayward@arm.com>
64 Simon Marchi <simon.marchi@ericsson.com>
65
66 * Makefile.in: Switch order of make rules.
67
68 2018-02-19 Alan Hayward <alan.hayward@arm.com>
69
70 * Makefile.in: Add common directory in build.
71 * configure.ac: Add common reference.
72 * configure: Regenerate.
73
74 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
75
76 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
77 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
78 * spu-low.c (spu_target_ops): Likewise.
79 * win32-low.c (win32_target_ops): Likewise.
80 * server.c (supported_btrace_packets): Report packets unconditionally.
81 * target.h (target_ops) <supports_btrace>: Remove.
82 (target_supports_btrace): Remove.
83
84 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
85
86 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
87 (handle_btrace_disable): Change return type to void. Use exceptions
88 to report errors.
89 (handle_btrace_general_set): Catch exception and copy message to
90 return message.
91
92 2018-02-08 Tom Tromey <tom@tromey.com>
93
94 * linux-low.c (install_software_single_step_breakpoints): Use
95 make_scoped_restore.
96 * inferiors.c (make_cleanup_restore_current_thread): Remove.
97 (do_restore_current_thread_cleanup): Remove.
98 * gdbthread.h (make_cleanup_restore_current_thread): Don't
99 declare.
100
101 2018-02-08 Tom Tromey <tom@tromey.com>
102
103 * mem-break.c (set_raw_breakpoint_at): Use
104 gdb::unique_xmalloc_ptr.
105
106 2018-01-30 Pedro Alves <palves@redhat.com>
107
108 PR gdb/13211
109 * target.c (target_terminal::terminal_state): Rename to ...
110 (target_terminal::m_terminal_state): ... this.
111
112 2018-01-19 James Clarke <jrtc27@jrtc27.com>
113
114 * linux-low.c (handle_extended_wait): Surround call to
115 thread_db_notice_clone with #ifdef USE_THREAD_DB.
116
117 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
118
119 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
120 linux_ptrace_attach_fail_reason_string now returning an
121 std::string.
122 (linux_attach): Likewise.
123 * thread-db.c (attach_thread): Likewise.
124
125 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
126
127 PR gdb/21559
128 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
129 checking for fs_base/gs_base fields in struct user_regs_struct.
130 * configure: Regenerate.
131
132 2018-01-16 Yao Qi <yao.qi@linaro.org>
133
134 PR gdb/18749
135 * linux-low.c (fetch_register): Call supply_register instead of
136 error.
137
138 2018-01-08 Yao Qi <yao.qi@linaro.org>
139 Simon Marchi <simon.marchi@ericsson.com>
140
141 * Makefile.in (OBS): Remove selftest.o.
142 * configure.ac: Set srv_selftest_objs if $development is true.
143 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
144 * configure: Re-generated.
145 * server.c (captured_main): Wrap variable selftest_filter with
146 GDB_SELF_TEST.
147
148 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
149
150 * server.c (parse_debug_format_options): Return std::string.
151 (handle_monitor_command, captured_main): Adjust.
152
153 2018-01-05 Pedro Alves <palves@redhat.com>
154
155 PR gdb/18653
156 * server.c (captured_main): Pass quiet=false to
157 save_original_signals_state.
158
159 2018-01-01 Joel Brobecker <brobecker@adacore.com>
160
161 * gdbreplay.c (gdbreplay_version): Update copyright year in
162 version message.
163 * server.c (gdbserver_version): Likewise.
164
165 2017-12-08 Tom Tromey <tom@tromey.com>
166
167 * ax.c (ax_printf): Update.
168
169 2017-12-07 Yao Qi <yao.qi@linaro.org>
170
171 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
172 aarch64_linux_read_description.
173 * linux-amd64-ipa.c (idx2mask): New array.
174 (get_ipa_tdesc): Move idx2mask out.
175 (initialize_low_tracepoint): Initialize target descriptions.
176 * linux-i386-ipa.c (idx2mask): New array.
177 (get_ipa_tdesc): Move idx2mask out.
178 (initialize_low_tracepoint): Initialize target descriptions.
179
180 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
181
182 * tdesc.c (struct tdesc_type): Change return type.
183 (tdesc_add_flag): Change parameter type.
184 (tdesc_add_bitfield): Likewise.
185 (tdesc_add_field): Likewise.
186 (tdesc_set_struct_size): Likewise.
187
188 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
189
190 * regcache.c (registers_to_string): Remove unused variable.
191
192 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
193
194 * inferiors.c (for_each_inferior_with_data): Remove.
195 * inferiors.h (for_each_inferior_with_data): Remove.
196 * server.c (handle_qxfer_threads_worker): Change parameter type.
197 (handle_qxfer_threads_proper): Use for_each_thread.
198
199 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
200
201 * inferiors.c (for_each_inferior): Remove.
202 (clear_inferiors): Use for_each_thread.
203 * inferiors.h (for_each_inferior): Remove.
204 * linux-low.c (linux_wait_for_event_filtered): Use
205 for_each_thread.
206 (linux_stabilize_threads): Likewise.
207 * regcache.c (regcache_release): Likewise.
208 * server.c (gdb_wants_all_threads_stopped): Likewise.
209 (clear_pending_status_callback): Remove.
210 (handle_status): Use for_each_thread.
211 (captured_main): Likewise.
212 * win32-low.c (child_init_thread_list): Likewise.
213 (win32_clear_inferiors): Likewise.
214 (fake_breakpoint_event): Likewise.
215
216 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
217
218 * inferiors.h (find_inferior): Remove.
219 * inferiors.c (find_inferior): Remove.
220
221 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
222
223 * linux-low.c (resume_status_pending_p): Update comment.
224 (need_step_over_p): Update comment.
225
226 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
227
228 * linux-low.c (proceed_one_lwp): Return void, change parameter
229 type.
230 (unsuspend_and_proceed_one_lwp): Likewise.
231 (proceed_all_lwps): Use for_each_thread.
232 (unstop_all_lwps): Likewise.
233
234 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
235
236 * linux-low.c (linux_resume_one_thread): Return void, take
237 parameter directly.
238 (linux_resume): Use for_each_thread.
239
240 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
241
242 * linux-low.c (send_sigstop_callback): Return void, change
243 parameter type. Rename to...
244 (send_sigstop): ... this.
245 (suspend_and_send_sigstop_callback): Return void, change parameter
246 type. Rename to...
247 (suspend_and_send_sigstop): ... this.
248 (stop_all_lwps): Use for_each_thread.
249
250 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
251
252 * linux-low.c (lwp_running): Return bool, remove unused
253 argument.
254 (linux_stabilize_threads): Use find_thread.
255
256 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
257
258 * linux-low.c (select_singlestep_lwp_callback): Remove.
259 (count_events_callback): Remove.
260 (select_event_lwp_callback): Remove.
261 (select_event_lwp): Use find_thread/for_each_thread.
262
263 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
264
265 * linux-low.c (not_stopped_callback): Return bool, take filter
266 argument directly.
267 (linux_wait_for_event_filtered): Use find_thread.
268 (linux_wait_1): Likewise.
269
270 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
271
272 * linux-low.c (same_lwp): Remove.
273 (find_lwp_pid): Use find_thread.
274
275 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
276
277 * linux-low.c (delete_lwp_callback): Remove.
278 (linux_mourn): Use for_each_thread.
279
280 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
281
282 * linux-low.c (linux_detach_lwp_callback): Return void, remove
283 args parameter, don't check for pid.
284 (linux_detach): Use for_each_thread.
285
286 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
287
288 * linux-low.c (struct counter): Remove.
289 (second_thread_of_pid_p): Remove.
290 (last_thread_of_process_p): Use find_thread.
291
292 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
293
294 * inferiors.c (find_inferior_in_random): Remove.
295 * inferiors.h (find_inferior_in_random): Remove.
296 * linux-low.c (status_pending_p_callback): Return bool, accept
297 parameter ptid directly.
298 (linux_wait_for_event_filtered): Use find_thread_in_random.
299 (linux_wait_1): Likewise.
300
301 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
302
303 * inferiors.c (find_inferior_id): Remove.
304 (find_thread_ptid): Move implemention from find_inferior_id to
305 here.
306 * inferiors.h (find_inferior_id): Remove.
307 * server.c (handle_status): Use find_thread_ptid.
308 (process_serial_event): Likewise.
309 * thread-db.c (find_one_thread): Likewise.
310 (thread_db_thread_handle): Likewise.
311 * win32-low.c (thread_rec): Likewise.
312 (child_delete_thread): Likewise.
313 (win32_thread_alive): Likewise.
314 (get_child_debug_event): Likewise.
315
316 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
317
318 * linux-mips-low.c (update_watch_registers_callback): Return
319 void, remove pid_p parameter, don't check for pid.
320 (mips_insert_point, mips_remove_point): Use for_each_thread.
321
322 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
323
324 * lynx.low (lynx_delete_thread_callback): Remove.
325 (lynx_mourn): Use for_each_thread.
326
327 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
328
329 * regcache.c (regcache_invalidate_one): Remove.
330 (regcache_invalidate_pid): use for_each_thread.
331
332 2017-11-26 Tom Tromey <tom@tromey.com>
333
334 * linux-low.c (linux_create_inferior): Update.
335
336 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
337
338 * spu-low.c (spu_create_inferior): Fix typo in argument name.
339
340 2017-11-24 Alan Hayward <alan.hayward@arm.com>
341
342 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
343 * linux-aarch64-low.c (initialize_low_arch): Call init func.
344 * linux-aarch64-tdesc-selftest.c: New file.
345 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
346
347 2017-11-24 Alan Hayward <alan.hayward@arm.com>
348
349 * configure.srv: Add new file.
350 * linux-aarch64-low.c (initialize_low_arch): Call init func.
351 * linux-aarch64-tdesc-selftest.c: New file.
352 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
353
354 2017-11-24 Alan Hayward <alan.hayward@arm.com>
355
356 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
357 * linux-aarch64-low.c (initialize_low_arch): Remove init.
358 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
359
360 2017-11-24 Alan Hayward <alan.hayward@arm.com>
361
362 * configure.srv: Add new files.
363 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
364 aarch64_linux_read_description.
365 * linux-aarch64-low.c (aarch64_linux_read_description):
366 Merge with aarch64_arch_setup.
367 (aarch64_arch_setup): Call aarch64_linux_read_description.
368 * linux-aarch64-tdesc.c: New file.
369 * linux-aarch64-tdesc.h: New file.
370
371 2017-11-24 Yao Qi <yao.qi@linaro.org>
372
373 * configure.srv: Set $srv_regobj for tic6x-linux.
374 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
375 (tic6x_read_description): Move some code to tic6x_arch_setup.
376 (tic6x_tdesc_test): New function.
377 (initialize_low_arch): Call selftests::register_test.
378
379 2017-11-22 Yao Qi <yao.qi@linaro.org>
380
381 * remote-utils.c (prepare_resume_reply): Use memcpy.
382
383 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
384
385 * linux-low.c (kill_one_lwp_callback): Return void, take
386 argument directly, don't filter on pid.
387 (linux_kill): Use for_each_thread.
388
389 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
390
391 * linux-low.c (need_step_over_p): Return bool, remove dummy
392 argument.
393 (linux_resume, proceed_all_lwps): Use find_thread.
394
395 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
396
397 * linux-low.c (resume_status_pending_p): Return bool, remove
398 flag_p argument.
399 (linux_resume): Use find_thread.
400
401 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
402
403 * linux-low.c (struct thread_resume_array): Remove.
404 (linux_set_resume_request): Return void, take arguments
405 directly.
406 (linux_resume): Use for_each_thread.
407
408 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
409
410 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
411 return bool, remove data argument.
412 (linux_stabilize_threads): Use find_thread.
413
414 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
415
416 * linux-low.c (unsuspend_one_lwp): Remove.
417 (unsuspend_all_lwps): Use for_each_thread, inline code from
418 unsuspend_one_lwp.
419
420 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
421
422 * gdbthread.h (find_thread): Add overload with ptid_t filter.
423 * linux-low.c (struct iterate_over_lwps_args): Remove.
424 (iterate_over_lwps_filter): Remove.
425 (iterate_over_lwps): Use find_thread.
426
427 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
428
429 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
430 (linux_handle_new_gdb_connection): Use for_each_thread, inline
431 code from reset_lwp_ptrace_options_callback.
432
433 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
434
435 * linux-arm-low.c (struct update_registers_data): Remove.
436 (update_registers_callback): Return void, take arguments
437 directly, don't check thread's pid.
438 (arm_insert_point, arm_remove_point): Use for_each_thread.
439
440 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
441
442 * win32-low.c (continue_one_thread): Return void, take argument
443 directly.
444 (child_continue): Use for_each_thread.
445
446 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
447
448 * win32-i386-low.c (update_debug_registers_callback): Rename
449 to ...
450 (update_debug_registers): ... this, return void, remove pid_p arg.
451 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
452
453 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
454
455 * inferiors.h (struct process_info): Add constructor, initialize
456 fields..
457 <syscalls_to_catch>: Change type to std::vector<int>.
458 * inferiors.c (add_process): Allocate process_info with new.
459 (remove_process): Free process_info with delete.
460 * linux-low.c (handle_extended_wait): Adjust.
461 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
462 * server.c (handle_general_set): Adjust.
463
464 2017-11-16 Pedro Alves <palves@redhat.com>
465
466 * remote-utils.c (remote_close): Block SIGIO signals instead of
467 uninstalling the SIGIO handler.
468
469 2017-11-16 Alan Hayward <alan.hayward@arm.com>
470
471 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
472
473 2017-11-16 Yao Qi <yao.qi@linaro.org>
474
475 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
476 (tic6x_store_gregset): Likewise.
477 (tic6x_usrregs_info): Move it up.
478
479 2017-11-15 Alan Hayward <alan.hayward@arm.com>
480
481 * Makefile.in: Update arch rules.
482 * configure.srv: Explicitly mark arch/ files.
483
484 2017-11-13 Andreas Schwab <schwab@suse.de>
485
486 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
487 function.
488 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
489
490 2017-11-06 Pedro Alves <palves@redhat.com>
491
492 * config.in, configure: Regenerate.
493
494 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
495
496 * target.c (struct thread_search): Remove.
497 (thread_search_callback): Remove.
498 (prepare_to_access_memory): Use for_each_thread instead of
499 find_inferior. Inline code from thread_search_callback.
500
501 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
502
503 * server.c (struct visit_actioned_threads_data): Remove.
504 (visit_actioned_threads): Change prototype to take arguments
505 directly.
506 (resume): Use find_thread instead of find_inferior.
507
508 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
509
510 * server.c (queue_stop_reply_callback): Change prototype, return
511 void.
512 (find_status_pending_thread_callback): Remove.
513 (handle_status): Replace find_inferior with find_thread and
514 for_each_thread.
515
516 2017-10-25 Alan Hayward <alan.hayward@arm.com>
517
518 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
519 with REGNO.
520 (aarch64_store_gregset): Likewise.
521 (aarch64_fill_fpregset): Likewise.
522 (aarch64_store_fpregset): Likewise.
523
524 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
525
526 * gdbthread.h (find_thread, for_each_thread): New functions.
527 * inferiors.c (thread_of_pid): Remove.
528 (find_any_thread_of_pid): Use find_thread.
529 * linux-low.c (num_lwps): Use for_each_thread.
530
531 2017-10-17 Yao Qi <yao.qi@linaro.org>
532
533 * Makefile.in: Remove one rule.
534 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
535
536 2017-10-17 Yao Qi <yao.qi@linaro.org>
537
538 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
539 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
540
541 2017-10-17 Yao Qi <yao.qi@linaro.org>
542
543 * configure.srv: Rename arm.o with arch/arm.o.
544
545 2017-10-17 Yao Qi <yao.qi@linaro.org>
546
547 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
548 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
549 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
550 (arch-i386.o, arch-amd64.o): Remove rules.
551 (arch/%.o): New rule.
552 Update POSTCOMPILE and COMPILE.pre.
553 * configure.ac: Invoke AC_CONFIG_COMMANDS.
554 * configure: Re-generated.
555 * configure.srv: Replace arch-i386.o with arch/i386.o.
556 Replace arch-amd64.o with arch/amd64.o.
557
558 2017-10-16 Yao Qi <yao.qi@linaro.org>
559
560 * configure: Regenerated.
561
562 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
563
564 * inferiors.h: (struct inferior_list): Remove.
565 (struct inferior_list_entry); Remove.
566 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
567 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
568 get_first_inferior): Remove.
569 (for_each_inferior, for_each_inferior_with_data, find_inferior,
570 find_inferior_id, find_inferior_in_random): Change signature.
571 * inferiors.c (all_threads): Change type to
572 std::list<thread_info *>.
573 (get_thread): Remove macro.
574 (find_inferior, find_inferior_id): Change signature, implement
575 using find_thread.
576 (find_inferior_in_random): Change signature, implement using
577 find_thread_in_random.
578 (for_each_inferior, for_each_inferior_with_data): Change
579 signature, implement using for_each_thread.
580 (add_inferior_to_list, remove_inferior): Remove.
581 (add_thread, get_first_thread, thread_of_pid,
582 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
583 (get_first_inferior, one_inferior_p, clear_inferior_list):
584 Remove.
585 (clear_inferiors, get_thread_process): Update.
586 * gdbthread.h: Include <list>.
587 (struct thread_info) <entry>: Remove field.
588 <id>: New field.
589 (all_threads): Change type to std::list<thread_info *>.
590 (get_first_inferior): Add doc.
591 (find_thread, for_each_thread, find_thread_in_random): New
592 functions.
593 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
594 * linux-arm-low.c (update_registers_callback): Update.
595 * linux-low.c (second_thread_of_pid_p): Update.
596 (kill_one_lwp_callback, linux_detach_lwp_callback,
597 delete_lwp_callback, status_pending_p_callback, same_lwp,
598 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
599 iterate_over_lwps, not_stopped_callback,
600 resume_stopped_resumed_lwps, count_events_callback,
601 select_singlestep_lwp_callback, select_event_lwp_callback,
602 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
603 suspend_and_send_sigstop_callback, wait_for_sigstop,
604 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
605 lwp_running, linux_set_resume_request, resume_status_pending_p,
606 need_step_over_p, start_step_over, linux_resume_one_thread,
607 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
608 reset_lwp_ptrace_options_callback): Update.
609 * linux-mips-low.c (update_watch_registers_callback): Update.
610 * regcache.c (regcache_invalidate_one, regcache_invalidate):
611 Update.
612 (free_register_cache_thread_one): Remove.
613 (regcache_release): Update.
614 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
615 handle_qxfer_threads_worker): Update.
616 (handle_query): Update, use list iterator.
617 (visit_actioned_threads, handle_pending_status,
618 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
619 clear_pending_status_callback, set_pending_status_callback,
620 find_status_pending_thread_callback, handle_status,
621 process_serial_event): Update.
622 * target.c (thread_search_callback): Update.
623 * thread-db.c (thread_db_get_tls_address): Update.
624 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
625 Update.
626 * win32-i386-low.c (update_debug_registers_callback): Update.
627 * win32-low.c (delete_thread_info, child_delete_thread,
628 continue_one_thread, suspend_one_thread,
629 get_child_debug_event): Adjust.
630
631 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
632
633 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
634 * inferiors.h: Include <list>.
635 (struct process_info) <entry>: Remove field.
636 <pid>: New field.
637 (pid_of): Change macro to function.
638 (ptid_of, lwpid_of): Remove macro.
639 (all_processes): Change type to std::list<process_info *>.
640 (ALL_PROCESSES): Remove macro.
641 (for_each_process, find_process): New function.
642 * inferiors.c (all_processes): Change type to
643 std::list<process_info *>.
644 (find_thread_process): Adjust.
645 (add_process): Likewise.
646 (remove_process): Likewise.
647 (find_process_pid): Likewise.
648 (get_first_process): Likewise.
649 (started_inferior_callback): Remove.
650 (have_started_inferiors_p): Adjust.
651 (attached_inferior_callback): Remove.
652 (have_attached_inferiors_p): Adjust.
653 * linux-low.c (check_zombie_leaders): Likewise.
654 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
655 (x86_linux_update_xmltarget): Adjust.
656 * server.c (handle_query): Likewise.
657 (gdb_reattached_process): Remove.
658 (handle_status): Adjust.
659 (kill_inferior_callback): Likewise.
660 (detach_or_kill_inferior): Remove.
661 (print_started_pid): Likewise.
662 (print_attached_pid): Likewise.
663 (detach_or_kill_for_exit): Update.
664 (process_serial_event): Likewise.
665 * linux-arm-low.c (arm_new_fork): Likewise.
666
667 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
668
669 * dll.h: Include <list>.
670 (struct dll_info): Add constructor.
671 <entry>: Remove field.
672 (all_dlls): Change type to std::list<dll_info>.
673 * dll.c: Include <algorithm>.
674 (get_dll): Remove macro.
675 (all_dlls): Change type to std::list<dll_info *>.
676 (free_one_dll): Remove.
677 (match_dll): Likewise.
678 (loaded_dll): Adjust.
679 (unloaded_dll): Adjust to all_dlls type change, use
680 std::find_if. Inline code from match_dll.
681 (clear_dlls): Adjust to all_dlls type change.
682 * server.c (emit_dll_description): Remove.
683 (handle_qxfer_libraries): Adjust to all_dlls type change,
684 integrate emit_dll_description's functionality.
685
686 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
687
688 * linux-low.h (struct linux_target_ops) <delete_process>: New
689 field.
690 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
691 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
692 (struct linux_target_ops): Add delete_process callback.
693 * linux-arm-low.c (arm_delete_process): New.
694 (struct linux_target_ops): Add delete_process callback.
695 * linux-bfin-low.c (struct linux_target_ops): Likewise.
696 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
697 * linux-m32r-low.c (struct linux_target_ops): Likewise.
698 * linux-mips-low.c (mips_linux_delete_process): New.
699 (struct linux_target_ops): Add delete_process callback.
700 * linux-ppc-low.c (struct linux_target_ops): Likewise.
701 * linux-s390-low.c (struct linux_target_ops): Likewise.
702 * linux-sh-low.c (struct linux_target_ops): Likewise.
703 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
704 * linux-tile-low.c (struct linux_target_ops): Likewise.
705 * linux-x86-low.c (x86_linux_delete_process): New.
706 (struct linux_target_ops): Add delete_process callback.
707 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
708
709 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
710
711 * linux-aarch64-low.c (the_low_target): Add thread delete
712 callback.
713 * linux-arm-low.c (arm_delete_thread): New function.
714 (the_low_target): Add thread delete callback.
715 * linux-bfin-low.c (the_low_target): Likewise.
716 * linux-crisv32-low.c (the_low_target): Likewise.
717 * linux-low.c (delete_lwp): Invoke delete_thread callback if
718 set.
719 * linux-low.h (struct linux_target_ops) <delete_thread>: New
720 field.
721 * linux-m32r-low.c (the_low_target): Add thread delete callback.
722 * linux-mips-low.c (mips_linux_delete_thread): New function.
723 (the_low_target): Add thread delete callback.
724 * linux-ppc-low.c (the_low_target): Likewise.
725 * linux-s390-low.c (the_low_target): Likewise.
726 * linux-sh-low.c (the_low_target): Likewise.
727 * linux-tic6x-low.c (the_low_target): Likewise.
728 * linux-tile-low.c (the_low_target): Likewise.
729 * linux-x86-low.c (the_low_target): Likewise.
730 * linux-xtensa-low.c (the_low_target): Likewise.
731
732 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
733
734 * win32-low.c: Include "common-inferior.h".
735
736 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
737
738 * inferiors.c (set_inferior_cwd): New function.
739 * server.c (handle_general_set): Handle QSetWorkingDir packet.
740 (handle_query): Inform that QSetWorkingDir is supported.
741 * win32-low.c (create_process): Pass the inferior's cwd to
742 CreateProcess.
743
744 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
745
746 * inferiors.c (current_inferior_cwd): New global variable.
747 (get_inferior_cwd): New function.
748 * inferiors.h (struct process_info) <cwd>: New field.
749
750 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
751
752 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
753 (OBS): Add gdb_tilde_expand.o.
754
755 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
756
757 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
758 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
759
760 2017-09-29 Pedro Alves <palves@redhat.com>
761
762 * ax.c (gdb_parse_agent_expr): Constify.
763 * ax.h (gdb_parse_agent_expr): Constify.
764 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
765 Constify.
766 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
767 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
768 * remote-utils.h (read_ptid): Constify.
769 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
770 (process_point_options, process_serial_event): Constify.
771 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
772 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
773 (cmd_qtbuffer): Constify.
774
775 2017-09-29 Pedro Alves <palves@redhat.com>
776
777 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
778 fails.
779
780 2017-09-29 Pedro Alves <palves@redhat.com>
781
782 * linux-low.c (handle_extended_wait): Pass parent thread instead
783 of process to thread_db_notice_clone.
784 * linux-low.h (thread_db_notice_clone): Replace parent process
785 parameter with parent thread parameter.
786 * thread-db.c (find_one_thread): Add comment.
787 (thread_db_notice_clone): Replace parent process parameter with
788 parent thread parameter. Temporarily switch to the parent thread.
789
790 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
791
792 * gdbthread.h: Include "common-gdbthread.h".
793 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
794 "if" when validating the ptid.
795 * remote-utils.c: Include "gdbthread.h".
796 (prepare_resume_reply): Use "switch_to_thread".
797 * target.c (done_accessing_memory): Likewise.
798
799 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
800
801 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
802 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
803 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
804 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
805 s390x-gs-linux64-ipa.o to ipa_obj.
806 * linux-s390-low.c (HWCAP_S390_GS): New define.
807 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
808 New functions.
809 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
810 (s390_arch_setup): Check for guarded-storage support and choose
811 appropriate tdesc.
812 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
813 init_registers_s390x_gs_linux64.
814 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
815 enum value.
816 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
817 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
818
819 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
820
821 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
822
823 2017-09-21 Kevin Buettner <kevinb@redhat.com>
824
825 * linux-low.h (struct lwp_info): Add new field, thread_handle.
826 (thread_db_thread_handle): Declare.
827 * linux-low.c (linux_target_ops): Initialize thread_handle.
828 * server.c (handle_qxfer_threads_worker): Add support for
829 "handle" attribute.
830 * target.h (struct target_ops): Add new function pointer,
831 thread_handle.
832 (target_thread_handle): Define.
833 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
834 field in lwp.
835 (thread_db_thread_handle): New function.
836
837 2017-09-21 Kevin Buettner <kevinb@redhat.com>
838
839 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
840 * linux-low.h (thread_db_notice_clone): Declare.
841 * thread-db.c (thread_db_notice_clone): New function.
842
843 2017-09-21 Pedro Alves <palves@redhat.com>
844
845 * server.c (gdb_read_memory, handle_status, process_serial_event)
846 (handle_serial_event, handle_target_event): Adjust to
847 set_desired_thread prototype change.
848 * target.c (set_desired_thread): Remove 'use_general' parameter
849 and adjust.
850 * target.h (set_desired_thread): Remove 'use_general' parameter.
851
852 2017-09-20 Tom Tromey <tom@tromey.com>
853
854 * target.c (target_terminal::terminal_state): Define.
855 (target_terminal::init): Rename from target_terminal_init.
856 (target_terminal::inferior): Rename from
857 target_terminal_inferior.
858 (target_terminal::ours): Rename from target_terminal_ours.
859 (target_terminal::ours_for_output, target_terminal::info): New.
860
861 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
862
863 * server.c (accumulate_file_name_length): Remove.
864 (emit_dll_description): Adjust to std::string change.
865 (handle_qxfer_libraries): Use std::string to hold document.
866
867 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
868
869 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
870 return type of xml_escape_text.
871 * server.c (emit_dll_description): Likewise.
872
873 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
874
875 * server.c (captured_main): Accept argument for --selftest.
876 Update run_tests call.
877 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
878 when registering selftests.
879
880 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
881
882 * regcache.c (get_thread_regcache): Update code to use "std::vector"
883 instead of "VEC" for "target_desc.reg_defs".
884 (regcache_cpy): Likewise.
885 (registers_to_string): Likewise.
886 (registers_from_string): Likewise.
887 (find_regno): Likewise.
888 (supply_regblock): Likewise.
889 (regcache_raw_read_unsigned): Likewise.
890 * tdesc.c (init_target_desc): Likewise.
891 (tdesc_create_reg): Likewise.
892 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
893 (struct target_desc) <reg_defs>: Convert to "std::vector".
894 (target_desc): Do not initialize "reg_defs".
895 (~target_desc): Update code to use "std::vector" instead of "VEC"
896 for "target_desc.reg_defs".
897 (operator==): Likewise.
898
899 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
900
901 * inferiors.h (thread_to_gdb_id): Remove.
902 * inferiors.c (thread_to_gdb_id): Remove.
903 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
904 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
905 lynx_store_registers, lynx_read_memory, lynx_write_memory):
906 Likewise.
907 * nto-low.c (nto_fetch_registers, nto_store_registers,
908 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
909
910 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
911
912 * inferiors.h (gdb_id_to_thread_id): Remove.
913 * inferiors.c (gdb_id_to_thread_id): Remove.
914 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
915 removal. Move pid declaration closer to where it's used.
916
917 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
918
919 * server.c (handle_detach): New function.
920 (process_serial_event): Move code out, call handle_detach.
921
922 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
923
924 * server.c (require_running): Rename to ...
925 (require_running_or_return): ... this ...
926 (require_running_or_break): ... and this.
927 (handle_query, process_serial_event): Adjust.
928
929 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
930
931 * linux-low.c (linux_set_resume_request): Remove unused
932 variables.
933
934 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
935
936 * server.c (first_thread_of): Remove.
937 (process_serial_event): Replace usage of first_thread_of with
938 find_any_thread_of_pid.
939 * tracepoint.c (same_process_p): Remove.
940 (gdb_agent_about_to_close): Replace usage of same_process_p with
941 find_any_thread_of_pid.
942 * linux-x86-low.c (same_process_callback): Remove.
943 (x86_arch_setup_process_callback): Replace usage of
944 same_process_callback with find_any_thread_of_pid.
945 * thread-db.c (any_thread_of): Remove.
946 (switch_to_process): Replace usage of any_thread_of with
947 find_any_thread_of_pid.
948 * inferiors.c (thread_pid_matches_callback): Remove.
949 (find_thread_process): Adjust to use find_any_thread_of_pid.
950
951 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
952
953 * regcache.c (get_thread_regcache): Guard calls to "memset"
954 with "!VEC_empty".
955
956 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
957
958 * linux-low.c (handle_extended_wait): Use
959 "allocate_target_description" instead of "XNEW".
960 * linux-x86-low.c (initialize_low_arch): Likewise.
961
962 2017-09-05 Yao Qi <yao.qi@linaro.org>
963
964 * configure.srv (srv_i386_regobj): Remove.
965 (srv_amd64_regobj): Remove.
966 (srv_regobj): Set it to "" for x86 non-linux targets.
967 * linux-x86-tdesc.c (i386_linux_read_description):
968 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
969 (init_registers_i386): Remove the declaration.
970 (tdesc_i386): Remove the declaration.
971 (lynx_i386_arch_setup): Call i386_create_target_description.
972 * nto-x86-low.c: Likewise.
973 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
974 [!__x86_64__]: include arch/i386.h.
975 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
976
977 2017-09-05 Yao Qi <yao.qi@linaro.org>
978
979 * configure.srv (srv_amd64_linux_xmlfiles): Remove
980 i386/amd64-XXX-linux from it.
981
982 2017-09-05 Yao Qi <yao.qi@linaro.org>
983
984 * configure.srv: Empty srv_amd64_linux_regobj if $development is
985 false.
986 (ipa_amd64_linux_regobj): Remove.
987 (ipa_x32_linux_regobj): Remove.
988
989 2017-09-05 Yao Qi <yao.qi@linaro.org>
990
991 * Makefile.in (arch-amd64.o): New rule.
992 * configure.srv: Append arch-amd64.o.
993 * linux-amd64-ipa.c: Include common/x86-xstate.h.
994 (get_ipa_tdesc): Call amd64_linux_read_description.
995 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
996 and init_registers_amd64_XXX.
997 * linux-x86-low.c (x86_linux_read_description): Call
998 amd64_linux_read_description.
999 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1000 (initialize_low_arch): Don't call init_registers_x32_XXX and
1001 init_registers_amd64_XXX.
1002 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1003 and tdesc_amd64_XXX.
1004 [__x86_64__] (amd64_tdesc_test): New function.
1005 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1006 and init_registers_amd64_XXX.
1007 * linux-x86-tdesc.c: Include arch/amd64.h.
1008 (xcr0_to_tdesc_idx): New function.
1009 (i386_linux_read_description): New function.
1010 (amd64_get_ipa_tdesc_idx): New function.
1011 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1012 (amd64_get_ipa_tdesc): Declare.
1013
1014 2017-09-05 Yao Qi <yao.qi@linaro.org>
1015
1016 * configure.srv (srv_i386_linux_xmlfiles): Remove
1017 i386/i386-XXX-linux.xml from it.
1018
1019 2017-09-05 Yao Qi <yao.qi@linaro.org>
1020
1021 * configure.srv: Set srv_i386_linux_regobj empty if $development
1022 is false.
1023 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1024 initialize_low_tdesc.
1025 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1026 with #if initialize_low_tdesc.
1027 * linux-x86-tdesc-selftest.c: New file.
1028 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1029
1030 2017-09-05 Yao Qi <yao.qi@linaro.org>
1031
1032 * Makefile.in (arch-i386.o): New rule.
1033 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1034 (x86_64-*-linux*): Likewise.
1035 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1036 include arch/i386.h.
1037 (i386_linux_read_description): Remove code and call
1038 i386_create_target_description.
1039 * tdesc.c (allocate_target_description): New function.
1040 * tdesc.h (set_tdesc_architecture): Remove declaration.
1041 (set_tdesc_osabi): Likewise.
1042
1043 2017-09-05 Yao Qi <yao.qi@linaro.org>
1044
1045 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1046 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1047 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1048 .xmltarget.
1049 * server.c (get_features_xml): Call tdesc_get_features_xml.
1050 * tdesc.c (set_tdesc_architecture): New function.
1051 (set_tdesc_osabi): New function.
1052 (tdesc_get_features_xml): New function.
1053 (tdesc_create_feature): Add an argument.
1054 * tdesc.h (struct target_desc) <features>: New field.
1055 <arch, osabi>: New field.
1056 (~target_desc): xfree features, arch, and osabi.
1057 (target_desc::oerator==): Don't compare .xmltarget.
1058 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1059 (set_tdesc_osabi): Likewise.
1060 (tdesc_get_features_xml): Likewise.
1061
1062 2017-09-05 Yao Qi <yao.qi@linaro.org>
1063
1064 * linux-x86-tdesc.c: Include selftest.h.
1065 (i386_tdesc_test): New function.
1066 (initialize_low_tdesc): Call selftests::register_test.
1067 * tdesc.h: Include regdef.h.
1068 (target_desc): Override operator == and !=.
1069
1070 2017-09-05 Yao Qi <yao.qi@linaro.org>
1071
1072 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1073 (ipa_obj): Likewise.
1074 * linux-i386-ipa.c: Include common/x86-xstate.h
1075 (get_ipa_tdesc): Call i386_linux_read_description.
1076 (initialize_low_tracepoint): Don't call init_registers_XXX
1077 functions, call initialize_low_tdesc instead.
1078 * linux-x86-low.c (x86_linux_read_description): Call
1079 i386_linux_read_description.
1080 (initialize_low_arch): Don't call init_registers_i386_XXX
1081 functions, call initialize_low_tdesc.
1082 * linux-x86-tdesc.c: New file.
1083 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1084 (i386_get_ipa_tdesc_idx): Declare.
1085 (i386_get_ipa_tdesc): Declare.
1086 (initialize_low_tdesc): Declare.
1087
1088 2017-09-05 Yao Qi <yao.qi@linaro.org>
1089
1090 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1091 instead of 0.
1092
1093 2017-09-05 Yao Qi <yao.qi@linaro.org>
1094
1095 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1096 * regcache.c (get_thread_regcache): Use VEC_length.
1097 (init_register_cache): Likewise.
1098 (regcache_cpy): Likewise.
1099 (registers_to_string): Iterate reg_defs via VEC_iterate.
1100 (find_regno): Likewise.
1101 (find_register_by_number): Use VEC_index.
1102 (register_size): Call find_register_by_number.
1103 (register_data): Call find_register_by_number.
1104 (supply_regblock): Use VEC_length.
1105 (regcache_raw_read_unsigned): Likewise.
1106 * tdesc.c (init_target_desc): Iterate reg_defs via
1107 VEC_iterate.
1108 (default_description): Update initializer.
1109 (copy_target_description): Don't update field num_registers.
1110 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1111 <num_registers>: Remove.
1112
1113 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1114
1115 * Makefile.in (.SECONDARY): Define target.
1116
1117 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1118
1119 * linux-low.c (linux_wait_1): Adjust.
1120 * server.c (queue_stop_reply_callback): Adjust.
1121
1122 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1123
1124 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1125 QEnvironmentUnset and QEnvironmentReset packets.
1126 (handle_query): Inform remote that QEnvironmentHexEncoded,
1127 QEnvironmentUnset and QEnvironmentReset are supported.
1128
1129 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1130
1131 * inferiors.h (inferior_target_data): Rename to ...
1132 (thread_target_data): ... this.
1133 (inferior_regcache_data): Rename to ...
1134 (thread_regcache_data): ... this.
1135 (set_inferior_regcache_data): Rename to ...
1136 (set_thread_regcache_data): ... this.
1137 * inferiors.c (inferior_target_data): Rename to ...
1138 (thread_target_data): ... this.
1139 (inferior_regcache_data): Rename to ...
1140 (thread_regcache_data): ... this.
1141 (set_inferior_regcache_data): Rename to ...
1142 (set_thread_regcache_data): ... this.
1143 (free_one_thread): Update.
1144 * linux-low.h (get_thread_lwp): Update.
1145 * regcache.c (get_thread_regcache): Update.
1146 (regcache_invalidate_thread): Update.
1147 (free_register_cache_thread): Update.
1148 * win32-i386-low.c (update_debug_registers_callback): Update.
1149 (win32_get_current_dr): Update.
1150 * win32-low.c (thread_rec): Update.
1151 (delete_thread_info): Update.
1152 (continue_one_thread): Update.
1153 (suspend_one_thread): Update.
1154
1155 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1156
1157 * inferiors.c (set_inferior_target_data): Remove.
1158 * inferiors.h (set_inferior_target_data): Remove.
1159
1160 2017-08-18 Yao Qi <yao.qi@linaro.org>
1161
1162 * Makefile.in (OBS): Add selftest.o.
1163 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1164 * configure, config.in: Re-generated.
1165 * server.c: Include common/sefltest.h.
1166 (captured_main): Handle option --selftest.
1167
1168 2017-08-09 Yao Qi <yao.qi@linaro.org>
1169
1170 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1171 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1172 i386-avx-mpx.o and i386-mmx.o.
1173 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1174 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1175 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1176 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1177 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1178 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1179 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1180 i386/amd64-avx-mpx.xml.
1181
1182 2017-08-09 Yao Qi <yao.qi@linaro.org>
1183
1184 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1185 and x32-avx-avx512.o.
1186 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1187 i386/x32-avx-avx512.xml.
1188
1189 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1190
1191 * tracepoint.h (enum class fast_tpoint_collect_result): New
1192 enumeration.
1193 (fast_tracepoint_collecting): Change return type to
1194 fast_tpoint_collect_result.
1195 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1196 * linux-low.h: Include tracepoint.h.
1197 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1198 fast_tpoint_collect_result.
1199 * linux-low.c (handle_tracepoints): Adjust.
1200 (linux_fast_tracepoint_collecting): Change return type to
1201 fast_tpoint_collect_result.
1202 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1203 linux_wait_1, stuck_in_jump_pad_callback,
1204 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1205 proceed_one_lwp): Adjust to type change.
1206
1207 2017-07-10 Yao Qi <yao.qi@linaro.org>
1208
1209 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1210
1211 2017-06-29 Yao Qi <yao.qi@linaro.org>
1212
1213 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1214 Remove.
1215 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1216
1217 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1220
1221 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1222
1223 * linux-low.c (linux_create_inferior): Adjust code to access the
1224 environment information via 'gdb_environ' class.
1225 * lynx-low.c (lynx_create_inferior): Likewise.
1226 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1227 (get_environ): Return a pointer to 'our_environ'.
1228 (captured_main): Initialize 'our_environ'.
1229 * server.h (get_environ): Adjust prototype.
1230 * spu-low.c (spu_create_inferior): Adjust code to access the
1231 environment information via 'gdb_environ' class.
1232
1233 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1234
1235 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1236 usage of "register" keyword.
1237
1238 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1239
1240 * configure: Re-generate.
1241
1242 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1243
1244 * configure: Re-generate.
1245
1246 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1247
1248 * Makefile.in (COMPILE.pre): Add "-x c++".
1249
1250 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1251
1252 * fork-child.c: Conditionally include <signal.h>.
1253
1254 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1255
1256 * server.c (handle_general_set): Handle new packet
1257 "QStartupWithShell".
1258 (handle_query): Add "QStartupWithShell" to the list of supported
1259 packets.
1260 (gdbserver_usage): Add help text explaining the
1261 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1262 options.
1263 (captured_main): Recognize and act upon the presence of the new
1264 CLI options.
1265
1266 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1267 Pedro Alves <palves@redhat.com>
1268
1269 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1270 * configure: Regenerate.
1271 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1272 "fork-inferior.o".
1273 (i[34567]86-*-lynxos*): Likewise.
1274 (spu*-*-*): Likewise.
1275 * fork-child.c: New file.
1276 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1277 and "environ.h".
1278 (linux_ptrace_fun): New function.
1279 (linux_create_inferior): Adjust function prototype to reflect
1280 change on "target.h". Adjust function code to use
1281 "fork_inferior".
1282 (linux_request_interrupt): Delete "signal_pid".
1283 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1284 (lynx_ptrace_fun): New function.
1285 (lynx_create_inferior): Adjust function prototype to reflect
1286 change on "target.h". Adjust function code to use
1287 "fork_inferior".
1288 * nto-low.c (nto_create_inferior): Adjust function prototype and
1289 code to reflect change on "target.h". Update comments.
1290 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1291 "common-terminal.h" and "environ.h".
1292 (terminal_fd): Moved to fork-child.c.
1293 (old_foreground_pgrp): Likewise.
1294 (restore_old_foreground_pgrp): Likewise.
1295 (last_status): Make it global.
1296 (last_ptid): Likewise.
1297 (our_environ): New variable.
1298 (startup_with_shell): Likewise.
1299 (program_name): Likewise.
1300 (program_argv): Rename to...
1301 (program_args): ...this.
1302 (wrapper_argv): New variable.
1303 (start_inferior): Delete function.
1304 (get_exec_wrapper): New function.
1305 (get_exec_file): Likewise.
1306 (get_environ): Likewise.
1307 (prefork_hook): Likewise.
1308 (post_fork_inferior): Likewise.
1309 (postfork_hook): Likewise.
1310 (postfork_child_hook): Likewise.
1311 (handle_v_run): Update code to deal with arguments coming from the
1312 remote host. Update calls from "start_inferior" to
1313 "create_inferior".
1314 (captured_main): Likewise. Initialize environment variable. Call
1315 "have_job_control".
1316 * server.h (post_fork_inferior): New prototype.
1317 (get_environ): Likewise.
1318 (last_status): Declare.
1319 (last_ptid): Likewise.
1320 (signal_pid): Likewise.
1321 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1322 (spu_ptrace_fun): New function.
1323 (spu_create_inferior): Adjust function prototype to reflect change
1324 on "target.h". Adjust function code to use "fork_inferior".
1325 * target.c (target_terminal_init): New function.
1326 (target_terminal_inferior): Likewise.
1327 (target_terminal_ours): Likewise.
1328 * target.h: Include <vector>.
1329 (struct target_ops) <create_inferior>: Update prototype.
1330 (create_inferior): Update macro.
1331 * utils.c (gdb_flush_out_err): New function.
1332 * win32-low.c (win32_create_inferior): Adjust function prototype
1333 and code to reflect change on "target.h".
1334
1335 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1336
1337 * inferiors.c (switch_to_thread): New function.
1338
1339 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1340
1341 * Makefile.in (SFILE): Add "common/job-control.c".
1342 (OBS): Add "job-control.o".
1343
1344 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1345
1346 * Makefile: Remove "@host_makefile_frag@".
1347
1348 2017-05-05 Pedro Alves <palves@redhat.com>
1349
1350 * configure: Regenerate.
1351
1352 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1353
1354 * configure: Regenerate.
1355
1356 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1357
1358 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1359 software_single_step change of return type to
1360 std::vector<CORE_ADDR>.
1361 * linux-low.c (install_software_single_step_breakpoints):
1362 Likewise.
1363 * linux-low.h (install_software_single_step_breakpoints):
1364 Likewise.
1365
1366 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1367
1368 * remote-utils.c: Include "gdb_termios.h" instead of
1369 "terminal.h".
1370 * terminal.h: Delete file.
1371
1372 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1373
1374 * server.c: Include <vector>.
1375 <program_argv, wrapper_argv>: Convert to std::vector.
1376 (start_inferior): Rewrite function to use C++.
1377 (handle_v_run): Likewise. Update code that calculates the argv
1378 based on the vRun packet; use C++.
1379 (captured_main): Likewise.
1380
1381 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1382
1383 * server.c (handle_v_cont): Initialize thread_resume::thread
1384 with null_ptid.
1385
1386 2017-04-05 Pedro Alves <palves@redhat.com>
1387
1388 * configure: Regenerate.
1389
1390 2017-04-05 Pedro Alves <palves@redhat.com>
1391
1392 * gdbreplay.c (sync_error): Constify.
1393 * linux-x86-low.c (push_opcode): Constify.
1394
1395 2017-04-05 Pedro Alves <palves@redhat.com>
1396
1397 * win32-low.c (get_child_debug_event)
1398 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1399 Report TARGET_WAITKIND_SPURIOUS instead.
1400
1401 2017-04-05 Pedro Alves <palves@redhat.com>
1402
1403 * remote-utils.c (remote_prepare, remote_open): Constify.
1404 * remote-utils.h (remote_prepare, remote_open): Constify.
1405 * server.c (captured_main): Constify 'port' handling.
1406
1407 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1408
1409 * Makefile.in (clean): Clear .deps.
1410
1411 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1412
1413 * .gitignore: Remove generated files, replace with wildcard.
1414 * (clean): Replace removal of generated files with wildcard.
1415 (version.c): Replace with...
1416 (version-generated.c): ...this.
1417 (xml-builtin.c): Replace with...
1418 (xml-builtin-generated.c): ...this.
1419 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1420 (%.c: *regformats*): Replace with...
1421 (%-generated.c: *regformats*): ...this.
1422
1423 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1424
1425 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1426 (xtensa_fill_gregset): Call collect_register_by_name for
1427 threadptr register.
1428 (xtensa_store_gregset): Call supply_register_by_name for
1429 threadptr register.
1430
1431 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1432
1433 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1434 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1435 (xtensa_store_gregset): Call supply_register for all registers in
1436 a0_regnum..a0_regnum + C0_NREGS range.
1437
1438 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1439
1440 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1441 (ax-ipa.o: ax.c): Remove.
1442 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1443 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1444 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1445 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1446 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1447
1448 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1449
1450 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1451 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1452 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1453 (errors-ipa.o: ../common/errors.c): Remove.
1454 (format-ipa.o: ../common/format.c): Remove.
1455 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1456
1457 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * Makefile.in (%-ipa.o: %.c): New rule.
1460 (tracepoint-ipa.o: tracepoint.c): Remove.
1461 (utils-ipa.o: utils.c): Remove.
1462 (remote-utils-ipa.o: remote-utils.c): Remove.
1463 (regcache-ipa.o: regcache.c): Remove.
1464 (i386-linux-ipa.o: i386-linux.c): Remove.
1465 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1466 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1467 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1468 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1469 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1470 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1471 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1472 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1473 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1474 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1475 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1476 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1477 (aarch64-ipa.o: aarch64.c): Remove.
1478 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1479 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1480 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1481 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1482 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1483 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1484 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1485 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1486 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1487 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1488 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1489 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1490 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1491 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1492 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1493 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1494 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1495 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1496 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1497 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1498 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1499 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1500 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1501 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1502 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1503 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1504 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1505 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1506 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1507 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1508 (tdesc-ipa.o: tdesc.c): Remove.
1509 (x32-linux-ipa.o: x32-linux.c): Remove.
1510 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1511 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1512
1513 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1514
1515 * Makefile.in (%.o: ../arch/%.c): New rule.
1516 (arm.o: ../arch/arm.c): Remove.
1517 (arm-linux.o: ../arch/arm-linux.c): Remove.
1518 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1519 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1520
1521 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1522
1523 * Makefile.in (%.o: ../nat/%.c): New rule.
1524 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1525 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1526 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1527 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1528 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1529 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1530 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1531 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1532 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1533 (linux-personality.o: ../nat/linux-personality.c): Remove.
1534 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1535 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1536 (x86-linux.o: ../nat/x86-linux.c): Remove.
1537 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1538 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1539
1540 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1541
1542 * Makefile.in (%.o: ../common/%.c): New rule.
1543 (signals.o: ../common/signals.c): Remove.
1544 (print-utils.o: ../common/print-utils.c): Remove.
1545 (rsp-low.o: ../common/rsp-low.c): Remove.
1546 (common-utils.o: ../common/common-utils.c): Remove.
1547 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1548 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1549 (vec.o: ../common/vec.c): Remove.
1550 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1551 (xml-utils.o: ../common/xml-utils.c): Remove.
1552 (ptid.o: ../common/ptid.c): Remove.
1553 (buffer.o: ../common/buffer.c): Remove.
1554 (format.o: ../common/format.c): Remove.
1555 (filestuff.o: ../common/filestuff.c): Remove.
1556 (agent.o: ../common/agent.c): Remove.
1557 (errors.o: ../common/errors.c): Remove.
1558 (environ.o: ../common/environ.c): Remove.
1559 (common-debug.o: ../common/common-debug.c): Remove.
1560 (cleanups.o: ../common/cleanups.c): Remove.
1561 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1562 (fileio.o: ../common/fileio.c): Remove.
1563 (common-regcache.o: ../common/common-regcache.c): Remove.
1564 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1565 (new-op.o: ../common/new-op.c): Remove.
1566 (btrace-common.o: ../common/btrace-common.c): Remove.
1567
1568 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1569
1570 * Makefile.in (%.o: ../target/%.c): New rule.
1571 (waitstatus.o: ../target/waitstatus.c): Remove.
1572
1573 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1574
1575 * Makefile.in
1576 (%.c: ../regformats/%.dat,
1577 (%.c: ../regformats/arm/%.dat,
1578 (%.c: ../regformats/i386/%.dat,
1579 (%.c: ../regformats/rs6000/%.dat): New rules.
1580 (aarch64.c): Remove.
1581 (reg-arm.c): Remove.
1582 (arm-with-iwmmxt.c): Remove.
1583 (arm-with-vfpv2.c): Remove.
1584 (arm-with-vfpv3.c): Remove.
1585 (arm-with-neon.c): Remove.
1586 (reg-bfin.c): Remove.
1587 (reg-cris.c): Remove.
1588 (reg-crisv32.c): Remove.
1589 (i386.c): Remove.
1590 (i386-linux.c): Remove.
1591 (i386-avx.c): Remove.
1592 (i386-avx-linux.c): Remove.
1593 (i386-avx-avx512.c): Remove.
1594 (i386-avx-avx512-linux.c): Remove.
1595 (i386-mpx.c): Remove.
1596 (i386-mpx-linux.c): Remove.
1597 (i386-avx-mpx-avx512-pku.c): Remove.
1598 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1599 (i386-avx-mpx.c): Remove.
1600 (i386-avx-mpx-linux.c): Remove.
1601 (i386-mmx.c): Remove.
1602 (i386-mmx-linux.c): Remove.
1603 (reg-ia64.c): Remove.
1604 (reg-m32r.c): Remove.
1605 (reg-m68k.c): Remove.
1606 (reg-cf.c): Remove.
1607 (mips-linux.c): Remove.
1608 (mips-dsp-linux.c): Remove.
1609 (mips64-linux.c): Remove.
1610 (mips64-dsp-linux.c): Remove.
1611 (nios2-linux.c): Remove.
1612 (powerpc-32.c): Remove.
1613 (powerpc-32l.c): Remove.
1614 (powerpc-altivec32l.c): Remove.
1615 (powerpc-cell32l.c): Remove.
1616 (powerpc-vsx32l.c): Remove.
1617 (powerpc-isa205-32l.c): Remove.
1618 (powerpc-isa205-altivec32l.c): Remove.
1619 (powerpc-isa205-vsx32l.c): Remove.
1620 (powerpc-e500l.c): Remove.
1621 (powerpc-64l.c): Remove.
1622 (powerpc-altivec64l.c): Remove.
1623 (powerpc-cell64l.c): Remove.
1624 (powerpc-vsx64l.c): Remove.
1625 (powerpc-isa205-64l.c): Remove.
1626 (powerpc-isa205-altivec64l.c): Remove.
1627 (powerpc-isa205-vsx64l.c): Remove.
1628 (s390-linux32.c): Remove.
1629 (s390-linux32v1.c): Remove.
1630 (s390-linux32v2.c): Remove.
1631 (s390-linux64.c): Remove.
1632 (s390-linux64v1.c): Remove.
1633 (s390-linux64v2.c): Remove.
1634 (s390-te-linux64.c): Remove.
1635 (s390-vx-linux64.c): Remove.
1636 (s390-tevx-linux64.c): Remove.
1637 (s390x-linux64.c): Remove.
1638 (s390x-linux64v1.c): Remove.
1639 (s390x-linux64v2.c): Remove.
1640 (s390x-te-linux64.c): Remove.
1641 (s390x-vx-linux64.c): Remove.
1642 (s390x-tevx-linux64.c): Remove.
1643 (tic6x-c64xp-linux.c): Remove.
1644 (tic6x-c64x-linux.c): Remove.
1645 (tic6x-c62x-linux.c): Remove.
1646 (reg-sh.c): Remove.
1647 (reg-sparc64.c): Remove.
1648 (reg-spu.c): Remove.
1649 (amd64.c): Remove.
1650 (amd64-linux.c): Remove.
1651 (amd64-avx.c): Remove.
1652 (amd64-avx-linux.c): Remove.
1653 (amd64-avx-avx512.c): Remove.
1654 (amd64-avx-avx512-linux.c): Remove.
1655 (amd64-mpx.c): Remove.
1656 (amd64-mpx-linux.c): Remove.
1657 (amd64-avx-mpx-avx512-pku.c): Remove.
1658 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1659 (amd64-avx-mpx.c): Remove.
1660 (amd64-avx-mpx-linux.c): Remove.
1661 (x32.c): Remove.
1662 (x32-linux.c): Remove.
1663 (x32-avx.c): Remove.
1664 (x32-avx-linux.c): Remove.
1665 (x32-avx-avx512.c): Remove.
1666 (x32-avx-avx512-linux.c): Remove.
1667 (reg-xtensa.c): Remove.
1668 (reg-tilegx.c): Remove.
1669 (reg-tilegx32.c): Remove.
1670
1671 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1672
1673 * Makefile.in (SFILES): Add "common/environ.c".
1674 (OBJS): Add "common/environ.h".
1675
1676 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1677
1678 * configure.ac: Check if the fs_base and gs_base members of
1679 `struct user_regs_struct' exist.
1680 * config.in: Regenerated.
1681 * configure: Likewise.
1682
1683 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1684
1685 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1686 target_read_memory.
1687 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1688 (get_next_pcs_syscall_next_pc): Likewise.
1689
1690 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1691
1692 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1693 * nto-x86-low.c: Likewise.
1694
1695 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1696
1697 * Makefile.in: Include disable-implicit-rules.mk.
1698
1699 2016-11-23 Pedro Alves <palves@redhat.com>
1700
1701 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1702 (debug_vprintf): Use std::chrono::steady_clock instead of
1703 gettimeofday. Use '.' instead of ':'.
1704 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1705 (get_timestamp): Use std::chrono::steady_clock instead of
1706 gettimeofday.
1707
1708 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1709
1710 * Makefile.in: Fix whitespace formatting.
1711
1712 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1713
1714 * Makefile.in (SFILES, OBS): Flatten list and order
1715 alphabetically.
1716
1717 2016-11-23 Pedro Alves <palves@redhat.com>
1718
1719 * event-loop.c (handle_file_event): Use warning.
1720 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1721 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1722 Use warning.
1723
1724 2016-11-23 Pedro Alves <palves@redhat.com>
1725
1726 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1727 output.
1728 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1729 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1730 debug_printf and debug_flush for debug output.
1731 * server.c (handle_general_set): Likewise.
1732 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1733 output.
1734
1735 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1736
1737 * Makefile.in (.c.o): Replace rule with ...
1738 (%.o: %.c): ... this one.
1739
1740 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1741
1742 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1743 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1744 make.
1745 * configure.ac: Remove checks for the make program.
1746 * configure: Re-generate.
1747
1748 2016-10-28 Pedro Alves <palves@redhat.com>
1749
1750 * Makefile.in (CXX_DIALECT): Get from configure.
1751 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1752 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1753 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1754 * config.in: Regenerate.
1755 * configure: Regenerate.
1756
1757 2016-10-27 Yao Qi <yao.qi@linaro.org>
1758
1759 * linux-low.c (linux_supports_range_stepping): Return true if
1760 can_software_single_step return true.
1761
1762 2016-10-27 Yao Qi <yao.qi@linaro.org>
1763
1764 * inferiors.c (find_inferior_in_random): New function.
1765 * inferiors.h (find_inferior_in_random): Declare.
1766 * linux-low.c (linux_wait_for_event_filtered): Call
1767 find_inferior_in_random instead of find_inferior.
1768
1769 2016-10-27 Yao Qi <yao.qi@linaro.org>
1770
1771 * linux-low.c (linux_wait_1): If single-step breakpoints are
1772 inserted, remove them.
1773
1774 2016-10-26 Pedro Alves <palves@redhat.com>
1775
1776 * linux-low.c (handle_extended_wait): Link parent/child fork
1777 threads.
1778 (linux_wait_1): Unlink them.
1779 (linux_set_resume_request): Ignore resume requests for
1780 already-resumed and unhandled fork child threads.
1781 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1782 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1783 New functions.
1784 (handle_v_requests) <vCont>: Don't call require_running.
1785 * server.h (in_queued_stop_replies): New declaration.
1786
1787 2016-10-24 Yao Qi <yao.qi@linaro.org>
1788
1789 PR server/20733
1790 * linux-aarch64-low.c (append_insns): Cast the return value to
1791 'uint32_t *'.
1792
1793 2016-10-10 Yao Qi <yao.qi@linaro.org>
1794
1795 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1796
1797 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1798
1799 * target.c (target_supports_multi_process): New function, moved
1800 from...
1801 * target.h (target_supports_multi_process): ... here. Remove
1802 macro.
1803
1804 2016-10-05 Tom Tromey <tom@tromey.com>
1805
1806 PR remote/20655:
1807 * tracepoint.c (handle_tracepoint_bkpts): Check
1808 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1809
1810 2016-10-05 Yao Qi <yao.qi@linaro.org>
1811
1812 * configure.srv: Update the path of arm-*.xml files.
1813
1814 2016-10-05 Terry Guo <terry.guo@arm.com>
1815 Yao Qi <yao.qi@linaro.org>
1816
1817 * Makefile.in: Adjust the path of rules.
1818 * configure.srv: Update the path of xml files.
1819 * regformats/arm-with-iwmmxt.dat: Regenerated.
1820 * regformats/arm-with-neon.dat: Likewise.
1821 * regformats/arm-with-vfpv2.dat: Likewise.
1822 * regformats/arm-with-vfpv3.dat Likewise.
1823
1824 2016-09-30 Yao Qi <yao.qi@linaro.org>
1825
1826 PR gdbserver/20627
1827 * target.c (target_stop_and_wait): Don't call
1828 target_continue_no_signal, use resume_stop instead.
1829
1830 2016-09-26 Yao Qi <yao.qi@linaro.org>
1831
1832 * linux-low.c (linux_wait_1): Call debug_exit.
1833
1834 2016-09-23 Pedro Alves <palves@redhat.com>
1835
1836 * Makefile.in (SFILES): Add common/new-op.c.
1837 (OBS): Add common/new-op.o.
1838 (new-op.o): New rule.
1839
1840 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1841
1842 * .gitinore: Ignore more files.
1843
1844 2016-09-21 Yao Qi <yao.qi@linaro.org>
1845
1846 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1847 23.
1848
1849 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1850
1851 * server.c (start_inferior): Call target_mourn_inferior instead of
1852 mourn_inferior; pass ptid_t argument to it.
1853 (resume): Likewise.
1854 (handle_target_event): Likewise.
1855 * target.c (target_mourn_inferior): New function.
1856 * target.h (mourn_inferior): Delete macro.
1857
1858 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1859
1860 * linux-low.c (lwp_is_stepping): New function.
1861
1862 2016-09-06 Carl Love <cel@us.ibm.com>
1863
1864 * server.c (start_inferior): Fixed comment, requested comment change
1865 didn't get updated correctly. Removed reference to ptrace () call as
1866 it is only true on Linux systems.
1867
1868 2016-09-06 Carl Love <cel@us.ibm.com>
1869
1870 * server.c (start_inferior): Do not call
1871 function target_post_create_inferior () if the
1872 inferior process has already exited.
1873
1874 2016-09-05 Pedro Alves <palves@redhat.com>
1875
1876 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1877 (COMPILE.pre, CC_LD): Use CXX directly.
1878 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1879 * acinclude.m4: Don't include build-with-cxx.m4.
1880 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1881 * configure: Regenerate.
1882
1883 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1884
1885 PR gdb/19495
1886 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1887 call writing data to own_buf.
1888
1889 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1890
1891 * target.c (mywait): Call target_wait instead of
1892 the_target->wait.
1893 (target_wait): New function.
1894
1895 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1896
1897 * server.c (start_inferior): New variable 'ptid'. Replace calls
1898 to the_target->resume by target_continue{,_no_signal}, depending
1899 on the case.
1900 * target.c (target_stop_and_wait): Call target_continue_no_signal
1901 instead of the_target->resume.
1902 (target_continue): New function.
1903
1904 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1905
1906 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1907
1908 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1909
1910 PR server/20491
1911 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1912 ps_prochandle.
1913 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1914 * linux-arm-low.c (ps_get_thread_area): Likewise.
1915 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1916 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1917 * linux-mips-low.c (ps_get_thread_area): Likewise.
1918 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1919 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1920 * linux-x86-low.c (ps_get_thread_area): Likewise.
1921 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1922
1923 2016-08-19 Pedro Alves <palves@redhat.com>
1924
1925 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1926
1927 2016-08-19 Pedro Alves <palves@redhat.com>
1928
1929 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1930 comment. Use memcpy instead of casting through unsigned long.
1931
1932 2016-08-19 Pedro Alves <palves@redhat.com>
1933
1934 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1935 allocating around 0x80000000.
1936
1937 2016-08-19 Pedro Alves <palves@redhat.com>
1938
1939 PR gdb/20415
1940 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1941 (x32-avx512-linux-ipa.o): New rules.
1942 * configure.ac (x86_64-*-linux*): New x32 check.
1943 * configure.srv (ipa_x32_linux_regobj): New.
1944 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1945 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1946 descriptions.
1947 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1948 descriptions.
1949 * configure: Regenerate.
1950
1951 2016-08-09 Pedro Alves <palves@redhat.com>
1952
1953 PR gdb/18653
1954 * Makefile.in (OBS): Add signals-state-save-restore.o.
1955 (signals-state-save-restore.o): New rule.
1956 * config.in: Regenerate.
1957 * configure: Regenerate.
1958 * linux-low.c: Include "signals-state-save-restore.h".
1959 (linux_create_inferior): Call
1960 restore_original_signals_state.
1961 * server.c: Include "dispositions-save-restore.h".
1962 (captured_main): Call save_original_signals_state.
1963
1964 2016-08-05 Pedro Alves <palves@redhat.com>
1965
1966 * configure: Regenerate.
1967
1968 2016-08-04 Yao Qi <yao.qi@linaro.org>
1969
1970 * linux-low.c (regsets_fetch_inferior_registers): Check
1971 errno is ESRCH or not.
1972
1973 2016-08-02 Yao Qi <yao.qi@linaro.org>
1974
1975 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1976 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1977 (thread_db_load_search): Update.
1978 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1979 td_ta_set_event and td_ta_event_getmsg.
1980
1981 2016-07-26 Pedro Alves <palves@redhat.com>
1982
1983 PR server/20414
1984 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1985 of unsigned long for 64-bit registers and use uint32_t instead of
1986 unsigned int for 32-bit registers.
1987
1988 2016-07-26 Pedro Alves <palves@redhat.com>
1989
1990 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1991 to 'ptrace'.
1992
1993 2016-07-21 Tom Tromey <tom@tromey.com>
1994
1995 * configure: Rebuild.
1996
1997 2016-07-21 Yao Qi <yao.qi@linaro.org>
1998
1999 * mem-break.c (find_gdb_breakpoint): Cast bp to
2000 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2001
2002 2016-07-21 Yao Qi <yao.qi@linaro.org>
2003
2004 * server.c (handle_v_requests): Support s and S actions
2005 if target_supports_software_single_step return true.
2006
2007 2016-07-21 Yao Qi <yao.qi@linaro.org>
2008
2009 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2010 is resume_step, call maybe_hw_step.
2011 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2012 and unstop them.
2013 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2014 breakpoints or not.
2015 (proceed_one_lwp): If resume request is resume_step, install
2016 reinsert breakpoints and call maybe_hw_step.
2017
2018 2016-07-21 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-low.c (proceed_one_lwp): Declare.
2021 (linux_resume_one_thread): Remove local variable 'step'.
2022 Lift code enqueue signal. Call proceed_one_lwp instead of
2023 linux_resume_one_lwp.
2024
2025 2016-07-21 Yao Qi <yao.qi@linaro.org>
2026
2027 * linux-low.c (linux_resume_one_thread): Call
2028 enqueue_pending_signal.
2029
2030 2016-07-21 Yao Qi <yao.qi@linaro.org>
2031
2032 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2033 * inferiors.c (do_restore_current_thread_cleanup): New function.
2034 (make_cleanup_restore_current_thread): Likewise.
2035 * linux-low.c (install_software_single_step_breakpoints): Call
2036 make_cleanup_restore_current_thread. Switch current_thread to
2037 thread.
2038
2039 2016-07-21 Yao Qi <yao.qi@linaro.org>
2040
2041 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2042 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2043 (clone_one_breakpoint): Likewise.
2044 (delete_reinsert_breakpoints): Change parameter to thread.
2045 Callers updated.
2046 (has_reinsert_breakpoints): Likewise.
2047 (uninsert_reinsert_breakpoints): Likewise.
2048 (reinsert_reinsert_breakpoints): Likewise.
2049 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2050 (delete_reinsert_breakpoints): Likewise.
2051 (reinsert_reinsert_breakpoints): Likewise.
2052 (uninsert_reinsert_breakpoints): Likewise.
2053 (has_reinsert_breakpoints): Likewise.
2054
2055 2016-07-21 Yao Qi <yao.qi@linaro.org>
2056
2057 * inferiors.c (get_thread_process): Make parameter const.
2058 * inferiors.h (get_thread_process): Update declaration.
2059 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2060 Add new parameters child_thread and parent_thread. Callers
2061 updated.
2062 * mem-break.h (clone_all_breakpoints): Update declaration.
2063
2064 2016-07-21 Yao Qi <yao.qi@linaro.org>
2065
2066 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2067 <command_list, handler>: Remove.
2068 (struct gdb_breakpoint): New.
2069 (struct other_breakpoint): New.
2070 (struct reinsert_breakpoint): New.
2071 (is_gdb_breakpoint): New function.
2072 (any_persistent_commands): Update command_list if
2073 is_gdb_breakpoint returns true.
2074 (set_breakpoint): Create breakpoints according to their types.
2075 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2076 (set_gdb_breakpoint_1): Likewise.
2077 (set_gdb_breakpoint): Likewise.
2078 (clear_breakpoint_conditions): Change parameter type to
2079 'struct gdb_breakpoint *'.
2080 (clear_breakpoint_commands): Likewise.
2081 (clear_breakpoint_conditions_and_commands): Likewise.
2082 (add_condition_to_breakpoint): Likewise.
2083 (add_breakpoint_condition): Likewise.
2084 (add_commands_to_breakpoint): Likewise.
2085 (check_breakpoints): Check other_breakpoint.
2086 (clone_one_breakpoint): Clone breakpopint according to its type.
2087 * mem-break.h (struct gdb_breakpoint): Declare.
2088 (set_gdb_breakpoint): Update declaration.
2089 (clear_breakpoint_conditions_and_commands): Likewise.
2090 (add_breakpoint_condition): Likewise.
2091 (add_breakpoint_commands): Likewise.
2092 * server.c (process_point_options): Change parameter type to
2093 'struct gdb_breakpoint *'.
2094
2095 2016-07-21 Yao Qi <yao.qi@linaro.org>
2096
2097 * mem-break.c (set_breakpoint_at): Rename it to ...
2098 (set_breakpoint_type_at): ... it.
2099 (set_breakpoint_at): Call set_breakpoint_type_at.
2100 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2101 * mem-break.h (set_breakpoint_at): Update comments.
2102
2103 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2104
2105 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2106 to buf parameter.
2107 (nios2_store_gregset): Likewise.
2108
2109 2016-07-01 Pedro Alves <palves@redhat.com>
2110 Antoine Tremblay <antoine.tremblay@ericsson.com>
2111
2112 * linux-low.c: Change interface to take the target lwp_info
2113 pointer directly and return void. Handle detaching from a zombie
2114 thread.
2115 (linux_detach_lwp_callback): New function.
2116 (linux_detach): Detach from the leader thread after detaching from
2117 the clone threads.
2118
2119 2016-06-28 Yao Qi <yao.qi@linaro.org>
2120
2121 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2122 for variable new_offset.
2123 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2124 (aarch64_ftrace_insn_reloc_cb): Likewise.
2125 (aarch64_ftrace_insn_reloc_tb): Likewise.
2126 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2127 PRIx64 instead of PRIx32.
2128
2129 2016-06-28 Yao Qi <yao.qi@linaro.org>
2130
2131 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2132 (the_low_target): Install arm_get_syscall_trapinfo.
2133
2134 2016-06-28 Yao Qi <yao.qi@linaro.org>
2135
2136 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2137 function.
2138 (the_low_target): Install aarch64_get_syscall_trapinfo.
2139
2140 2016-06-28 Yao Qi <yao.qi@linaro.org>
2141
2142 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2143 Callers updated.
2144 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2145 Remove parameter sysno.
2146 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2147 sysret.
2148
2149 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2150
2151 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2152 (s390_emit_ne_goto): Likewise.
2153 (s390_emit_lt_goto): Likewise.
2154 (s390_emit_le_goto): Likewise.
2155 (s390_emit_gt_goto): Likewise.
2156 (s390_emit_ge_goto): Likewise.
2157 (s390x_emit_eq_goto): Likewise.
2158 (s390x_emit_ne_goto): Likewise.
2159 (s390x_emit_lt_goto): Likewise.
2160 (s390x_emit_le_goto): Likewise.
2161 (s390x_emit_gt_goto): Likewise.
2162 (s390x_emit_ge_goto): Likewise.
2163 (s390_emit_ops_impl): Mark variable static.
2164 (s390x_emit_ops): Likewise.
2165
2166 2016-06-17 Yao Qi <yao.qi@linaro.org>
2167
2168 * linux-low.c (handle_extended_wait): Call
2169 uninsert_reinsert_breakpoints for the parent process. Remove
2170 reinsert breakpoints from the child process. Reinsert them to
2171 the parent process when vfork is done.
2172 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2173 (reinsert_reinsert_breakpoints): New function.
2174 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2175 (reinsert_reinsert_breakpoints): Declare.
2176
2177 2016-06-17 Yao Qi <yao.qi@linaro.org>
2178
2179 * linux-low.c (handle_extended_wait): If the parent is doing
2180 step-over, remove the reinsert breakpoints from the forked child.
2181
2182 2016-06-17 Yao Qi <yao.qi@linaro.org>
2183
2184 * linux-low.c (unsuspend_all_lwps): Declare.
2185 (linux_low_filter_event): If thread exited, call finish_step_over.
2186 If step-over is finished, unsuspend other threads.
2187
2188 2016-06-17 Yao Qi <yao.qi@linaro.org>
2189
2190 * linux-low.c (linux_resume_one_lwp_throw): Assert
2191 has_reinsert_breakpoints returns false.
2192 * mem-break.c (delete_disabled_breakpoints): Assert
2193 bp type isn't reinsert_breakpoint.
2194
2195 2016-06-17 Yao Qi <yao.qi@linaro.org>
2196
2197 * linux-low.c (maybe_hw_step): New function.
2198 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2199 (finish_step_over): Switch current_thread to lwp temporarily,
2200 and assert has_reinsert_breakpoints returns true.
2201 (proceed_one_lwp): Call maybe_hw_step.
2202 * mem-break.c (has_reinsert_breakpoints): New function.
2203 * mem-break.h (has_reinsert_breakpoints): Declare.
2204
2205 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2206
2207 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2208
2209 2016-05-17 Yao Qi <yao.qi@linaro.org>
2210
2211 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2212 instead of find_inferior.
2213
2214 2016-05-05 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2217 Initialize res to zero.
2218
2219 2016-05-05 Yao Qi <yao.qi@linaro.org>
2220
2221 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2222 to uint32_t.
2223
2224 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2225
2226 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2227 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2228 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2229
2230 2016-04-28 Par Olsson <par.olsson@windriver.com>
2231 Simon Marchi <simon.marchi@ericsson.com>
2232
2233 * tracepoint.c (write_inferior_int8): New function.
2234 (cmd_qtenable_disable): Write enable flag using
2235 write_inferior_int8.
2236
2237 2016-04-25 Yao Qi <yao.qi@linaro.org>
2238
2239 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2240 (need_step_over_p): Return zero if the LWP has pending signals
2241 can be delivered on software single step target.
2242
2243 2016-04-25 Yao Qi <yao.qi@linaro.org>
2244
2245 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2246 return instead of error.
2247
2248 2016-04-22 Yao Qi <yao.qi@linaro.org>
2249
2250 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2251 to 23.
2252
2253 2016-04-22 Yao Qi <yao.qi@linaro.org>
2254
2255 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2256 signal when stepping over breakpoint with software single
2257 step.
2258
2259 2016-04-21 Pedro Alves <palves@redhat.com>
2260
2261 * linux-s390-low.c (s390_collect_ptrace_register)
2262 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2263 add casts.
2264 (s390_check_regset): Use void * instead of gdb_byte *.
2265
2266 2016-04-20 Pedro Alves <palves@redhat.com>
2267
2268 * configure: Renegerate.
2269
2270 2016-04-20 Yao Qi <yao.qi@linaro.org>
2271
2272 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2273 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2274 number 16.
2275 (arm_store_gregset): Likewise.
2276
2277 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2278
2279 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2280 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2281 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2282 (amd64-avx-mpx-linux.c): New rules.
2283 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2284 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2285 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2286 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2287 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2288 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2289 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2290 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2291 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2292 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2293 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2294 * linux-x86-low.c (x86_linux_read_description): Add case for
2295 X86_XSTATE_AVX_MPX_MASK.
2296 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2297 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2298 init_registers_i386_avx_mpx_linux.
2299 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2300 (initialize_low_tracepoint): Call
2301 init_registers_i386_avx_mpx_linux.
2302 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2303 (initialize_low_tracepoint): Call
2304 init_registers_amd64_avx_mpx_linux.
2305 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2306 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2307 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2308 declarations.
2309
2310 2016-04-18 Pedro Alves <palves@redhat.com>
2311
2312 * configure: Regenerate.
2313
2314 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2315
2316 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2317 (aarch64_emit_sub): Likewise.
2318
2319 2016-04-12 Pedro Alves <palves@redhat.com>
2320
2321 * utils.c (prepare_to_throw_exception): Delete.
2322
2323 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2324
2325 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2326
2327 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2328
2329 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2330
2331 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2332
2333 * linux-aarch64-ipa.c: Add <elf.h> include.
2334 * linux-ppc-ipa.c: Add <elf.h> include.
2335 * linux-s390-ipa.c: Add <elf.h> include.
2336
2337 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2338
2339 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2340 (get_raw_reg_ptr): Likewise.
2341 (get_trace_state_variable_value_ptr): Likewise.
2342 (set_trace_state_variable_value_ptr): Likewise.
2343 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2344 char *.
2345
2346 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2347 Marcin Kościelnicki <koriakin@0x04.net>
2348
2349 PR/17221
2350 * linux-ppc-low.c (emit_insns): New function.
2351 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2352 (ppc_emit_prologue): New function.
2353 (ppc_emit_epilogue): New function.
2354 (ppc_emit_add): New function.
2355 (ppc_emit_sub): New function.
2356 (ppc_emit_mul): New function.
2357 (ppc_emit_lsh): New function.
2358 (ppc_emit_rsh_signed): New function.
2359 (ppc_emit_rsh_unsigned): New function.
2360 (ppc_emit_ext): New function.
2361 (ppc_emit_zero_ext): New function.
2362 (ppc_emit_log_not): New function.
2363 (ppc_emit_bit_and): New function.
2364 (ppc_emit_bit_or): New function.
2365 (ppc_emit_bit_xor): New function.
2366 (ppc_emit_bit_not): New function.
2367 (ppc_emit_equal): New function.
2368 (ppc_emit_less_signed): New function.
2369 (ppc_emit_less_unsigned): New function.
2370 (ppc_emit_ref): New function.
2371 (ppc_emit_const): New function.
2372 (ppc_emit_reg): New function.
2373 (ppc_emit_pop): New function.
2374 (ppc_emit_stack_flush): New function.
2375 (ppc_emit_swap): New function.
2376 (ppc_emit_stack_adjust): New function.
2377 (ppc_emit_call): New function.
2378 (ppc_emit_int_call_1): New function.
2379 (ppc_emit_void_call_2): New function.
2380 (ppc_emit_if_goto): New function.
2381 (ppc_emit_goto): New function.
2382 (ppc_emit_eq_goto): New function.
2383 (ppc_emit_ne_goto): New function.
2384 (ppc_emit_lt_goto): New function.
2385 (ppc_emit_le_goto): New function.
2386 (ppc_emit_gt_goto): New function.
2387 (ppc_emit_ge_goto): New function.
2388 (ppc_write_goto_address): New function.
2389 (ppc_emit_ops_impl): New static variable.
2390 (ppc64v1_emit_prologue): New function.
2391 (ppc64v2_emit_prologue): New function.
2392 (ppc64_emit_epilogue): New function.
2393 (ppc64_emit_add): New function.
2394 (ppc64_emit_sub): New function.
2395 (ppc64_emit_mul): New function.
2396 (ppc64_emit_lsh): New function.
2397 (ppc64_emit_rsh_signed): New function.
2398 (ppc64_emit_rsh_unsigned): New function.
2399 (ppc64_emit_ext): New function.
2400 (ppc64_emit_zero_ext): New function.
2401 (ppc64_emit_log_not): New function.
2402 (ppc64_emit_bit_and): New function.
2403 (ppc64_emit_bit_or): New function.
2404 (ppc64_emit_bit_xor): New function.
2405 (ppc64_emit_bit_not): New function.
2406 (ppc64_emit_equal): New function.
2407 (ppc64_emit_less_signed): New function.
2408 (ppc64_emit_less_unsigned): New function.
2409 (ppc64_emit_ref): New function.
2410 (ppc64_emit_const): New function.
2411 (ppc64v1_emit_reg): New function.
2412 (ppc64v2_emit_reg): New function.
2413 (ppc64_emit_pop): New function.
2414 (ppc64_emit_stack_flush): New function.
2415 (ppc64_emit_swap): New function.
2416 (ppc64v1_emit_call): New function.
2417 (ppc64v2_emit_call): New function.
2418 (ppc64v1_emit_int_call_1): New function.
2419 (ppc64v2_emit_int_call_1): New function.
2420 (ppc64v1_emit_void_call_2): New function.
2421 (ppc64v2_emit_void_call_2): New function.
2422 (ppc64_emit_if_goto): New function.
2423 (ppc64_emit_eq_goto): New function.
2424 (ppc64_emit_ne_goto): New function.
2425 (ppc64_emit_lt_goto): New function.
2426 (ppc64_emit_le_goto): New function.
2427 (ppc64_emit_gt_goto): New function.
2428 (ppc64_emit_ge_goto): New function.
2429 (ppc64v1_emit_ops_impl): New static variable.
2430 (ppc64v2_emit_ops_impl): New static variable.
2431 (ppc_emit_ops): New function.
2432 (linux_low_target): Wire in ppc_emit_ops.
2433
2434 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2435 Marcin Kościelnicki <koriakin@0x04.net>
2436
2437 PR/17221
2438 * Makefile.in: Add powerpc-*-ipa.o
2439 * configure.srv: Add ipa_obj for powerpc*-linux.
2440 * linux-ppc-ipa.c: New file.
2441 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2442 includes.
2443 (PPC_FIELD): New macro.
2444 (PPC_SEXT): New macro.
2445 (PPC_OP6): New macro.
2446 (PPC_BO): New macro.
2447 (PPC_LI): New macro.
2448 (PPC_BD): New macro.
2449 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2450 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2451 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2452 (ppc_get_thread_area): New function.
2453 (is_elfv2_inferior): New function.
2454 (gen_ds_form): New function.
2455 (GEN_STD): New macro.
2456 (GEN_STDU): New macro.
2457 (GEN_LD): New macro.
2458 (GEN_LDU): New macro.
2459 (gen_d_form): New function.
2460 (GEN_ADDI): New macro.
2461 (GEN_ADDIS): New macro.
2462 (GEN_LI): New macro.
2463 (GEN_LIS): New macro.
2464 (GEN_ORI): New macro.
2465 (GEN_ORIS): New macro.
2466 (GEN_LWZ): New macro.
2467 (GEN_STW): New macro.
2468 (GEN_STWU): New macro.
2469 (gen_xfx_form): New function.
2470 (GEN_MFSPR): New macro.
2471 (GEN_MTSPR): New macro.
2472 (GEN_MFCR): New macro.
2473 (GEN_MTCR): New macro.
2474 (GEN_SYNC): New macro.
2475 (GEN_LWSYNC): New macro.
2476 (gen_x_form): New function.
2477 (GEN_OR): New macro.
2478 (GEN_MR): New macro.
2479 (GEN_LWARX): New macro.
2480 (GEN_STWCX): New macro.
2481 (GEN_CMPW): New macro.
2482 (gen_md_form): New function.
2483 (GEN_RLDICL): New macro.
2484 (GEN_RLDICR): New macro.
2485 (gen_i_form): New function.
2486 (GEN_B): New macro.
2487 (GEN_BL): New macro.
2488 (gen_b_form): New function.
2489 (GEN_BNE): New macro.
2490 (GEN_LOAD): New macro.
2491 (GEN_STORE): New macro.
2492 (gen_limm): New function.
2493 (gen_atomic_xchg): New function.
2494 (gen_call): New function.
2495 (ppc_relocate_instruction): New function.
2496 (ppc_install_fast_tracepoint_jump_pad): New function.
2497 (ppc_get_min_fast_tracepoint_insn_len): New function.
2498 (ppc_get_ipa_tdesc_idx): New function.
2499 (the_low_target): Wire in the new functions.
2500 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2501 tdescs.
2502 * linux-ppc-tdesc.h: New file.
2503
2504 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2505
2506 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2507 (alloc_jump_pad_buffer): New function.
2508 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2509 (alloc_jump_pad_buffer): New function.
2510 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2511 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2512 (alloc_jump_pad_buffer): New function.
2513 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2514 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2515 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2516 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2517
2518 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2519
2520 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2521 * linux-amd64-ipa.c: Likewise.
2522 * linux-i386-ipa.c: Likewise.
2523 * linux-s390-ipa.c: Likewise.
2524 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2525 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2526 set_trace_state_variable_value_ptr.
2527 (struct ipa_sym_addresses): Likewise.
2528 (symbol_list): Likewise.
2529 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2530 accessing gdb_collect directly.
2531 (gdb_collect_ptr_type): New typedef.
2532 (get_raw_reg_ptr_type): New typedef.
2533 (get_trace_state_variable_value_ptr_type): New typedef.
2534 (set_trace_state_variable_value_ptr_type): New typedef.
2535 (gdb_collect_ptr): New global.
2536 (get_raw_reg_ptr): New global.
2537 (get_trace_state_variable_value_ptr): New global.
2538 (set_trace_state_variable_value_ptr): New global.
2539 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2540 accessing get_raw_reg directly.
2541 (get_get_tsv_func_addr): Likewise for
2542 get_trace_state_variable_value_ptr.
2543 (get_set_tsv_func_addr): Likewise for
2544 set_trace_state_variable_value_ptr.
2545 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2546
2547 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2548
2549 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2550
2551 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2552
2553 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2554 packets.
2555 (relocate_instruction): Remove own_buf.
2556 * server.c (own_buf): Make global.
2557 (handle_v_requests): Make global.
2558 * server.h (own_buf): New declaration.
2559 (handle_v_requests): New prototype.
2560
2561 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2562
2563 PR 18377
2564 * linux-s390-low.c (add_insns): New function.
2565 (s390_emit_prologue): New function.
2566 (s390_emit_epilogue): New function.
2567 (s390_emit_add): New function.
2568 (s390_emit_sub): New function.
2569 (s390_emit_mul): New function.
2570 (s390_emit_lsh): New function.
2571 (s390_emit_rsh_signed): New function.
2572 (s390_emit_rsh_unsigned): New function.
2573 (s390_emit_ext): New function.
2574 (s390_emit_log_not): New function.
2575 (s390_emit_bit_and): New function.
2576 (s390_emit_bit_or): New function.
2577 (s390_emit_bit_xor): New function.
2578 (s390_emit_bit_not): New function.
2579 (s390_emit_equal): New function.
2580 (s390_emit_less_signed): New function.
2581 (s390_emit_less_unsigned): New function.
2582 (s390_emit_ref): New function.
2583 (s390_emit_if_goto): New function.
2584 (s390_emit_goto): New function.
2585 (s390_write_goto_address): New function.
2586 (s390_emit_litpool): New function.
2587 (s390_emit_const): New function.
2588 (s390_emit_call): New function.
2589 (s390_emit_reg): New function.
2590 (s390_emit_pop): New function.
2591 (s390_emit_stack_flush): New function.
2592 (s390_emit_zero_ext): New function.
2593 (s390_emit_swap): New function.
2594 (s390_emit_stack_adjust): New function.
2595 (s390_emit_set_r2): New function.
2596 (s390_emit_int_call_1): New function.
2597 (s390_emit_void_call_2): New function.
2598 (s390_emit_eq_goto): New function.
2599 (s390_emit_ne_goto): New function.
2600 (s390_emit_lt_goto): New function.
2601 (s390_emit_le_goto): New function.
2602 (s390_emit_gt_goto): New function.
2603 (s390_emit_ge_goto): New function.
2604 (s390x_emit_prologue): New function.
2605 (s390x_emit_epilogue): New function.
2606 (s390x_emit_add): New function.
2607 (s390x_emit_sub): New function.
2608 (s390x_emit_mul): New function.
2609 (s390x_emit_lsh): New function.
2610 (s390x_emit_rsh_signed): New function.
2611 (s390x_emit_rsh_unsigned): New function.
2612 (s390x_emit_ext): New function.
2613 (s390x_emit_log_not): New function.
2614 (s390x_emit_bit_and): New function.
2615 (s390x_emit_bit_or): New function.
2616 (s390x_emit_bit_xor): New function.
2617 (s390x_emit_bit_not): New function.
2618 (s390x_emit_equal): New function.
2619 (s390x_emit_less_signed): New function.
2620 (s390x_emit_less_unsigned): New function.
2621 (s390x_emit_ref): New function.
2622 (s390x_emit_if_goto): New function.
2623 (s390x_emit_const): New function.
2624 (s390x_emit_call): New function.
2625 (s390x_emit_reg): New function.
2626 (s390x_emit_pop): New function.
2627 (s390x_emit_stack_flush): New function.
2628 (s390x_emit_zero_ext): New function.
2629 (s390x_emit_swap): New function.
2630 (s390x_emit_stack_adjust): New function.
2631 (s390x_emit_int_call_1): New function.
2632 (s390x_emit_void_call_2): New function.
2633 (s390x_emit_eq_goto): New function.
2634 (s390x_emit_ne_goto): New function.
2635 (s390x_emit_lt_goto): New function.
2636 (s390x_emit_le_goto): New function.
2637 (s390x_emit_gt_goto): New function.
2638 (s390x_emit_ge_goto): New function.
2639 (s390_emit_ops): New function.
2640 (struct linux_target_ops): Fill in emit_ops hook.
2641
2642 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2643
2644 PR 18377
2645 * Makefile.in: Add s390 IPA files.
2646 * configure.srv: Build IPA for s390.
2647 * linux-s390-ipa.c: New file.
2648 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2649 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2650 (tdesc_s390_linux32): Likewise.
2651 (init_registers_s390_linux32v1): Likewise.
2652 (tdesc_s390_linux32v1): Likewise.
2653 (init_registers_s390_linux32v2): Likewise.
2654 (tdesc_s390_linux32v2): Likewise.
2655 (init_registers_s390_linux64): Likewise.
2656 (tdesc_s390_linux64): Likewise.
2657 (init_registers_s390_linux64v1): Likewise.
2658 (tdesc_s390_linux64v1): Likewise.
2659 (init_registers_s390_linux64v2): Likewise.
2660 (tdesc_s390_linux64v2): Likewise.
2661 (init_registers_s390_te_linux64): Likewise.
2662 (tdesc_s390_te_linux64): Likewise.
2663 (init_registers_s390_vx_linux64): Likewise.
2664 (tdesc_s390_vx_linux64): Likewise.
2665 (init_registers_s390_tevx_linux64): Likewise.
2666 (tdesc_s390_tevx_linux64): Likewise.
2667 (init_registers_s390x_linux64): Likewise.
2668 (tdesc_s390x_linux64): Likewise.
2669 (init_registers_s390x_linux64v1): Likewise.
2670 (tdesc_s390x_linux64v1): Likewise.
2671 (init_registers_s390x_linux64v2): Likewise.
2672 (tdesc_s390x_linux64v2): Likewise.
2673 (init_registers_s390x_te_linux64): Likewise.
2674 (tdesc_s390x_te_linux64): Likewise.
2675 (init_registers_s390x_vx_linux64): Likewise.
2676 (tdesc_s390x_vx_linux64): Likewise.
2677 (init_registers_s390x_tevx_linux64): Likewise.
2678 (tdesc_s390x_tevx_linux64): Likewise.
2679 (have_hwcap_s390_vx): New static variable.
2680 (s390_arch_setup): Fill have_hwcap_s390_vx.
2681 (s390_get_thread_area): New function.
2682 (s390_ft_entry_gpr_esa): New const.
2683 (s390_ft_entry_gpr_zarch): New const.
2684 (s390_ft_entry_misc): New const.
2685 (s390_ft_entry_fr): New const.
2686 (s390_ft_entry_vr): New const.
2687 (s390_ft_main_31): New const.
2688 (s390_ft_main_64): New const.
2689 (s390_ft_exit_fr): New const.
2690 (s390_ft_exit_vr): New const.
2691 (s390_ft_exit_misc): New const.
2692 (s390_ft_exit_gpr_esa): New const.
2693 (s390_ft_exit_gpr_zarch): New const.
2694 (append_insns): New function.
2695 (s390_relocate_instruction): New function.
2696 (s390_install_fast_tracepoint_jump_pad): New function.
2697 (s390_get_min_fast_tracepoint_insn_len): New function.
2698 (s390_get_ipa_tdesc_idx): New function.
2699 (struct linux_target_ops): Wire in the above functions.
2700 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2701 * linux-s390-tdesc.h: New file.
2702
2703 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2704
2705 * linux-s390-low.c (s390_supports_tracepoints): New function.
2706 (struct linux_target_ops): Fill supports_tracepoints hook.
2707
2708 2016-03-18 Yao Qi <yao.qi@linaro.org>
2709
2710 * linux-low.c (lwp_signal_can_be_delivered): New function.
2711 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2712
2713 2016-03-18 Yao Qi <yao.qi@linaro.org>
2714
2715 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2716 0 if signal is enqueued. Remove 'signal' from one debugging
2717 message. Move one debugging message to some lines below.
2718 Remove code setting 'signal' to 0.
2719
2720 2016-03-18 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-low.c (linux_low_filter_event): Remove redundant
2723 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2724
2725 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2726
2727 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2728 (struct linux_target_ops): Wire in the above.
2729
2730 2016-03-03 Yao Qi <yao.qi@linaro.org>
2731
2732 * linux-low.c: Update comments to start_step_over.
2733
2734 2016-03-03 Yao Qi <yao.qi@linaro.org>
2735
2736 PR server/19736
2737 * linux-low.c (handle_extended_wait): Set child suspended
2738 if event_lwp->bp_reinsert isn't zero.
2739
2740 2016-03-02 Yao Qi <yao.qi@linaro.org>
2741
2742 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2743 enqueue_pending_signal.
2744
2745 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2746
2747 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2748 is actually loaded.
2749
2750 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2751
2752 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2753 (s390_regmap_3264) [!__s390x__]: New global.
2754 (s390_collect_ptrace_register): Skip map entries containing -1.
2755 (s390_supply_ptrace_register): Ditto.
2756 (s390_fill_gprs_high): New function.
2757 (s390_store_gprs_high): New function.
2758 (s390_regsets): Add NT_S390_HIGH_GPRS.
2759 (s390_get_hwcap): Enable on 31-bit.
2760 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2761 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2762 Detect NT_S390_HIGH_GPRS.
2763 (s390_usrregs_info_3264): Enable on 31-bit.
2764 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2765 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2766
2767 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2768
2769 PR gdb/13808
2770 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2771 * configure.srv: Ditto.
2772 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2773 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2774 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2775 (init_registers_amd64_linux): Remove prototype.
2776 (tdesc_amd64_linux): Remove declaration.
2777 (get_ipa_tdesc): New function.
2778 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2779 initialize remaining tdescs.
2780 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2781 (init_registers_i386_linux): Remove prototype.
2782 (tdesc_i386_linux): Remove declaration.
2783 (get_ipa_tdesc): New function.
2784 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2785 initialize remaining tdescs.
2786 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2787 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2788 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2789 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2790 (x86_get_ipa_tdesc_idx): New function.
2791 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2792 * linux-x86-tdesc.h: New file.
2793 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2794 (target_get_ipa_tdesc_idx): New macro.
2795 * tracepoint.c (ipa_tdesc_idx): New macro.
2796 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2797 (symbol_list): Add ipa_tdesc_idx.
2798 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2799 (ipa_tdesc): Remove.
2800 (ipa_tdesc_idx): New variable.
2801 (get_context_regcache): Use get_ipa_tdesc.
2802 (gdb_collect): Ditto.
2803 (gdb_probe): Ditto.
2804 * tracepoint.h (get_ipa_tdesc): New prototype.
2805 (ipa_tdesc): Remove.
2806
2807 2016-02-24 Pedro Alves <palves@redhat.com>
2808
2809 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2810 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2811 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2812 Factor out common code between the USE_SIGTRAP_SIGINFO and
2813 !USE_SIGTRAP_SIGINFO blocks.
2814 (linux_low_filter_event): Call save_stop_reason instead of
2815 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2816 Update comments.
2817 (linux_wait_1): Update comments.
2818
2819 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2820
2821 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2822 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2823 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2824 ppc_insert_point, ppc_remove_point.
2825
2826 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2827
2828 * linux-s390-low.c (s390_supports_z_point_type): New function.
2829 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2830
2831 2016-02-16 Yao Qi <yao.qi@linaro.org>
2832
2833 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2834 PC. Get pc from regcache_read_pc.
2835
2836 2016-02-12 Yao Qi <yao.qi@linaro.org>
2837
2838 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2839 or linux_get_pc_32bit.
2840 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2841
2842 2016-02-12 Yao Qi <yao.qi@linaro.org>
2843
2844 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2845 arm_linux_get_next_pcs_fixup.
2846
2847 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2848
2849 * tracepoint.c (x_tracepoint_action_download): Change
2850 write_inferior_data_ptr to write_inferior_data_pointer.
2851 (cmd_qtstart): Likewise.
2852 (write_inferior_data_ptr): Remove.
2853 (download_agent_expr): Change write_inferior_data_ptr to
2854 write_inferior_data_pointer.
2855 (download_tracepoint_1): Likewise.
2856 (download_tracepoint): Likewise.
2857 (download_trace_state_variables): Likewise.
2858
2859 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2860 Marcin Kościelnicki <koriakin@0x04.net>
2861
2862 * tracepoint.c (struct tracepoint_action_ops): Remove.
2863 (struct tracepoint_action): Remove ops.
2864 (m_tracepoint_action_download, r_tracepoint_action_download)
2865 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2866 size and offset accordingly.
2867 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2868 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2869 (tracepoint_action_send, tracepoint_action_download): New functions.
2870 Helpers for trace action handlers.
2871 (add_tracepoint_action): Remove setup actions ops.
2872 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2873
2874 2016-02-10 Yao Qi <yao.qi@linaro.org>
2875
2876 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2877
2878 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2879
2880 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2881 to AC_OUTPUT.
2882 * configure: Regenerate.
2883
2884 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2885
2886 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2887 void * to gdb_byte *.
2888 * linux-low.c (siginfo_fixup): Likewise.
2889 (linux_xfer_siginfo): Likewise.
2890 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2891 Likewise.
2892 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2893
2894 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2895
2896 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2897 to srv_tgtobj.
2898 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2899 to srv_tgtobj.
2900 * linux-x86-low.c [__x86_64__]: Include
2901 "nat/amd64-linux-siginfo.h".
2902 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2903 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2904 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2905 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2906 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2907 (cpt_si_fd, si_timerid, si_overrun): Move from
2908 nat/amd64-linux-siginfo.c.
2909 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2910
2911 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2912
2913 * server.c (skip_to_semicolon): Remove.
2914 (process_point_options): Use strchrnul instead of
2915 skip_to_semicolon.
2916
2917 2016-01-26 Yao Qi <yao.qi@linaro.org>
2918
2919 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2920 * linux-low.c (install_software_single_step_breakpoints): Don't
2921 call regcache_read_pc.
2922 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2923 argument pc.
2924
2925 2016-01-26 Yao Qi <yao.qi@linaro.org>
2926
2927 * linux-low.c (install_software_single_step_breakpoints): Call
2928 regcache_read_pc instead of get_pc.
2929
2930 2016-01-26 Yao Qi <yao.qi@linaro.org>
2931
2932 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2933 (unblock_async_io): Rename to ...
2934 (block_unblock_async_io): ... it. New function.
2935 (enable_async_io): Don't install SIGIO handler. Unblock it
2936 instead.
2937 (disable_async_io): Don't ignore SIGIO. Block it instead.
2938 (initialize_async_io): Install SIGIO handler. Don't call
2939 unblock_async_io.
2940
2941 2016-01-26 Yao Qi <yao.qi@linaro.org>
2942
2943 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2944 first character is '\003', call *the_target->request_interrupt.
2945
2946 2016-01-25 Yao Qi <yao.qi@linaro.org>
2947
2948 * remote-utils.c (new_thread_notify): Remove.
2949 (dead_thread_notify): Likewise.
2950 * remote-utils.h (new_thread_notify): Remove declaration.
2951 (dead_thread_notify): Likewise.
2952
2953 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2954
2955 * gdb.trace/pending.exp: Fix expected message on continue.
2956
2957 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2958
2959 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2960 it works properly on big-endian machines where sizeof (CORE_ADDR)
2961 != sizeof (void *).
2962
2963 2016-01-21 Pedro Alves <palves@redhat.com>
2964
2965 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2966 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2967 * configure: Regenerate.
2968
2969 2016-01-21 Yao Qi <yao.qi@linaro.org>
2970
2971 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2972 is_thumb and set it according to CPSR saved on the stack.
2973 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2974 arm_sigreturn_next_pc.
2975
2976 2016-01-18 Yao Qi <yao.qi@linaro.org>
2977
2978 * linux-low.c (linux_set_pc_64bit): New function.
2979 (linux_get_pc_64bit): New function.
2980 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2981 Declare.
2982 * linux-sparc-low.c (debug_threads): Remove declaration.
2983 (sparc_get_pc): Remove.
2984 (the_low_target): Use linux_get_pc_64bit instead of
2985 sparc_get_pc.
2986 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2987 (the_low_target): Use linux_get_pc_64bit and
2988 linux_set_pc_64bit.
2989
2990 2016-01-18 Yao Qi <yao.qi@linaro.org>
2991
2992 * linux-arm-low.c (debug_threads): Remove declaration.
2993 (arm_get_pc, arm_set_pc): Remove.
2994 (the_low_target): Use linux_get_pc_32bit and
2995 linux_set_pc_32bit.
2996 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2997 (the_low_target): Use linux_get_pc_32bit and
2998 linux_set_pc_32bit.
2999 * linux-cris-low.c (debug_threads): Remove declaration.
3000 (cris_get_pc, cris_set_pc,): Remove.
3001 (the_low_target): Use linux_get_pc_32bit and
3002 linux_set_pc_32bit.
3003 * linux-crisv32-low.c (debug_threads): Remove declaration.
3004 (cris_get_pc, cris_set_pc): Remove.
3005 (the_low_target): Use linux_get_pc_32bit and
3006 linux_set_pc_32bit.
3007 * linux-low.c: Include inttypes.h.
3008 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3009 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3010 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3011 (the_low_target): Use linux_get_pc_32bit and
3012 linux_set_pc_32bit.
3013 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3014 (the_low_target): Use linux_get_pc_32bit and
3015 linux_set_pc_32bit.
3016 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3017 (the_low_target): Use linux_get_pc_32bit and
3018 linux_set_pc_32bit.
3019 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3020 (the_low_target): Use linux_get_pc_32bit and
3021 linux_set_pc_32bit.
3022 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3023 (the_low_target): Use linux_get_pc_32bit and
3024 linux_set_pc_32bit.
3025
3026 2016-01-18 Gary Benson <gbenson@redhat.com>
3027
3028 * configure.ac (AC_FUNC_FORK): New check.
3029 * config.in: Regenerate.
3030 * configure: Likewise.
3031
3032 2016-01-14 Yao Qi <yao.qi@linaro.org>
3033
3034 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3035 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3036 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3037 arm_get_next_pcs_ctor.
3038
3039 2016-01-12 Josh Stone <jistone@redhat.com>
3040 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3041
3042 * inferiors.h: Include "gdb_vecs.h".
3043 (struct process_info): Add syscalls_to_catch.
3044 * inferiors.c (remove_process): Free syscalls_to_catch.
3045 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3046 syscall_return stops.
3047 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3048 * server.c (handle_general_set): Handle QCatchSyscalls.
3049 (handle_query): Report support for QCatchSyscalls.
3050 * target.h (struct target_ops): Add supports_catch_syscall.
3051 (target_supports_catch_syscall): New macro.
3052 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3053 (struct lwp_info): Add syscall_state.
3054 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3055 Maintain syscall_state and syscalls_to_catch across exec.
3056 (get_syscall_trapinfo): New function, proxy to the_low_target.
3057 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3058 (linux_low_filter_event): Toggle syscall_state entry/return for
3059 syscall traps, and set it ignored for all others.
3060 (gdb_catching_syscalls_p): New function.
3061 (gdb_catch_this_syscall_p): New function.
3062 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3063 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3064 (linux_supports_catch_syscall): New function.
3065 (linux_target_ops): Install it.
3066 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3067 (the_low_target): Install it.
3068
3069 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3070
3071 * acinclude.m4: Include new ../warning.m4 file.
3072 * configure: Regenerated.
3073 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3074
3075 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3076
3077 * ax.c (is_goto_target): Mark static.
3078 * linux-low.c (register_addr): Likewise.
3079 (linux_fetch_registers, linux_store_registers): Likewise.
3080 * mem-break.c (any_persistent_commands): Fix old prototype.
3081 (add_commands_to_breakpoint): Mark static.
3082 * regcache.c (find_register_by_name): Delete unused func.
3083 * remote-utils.c (hex_or_minus_one): Mark static.
3084 * server.c (monitor_show_help): Mark static.
3085 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3086 handle_v_requests): Likewise.
3087
3088 2016-01-12 Pedro Alves <palves@redhat.com>
3089
3090 Remove use of the registered trademark symbol throughout.
3091
3092 2016-01-08 Yao Qi <yao.qi@linaro.org>
3093
3094 * remote-utils.c (getpkt): If c is '\003', call target hook
3095 request_interrupt.
3096
3097 2016-01-06 Yao Qi <yao.qi@linaro.org>
3098
3099 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3100 linux-aarch32-low.c.
3101 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3102 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3103 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3104 (thumb2_breakpoint): Declare.
3105 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3106 linux-aarch32-low.h.
3107 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3108 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3109 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3110
3111 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3112
3113 * gdbreplay.c (gdbreplay_version): Change copyright year in
3114 version message.
3115 * server.c (gdbserver_version): Likewise.
3116
3117 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3118
3119 * server.c (crc32_table): Delete.
3120 (crc32): Use libiberty's xcrc32 function.
3121
3122 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3123
3124 * lynx-low.c (lynx_delete_thread_callback): New function.
3125 (lynx_mourn): Properly delete our process and all of its
3126 threads. Remove call to clear_inferiors.
3127
3128 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3129
3130 * target.c (thread_search_callback): Add check that
3131 the thread_stopped target callback is not NULL before
3132 calling it.
3133
3134 2015-12-21 Yao Qi <yao.qi@linaro.org>
3135
3136 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3137 arm breakpoint.
3138
3139 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3140
3141 * server.c (handle_query): Call target_supports_software_single_step.
3142
3143 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3144
3145 * linux-low.c (single_step): New function.
3146 (linux_resume_one_lwp_throw): Call single_step.
3147 (start_step_over): Likewise.
3148
3149 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3150
3151 * Makefile.in (SFILES): Append arch/arm-linux.c,
3152 arch/arm-get-next-pcs.c.
3153 (arm-linux.o): New rule.
3154 (arm-get-next-pcs.o): New rule.
3155 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3156 arm-linux.o.
3157 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3158 to linux-aarch32-low.c.
3159 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3160 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3161 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3162 (thumb2_breakpoint_len): Likewise.
3163 (arm_is_thumb_mode): Make non-static.
3164 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3165 from linux-aarch32-low.c.
3166 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3167 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3168 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3169 (thumb2_breakpoint_len): Likewise.
3170 (arm_is_thumb_mode): New declaration.
3171 * linux-arm-low.c: Include arch/arm-linux.h
3172 aarch/arm-get-next-pcs.h, sys/syscall.h.
3173 (get_next_pcs_ops): New struct.
3174 (get_next_pcs_addr_bits_remove): New function.
3175 (get_next_pcs_is_thumb): New function.
3176 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3177 (arm_sigreturn_next_pc): Likewise.
3178 (get_next_pcs_syscall_next_pc): Likewise.
3179 (arm_gdbserver_get_next_pcs): Likewise.
3180 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3181 Initialize.
3182 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3183 * server.h: Include gdb_vecs.h.
3184
3185 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3186
3187 * Makefile.in (SFILES): Append common/common-regcache.c.
3188 (OBS): Append common-regcache.o.
3189 (common-regcache.o): New rule.
3190 * regcache.c (init_register_cache): Initialize cache to
3191 REG_UNAVAILABLE.
3192 (regcache_raw_read_unsigned): New function.
3193 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3194 register_status enum.
3195
3196 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3197
3198 * linux-aarch64-low.c (the_low_targets): Rename
3199 breakpoint_reinsert_addr to get_next_pcs.
3200 * linux-arm-low.c (the_low_targets): Likewise.
3201 * linux-bfin-low.c (the_low_targets): Likewise.
3202 * linux-cris-low.c (the_low_targets): Likewise.
3203 * linux-crisv32-low.c (the_low_targets): Likewise.
3204 * linux-low.c (can_software_single_step): Likewise.
3205 (install_software_single_step_breakpoints): New function.
3206 (start_step_over): Use install_software_single_step_breakpoints.
3207 * linux-low.h: New CORE_ADDR vector.
3208 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3209 get_next_pcs.
3210 * linux-mips-low.c (the_low_targets): Likewise.
3211 * linux-nios2-low.c (the_low_targets): Likewise.
3212 * linux-sparc-low.c (the_low_targets): Likewise.
3213
3214 2015-12-17 Pedro Alves <palves@redhat.com>
3215
3216 * linux-low.c (linux_kill_one_lwp): Remove references to
3217 LinuxThreads.
3218 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3219 to 'kill'.
3220 (linux_init_signals): Delete.
3221 (initialize_low): Adjust.
3222 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3223
3224 2015-12-16 Pedro Alves <palves@redhat.com>
3225
3226 * configure.ac (compiler warning flags): When testing a
3227 -Wno-foo option, check whether -Wfoo works instead.
3228 * configure: Regenerate.
3229
3230 2015-12-11 Don Breazeal <donb@codesourcery.com>
3231
3232 * server.c (process_serial_event): Don't exit from gdbserver
3233 in remote mode if there are still active inferiors.
3234
3235 2015-12-11 Yao Qi <yao.qi@linaro.org>
3236
3237 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3238 arm_breakpoint_at if the process is 32-bit.
3239
3240 2015-12-11 Yao Qi <yao.qi@linaro.org>
3241
3242 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3243 arm breakpoint.
3244
3245 2015-12-07 Yao Qi <yao.qi@linaro.org>
3246
3247 * configure.srv: Append arm.o to srv_tgtobj for
3248 aarch64*-*-linux* target.
3249 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3250 from linux-arm-low.c.
3251 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3252 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3253 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3254 (thumb2_breakpoint_len): Likewise.
3255 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3256 (arm_breakpoint_kinds): Likewise.
3257 (arm_breakpoint_kind_from_pc): Likewise.
3258 (arm_sw_breakpoint_from_kind): Likewise.
3259 (arm_breakpoint_kind_from_current_state): Likewise.
3260 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3261 (arm_sw_breakpoint_from_kind): Declare.
3262 (arm_breakpoint_kind_from_current_state): Declare.
3263 (arm_breakpoint_at): Declare.
3264 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3265 arm_sw_breakpoint_from_kind if process is 32-bit.
3266 (aarch64_breakpoint_kind_from_pc): New function.
3267 (aarch64_breakpoint_kind_from_current_state): New function.
3268 (the_low_target): Initialize fields breakpoint_kind_from_pc
3269 and breakpoint_kind_from_current_state.
3270 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3271 linux-aarch32-low.c.
3272 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3273 (arm_breakpoint, arm_breakpoint_len): Likewise.
3274 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3275 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3276 (arm_is_thumb_mode): Likewise.
3277 (arm_breakpoint_at): Likewise.
3278 (arm_breakpoint_kind_from_pc): Likewise.
3279 (arm_sw_breakpoint_from_kind): Likewise.
3280 (arm_breakpoint_kind_from_current_state): Likewise.
3281
3282 Revert:
3283 2015-08-04 Yao Qi <yao.qi@linaro.org>
3284
3285 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3286 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3287 * server.c (extended_protocol): Remove "static".
3288 * server.h (extended_protocol): Declare it.
3289
3290 2015-12-04 Josh Stone <jistone@redhat.com>
3291
3292 * target.h (struct target_ops) <arch_setup>: Rename to ...
3293 (struct target_ops) <post_create_inferior>: ... this.
3294 (target_arch_setup): Rename to ...
3295 (target_post_create_inferior): ... this, calling post_create_inferior.
3296 * server.c (start_inferior): Update target_arch_setup calls to
3297 target_post_create_inferior.
3298 * linux-low.c (linux_low_ptrace_options): Forward declare.
3299 (linux_arch_setup): Update its comment for general use.
3300 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3301 (struct linux_target_ops): Use linux_post_create_inferior.
3302 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3303 to post_create_inferior.
3304 * nto-low.c (struct nto_target_ops): Likewise.
3305 * spu-low.c (struct spu_target_ops): Likewise.
3306 * win32-low.c (struct win32_target_ops): Likewise.
3307
3308 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3309
3310 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3311
3312 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3313
3314 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3315 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3316 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3317 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3318 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3319 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3320 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3321 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3322 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3323 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3324 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3325 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3326
3327 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3328
3329 * linux-low.c (linux_look_up_symbols): Don't call
3330 linux_supports_traceclone.
3331 * linux-low.h (thread_db_init): Remove use_events argument.
3332 * thread-db.c (thread_db_use_event): Remove global variable.
3333 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3334 (struct thread_db) <td_create_bp>: Remove field.
3335 (thread_db_create_event): Remove function.
3336 (thread_db_enable_reporting): Likewise.
3337 (find_one_thread): Don't check for thread_db_use_events.
3338 (attach_thread): Likewise.
3339 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3340 (try_thread_db_load_1): Don't check for thread_db_use_events.
3341 (thread_db_init): Remove use_events argument and thread events
3342 handling.
3343 (remove_thread_event_breakpoints): Remove function.
3344 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3345
3346 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3347
3348 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3349 New function.
3350 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3351 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3352 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3353 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3354 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3355 Initialize.
3356 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3357 New function.
3358 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3359 * linux-low.c (can_hardware_single_step): Use
3360 supports_hardware_single_step.
3361 (can_software_single_step): New function.
3362 (start_step_over): Call can_software_single_step.
3363 (linux_supports_hardware_single_step): New function.
3364 (struct target_ops) <supports_software_single_step>: Initialize.
3365 * linux-low.h (struct linux_target_ops)
3366 <supports_hardware_single_step>: Initialize.
3367 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3368 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3369 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3370 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3371 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3372 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3373 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3374 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3375 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3376 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3377 Initialize.
3378 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3379 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3380 Initialize.
3381 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3382 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3383 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3384 New function.
3385 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3386 * target.h (struct target_ops): <supports_software_single_step>:
3387 New field.
3388 (target_supports_software_single_step): New macro.
3389
3390 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3391
3392 * linux-low.c (linux_wait_1): Fix pc advance condition.
3393 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3394 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3395
3396 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3397
3398 * linux-arm-low.c (arm_is_thumb_mode): New function.
3399 (arm_breakpoint_at): Use arm_is_thumb_mode.
3400 (arm_breakpoint_kind_from_current_state): New function.
3401 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3402 Initialize.
3403 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3404 (linux_breakpoint_kind_from_current_state): New function.
3405 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3406 * linux-low.h (struct linux_target_ops)
3407 <breakpoint_kind_from_current_state>: New field.
3408 * target.h (struct target_ops): Likewise.
3409 (target_breakpoint_kind_from_current_state): New macro.
3410
3411 2015-11-30 Pedro Alves <palves@redhat.com>
3412
3413 * linux-low.c (linux_resume): Wake up the event loop before
3414 returning.
3415
3416 2015-11-30 Pedro Alves <palves@redhat.com>
3417
3418 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3419 check.
3420 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3421 to -1.
3422 * target.c (struct thread_search): New structure.
3423 (thread_search_callback): New function.
3424 (prev_general_thread): New global.
3425 (prepare_to_access_memory, done_accessing_memory): New functions.
3426 * target.h (prepare_to_access_memory, done_accessing_memory):
3427 Replace macros with function declarations.
3428
3429 2015-11-30 Pedro Alves <palves@redhat.com>
3430
3431 PR 14618
3432 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3433 report TARGET_WAITKIND_NO_RESUMED.
3434 * remote-utils.c (prepare_resume_reply): Handle
3435 TARGET_WAITKIND_NO_RESUMED.
3436 * server.c (report_no_resumed): New global.
3437 (handle_query) <qSupported>: Handle "no-resumed+". Report
3438 "no-resumed+" support.
3439 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3440 return error if the client doesn't support no-resumed events.
3441 (push_stop_notification): New function.
3442 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3443 events if the client supports them.
3444
3445 2015-11-30 Pedro Alves <palves@redhat.com>
3446
3447 * linux-low.c (thread_still_has_status_pending_p): Don't check
3448 vCont;t here.
3449 (lwp_resumed): New function.
3450 (status_pending_p_callback): Return early if the LWP is not
3451 supposed to be resumed.
3452
3453 2015-11-30 Pedro Alves <palves@redhat.com>
3454
3455 * linux-low.c (handle_extended_wait): Assert that the LWP's
3456 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3457 thread create events, leave the new child's status pending.
3458 (linux_low_filter_event): If GDB wants to hear about thread exit
3459 events, leave the LWP marked dead and don't delete it.
3460 (linux_wait_for_event_filtered): Don't check for thread exit.
3461 (filter_exit_event): New function.
3462 (linux_wait_1): Use it, when returning an exit event.
3463 (linux_resume_one_lwp_throw): Assert that the LWP's
3464 waitstatus is TARGET_WAITKIND_IGNORE.
3465 * remote-utils.c (prepare_resume_reply): Handle
3466 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3467 * server.c (report_thread_events): New global.
3468 (handle_general_set): Handle QThreadEvents.
3469 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3470 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3471 TARGET_WAITKIND_THREAD_EXITED.
3472 * server.h (report_thread_events): Declare.
3473
3474 2015-11-30 Pedro Alves <palves@redhat.com>
3475
3476 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3477 the thread's last_resume_kind was resume_stop.
3478
3479 2015-11-30 Pedro Alves <palves@redhat.com>
3480
3481 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3482 before returning.
3483
3484 2015-11-30 Pedro Alves <palves@redhat.com>
3485
3486 * server.c (handle_v_requests): Handle vCtrlC.
3487
3488 2015-11-30 Pedro Alves <palves@redhat.com>
3489
3490 * gdbthread.h (find_any_thread_of_pid): Declare.
3491 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3492 functions.
3493 * server.c (handle_query): If current_thread is NULL, look for
3494 another thread of the selected process.
3495
3496 2015-11-26 Daniel Colascione <dancol@dancol.org>
3497 Simon Marchi <simon.marchi@ericsson.com>
3498
3499 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3500 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3501 name in reply.
3502 * target.h (struct target_ops) <thread_name>: New field.
3503 (target_thread_name): New macro.
3504
3505 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3506
3507 * regcache.h (regcache_invalidate_pid): Add declaration.
3508 * regcache.c (regcache_invalidate_pid): New function, extracted
3509 from regcache_invalidate.
3510 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3511 Add trivial documentation comment.
3512 * lynx-low.c: Use regcache_invalidate_pid instead of
3513 regcache_invalidate.
3514
3515 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3516
3517 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3518 and Elf64_auxv_t if the target is Android.
3519
3520 2015-11-22 Doug Evans <xdje42@gmail.com>
3521
3522 * target.h: #include <sys/types.h>.
3523
3524 2015-11-19 Pedro Alves <palves@redhat.com>
3525
3526 * linux-low.c (linux_process_qsupported): Change prototype.
3527 Adjust.
3528 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3529 Change prototype.
3530 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3531 and adjust to loop over all features.
3532 * server.c (handle_query) <qSupported>: Adjust to call
3533 target_process_qsupported once, passing it a vector of unprocessed
3534 features.
3535 * target.h (struct target_ops) <process_qsupported>: Change
3536 prototype.
3537 (target_process_qsupported): Adjust.
3538
3539 2015-11-19 Pedro Alves <palves@redhat.com>
3540
3541 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3542 mode.
3543 * configure: Regenerate.
3544
3545 2015-11-19 Pedro Alves <palves@redhat.com>
3546
3547 * configure: Regenerate.
3548
3549 2015-11-19 Yao Qi <yao.qi@linaro.org>
3550
3551 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3552 type to uint32_t.
3553
3554 2015-11-19 Yao Qi <yao.qi@linaro.org>
3555
3556 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3557 (struct aarch64_operand): Move enum out.
3558
3559 2015-11-19 Yao Qi <yao.qi@linaro.org>
3560
3561 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3562 struct user_fpsimd_state *.
3563 (aarch64_store_fpregset): Likewise.
3564
3565 2015-11-19 Yao Qi <yao.qi@linaro.org>
3566
3567 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3568 struct user_pt_regs *.
3569 (aarch64_store_gregset): Likewise.
3570
3571 2015-11-18 Pedro Alves <palves@redhat.com>
3572
3573 * Makefile.in (all_object_files): Add $IPA_OBJS.
3574
3575 2015-11-17 Pedro Alves <palves@redhat.com>
3576
3577 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3578 GDB_SIGNAL_0 and gdb_signal_to_string.
3579
3580 2015-11-17 Pedro Alves <palves@redhat.com>
3581
3582 * win32-low.c (handle_output_debug_string): Remove parameter.
3583 (win32_kill): Remove our_status local and adjust call to
3584 handle_output_debug_string.
3585 (get_child_debug_event): Adjust call to
3586 handle_output_debug_string.
3587
3588 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3589
3590 * linux-mips-low.c (mips_fill_gregset): Add cast.
3591 (mips_store_gregset): Likewise.
3592 (mips_fill_fpregset): Likewise.
3593 (mips_store_fpregset): Likewise.
3594
3595 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3596
3597 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3598 priv.
3599
3600 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3601
3602 * linux-mips-low.c (mips_linux_new_thread): Change type of
3603 watch_type to enum target_hw_bp_type.
3604
3605 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3606
3607 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3608 Change return type to arm_hwbp_type.
3609
3610 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3611
3612 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3613 (arm_store_gregset): Likewise.
3614 * linux-arm-low.c (arm_get_hwcap): Likewise.
3615 (arm_read_description): Likewise.
3616
3617 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3618
3619 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3620
3621 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3622
3623 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3624 (ppc_fill_vsxregset): Likewise.
3625 (ppc_store_vsxregset): Likewise.
3626 (ppc_fill_vrregset): Likewise.
3627 (ppc_store_vrregset): Likewise.
3628 (ppc_fill_evrregset): Likewise.
3629 (ppc_store_evrregset): Likewise.
3630
3631 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3632
3633 * linux-ppc-low.c (ppc_usrregs_info): Remove
3634 forward-declaration.
3635 (ppc_arch_setup): Move lower in file.
3636
3637 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3638
3639 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3640 (ps_pdwrite): Likewise.
3641
3642 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3643
3644 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3645 to after assert checks.
3646
3647 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3648
3649 * proc-service.c (ps_pdread): Add/adjust casts.
3650 (ps_pdwrite): Add/adjust casts.
3651
3652 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3653
3654 * server.c (handle_search_memory_1): Cast return value of
3655 memmem.
3656
3657 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3658
3659 * server.c (write_qxfer_response): Change type of data to
3660 gdb_byte *.
3661
3662 2015-10-29 Pedro Alves <palves@redhat.com>
3663
3664 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3665
3666 2015-10-29 Pedro Alves <palves@redhat.com>
3667
3668 * tracepoint.c (clear_installed_tracepoints): Add casts.
3669
3670 2015-10-29 Pedro Alves <palves@redhat.com>
3671
3672 * server.c (handle_v_cont, process_serial_event): Add enum
3673 gdb_signal casts to signal parsing code.
3674
3675 2015-10-29 Pedro Alves <palves@redhat.com>
3676
3677 * linux-low.h (NULL_REGSET): Define.
3678 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3679 * linux-arm-low.c (arm_regsets): Likewise.
3680 * linux-crisv32-low.c (cris_regsets): Likewise.
3681 * linux-m68k-low.c (m68k_regsets): Likewise.
3682 * linux-mips-low.c (mips_regsets): Likewise.
3683 * linux-nios2-low.c (nios2_regsets): Likewise.
3684 * linux-ppc-low.c (ppc_regsets): Likewise.
3685 * linux-s390-low.c (s390_regsets): Likewise.
3686 * linux-sh-low.c (sh_regsets): Likewise.
3687 * linux-sparc-low.c (sparc_regsets): Likewise.
3688 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3689 * linux-tile-low.c (tile_regsets): Likewise.
3690 * linux-x86-low.c (x86_regsets): Likewise.
3691 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3692
3693 2015-10-29 Pedro Alves <palves@redhat.com>
3694
3695 * linux-low.h (NULL_REGSET): Define.
3696 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3697 * linux-arm-low.c (arm_regsets): Likewise.
3698 * linux-crisv32-low.c (cris_regsets): Likewise.
3699 * linux-m68k-low.c (m68k_regsets): Likewise.
3700 * linux-mips-low.c (mips_regsets): Likewise.
3701 * linux-nios2-low.c (nios2_regsets): Likewise.
3702 * linux-ppc-low.c (ppc_regsets): Likewise.
3703 * linux-s390-low.c (s390_regsets): Likewise.
3704 * linux-sh-low.c (sh_regsets): Likewise.
3705 * linux-sparc-low.c (sparc_regsets): Likewise.
3706 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3707 * linux-tile-low.c (tile_regsets): Likewise.
3708 * linux-x86-low.c (x86_regsets): Likewise.
3709 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3710
3711 2015-10-26 Doug Evans <dje@google.com>
3712
3713 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3714
3715 2015-10-26 Doug Evans <dje@google.com>
3716
3717 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3718
3719 2015-10-26 Doug Evans <dje@google.com>
3720
3721 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3722 for debug_printf.
3723 (attach_thread, find_new_threads_callback): Ditto.
3724
3725 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3726
3727 * mem-break.h (set_breakpoint_data): Remove.
3728
3729 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3730
3731 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3732 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3733 (initialize_low): Remove set_breakpoint_data call.
3734 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3735 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3736 (initialize_low): Remove set_breakpoint_data call.
3737 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3738 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3739 (initialize_low): Remove set_breakpoint_data call.
3740
3741 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3742
3743 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3744 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3745 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3746 * target.h (target_breakpoint_kind_from_pc): New macro.
3747
3748 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3749
3750 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3751 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3752 the default breakpoint kind.
3753
3754 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3755
3756 * linux-arm-low.c (arm_supports_z_point_type): Add software
3757 breakpoint support.
3758
3759 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3760
3761 * linux-arm-low.c: Refactor breakpoint definitions.
3762 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3763 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3764
3765 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3766
3767 * Makefile.in: Add arm.c/o.
3768 * configure.srv: Likewise.
3769 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3770 (arm_breakpoint_kind_from_pc): New function.
3771 (arm_sw_breakpoint_from_kind): Return proper kind.
3772 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3773
3774 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3775
3776 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3777 removal.
3778 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3779 (struct raw_breakpoint) <size>: Remove.
3780 (struct raw_breakpoint) <kind>: Add.
3781 (bp_size): New function.
3782 (bp_opcode): Likewise.
3783 (find_raw_breakpoint_at): Adjust for kind.
3784 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3785 (remove_memory_breakpoint): Adjust for kind call bp_size.
3786 (set_raw_breakpoint_at): Adjust for kind.
3787 (set_breakpoint): Likewise.
3788 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3789 (delete_raw_breakpoint): Adjust for kind.
3790 (delete_breakpoint): Likewise.
3791 (find_gdb_breakpoint): Likewise.
3792 (set_gdb_breakpoint_1): Likewise.
3793 (set_gdb_breakpoint): Likewise.
3794 (delete_gdb_breakpoint_1): Likewise.
3795 (delete_gdb_breakpoint): Likewise.
3796 (uninsert_raw_breakpoint): Likewise.
3797 (reinsert_raw_breakpoint): Likewise.
3798 (set_breakpoint_data): Remove.
3799 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3800 (check_mem_read): Adjust for kind call bp_size.
3801 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3802 (clone_one_breakpoint): Adjust for kind.
3803 * mem-break.h (set_gdb_breakpoint): Likewise.
3804 (delete_gdb_breakpoint): Likewise.
3805 * server.c (process_serial_event): Likewise.
3806
3807 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3808
3809 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3810 (struct linux_target_ops) <breakpoint>: Remove.
3811 (struct linux_target_ops) <breakpoint_len>: Remove.
3812 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3813 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3814 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3815 (arm_sw_breakpoint_from_kind): New function.
3816 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3817 (struct linux_target_ops) <breakpoint>: Remove.
3818 (struct linux_target_ops) <breakpoint_len>: Remove.
3819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3820 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3821 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3822 (struct linux_target_ops) <breakpoint>: Remove.
3823 (struct linux_target_ops) <breakpoint_len>: Remove.
3824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3826 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3827 (struct linux_target_ops) <breakpoint>: Remove.
3828 (struct linux_target_ops) <breakpoint_len>: Remove.
3829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3831 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3832 and sw_breakpoint_from_kind to increment the pc.
3833 (linux_breakpoint_kind_from_pc): New function.
3834 (linux_sw_breakpoint_from_kind): New function.
3835 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3836 (initialize_low): Call breakpoint_kind_from_pc and
3837 sw_breakpoint_from_kind to replace breakpoint_data/len.
3838 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3839 New field.
3840 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3841 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3842 (struct linux_target_ops) <breakpoint>: Remove.
3843 (struct linux_target_ops) <breakpoint_len>: Remove.
3844 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3845 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3846 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3847 (struct linux_target_ops) <breakpoint>: Remove.
3848 (struct linux_target_ops) <breakpoint_len>: Remove.
3849 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3850 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3851 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3852 (struct linux_target_ops) <breakpoint>: Remove.
3853 (struct linux_target_ops) <breakpoint_len>: Remove.
3854 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3855 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3856 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3857 (struct linux_target_ops) <breakpoint>: Remove.
3858 (struct linux_target_ops) <breakpoint_len>: Remove.
3859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3860 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3861 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3862 (struct linux_target_ops) <breakpoint>: Remove.
3863 (struct linux_target_ops) <breakpoint_len>: Remove.
3864 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3865 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3866 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3867 (struct linux_target_ops) <breakpoint>: Remove.
3868 (struct linux_target_ops) <breakpoint_len>: Remove.
3869 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3870 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3871 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3872 (struct linux_target_ops) <breakpoint>: Remove.
3873 (struct linux_target_ops) <breakpoint_len>: Remove.
3874 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3875 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3876 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3877 (struct linux_target_ops) <breakpoint>: Remove.
3878 (struct linux_target_ops) <breakpoint_len>: Remove.
3879 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3880 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3881 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3882 (struct linux_target_ops) <breakpoint>: Remove.
3883 (struct linux_target_ops) <breakpoint_len>: Remove.
3884 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3885 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3886 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3887 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3888 (struct linux_target_ops) <breakpoint>: Remove.
3889 (struct linux_target_ops) <breakpoint_len>: Remove.
3890 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3891 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3892 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3893 (struct linux_target_ops) <breakpoint>: Remove.
3894 (struct linux_target_ops) <breakpoint_len>: Remove.
3895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3896 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3897
3898 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3899
3900 * linux-cris-low.c (cris_get_pc): Remove void arg.
3901
3902 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3903
3904 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3905 variable name.
3906
3907 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3908
3909 * inferiors.c (thread_pid_matches_callback): New function.
3910 (find_thread_process): New function.
3911 (remove_thread): Reset current_thread.
3912 (remove_process): Assert threads have been removed first.
3913
3914 2015-10-15 Yao Qi <yao.qi@linaro.org>
3915
3916 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3917 if it is 3.
3918 (aarch64_remove_point): Likewise.
3919 * regcache.c (regcache_register_size): New function.
3920
3921 2015-10-12 Yao Qi <yao.qi@linaro.org>
3922
3923 * linux-aarch64-low.c: Update all callers as emit_load_store
3924 is renamed to aarch64_emit_load_store.
3925
3926 2015-10-12 Yao Qi <yao.qi@linaro.org>
3927
3928 * linux-aarch64-low.c: Update all callers of function renaming
3929 from emit_insn to aarch64_emit_insn.
3930
3931 2015-10-12 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3934 arch/aarch64-insn.h.
3935 (struct aarch64_memory_operand): Likewise.
3936 (ENCODE): Likewise.
3937 (emit_insn): Move to arch/aarch64-insn.c.
3938 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3939 (emit_load_store): Move to arch/aarch64-insn.c.
3940 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3941 (can_encode_int32): Remove.
3942
3943 2015-10-12 Yao Qi <yao.qi@linaro.org>
3944
3945 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3946 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3947 (aarch64_relocate_instruction): Likewise.
3948 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3949 (struct aarch64_insn_visitor): Likewise.
3950
3951 2015-10-12 Yao Qi <yao.qi@linaro.org>
3952
3953 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3954 (struct aarch64_insn_visitor): New.
3955 (struct aarch64_insn_relocation_data): New.
3956 (aarch64_ftrace_insn_reloc_b): New function.
3957 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3958 (aarch64_ftrace_insn_reloc_cb): Likewise.
3959 (aarch64_ftrace_insn_reloc_tb): Likewise.
3960 (aarch64_ftrace_insn_reloc_adr): Likewise.
3961 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3962 (aarch64_ftrace_insn_reloc_others): Likewise.
3963 (visitor): New.
3964 (aarch64_relocate_instruction): Use visitor.
3965
3966 2015-10-12 Yao Qi <yao.qi@linaro.org>
3967
3968 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3969 int. Add argument buf.
3970 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3971 aarch64_relocate_instruction.
3972
3973 2015-10-12 Yao Qi <yao.qi@linaro.org>
3974
3975 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3976 argument insn. Remove local variable insn. Don't call
3977 target_read_uint32.
3978 (aarch64_install_fast_tracepoint_jump_pad): Call
3979 target_read_uint32.
3980
3981 2015-09-30 Yao Qi <yao.qi@linaro.org>
3982
3983 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3984 (emit_load_store_pair): Likewise.
3985
3986 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3987
3988 * dll.c (match_dll): Add cast(s).
3989 (unloaded_dll): Likewise.
3990 * linux-low.c (second_thread_of_pid_p): Likewise.
3991 (delete_lwp_callback): Likewise.
3992 (count_events_callback): Likewise.
3993 (select_event_lwp_callback): Likewise.
3994 (linux_set_resume_request): Likewise.
3995 * server.c (accumulate_file_name_length): Likewise.
3996 (emit_dll_description): Likewise.
3997 (handle_qxfer_threads_worker): Likewise.
3998 (visit_actioned_threads): Likewise.
3999 * thread-db.c (any_thread_of): Likewise.
4000 * tracepoint.c (same_process_p): Likewise.
4001 (match_blocktype): Likewise.
4002 (build_traceframe_info_xml): Likewise.
4003
4004 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4005
4006 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4007 assignment.
4008 (gdb_unparse_agent_expr): Likewise.
4009 * hostio.c (require_data): Likewise.
4010 (handle_pread): Likewise.
4011 * linux-low.c (disable_regset): Likewise.
4012 (fetch_register): Likewise.
4013 (store_register): Likewise.
4014 (get_dynamic): Likewise.
4015 (linux_qxfer_libraries_svr4): Likewise.
4016 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4017 (set_fast_tracepoint_jump): Likewise.
4018 (uninsert_fast_tracepoint_jumps_at): Likewise.
4019 (reinsert_fast_tracepoint_jumps_at): Likewise.
4020 (validate_inserted_breakpoint): Likewise.
4021 (clone_agent_expr): Likewise.
4022 * regcache.c (init_register_cache): Likewise.
4023 * remote-utils.c (putpkt_binary_1): Likewise.
4024 (decode_M_packet): Likewise.
4025 (decode_X_packet): Likewise.
4026 (look_up_one_symbol): Likewise.
4027 (relocate_instruction): Likewise.
4028 (monitor_output): Likewise.
4029 * server.c (handle_search_memory): Likewise.
4030 (handle_qxfer_exec_file): Likewise.
4031 (handle_qxfer_libraries): Likewise.
4032 (handle_qxfer): Likewise.
4033 (handle_query): Likewise.
4034 (handle_v_cont): Likewise.
4035 (handle_v_run): Likewise.
4036 (captured_main): Likewise.
4037 * target.c (write_inferior_memory): Likewise.
4038 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4039 * tracepoint.c (init_trace_buffer): Likewise.
4040 (add_tracepoint_action): Likewise.
4041 (add_traceframe): Likewise.
4042 (add_traceframe_block): Likewise.
4043 (cmd_qtdpsrc): Likewise.
4044 (cmd_qtdv): Likewise.
4045 (cmd_qtstatus): Likewise.
4046 (response_source): Likewise.
4047 (response_tsv): Likewise.
4048 (cmd_qtnotes): Likewise.
4049 (gdb_collect): Likewise.
4050 (initialize_tracepoint): Likewise.
4051
4052 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4053
4054 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4055 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4056 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4057 <NOP>: New.
4058 (enum aarch64_condition_codes): New enum.
4059 (w0): New static global.
4060 (fp): Likewise.
4061 (lr): Likewise.
4062 (struct aarch64_memory_operand) <type>: New
4063 MEMORY_OPERAND_POSTINDEX type.
4064 (postindex_memory_operand): New helper function.
4065 (emit_ret): New function.
4066 (emit_load_store_pair): New function, factored out of emit_stp
4067 with support for MEMORY_OPERAND_POSTINDEX.
4068 (emit_stp): Rewrite using emit_load_store_pair.
4069 (emit_ldp): New function.
4070 (emit_load_store): Likewise.
4071 (emit_ldr): Mention post-index instruction in comment.
4072 (emit_ldrh): New function.
4073 (emit_ldrb): New function.
4074 (emit_ldrsw): Mention post-index instruction in comment.
4075 (emit_str): Likewise.
4076 (emit_subs): New function.
4077 (emit_cmp): Likewise.
4078 (emit_and): Likewise.
4079 (emit_orr): Likewise.
4080 (emit_orn): Likewise.
4081 (emit_eor): Likewise.
4082 (emit_mvn): Likewise.
4083 (emit_lslv): Likewise.
4084 (emit_lsrv): Likewise.
4085 (emit_asrv): Likewise.
4086 (emit_mul): Likewise.
4087 (emit_sbfm): Likewise.
4088 (emit_sbfx): Likewise.
4089 (emit_ubfm): Likewise.
4090 (emit_ubfx): Likewise.
4091 (emit_csinc): Likewise.
4092 (emit_cset): Likewise.
4093 (emit_nop): Likewise.
4094 (emit_ops_insns): New helper function.
4095 (emit_pop): Likewise.
4096 (emit_push): Likewise.
4097 (aarch64_emit_prologue): New function.
4098 (aarch64_emit_epilogue): Likewise.
4099 (aarch64_emit_add): Likewise.
4100 (aarch64_emit_sub): Likewise.
4101 (aarch64_emit_mul): Likewise.
4102 (aarch64_emit_lsh): Likewise.
4103 (aarch64_emit_rsh_signed): Likewise.
4104 (aarch64_emit_rsh_unsigned): Likewise.
4105 (aarch64_emit_ext): Likewise.
4106 (aarch64_emit_log_not): Likewise.
4107 (aarch64_emit_bit_and): Likewise.
4108 (aarch64_emit_bit_or): Likewise.
4109 (aarch64_emit_bit_xor): Likewise.
4110 (aarch64_emit_bit_not): Likewise.
4111 (aarch64_emit_equal): Likewise.
4112 (aarch64_emit_less_signed): Likewise.
4113 (aarch64_emit_less_unsigned): Likewise.
4114 (aarch64_emit_ref): Likewise.
4115 (aarch64_emit_if_goto): Likewise.
4116 (aarch64_emit_goto): Likewise.
4117 (aarch64_write_goto_address): Likewise.
4118 (aarch64_emit_const): Likewise.
4119 (aarch64_emit_call): Likewise.
4120 (aarch64_emit_reg): Likewise.
4121 (aarch64_emit_pop): Likewise.
4122 (aarch64_emit_stack_flush): Likewise.
4123 (aarch64_emit_zero_ext): Likewise.
4124 (aarch64_emit_swap): Likewise.
4125 (aarch64_emit_stack_adjust): Likewise.
4126 (aarch64_emit_int_call_1): Likewise.
4127 (aarch64_emit_void_call_2): Likewise.
4128 (aarch64_emit_eq_goto): Likewise.
4129 (aarch64_emit_ne_goto): Likewise.
4130 (aarch64_emit_lt_goto): Likewise.
4131 (aarch64_emit_le_goto): Likewise.
4132 (aarch64_emit_gt_goto): Likewise.
4133 (aarch64_emit_ge_got): Likewise.
4134 (aarch64_emit_ops_impl): New static global variable.
4135 (aarch64_emit_ops): New target function, return
4136 &aarch64_emit_ops_impl.
4137 (struct linux_target_ops): Install it.
4138
4139 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4140
4141 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4142 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4143 aarch64-ipa.o.
4144 * linux-aarch64-ipa.c: New file.
4145 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4146 and endian.h.
4147 (aarch64_get_thread_area): New target method.
4148 (extract_signed_bitfield): New helper function.
4149 (aarch64_decode_ldr_literal): New function.
4150 (enum aarch64_opcodes): New enum.
4151 (struct aarch64_register): New struct.
4152 (struct aarch64_operand): New struct.
4153 (x0): New static global.
4154 (x1): Likewise.
4155 (x2): Likewise.
4156 (x3): Likewise.
4157 (x4): Likewise.
4158 (w2): Likewise.
4159 (ip0): Likewise.
4160 (sp): Likewise.
4161 (xzr): Likewise.
4162 (aarch64_register): New helper function.
4163 (register_operand): Likewise.
4164 (immediate_operand): Likewise.
4165 (struct aarch64_memory_operand): New struct.
4166 (offset_memory_operand): New helper function.
4167 (preindex_memory_operand): Likewise.
4168 (enum aarch64_system_control_registers): New enum.
4169 (ENCODE): New macro.
4170 (emit_insn): New helper function.
4171 (emit_b): New function.
4172 (emit_bcond): Likewise.
4173 (emit_cb): Likewise.
4174 (emit_tb): Likewise.
4175 (emit_blr): Likewise.
4176 (emit_stp): Likewise.
4177 (emit_ldp_q_offset): Likewise.
4178 (emit_stp_q_offset): Likewise.
4179 (emit_load_store): Likewise.
4180 (emit_ldr): Likewise.
4181 (emit_ldrsw): Likewise.
4182 (emit_str): Likewise.
4183 (emit_ldaxr): Likewise.
4184 (emit_stxr): Likewise.
4185 (emit_stlr): Likewise.
4186 (emit_data_processing_reg): Likewise.
4187 (emit_data_processing): Likewise.
4188 (emit_add): Likewise.
4189 (emit_sub): Likewise.
4190 (emit_mov): Likewise.
4191 (emit_movk): Likewise.
4192 (emit_mov_addr): Likewise.
4193 (emit_mrs): Likewise.
4194 (emit_msr): Likewise.
4195 (emit_sevl): Likewise.
4196 (emit_wfe): Likewise.
4197 (append_insns): Likewise.
4198 (can_encode_int32_in): New helper function.
4199 (aarch64_relocate_instruction): New function.
4200 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4201 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4202 (struct linux_target_ops): Install aarch64_get_thread_area,
4203 aarch64_install_fast_tracepoint_jump_pad and
4204 aarch64_get_min_fast_tracepoint_insn_len.
4205
4206 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4207
4208 * Makefile.in (aarch64-insn.o): New rule.
4209 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4210
4211 2015-09-21 Yao Qi <yao.qi@linaro.org>
4212
4213 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4214
4215 2015-09-21 Yao Qi <yao.qi@linaro.org>
4216
4217 * tracepoint.c (max_jump_pad_size): Remove.
4218
4219 2015-09-18 Yao Qi <yao.qi@linaro.org>
4220
4221 * linux-aarch64-low.c: Don't include sys/uio.h.
4222 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4223
4224 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4225
4226 * tracepoint.c (eval_result_type): Change prototype.
4227 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4228
4229 2015-09-15 Pedro Alves <palves@redhat.com>
4230
4231 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4232 Check whether to report exec events instead of checking whether
4233 multiprocess is enabled.
4234
4235 2015-09-15 Pedro Alves <palves@redhat.com>
4236
4237 PR remote/18965
4238 * remote-utils.c (prepare_resume_reply): Merge
4239 TARGET_WAITKIND_VFORK_DONE switch case with the
4240 TARGET_WAITKIND_FORKED case.
4241
4242 2015-09-15 Yao Qi <yao.qi@linaro.org>
4243
4244 * server.c (handle_query): Check string comparison using
4245 "else if" instead of "if".
4246
4247 2015-09-15 Yao Qi <yao.qi@linaro.org>
4248
4249 * server.c (vCont_supported): New global variable.
4250 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4251 matches. Append ";vContSupported+" to own_buf.
4252 (handle_v_requests): Append ";s;S" to own_buf if target supports
4253 hardware single step or vCont_supported is false.
4254 (capture_main): Set vCont_supported to zero.
4255
4256 2015-09-15 Yao Qi <yao.qi@linaro.org>
4257
4258 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4259 it to ...
4260 (linux_supports_hardware_single_step): ... New function.
4261 (linux_target_ops): Update.
4262 * lynx-low.c (lynx_target_ops): Set field
4263 supports_hardware_single_step to target_can_do_hardware_single_step.
4264 * nto-low.c (nto_target_ops): Likewise.
4265 * spu-low.c (spu_target_ops): Likewise.
4266 * win32-low.c (win32_target_ops): Likewise.
4267 * target.c (target_can_do_hardware_single_step): New function.
4268 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4269 Remove. <supports_hardware_single_step>: New field.
4270 (target_supports_conditional_breakpoints): Remove.
4271 (target_supports_hardware_single_step): New macro.
4272 (target_can_do_hardware_single_step): Declare.
4273 * server.c (handle_query): Use target_supports_hardware_single_step
4274 instead of target_supports_conditional_breakpoints.
4275
4276 2015-09-15 Yao Qi <yao.qi@linaro.org>
4277
4278 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4279 function.
4280 (struct linux_target_ops the_low_target): Install
4281 aarch64_linux_siginfo_fixup.
4282
4283 2015-09-11 Don Breazeal <donb@codesourcery.com>
4284 Luis Machado <lgustavo@codesourcery.com>
4285
4286 * linux-low.c (linux_mourn): Static declaration.
4287 (linux_arch_setup): Move in front of
4288 handle_extended_wait.
4289 (linux_arch_setup_thread): New function.
4290 (handle_extended_wait): Handle exec events. Call
4291 linux_arch_setup_thread. Make event_lwp argument a
4292 pointer-to-a-pointer.
4293 (check_zombie_leaders): Do not check stopped threads.
4294 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4295 (linux_low_filter_event): Add lwp and thread for exec'ing
4296 non-leader thread if leader thread has been deleted.
4297 Refactor code into linux_arch_setup_thread and call it.
4298 Pass child lwp pointer by reference to handle_extended_wait.
4299 (linux_wait_for_event_filtered): Update comment.
4300 (linux_wait_1): Prevent clobbering exec event status.
4301 (linux_supports_exec_events): New function.
4302 (linux_target_ops) <supports_exec_events>: Initialize new member.
4303 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4304 new member.
4305 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4306 * server.c (report_exec_events): New global variable.
4307 (handle_query): Handle qSupported query for exec-events feature.
4308 (captured_main): Initialize report_exec_events.
4309 * server.h (report_exec_events): Declare new global variable.
4310 * target.h (struct target_ops) <supports_exec_events>: New
4311 member.
4312 (target_supports_exec_events): New macro.
4313 * win32-low.c (win32_target_ops) <supports_exec_events>:
4314 Initialize new member.
4315
4316 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4317
4318 * linux-low.c (linux_low_enable_btrace): Remove.
4319 (linux_target_ops): Replace linux_low_enable_btrace with
4320 linux_enable_btrace.
4321
4322 2015-09-03 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-aarch64-low.c (aarch64_insert_point): Call
4325 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4326 returns true.
4327
4328 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4329
4330 * linux-low.c (check_stopped_by_breakpoint): Use
4331 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4332
4333 2015-08-27 Pedro Alves <palves@redhat.com>
4334
4335 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4336
4337 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4338
4339 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4340 the XNEW-family equivalent.
4341 (compile_bytecodes): Likewise.
4342 * dll.c (loaded_dll): Likewise.
4343 * event-loop.c (append_callback_event): Likewise.
4344 (create_file_handler): Likewise.
4345 (create_file_event): Likewise.
4346 * hostio.c (handle_open): Likewise.
4347 * inferiors.c (add_thread): Likewise.
4348 (add_process): Likewise.
4349 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4350 * linux-arm-low.c (arm_new_process): Likewise.
4351 (arm_new_thread): Likewise.
4352 * linux-low.c (add_to_pid_list): Likewise.
4353 (linux_add_process): Likewise.
4354 (handle_extended_wait): Likewise.
4355 (add_lwp): Likewise.
4356 (enqueue_one_deferred_signal): Likewise.
4357 (enqueue_pending_signal): Likewise.
4358 (linux_resume_one_lwp_throw): Likewise.
4359 (linux_resume_one_thread): Likewise.
4360 (linux_read_memory): Likewise.
4361 (linux_write_memory): Likewise.
4362 * linux-mips-low.c (mips_linux_new_process): Likewise.
4363 (mips_linux_new_thread): Likewise.
4364 (mips_add_watchpoint): Likewise.
4365 * linux-x86-low.c (initialize_low_arch): Likewise.
4366 * lynx-low.c (lynx_add_process): Likewise.
4367 * mem-break.c (set_raw_breakpoint_at): Likewise.
4368 (set_breakpoint): Likewise.
4369 (add_condition_to_breakpoint): Likewise.
4370 (add_commands_to_breakpoint): Likewise.
4371 (clone_agent_expr): Likewise.
4372 (clone_one_breakpoint): Likewise.
4373 * regcache.c (new_register_cache): Likewise.
4374 * remote-utils.c (look_up_one_symbol): Likewise.
4375 * server.c (queue_stop_reply): Likewise.
4376 (start_inferior): Likewise.
4377 (queue_stop_reply_callback): Likewise.
4378 (handle_target_event): Likewise.
4379 * spu-low.c (fetch_ppc_memory): Likewise.
4380 (store_ppc_memory): Likewise.
4381 * target.c (set_target_ops): Likewise.
4382 * thread-db.c (thread_db_load_search): Likewise.
4383 (try_thread_db_load_1): Likewise.
4384 * tracepoint.c (add_tracepoint): Likewise.
4385 (add_tracepoint_action): Likewise.
4386 (create_trace_state_variable): Likewise.
4387 (cmd_qtdpsrc): Likewise.
4388 (cmd_qtro): Likewise.
4389 (add_while_stepping_state): Likewise.
4390 * win32-low.c (child_add_thread): Likewise.
4391 (get_image_name): Likewise.
4392
4393 2015-08-25 Yao Qi <yao.qi@linaro.org>
4394
4395 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4396
4397 2015-08-25 Yao Qi <yao.qi@linaro.org>
4398
4399 * Makefile.in (aarch64-linux.o): New rule.
4400 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4401 srv_tgtobj.
4402 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4403 (aarch64_init_debug_reg_state): Make it extern.
4404 (aarch64_linux_prepare_to_resume): Remove.
4405
4406 2015-08-25 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4409 lwp_arch_private_info and ptid_of_lwp.
4410
4411 2015-08-25 Yao Qi <yao.qi@linaro.org>
4412
4413 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4414 Find proc_info by find_process_pid. All callers updated.
4415
4416 2015-08-25 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4419 Remove.
4420 (debug_reg_change_callback): Remove.
4421 (aarch64_notify_debug_reg_change): Remove.
4422
4423 2015-08-25 Yao Qi <yao.qi@linaro.org>
4424
4425 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4426 Call current_lwp_ptid.
4427
4428 2015-08-25 Yao Qi <yao.qi@linaro.org>
4429
4430 * linux-aarch64-low.c (debug_reg_change_callback): Use
4431 debug_printf.
4432
4433 2015-08-25 Yao Qi <yao.qi@linaro.org>
4434
4435 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4436
4437 2015-08-25 Yao Qi <yao.qi@linaro.org>
4438
4439 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4440
4441 2015-08-25 Yao Qi <yao.qi@linaro.org>
4442
4443 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4444 the code.
4445
4446 2015-08-25 Yao Qi <yao.qi@linaro.org>
4447
4448 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4449 Remove.
4450 (debug_reg_change_callback): Remove argument entry and add argument
4451 lwp. Remove local variable thread. Don't print thread id in the
4452 debugging output. Don't check whether pid of thread equals to pid.
4453 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4454 iterate_over_lwps instead find_inferior.
4455
4456 2015-08-24 Pedro Alves <palves@redhat.com>
4457
4458 * inferiors.c (get_first_process): New function.
4459 * inferiors.h (get_first_process): New declaration.
4460 * remote-utils.c (read_ptid): Default to the first process in the
4461 list, instead of to the current thread's process.
4462
4463 2015-08-24 Pedro Alves <palves@redhat.com>
4464
4465 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4466 * event-loop.c: Likewise.
4467 * remote-utils.c: Likewise.
4468 * tracepoint.c: Likewise.
4469
4470 2015-08-24 Pedro Alves <palves@redhat.com>
4471
4472 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4473 ptid_get_lwp.
4474
4475 2015-08-21 Pedro Alves <palves@redhat.com>
4476
4477 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4478 instead of literal 1.
4479
4480 2015-08-21 Pedro Alves <palves@redhat.com>
4481
4482 * tdesc.c (default_description): Explicitly zero-initialize.
4483
4484 2015-08-21 Pedro Alves <palves@redhat.com>
4485
4486 PR gdb/18749
4487 * inferiors.c (remove_thread): Discard any pending stop reply for
4488 this thread.
4489 * server.c (remove_all_on_match_pid): Rename to ...
4490 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4491 instead of a pid.
4492 (discard_queued_stop_replies): Change parameter to a ptid. Now
4493 extern.
4494 (handle_v_kill, kill_inferior_callback, captured_main)
4495 (process_serial_event): Adjust.
4496 * server.h (discard_queued_stop_replies): Declare.
4497
4498 2015-08-21 Pedro Alves <palves@redhat.com>
4499
4500 * linux-low.c (wait_for_sigstop): Always switch to no thread
4501 selected if the previously current thread dies.
4502 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4503 process instead of the current thread's.
4504 * remote-utils.c (input_interrupt): Don't check if there's no
4505 current thread.
4506 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4507 current thread to the general thread fails, error out.
4508 (handle_qxfer_auxv, handle_qxfer_libraries)
4509 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4510 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4511 (handle_query): Check if there's a thread selected instead of
4512 checking whether there's any thread in the thread list.
4513 (handle_qxfer_threads, handle_qxfer_btrace)
4514 (handle_qxfer_btrace_conf): Don't error out early if there's no
4515 thread in the thread list.
4516 (handle_v_cont, myresume): Don't set the current thread to the
4517 continue thread.
4518 (process_serial_event) <Hg handling>: Also set thread_id if the
4519 previous general thread is still alive.
4520 (process_serial_event) <g/G handling>: If setting the current
4521 thread to the general thread fails, error out.
4522 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4523 thread's lwp instead of the current thread's.
4524 * target.c (set_desired_thread): If the desired thread was not
4525 found, leave the current thread pointing to NULL. Return an int
4526 (boolean) indicating success.
4527 * target.h (set_desired_thread): Change return type to int.
4528
4529 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4530
4531 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4532 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4533 #includes.
4534 (ps_get_thread_area): New function.
4535
4536 2015-08-19 Gary Benson <gbenson@redhat.com>
4537
4538 * hostio.c (handle_pread): Do not attempt to read more data
4539 than hostio_reply_with_data can fit in a packet.
4540
4541 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4542
4543 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4544
4545 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4546
4547 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4548
4549 2015-08-06 Pedro Alves <palves@redhat.com>
4550
4551 * tracepoint.c (expr_eval_result): Now an int.
4552
4553 2015-08-06 Pedro Alves <palves@redhat.com>
4554
4555 * gdbthread.h (struct regcache): Forward declare.
4556 (struct thread_info) <regcache_data>: Now a struct regcache
4557 pointer.
4558 * inferiors.c (inferior_regcache_data)
4559 (set_inferior_regcache_data): Now work with struct regcache
4560 pointers.
4561 * inferiors.h (struct regcache): Forward declare.
4562 (inferior_regcache_data, set_inferior_regcache_data): Now work
4563 with struct regcache pointers.
4564 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4565 (free_register_cache_thread): Remove struct regcache pointer
4566 casts.
4567
4568 2015-08-06 Pedro Alves <palves@redhat.com>
4569
4570 * server.c (captured_main): On error, print the exception message
4571 to stderr, and if run_once is set, throw a quit.
4572
4573 2015-08-06 Pedro Alves <palves@redhat.com>
4574
4575 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4576 the current thread.
4577
4578 2015-08-06 Pedro Alves <palves@redhat.com>
4579
4580 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4581 reading beyond the passed in buffer length.
4582
4583 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4584
4585 * tracepoint.c (symbol_list) <required>: Remove.
4586
4587 2015-08-06 Pedro Alves <palves@redhat.com>
4588
4589 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4590 count if stopping and suspending threads.
4591 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4592 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4593 (linux_detach): Complete an ongoing step-over.
4594 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4595 throughout.
4596 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4597 (linux_wait_1): If passing a signal to the inferior after
4598 finishing a step-over, unsuspend and re-resume all lwps. If we
4599 see a single-step event but the thread should be continuing, don't
4600 pass the trap to gdb.
4601 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4602 internal_error instead of gdb_assert.
4603 (enqueue_pending_signal): New function.
4604 (check_ptrace_stopped_lwp_gone): Add debug output.
4605 (start_step_over): Use internal_error instead of gdb_assert.
4606 (complete_ongoing_step_over): New function.
4607 (linux_resume_one_thread): Don't resume a suspended thread.
4608 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4609 it stepping.
4610
4611 2015-08-06 Pedro Alves <palves@redhat.com>
4612
4613 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4614 (linux_thread_alive): Use lwp_is_marked_dead.
4615 (extended_event_reported): Delete.
4616 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4617 instead of extended_event_reported.
4618 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4619 as well.
4620 (lwp_is_marked_dead): New function.
4621 (lwp_running): Use lwp_is_marked_dead.
4622 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4623 comment.
4624
4625 2015-08-06 Pedro Alves <palves@redhat.com>
4626
4627 * linux-low.c (linux_wait_1): Move fork event output out of the
4628 !report_to_gdb check. Pass event_child->waitstatus to
4629 target_waitstatus_to_string instead of ourstatus.
4630
4631 2015-08-04 Yao Qi <yao.qi@linaro.org>
4632
4633 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4634 if current_thread is 32 bit.
4635
4636 2015-08-04 Yao Qi <yao.qi@linaro.org>
4637
4638 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4639 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4640 * server.c (extended_protocol): Remove "static".
4641 * server.h (extended_protocol): Declare it.
4642
4643 2015-08-04 Yao Qi <yao.qi@linaro.org>
4644
4645 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4646 both aarch64 and aarch32.
4647 (aarch64_set_pc): Likewise.
4648
4649 2015-08-04 Yao Qi <yao.qi@linaro.org>
4650
4651 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4652 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4653 arm-with-neon.xml to srv_xmlfiles.
4654 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4655 (is_64bit_tdesc): New function.
4656 (aarch64_linux_read_description): New function.
4657 (aarch64_arch_setup): Call aarch64_linux_read_description.
4658 (regs_info): Rename to regs_info_aarch64.
4659 (aarch64_regs_info): Return right regs_info.
4660 (initialize_low_arch): Call initialize_low_arch_aarch32.
4661
4662 2015-08-04 Yao Qi <yao.qi@linaro.org>
4663
4664 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4665 * linux-aarch32-low.c: New file.
4666 * linux-aarch32-low.h: New file.
4667 * linux-arm-low.c (arm_fill_gregset): Move it to
4668 linux-aarch32-low.c.
4669 (arm_store_gregset): Likewise.
4670 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4671 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4672 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4673 (regs_info): Rename to regs_info_arm.
4674 (arm_regs_info): Return regs_info_aarch32 if
4675 have_ptrace_getregset is 1 and target description is
4676 arm_with_neon or arm_with_vfpv3.
4677 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4678 Call initialize_low_arch_aarch32 instead.
4679
4680 2015-08-04 Yao Qi <yao.qi@linaro.org>
4681
4682 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4683 * linux-low.c: ... here.
4684 * linux-low.h (have_ptrace_getregset): Declare it.
4685
4686 2015-08-04 Pedro Alves <palves@redhat.com>
4687
4688 * thread-db.c (struct thread_db): Use new typedefs.
4689 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4690 CHK calls.
4691 (disable_thread_event_reporting): Cast result of dlsym to
4692 destination function pointer type.
4693 (thread_db_mourn): Use td_ta_delete_ftype.
4694
4695 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4696
4697 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4698 arch variant.
4699 (CDX_BREAKPOINT): Define for R2.
4700 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4701 (the_low_target): Add comments.
4702
4703 2015-07-30 Yao Qi <yao.qi@linaro.org>
4704
4705 * linux-arm-low.c (arm_hwcap): Remove it.
4706 (arm_read_description): New local variable arm_hwcap. Don't
4707 set arm_hwcap to zero.
4708
4709 2015-07-30 Yao Qi <yao.qi@linaro.org>
4710
4711 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4712 Use regcache->tdesc instead.
4713 (arm_store_wmmxregset): Likewise.
4714 (arm_fill_vfpregset): Likewise.
4715 (arm_store_vfpregset): Likewise.
4716
4717 2015-07-30 Yao Qi <yao.qi@linaro.org>
4718
4719 * linux-arm-low.c: Include arch/arm.h.
4720 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4721 (arm_store_gregset): Likewise.
4722
4723 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4724
4725 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4726 ptrace's 4th parameter.
4727
4728 2015-07-27 Yao Qi <yao.qi@linaro.org>
4729
4730 * configure.srv (case aarch64*-*-linux*): Don't set
4731 srv_linux_usrregs.
4732
4733 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4734
4735 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4736 sys/ptrace.h.
4737 * linux-arm-low.c: Likewise.
4738 * linux-cris-low.c: Likewise.
4739 * linux-crisv32-low.c: Likewise.
4740 * linux-low.c: Likewise.
4741 * linux-m68k-low.c: Likewise.
4742 * linux-mips-low.c: Likewise.
4743 * linux-nios2-low.c: Likewise.
4744 * linux-s390-low.c: Likewise.
4745 * linux-sparc-low.c: Likewise.
4746 * linux-tic6x-low.c: Likewise.
4747 * linux-tile-low.c: Likewise.
4748 * linux-x86-low.c: Likewise.
4749
4750 2015-07-24 Pedro Alves <palves@redhat.com>
4751
4752 * config.in: Regenerate.
4753 * configure: Regenerate.
4754
4755 2015-07-24 Pedro Alves <palves@redhat.com>
4756
4757 * acinclude.m4: Include ../ptrace.m4.
4758 * configure.ac: Call GDB_AC_PTRACE.
4759 * config.in, configure: Regenerate.
4760
4761 2015-07-24 Yao Qi <yao.qi@linaro.org>
4762
4763 * linux-low.c (linux_create_inferior): Remove setting to
4764 proc->priv->new_inferior.
4765 (linux_attach): Likewise.
4766 (linux_low_filter_event): Likewise.
4767 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4768
4769 2015-07-24 Yao Qi <yao.qi@linaro.org>
4770
4771 * linux-low.c (linux_arch_setup): New function.
4772 (linux_low_filter_event): If proc->tdesc is NULL and
4773 proc->attached is true, call the_low_target.arch_setup.
4774 Otherwise, keep status pending, and return.
4775 (linux_resume_one_lwp_throw): Don't call get_pc if
4776 thread->while_stepping isn't NULL. Don't call
4777 get_thread_regcache if proc->tdesc is NULL.
4778 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4779 (linux_target_ops): Install arch_setup.
4780 * server.c (start_inferior): Call the_target->arch_setup.
4781 * target.h (struct target_ops) <arch_setup>: New field.
4782 (target_arch_setup): New marco.
4783 * lynx-low.c (lynx_target_ops): Update.
4784 * nto-low.c (nto_target_ops): Update.
4785 * spu-low.c (spu_target_ops): Update.
4786 * win32-low.c (win32_target_ops): Update.
4787
4788 2015-07-24 Yao Qi <yao.qi@linaro.org>
4789
4790 * linux-low.c (linux_add_process): Don't set
4791 proc->priv->new_inferior.
4792 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4793 (linux_attach): Likewise.
4794
4795 2015-07-24 Yao Qi <yao.qi@linaro.org>
4796
4797 * server.c (start_inferior): Code refactor.
4798
4799 2015-07-24 Yao Qi <yao.qi@linaro.org>
4800
4801 * server.c (process_serial_event): Set general_thread.
4802
4803 2015-07-21 Yao Qi <yao.qi@linaro.org>
4804
4805 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4806 aarch64_linux_get_debug_reg_capacity.
4807
4808 2015-07-17 Yao Qi <yao.qi@linaro.org>
4809
4810 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4811 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4812 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4813 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4814 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4815 (AARCH64_HWP_ALIGNMENT): Likewise.
4816 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4817 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4818 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4819 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4820 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4821 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4822 (struct aarch64_debug_reg_state): Likewise.
4823 (struct arch_lwp_info): Likewise.
4824 (aarch64_align_watchpoint): Likewise.
4825 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4826 (aarch64_watchpoint_length): Likewise.
4827 (aarch64_point_encode_ctrl_reg): Likewise
4828 (aarch64_point_is_aligned): Likewise.
4829 (aarch64_align_watchpoint): Likewise.
4830 (aarch64_linux_set_debug_regs):
4831 (aarch64_dr_state_insert_one_point): Likewise.
4832 (aarch64_dr_state_remove_one_point): Likewise.
4833 (aarch64_handle_breakpoint): Likewise.
4834 (aarch64_handle_aligned_watchpoint): Likewise.
4835 (aarch64_handle_unaligned_watchpoint): Likewise.
4836 (aarch64_handle_watchpoint): Likewise.
4837
4838 2015-07-17 Yao Qi <yao.qi@linaro.org>
4839
4840 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4841 and don't aarch64_get_debug_reg_state. All callers update.
4842 (aarch64_handle_aligned_watchpoint): Likewise.
4843 (aarch64_handle_unaligned_watchpoint): Likewise.
4844 (aarch64_handle_watchpoint): Likewise.
4845 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4846 (aarch64_remove_point): Likewise.
4847
4848 2015-07-17 Yao Qi <yao.qi@linaro.org>
4849
4850 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4851 debug_printf.
4852 (aarch64_handle_unaligned_watchpoint): Likewise.
4853
4854 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4855
4856 Revert the previous 3 commits:
4857 Move gdb_regex* to common/
4858 Move linux_find_memory_regions_full & co.
4859 gdbserver build-id attribute generator
4860
4861 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4862 Jan Kratochvil <jan.kratochvil@redhat.com>
4863
4864 gdbserver build-id attribute generator.
4865 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4866 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4867 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4868 (find_phdr): New.
4869 (get_dynamic): Use find_pdhr to traverse program headers.
4870 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4871 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4872 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4873 (get_hex_build_id): New.
4874 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4875 to reply XML document.
4876
4877 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4878 Jan Kratochvil <jan.kratochvil@redhat.com>
4879
4880 * target.c: Include target/target-utils.h and fcntl.h.
4881 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4882 (target_fileio_read_stralloc): New functions.
4883
4884 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4885
4886 * Makefile.in (OBS): Add gdb_regex.o.
4887 (gdb_regex.o): New.
4888 * config.in: Rebuilt.
4889 * configure: Rebuilt.
4890
4891 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4892 Jan Kratochvil <jan.kratochvil@redhat.com>
4893
4894 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4895 * Makefile.in (OBS): Add target-utils.o.
4896 (linux-maps.o, target-utils.o): New.
4897 * configure.srv (srv_linux_obj): Add linux-maps.o.
4898
4899 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4900
4901 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4902 function, return 1.
4903 (the_low_target): Install it.
4904
4905 2015-07-14 Pedro Alves <palves@redhat.com>
4906
4907 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4908 Instead, ignore ECHILD, and throw an error for other errnos.
4909
4910 2015-07-10 Pedro Alves <palves@redhat.com>
4911
4912 * event-loop.c (struct callback_event) <data>: Change type to
4913 gdb_client_data instance instead of gdb_client_data pointer.
4914 (append_callback_event): Adjust.
4915
4916 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4917
4918 * linux-aarch64-low.c: Add comments for each linux_target_ops
4919 method. Remove comments already covered in target_ops and
4920 linux_target_ops definitions.
4921 (the_low_target): Add comments for each unimplemented method.
4922
4923 2015-07-09 Yao Qi <yao.qi@linaro.org>
4924
4925 * linux-aarch64-low.c (aarch64_regmap): Remove.
4926 (aarch64_usrregs_info): Remove.
4927 (regs_info): Set field usrregs to NULL.
4928
4929 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4930
4931 * linux-low.c: Include "rsp-low.h"
4932 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4933 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4934 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4935 (handle_btrace_enable_pt): New.
4936 (handle_btrace_general_set): Support "pt".
4937 (handle_btrace_conf_general_set): Support "pt:size".
4938
4939 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4940
4941 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4942 Z_PACKET_SW_BP.
4943
4944 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4945
4946 * linux-aarch64-low.c: Remove comment about endianness.
4947 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4948 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4949 memcmp.
4950
4951 2015-06-24 Gary Benson <gbenson@redhat.com>
4952
4953 * linux-i386-ipa.c (stdint.h): Do not include.
4954 * lynx-i386-low.c (stdint.h): Likewise.
4955 * lynx-ppc-low.c (stdint.h): Likewise.
4956 * mem-break.c (stdint.h): Likewise.
4957 * thread-db.c (stdint.h): Likewise.
4958 * tracepoint.c (stdint.h): Likewise.
4959 * win32-low.c (stdint.h): Likewise.
4960
4961 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4962
4963 * server.c (write_qxfer_response): Update call to
4964 remote_escape_output.
4965
4966 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4967 Jan Kratochvil <jan.kratochvil@redhat.com>
4968
4969 Merge multiple hex conversions.
4970 * gdbreplay.c (tohex): Rename to 'fromhex'.
4971 (logchar): Use fromhex.
4972
4973 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4974
4975 * server.c (handle_qxfer_libraries): Set `version' attribute for
4976 <library-list>.
4977
4978 2015-06-10 Gary Benson <gbenson@redhat.com>
4979
4980 * target.h (struct target_ops) <multifs_open>: New field.
4981 <multifs_unlink>: Likewise.
4982 <multifs_readlink>: Likewise.
4983 * linux-low.c (nat/linux-namespaces.h): New include.
4984 (linux_target_ops): Initialize the_target->multifs_open,
4985 the_target->multifs_unlink and the_target->multifs_readlink.
4986 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4987 * hostio.c (hostio_fs_pid): New static variable.
4988 (hostio_handle_new_gdb_connection): New function.
4989 (handle_setfs): Likewise.
4990 (handle_open): Use the_target->multifs_open as appropriate.
4991 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4992 (handle_readlink): Use the_target->multifs_readlink as
4993 appropriate.
4994 (handle_vFile): Handle vFile:setfs packets.
4995 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4996 after target_handle_new_gdb_connection.
4997
4998 2015-06-10 Gary Benson <gbenson@redhat.com>
4999
5000 * configure.ac (AC_CHECK_FUNCS): Add setns.
5001 * config.in: Regenerate.
5002 * configure: Likewise.
5003 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5004 (linux-namespaces.o): New rule.
5005 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5006
5007 2015-06-09 Gary Benson <gbenson@redhat.com>
5008
5009 * hostio.c (handle_open): Process mode argument with
5010 fileio_to_host_mode.
5011
5012 2015-06-01 Yao Qi <yao.qi@linaro.org>
5013
5014 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5015 * linux-x86-low.c: Likewise.
5016
5017 2015-05-28 Don Breazeal <donb@codesourcery.com>
5018
5019 * linux-low.c (handle_extended_wait): Initialize
5020 thread_info.last_resume_kind for new fork children.
5021
5022 2015-05-15 Pedro Alves <palves@redhat.com>
5023
5024 * target.h (target_handle_new_gdb_connection): Rewrite using if
5025 wrapped in do/while.
5026
5027 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5028
5029 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5030 * configure, config.in: Regenerate.
5031 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5032 Declare typedef.
5033
5034 2015-05-12 Don Breazeal <donb@codesourcery.com>
5035
5036 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5037 PTRACE_EVENT_VFORK_DONE.
5038 (linux_low_ptrace_options, extended_event_reported): Add vfork
5039 events.
5040 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5041 and "vforkdone" for RSP 'T' Stop Reply Packet.
5042 * server.h (report_vfork_events): Declare
5043 global variable.
5044
5045 2015-05-12 Don Breazeal <donb@codesourcery.com>
5046
5047 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5048 (the_low_target) <new_fork>: Initialize new member.
5049 * linux-arm-low.c (arm_new_fork): New function.
5050 (the_low_target) <new_fork>: Initialize new member.
5051 * linux-low.c (handle_extended_wait): Call new target function
5052 new_fork.
5053 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5054 * linux-mips-low.c (mips_add_watchpoint): New function
5055 extracted from mips_insert_point.
5056 (the_low_target) <new_fork>: Initialize new member.
5057 (mips_linux_new_fork): New function.
5058 (mips_insert_point): Call mips_add_watchpoint.
5059 * linux-x86-low.c (x86_linux_new_fork): New function.
5060 (the_low_target) <new_fork>: Initialize new member.
5061
5062 2015-05-12 Don Breazeal <donb@codesourcery.com>
5063
5064 * linux-low.c (handle_extended_wait): Implement return value,
5065 rename argument 'event_child' to 'event_lwp', handle
5066 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5067 (linux_low_ptrace_options): New function.
5068 (linux_low_filter_event): Call linux_low_ptrace_options,
5069 use different argument fo linux_enable_event_reporting,
5070 use return value from handle_extended_wait.
5071 (extended_event_reported): New function.
5072 (linux_wait_1): Call extended_event_reported and set
5073 status to report fork events.
5074 (linux_write_memory): Add pid to debug message.
5075 (reset_lwp_ptrace_options_callback): New function.
5076 (linux_handle_new_gdb_connection): New function.
5077 (linux_target_ops): Initialize new structure member.
5078 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5079 * lynx-low.c: Initialize new structure member.
5080 * remote-utils.c (prepare_resume_reply): Implement stop reason
5081 "fork" for "T" stop message.
5082 * server.c (handle_query): Call handle_new_gdb_connection.
5083 * server.h (report_fork_events): Declare global flag.
5084 * target.h (struct target_ops) <handle_new_gdb_connection>:
5085 New member.
5086 (target_handle_new_gdb_connection): New macro.
5087 * win32-low.c: Initialize new structure member.
5088
5089 2015-05-12 Don Breazeal <donb@codesourcery.com>
5090
5091 * mem-break.c (APPEND_TO_LIST): Define macro.
5092 (clone_agent_expr): New function.
5093 (clone_one_breakpoint): New function.
5094 (clone_all_breakpoints): New function.
5095 * mem-break.h: Declare new functions.
5096
5097 2015-05-12 Don Breazeal <donb@codesourcery.com>
5098
5099 * linux-low.c (linux_supports_fork_events): New function.
5100 (linux_supports_vfork_events): New function.
5101 (linux_target_ops): Initialize new structure members.
5102 (initialize_low): Call linux_check_ptrace_features.
5103 * lynx-low.c (lynx_target_ops): Initialize new structure
5104 members.
5105 * server.c (report_fork_events, report_vfork_events):
5106 New global flags.
5107 (handle_query): Add new features to qSupported packet and
5108 response.
5109 (captured_main): Initialize new global variables.
5110 * target.h (struct target_ops) <supports_fork_events>:
5111 New member.
5112 <supports_vfork_events>: New member.
5113 (target_supports_fork_events): New macro.
5114 (target_supports_vfork_events): New macro.
5115 * win32-low.c (win32_target_ops): Initialize new structure
5116 members.
5117
5118 2015-05-12 Gary Benson <gbenson@redhat.com>
5119
5120 * server.c (handle_qxfer_exec_file): Use current process
5121 if annex is empty.
5122
5123 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5124
5125 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5126 Remove HAVE_PTRACE_GETREGS conditionals.
5127 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5128 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5129
5130 2015-05-08 Yao Qi <yao.qi@linaro.org>
5131
5132 * linux-low.c (linux_supports_conditional_breakpoints): New
5133 function.
5134 (linux_target_ops): Install new target method.
5135 * lynx-low.c (lynx_target_ops): Install NULL hook for
5136 supports_conditional_breakpoints.
5137 * nto-low.c (nto_target_ops): Likewise.
5138 * spu-low.c (spu_target_ops): Likewise.
5139 * win32-low.c (win32_target_ops): Likewise.
5140 * server.c (handle_query): Check
5141 target_supports_conditional_breakpoints.
5142 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5143 New field.
5144 (target_supports_conditional_breakpoints): New macro.
5145
5146 2015-05-06 Pedro Alves <palves@redhat.com>
5147
5148 PR server/18081
5149 * server.c (start_inferior): If the process exits, mourn it.
5150
5151 2015-04-21 Gary Benson <gbenson@redhat.com>
5152
5153 * hostio.c (fileio_open_flags_to_host): Factored out to
5154 fileio_to_host_openflags in common/fileio.c. Single use
5155 updated.
5156
5157 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5158
5159 * linux-xtensa-low.c (xtensa_fill_gregset)
5160 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5161 XCHAL_HAVE_LOOP.
5162
5163 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5164
5165 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5166 (regs_info): Replace usrregs pointer with NULL.
5167
5168 2015-04-17 Gary Benson <gbenson@redhat.com>
5169
5170 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5171 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5172 * server.c (handle_qxfer_exec_file): New function.
5173 (qxfer_packets): Add exec-file entry.
5174 (handle_query): Report qXfer:exec-file:read as supported packet.
5175
5176 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5177
5178 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5179
5180 2015-04-09 Gary Benson <gbenson@redhat.com>
5181
5182 * hostio-errno.c (errno_to_fileio_error): Remove function.
5183 Update caller to use remote_fileio_to_fio_error.
5184
5185 2015-04-09 Yao Qi <yao.qi@linaro.org>
5186
5187 * linux-low.c (linux_insert_point): Call
5188 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5189 (linux_remove_point): Call remove_memory_breakpoint if type is
5190 raw_bkpt_type_sw.
5191 * linux-x86-low.c (x86_insert_point): Don't call
5192 insert_memory_breakpoint.
5193 (x86_remove_point): Don't call remove_memory_breakpoint.
5194
5195 2015-04-01 Pedro Alves <palves@redhat.com>
5196 Cleber Rosa <crosa@redhat.com>
5197
5198 * server.c (gdbserver_usage): Reorganize and extend the usage
5199 message.
5200
5201 2015-03-24 Pedro Alves <palves@redhat.com>
5202
5203 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5204 output. Also dump TRAP_TRACE.
5205 (linux_low_filter_event): In debug output, distinguish a
5206 resume_stop SIGSTOP from a delayed SIGSTOP.
5207
5208 2015-03-24 Gary Benson <gbenson@redhat.com>
5209
5210 * linux-x86-low.c (x86_linux_new_thread): Moved to
5211 nat/x86-linux.c.
5212 (x86_linux_prepare_to_resume): Likewise.
5213
5214 2015-03-24 Gary Benson <gbenson@redhat.com>
5215
5216 * Makefile.in (x86-linux-dregs.o): New rule.
5217 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5218 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5219 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5220 (x86_linux_dr_get): Likewise.
5221 (x86_linux_dr_set): Likewise.
5222 (update_debug_registers_callback): Likewise.
5223 (x86_linux_dr_set_addr): Likewise.
5224 (x86_linux_dr_get_addr): Likewise.
5225 (x86_linux_dr_set_control): Likewise.
5226 (x86_linux_dr_get_control): Likewise.
5227 (x86_linux_dr_get_status): Likewise.
5228 (x86_linux_update_debug_registers): Likewise.
5229
5230 2015-03-24 Gary Benson <gbenson@redhat.com>
5231
5232 * linux-x86-low.c (x86_linux_update_debug_registers):
5233 New function, factored out from...
5234 (x86_linux_prepare_to_resume): ...this.
5235
5236 2015-03-24 Gary Benson <gbenson@redhat.com>
5237
5238 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5239 (x86_linux_dr_set): Likewise.
5240 (update_debug_registers_callback): Likewise.
5241 (x86_linux_dr_set_addr): Likewise.
5242 (x86_linux_dr_get_addr): Likewise.
5243 (x86_linux_dr_set_control): Likewise.
5244 (x86_linux_dr_get_control): Likewise.
5245 (x86_linux_dr_get_status): Likewise.
5246 (x86_linux_prepare_to_resume): Likewise.
5247
5248 2015-03-24 Gary Benson <gbenson@redhat.com>
5249
5250 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5251 Use perror_with_name. Pass string through gettext.
5252 (x86_linux_dr_set): Likewise.
5253
5254 2015-03-24 Gary Benson <gbenson@redhat.com>
5255
5256 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5257 (x86_linux_dr_set_addr): ...this.
5258 (x86_dr_low_get_addr): Rename to...
5259 (x86_linux_dr_get_addr): ...this.
5260 (x86_dr_low_set_control): Rename to...
5261 (x86_linux_dr_set_control): ...this.
5262 (x86_dr_low_get_control): Rename to...
5263 (x86_linux_dr_get_control): ...this.
5264 (x86_dr_low_get_status): Rename to...
5265 (x86_linux_dr_get_status): ...this.
5266 (x86_dr_low): Update with new function names.
5267
5268 2015-03-24 Gary Benson <gbenson@redhat.com>
5269
5270 * Makefile.in (x86-linux.o): New rule.
5271 * configure.srv: Add x86-linux.o to relevant targets.
5272 * linux-low.c (lwp_set_arch_private_info): New function.
5273 (lwp_arch_private_info): Likewise.
5274 * linux-x86-low.c: Include nat/x86-linux.h.
5275 (arch_lwp_info): Removed structure.
5276 (update_debug_registers_callback):
5277 Use lwp_set_debug_registers_changed.
5278 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5279 and lwp_set_debug_registers_changed.
5280 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5281
5282 2015-03-24 Gary Benson <gbenson@redhat.com>
5283
5284 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5285 * linux-arm-low.c (arm_new_thread): Likewise.
5286 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5287 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5288 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5289 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5290
5291 2015-03-24 Gary Benson <gbenson@redhat.com>
5292
5293 * linux-low.c (ptid_of_lwp): New function.
5294 (lwp_is_stopped): Likewise.
5295 (lwp_stop_reason): Likewise.
5296 * linux-x86-low.c (update_debug_registers_callback):
5297 Use lwp_is_stopped.
5298 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5299 lwp_stop_reason.
5300
5301 2015-03-24 Gary Benson <gbenson@redhat.com>
5302
5303 * linux-low.h (linux_stop_lwp): Remove declaration.
5304
5305 2015-03-24 Gary Benson <gbenson@redhat.com>
5306
5307 * linux-low.h: Include nat/linux-nat.h.
5308 * linux-low.c (iterate_over_lwps_args): New structure.
5309 (iterate_over_lwps_filter): New function.
5310 (iterate_over_lwps): Likewise.
5311 * linux-x86-low.c (update_debug_registers_callback):
5312 Update signature to what iterate_over_lwps expects.
5313 Remove PID check that iterate_over_lwps now performs.
5314 (x86_dr_low_set_addr): Use iterate_over_lwps.
5315 (x86_dr_low_set_control): Likewise.
5316
5317 2015-03-24 Gary Benson <gbenson@redhat.com>
5318
5319 * linux-x86-low.c (x86_debug_reg_state): New function.
5320 (x86_linux_prepare_to_resume): Use the above.
5321
5322 2015-03-24 Gary Benson <gbenson@redhat.com>
5323
5324 * linux-low.c (current_lwp_ptid): New function.
5325 * linux-x86-low.c: Include nat/linux-nat.h.
5326 (x86_dr_low_get_addr): Use current_lwp_ptid.
5327 (x86_dr_low_get_control): Likewise.
5328 (x86_dr_low_get_status): Likewise.
5329
5330 2015-03-20 Pedro Alves <palves@redhat.com>
5331
5332 * tracepoint.c (cmd_qtstatus): Make "str" const.
5333
5334 2015-03-20 Pedro Alves <palves@redhat.com>
5335
5336 * server.c (handle_general_set): Make "req_str" const.
5337
5338 2015-03-19 Pedro Alves <palves@redhat.com>
5339
5340 * linux-low.c (linux_resume_one_lwp): Rename to ...
5341 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5342 instead call perror_with_name.
5343 (check_ptrace_stopped_lwp_gone): New function.
5344 (linux_resume_one_lwp): Reimplement as wrapper around
5345 linux_resume_one_lwp_throw that swallows errors if the LWP is
5346 gone.
5347
5348 2015-03-19 Pedro Alves <palves@redhat.com>
5349
5350 * linux-low.c (count_events_callback, select_event_lwp_callback):
5351 No longer check whether the thread has resume_stop as last resume
5352 kind.
5353
5354 2015-03-19 Pedro Alves <palves@redhat.com>
5355
5356 * linux-low.c (count_events_callback, select_event_lwp_callback):
5357 Use the lwp's status_pending_p field, not the thread's.
5358
5359 2015-03-19 Pedro Alves <palves@redhat.com>
5360
5361 * linux-low.c (select_event_lwp_callback): Update comments to
5362 no longer mention SIGTRAP.
5363
5364 2015-03-18 Gary Benson <gbenson@redhat.com>
5365
5366 * server.c (handle_query): Do not report vFile:fstat as supported.
5367
5368 2015-03-11 Gary Benson <gbenson@redhat.com>
5369
5370 * hostio.c (sys/types.h): New include.
5371 (sys/stat.h): Likewise.
5372 (common-remote-fileio.h): Likewise.
5373 (handle_fstat): New function.
5374 (handle_vFile): Handle vFile:fstat packets.
5375
5376 2015-03-11 Gary Benson <gbenson@redhat.com>
5377
5378 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5379 struct stat.st_blocks and struct stat.st_blksize.
5380 * configure: Regenerate.
5381 * config.in: Likewise.
5382 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5383 (OBS): Add common-remote-fileio.o.
5384 (common-remote-fileio.o): New rule.
5385
5386 2015-03-09 Pedro Alves <palves@redhat.com>
5387
5388 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5389 'struct sockaddr' pointer in 'accept' call.
5390
5391 2015-03-09 Pedro Alves <palves@redhat.com>
5392
5393 Revert:
5394 2015-03-07 Pedro Alves <palves@redhat.com>
5395 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5396 or <winsock2.h> here. Instead include "gdb_socket.h".
5397 (remote_open): Use union gdb_sockaddr_u.
5398 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5399 or <winsock2.h> here. Instead include "gdb_socket.h".
5400 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5401 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5402 or <sys/un.h>.
5403 (init_named_socket, gdb_agent_helper_thread): Use union
5404 gdb_sockaddr_u.
5405
5406 2015-03-07 Pedro Alves <palves@redhat.com>
5407
5408 * configure.ac (build_warnings): Move
5409 -Wdeclaration-after-statement to the C-specific set.
5410 * configure: Regenerate.
5411
5412 2015-03-07 Pedro Alves <palves@redhat.com>
5413
5414 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5415 or <winsock2.h> here. Instead include "gdb_socket.h".
5416 (remote_open): Use union gdb_sockaddr_u.
5417 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5418 or <winsock2.h> here. Instead include "gdb_socket.h".
5419 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5420 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5421 or <sys/un.h>.
5422 (init_named_socket, gdb_agent_helper_thread): Use union
5423 gdb_sockaddr_u.
5424
5425 2015-03-07 Pedro Alves <palves@redhat.com>
5426
5427 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5428 instead.
5429
5430 2015-03-06 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-aarch64-low.c (aarch64_insert_point): Use
5433 show_debug_regs as a boolean.
5434 (aarch64_remove_point): Likewise.
5435
5436 2015-03-05 Pedro Alves <palves@redhat.com>
5437
5438 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5439 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5440 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5441 * nto-low.c (nto_target_ops): Likewise.
5442 * spu-low.c (spu_target_ops): Likewise.
5443 * win32-low.c (win32_target_ops): Likewise.
5444
5445 2015-03-04 Pedro Alves <palves@redhat.com>
5446
5447 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5448 Decide whether a breakpoint triggered based on the SIGTRAP's
5449 siginfo.si_code.
5450 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5451 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5452 (linux_low_filter_event): Check for breakpoints before checking
5453 watchpoints.
5454 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5455 siginfo.si_code.
5456 (linux_stopped_by_sw_breakpoint)
5457 (linux_supports_stopped_by_sw_breakpoint)
5458 (linux_stopped_by_hw_breakpoint)
5459 (linux_supports_stopped_by_hw_breakpoint): New functions.
5460 (linux_target_ops): Install new target methods.
5461
5462 2015-03-04 Pedro Alves <palves@redhat.com>
5463
5464 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5465 * server.c (swbreak_feature, hwbreak_feature): New globals.
5466 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5467 (captured_main): Clear swbreak_feature and hwbreak_feature.
5468 * server.h (swbreak_feature, hwbreak_feature): Declare.
5469 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5470 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5471 supports_stopped_by_hw_breakpoint>: New fields.
5472 (target_supports_stopped_by_sw_breakpoint)
5473 (target_stopped_by_sw_breakpoint)
5474 (target_supports_stopped_by_hw_breakpoint)
5475 (target_stopped_by_hw_breakpoint): Declare.
5476
5477 2015-03-04 Pedro Alves <palves@redhat.com>
5478
5479 enum lwp_stop_reason -> enum target_stop_reason
5480 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5481 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5482 (linux_wait_1, stuck_in_jump_pad_callback)
5483 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5484 (linux_stopped_by_watchpoint):
5485 * linux-low.h (enum lwp_stop_reason): Delete.
5486 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5487 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5488
5489 2015-03-04 Yao Qi <yao.qi@linaro.org>
5490
5491 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5492
5493 2015-03-03 Gary Benson <gbenson@redhat.com>
5494
5495 * hostio.c (handle_vFile): Fix prefix lengths.
5496
5497 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5498
5499 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5500 ptr_bits.
5501
5502 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5503
5504 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5505 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5506 (clean): Add "rm -f" for above C files.
5507 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5508 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5509 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5510 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5511 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5512 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5513 (init_registers_s390x_vx_linux64)
5514 (init_registers_s390x_tevx_linux64)
5515 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5516 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5517 declarations.
5518 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5519 (s390_store_vxrs_high): New functions.
5520 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5521 NT_S390_VXRS_HIGH.
5522 (s390_arch_setup): Add logic for selecting one of the new target
5523 descriptions. Activate the new vector regsets if applicable.
5524 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5525 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5526 and init_registers_s390x_tevx_linux64.
5527
5528 2015-03-01 Pedro Alves <palves@redhat.com>
5529
5530 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5531 parameter.
5532
5533 2015-02-27 Pedro Alves <palves@redhat.com>
5534
5535 * linux-x86-low.c (u_debugreg_offset): New function.
5536 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5537
5538 2015-02-27 Pedro Alves <palves@redhat.com>
5539
5540 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5541 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5542 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5543 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5544 (ps_lsetfpregs, ps_getpid)
5545 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5546 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5547 (ps_lsetxregs, ps_plog): Declare.
5548
5549 2015-02-27 Pedro Alves <palves@redhat.com>
5550
5551 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5552 IP_AGENT_EXPORT_FUNC.
5553 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5554 IP_AGENT_EXPORT_FUNC.
5555 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5556 (IP_AGENT_EXPORT): Delete.
5557 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5558 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5559 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5560 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5561 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5562 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5563 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5564 (traceframe_read_count, traceframe_write_count)
5565 (traceframes_created, trace_state_variables, get_raw_reg)
5566 (get_trace_state_variable_value, set_trace_state_variable_value)
5567 (ust_loaded, helper_thread_id, cmd_buf): Use
5568 IPA_SYM_EXPORTED_NAME.
5569 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5570 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5571 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5572 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5573 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5574 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5575 EXTERN_C_PUSH/EXTERN_C_POP.
5576 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5577 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5578 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5579 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5580 (traceframe_write_count, traceframe_read_count)
5581 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5582 (about_to_request_buffer_space, get_trace_state_variable_value)
5583 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5584 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5585 EXTERN_C_PUSH/EXTERN_C_POP.
5586 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5587 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5588 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5589 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5590 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5591 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5592 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5593 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5594 Define.
5595 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5596 (IP_AGENT_EXPORT_VAR_DECL): Define.
5597 (tracing): Declare.
5598 (gdb_agent_get_raw_reg): Declare.
5599
5600 2015-02-27 Tom Tromey <tromey@redhat.com>
5601 Pedro Alves <palves@redhat.com>
5602
5603 Rename symbols whose names are reserved C++ keywords throughout.
5604
5605 2015-02-27 Pedro Alves <palves@redhat.com>
5606
5607 * Makefile.in (COMPILER): New, get it from autoconf.
5608 (CXX): Get from autoconf instead.
5609 (COMPILE.pre): Use COMPILER.
5610 (CC-LD): Rename to ...
5611 (CC_LD): ... this. Use COMPILER.
5612 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5613 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5614 * acinclude.m4: Include build-with-cxx.m4.
5615 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5616 Disable -Werror by default if building in C++ mode.
5617 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5618 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5619 the C++ compiler. Save/restore CXXFLAGS too.
5620 * configure: Regenerate.
5621
5622 2015-02-27 Pedro Alves <palves@redhat.com>
5623
5624 * acinclude.m4: Include libiberty.m4.
5625 * configure.ac: Call libiberty_INIT.
5626 * config.in, configure: Regenerate.
5627
5628 2015-02-26 Pedro Alves <palves@redhat.com>
5629
5630 * linux-low.c (linux_wait_1): When incrementing the PC past a
5631 program breakpoint always use the_low_target.breakpoint_len as
5632 increment, rather than the maximum between that and
5633 the_low_target.decr_pc_after_break.
5634
5635 2015-02-23 Pedro Alves <palves@redhat.com>
5636
5637 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5638 thread was doing a step-over; always adjust the PC if
5639 we stepped over a permanent breakpoint.
5640 (linux_wait_1): If we stepped over breakpoint that was on top of a
5641 permanent breakpoint, manually advance the PC past it.
5642
5643 2015-02-23 Pedro Alves <palves@redhat.com>
5644
5645 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5646 modes.
5647 (x86_fill_gregset, x86_store_gregset): Use it when handling
5648 $orig_eax.
5649
5650 2015-02-20 Pedro Alves <palves@redhat.com>
5651
5652 * thread-db.c: Include "nat/linux-procfs.h".
5653 (thread_db_init): Skip listing new threads if the kernel supports
5654 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5655
5656 2015-02-20 Pedro Alves <palves@redhat.com>
5657
5658 * linux-low.c (status_pending_p_callback): Use ptid_match.
5659
5660 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5661
5662 PR breakpoints/16812
5663 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5664 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5665 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5666
5667 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5668
5669 PR breakpoints/15956
5670 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5671
5672 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5673
5674 * linux-low.c (linux_low_btrace_conf): Print size.
5675 * server.c (handle_btrace_conf_general_set): New.
5676 (hanle_general_set): Call handle_btrace_conf_general_set.
5677 (handle_query): Report Qbtrace-conf:bts:size as supported.
5678
5679 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5680
5681 * linux-low.c (linux_low_enable_btrace): Update parameters.
5682 (linux_low_btrace_conf): New.
5683 (linux_target_ops)<to_btrace_conf>: Initialize.
5684 * server.c (current_btrace_conf): New.
5685 (handle_btrace_enable): Rename to ...
5686 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5687 to target_enable_btrace. Update comment. Update users.
5688 (handle_qxfer_btrace_conf): New.
5689 (qxfer_packets): Add btrace-conf entry.
5690 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5691 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5692 (target_ops)<read_btrace_conf>: New.
5693 (target_enable_btrace): Update parameters.
5694 (target_read_btrace_conf): New.
5695
5696 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5697
5698 * server.c (handle_btrace_general_set): Remove call to
5699 target_supports_btrace.
5700 (supported_btrace_packets): New.
5701 (handle_query): Call supported_btrace_packets.
5702 * target.h: include btrace-common.h.
5703 (btrace_target_info): Removed.
5704 (supports_btrace, target_supports_btrace): Update parameters.
5705
5706 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5707
5708 * Makefile.in (SFILES): Add common/btrace-common.c.
5709 (OBS): Add common/btrace-common.o.
5710 (btrace-common.o): Add build rules.
5711 * linux-low: Include btrace-common.h.
5712 (linux_low_read_btrace): Use struct btrace_data. Call
5713 btrace_data_init and btrace_data_fini.
5714
5715 2015-02-06 Pedro Alves <palves@redhat.com>
5716
5717 * thread-db.c (find_new_threads_callback): Add debug output.
5718
5719 2015-02-04 Pedro Alves <palves@redhat.com>
5720
5721 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5722 (resume_stopped_resumed_lwps): New function.
5723 (linux_wait_for_event_filtered): Use it.
5724
5725 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5726
5727 * Makefile.in (SFILES): Add linux-personality.c.
5728 (linux-personality.o): New rule.
5729 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5730 list of objects to be built.
5731 * linux-low.c: Include nat/linux-personality.h.
5732 (linux_create_inferior): Remove code to disable address space
5733 randomization (moved to ../nat/linux-personality.c). Create
5734 cleanup to disable address space randomization.
5735
5736 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5737
5738 * Makefile.in (posix-strerror.o): New rule.
5739 (mingw-strerror.o): Likewise.
5740 * configure: Regenerated.
5741 * configure.ac: Source file ../common/common.host. Initialize new
5742 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5743
5744 2015-01-14 Yao Qi <yao@codesourcery.com>
5745
5746 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5747 (ppc-linux.o): New rule.
5748 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5749 * configure.ac: AC_CHECK_FUNCS(getauxval).
5750 * config.in: Re-generated.
5751 * configure: Re-generated.
5752 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5753 ppc64_64bit_inferior_p
5754
5755 2015-01-14 Yao Qi <yao@codesourcery.com>
5756
5757 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5758 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5759 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5760 (PT_ORIG_R3, PT_TRAP): Likewise.
5761 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5762 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5763 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5764
5765 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5766
5767 * i387-fp.c (i387_cache_to_xsave): In look over
5768 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5769 zmmh_low_space field by use of zmmh_high_space.
5770
5771 2015-01-09 Pedro Alves <palves@redhat.com>
5772
5773 * linux-low.c (step_over_bkpt): Move higher up in the file.
5774 (handle_extended_wait): Don't store the stop_pc here.
5775 (get_stop_pc): Adjust comments and rename to ...
5776 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5777 stopped for a software breakpoint or hardware breakpoint.
5778 (thread_still_has_status_pending_p): New function.
5779 (status_pending_p_callback): Use
5780 thread_still_has_status_pending_p. If the event is no longer
5781 interesting, resume the LWP.
5782 (handle_tracepoints): Add assert.
5783 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5784 (wstatus_maybe_breakpoint): New function.
5785 (cancel_breakpoint): Delete function.
5786 (check_stopped_by_watchpoint): New function, factored out from
5787 linux_low_filter_event.
5788 (lp_status_maybe_breakpoint): Delete function.
5789 (linux_low_filter_event): Remove filter_ptid argument.
5790 Leave thread group exits pending here. Store the LWP's stop PC.
5791 Always leave events pending.
5792 (linux_wait_for_event_filtered): Pull all events out of the
5793 kernel, and leave them all pending.
5794 (count_events_callback, select_event_lwp_callback): Consider all
5795 events.
5796 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5797 (select_event_lwp): Only give preference to the stepping LWP in
5798 all-stop mode. Adjust comments.
5799 (ignore_event): New function.
5800 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5801 references to cancel_breakpoints. Adjust to renames. Also give
5802 equal priority to all LWPs that have had events in non-stop mode.
5803 If reporting a software breakpoint event, unadjust the LWP's PC.
5804 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5805 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5806 Adjust.
5807 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5808 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5809 (linux_stopped_by_watchpoint): Adjust.
5810 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5811 * linux-low.h (enum lwp_stop_reason): New.
5812 (struct lwp_info) <stop_pc>: Adjust comment.
5813 <stopped_by_watchpoint>: Delete field.
5814 <stop_reason>: New field.
5815 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5816 * mem-break.c (software_breakpoint_inserted_here)
5817 (hardware_breakpoint_inserted_here): New function.
5818 * mem-break.h (software_breakpoint_inserted_here)
5819 (hardware_breakpoint_inserted_here): Declare.
5820 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5821 (cancel_breakpoints): Delete.
5822 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5823 (upload_fast_traceframes): Remove references to
5824 cancel_breakpoints.
5825
5826 2015-01-09 Pedro Alves <palves@redhat.com>
5827
5828 * thread-db.c (find_new_threads_callback): Ignore thread if the
5829 kernel thread ID is -1.
5830
5831 2015-01-09 Pedro Alves <palves@redhat.com>
5832
5833 * linux-low.c (linux_attach_fail_reason_string): Move to
5834 nat/linux-ptrace.c, and rename.
5835 (linux_attach_lwp): Update comment.
5836 (attach_proc_task_lwp_callback): New function.
5837 (linux_attach): Adjust to rename and use
5838 linux_proc_attach_tgid_threads.
5839 (linux_attach_fail_reason_string): Delete declaration.
5840
5841 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5842
5843 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5844 * server.c (gdbserver_version): Likewise.
5845
5846 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5847
5848 * remote-utils.c: Include ctype.h.
5849 (input_interrupt): Explicitly handle the case when the char
5850 received is the NUL byte. Improve the printing of non-ASCII
5851 characters.
5852
5853 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5854
5855 * linux-low.c (linux_low_filter_event): Update call to
5856 linux_enable_event_reporting following the addition of
5857 a new parameter to that function.
5858
5859 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5860
5861 PR server/17457
5862 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5863 (AARCH64_FPCR_REGNO): Likewise.
5864 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5865 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5866 (aarch64_store_fpregset): Likewise.
5867
5868 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5869
5870 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5871 Remove FIXME comment about assumption about N.
5872
5873 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5874
5875 * configure.ac: If large-file support is disabled in GDBserver,
5876 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5877 * configure: Regenerate.
5878
5879 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5880
5881 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5882 warning upon ENODATA from ptrace.
5883 * linux-s390-low.c (s390_store_tdb): New.
5884 (s390_regsets): Add regset for NT_S390_TDB.
5885
5886 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5887
5888 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5889 without a fill_function.
5890 * linux-s390-low.c (s390_fill_last_break): Remove.
5891 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5892 (s390_arch_setup): Use regset's size instead of fill_function for
5893 loop end condition.
5894
5895 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5896
5897 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5898 the regset's store function when ptrace returned an error.
5899 * regcache.c (get_thread_regcache): Invalidate register cache
5900 before fetching inferior's registers.
5901
5902 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5903
5904 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5905 while-loop as for-loop.
5906 (regsets_store_inferior_registers): Likewise.
5907
5908 2014-11-28 Yao Qi <yao@codesourcery.com>
5909
5910 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5911 * config.in, configure: Re-generate.
5912 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5913 is defined.
5914
5915 2014-11-21 Yao Qi <yao@codesourcery.com>
5916
5917 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5918 (AC_CHECK_HEADERS): Remove malloc.h.
5919 * configure: Re-generated.
5920 * config.in: Re-generated.
5921 * server.h: Don't include alloca.h and malloc.h.
5922 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5923 Don't include malloc.h.
5924
5925 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5926
5927 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5928 corresponding ERRNO check in same block.
5929
5930 2014-11-12 Pedro Alves <palves@redhat.com>
5931
5932 * server.c (cont_thread): Update comment.
5933 (start_inferior, attach_inferior): No longer clear cont_thread.
5934 (handle_v_cont): No longer set cont_thread.
5935 (captured_main): Clear cont_thread each time a GDB connects.
5936
5937 2014-11-12 Pedro Alves <palves@redhat.com>
5938
5939 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5940 thread, and don't resume all threads if the Hc thread has exited.
5941
5942 2014-11-12 Pedro Alves <palves@redhat.com>
5943
5944 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5945 the process group instead of to a specific LWP.
5946
5947 2014-10-15 Pedro Alves <palves@redhat.com>
5948
5949 PR server/17487
5950 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5951 parameter.
5952 (arm_set_thread_context): Delete.
5953 (the_low_target): Adjust.
5954 * win32-i386-low.c (debug_registers_changed)
5955 (debug_registers_used): Delete.
5956 (update_debug_registers_callback): New function.
5957 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5958 needing to update their debug registers.
5959 (win32_get_current_dr): New function.
5960 (x86_dr_low_get_addr, x86_dr_low_get_control)
5961 (x86_dr_low_get_status): Fetch the debug register from the thread
5962 record's context.
5963 (i386_initial_stuff): Adjust.
5964 (i386_get_thread_context): Remove current_event parameter. Don't
5965 clear debug_registers_changed nor copy DR values to
5966 debug_reg_state.
5967 (i386_set_thread_context): Delete.
5968 (i386_prepare_to_resume): New function.
5969 (i386_thread_added): Mark the thread as needing to update irs
5970 debug registers.
5971 (the_low_target): Remove i386_set_thread_context and install
5972 i386_prepare_to_resume.
5973 * win32-low.c (win32_get_thread_context): Adjust.
5974 (win32_set_thread_context): Use SetThreadContext
5975 directly.
5976 (win32_prepare_to_resume): New function.
5977 (win32_require_context): New function, factored out from ...
5978 (thread_rec): ... this.
5979 (continue_one_thread): Call win32_prepare_to_resume on each thread
5980 we're about to continue.
5981 (win32_resume): Call win32_prepare_to_resume on the event thread.
5982 * win32-low.h (struct win32_thread_info)
5983 <debug_registers_changed>: New field.
5984 (struct win32_target_ops): Change prototype of set_thread_context,
5985 delete set_thread_context and add prepare_to_resume.
5986 (win32_require_context): New declaration.
5987
5988 2014-10-08 Gary Benson <gbenson@redhat.com>
5989
5990 * server.h: Do not include common-exceptions.h.
5991
5992 2014-10-08 Gary Benson <gbenson@redhat.com>
5993
5994 * server.h: Do not include cleanups.h.
5995
5996 2014-09-30 James Hogan <james.hogan@imgtec.com>
5997
5998 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5999 mips64-dsp-linux.c.
6000
6001 2014-09-23 Yao Qi <yao@codesourcery.com>
6002
6003 * linux-low.c (lp_status_maybe_breakpoint): New function.
6004 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6005 (count_events_callback): Likewise.
6006 (select_event_lwp_callback): Likewise.
6007 (cancel_breakpoints_callback): Likewise.
6008
6009 2014-09-19 Don Breazeal <donb@codesourcery.com>
6010
6011 * linux-low.c (handle_extended_wait): Call
6012 linux_ptrace_get_extended_event.
6013 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6014 linux_is_extended_waitstatus.
6015
6016 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6017
6018 * Makefile.in (CPPFLAGS): Define.
6019 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6020 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6021
6022 2014-09-16 Gary Benson <gbenson@redhat.com>
6023
6024 * inferiors.h (current_inferior): Renamed as...
6025 (current_thread): New variable. All uses updated.
6026 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6027 (maybe_move_out_of_jump_pad): Likewise.
6028 (cancel_breakpoint): Likewise.
6029 (linux_low_filter_event): Likewise.
6030 (wait_for_sigstop): Likewise.
6031 (linux_resume_one_lwp): Likewise.
6032 (need_step_over_p): Likewise.
6033 (start_step_over): Likewise.
6034 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6035 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6036 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6037 and save_inferior as saved_thread.
6038 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6039 saved_thread.
6040 (regcache_invalidate_thread): Likewise.
6041 * remote-utils.c (prepare_resume_reply): Likewise.
6042 * thread-db.c (thread_db_get_tls_address): Likewise.
6043 (disable_thread_event_reporting): Likewise.
6044 (remove_thread_event_breakpoints): Likewise.
6045 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6046 as saved_thread.
6047 * target.h (set_desired_inferior): Renamed as...
6048 (set_desired_thread): New declaration. All uses updated.
6049 * server.c (myresume): Updated comment to reference thread instead
6050 of inferior.
6051 (handle_serial_event): Likewise.
6052 (handle_target_event): Likewise.
6053
6054 2014-09-12 Tom Tromey <tromey@redhat.com>
6055 Gary Benson <gbenson@redhat.com>
6056
6057 * regcache.h: Include common-regcache.h.
6058 (regcache_read_pc): Don't declare.
6059 * regcache.c (get_thread_regcache_for_ptid): New function.
6060
6061 2014-09-11 Tom Tromey <tromey@redhat.com>
6062 Gary Benson <gbenson@redhat.com>
6063
6064 * symbol.c: New file.
6065 * Makefile.in (SFILES): Add symbol.c.
6066 (OBS): Add symbol.o.
6067
6068 2014-09-11 Gary Benson <gbenson@redhat.com>
6069
6070 * target.c (target_stop_ptid, target_continue_ptid): New
6071 functions.
6072
6073 2014-09-11 Tom Tromey <tromey@redhat.com>
6074 Gary Benson <gbenson@redhat.com>
6075
6076 * target.h: Include target/target.h.
6077 * target.c (target_read_memory, target_read_uint32)
6078 (target_write_memory): New functions.
6079
6080 2014-09-11 Gary Benson <gbenson@redhat.com>
6081
6082 * server.h (debug_hw_points): Don't declare.
6083 * server.c (debug_hw_points): Don't define. Replace all uses
6084 with show_debug_regs.
6085 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6086 all uses with show_debug_regs.
6087
6088 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6089
6090 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6091 endianness into account.
6092 (ppc_supply_ptrace_register): Likewise.
6093
6094 2014-09-03 James Hogan <james.hogan@imgtec.com>
6095
6096 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6097 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6098
6099 2014-09-03 Gary Benson <gbenson@redhat.com>
6100
6101 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6102 ALL_DEBUG_ADDRESS_REGISTERS.
6103
6104 2014-09-02 Gary Benson <gbenson@redhat.com>
6105
6106 * i386-low.h: Renamed as...
6107 * x86-low.h: New file. All type, function and variable name
6108 prefixes changed from "i386_" to "x86_". All references updated.
6109 * i386-low.c: Renamed as...
6110 * x86-low.c: New file. All type, function and variable name
6111 prefixes changed from "i386_" to "x86_". All references updated.
6112
6113 2014-09-02 Gary Benson <gbenson@redhat.com>
6114
6115 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6116 (x86_linux_new_thread): Likewise.
6117
6118 2014-08-29 Gary Benson <gbenson@redhat.com>
6119
6120 * server.h (setjmp.h): Do not include.
6121 (toplevel): Do not declare.
6122 (common-exceptions.h): Include.
6123 (cleanups.h): Likewise.
6124 * server.c (toplevel): Do not define.
6125 (exit_code): New static global.
6126 (detach_or_kill_for_exit_cleanup): New function.
6127 (main): New function. Original main renamed to...
6128 (captured_main): New function.
6129 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6130
6131 2014-08-29 Gary Benson <gbenson@redhat.com>
6132
6133 * Makefile.in (SFILES): Add common/common-exceptions.c.
6134 (OBS): Add common-exceptions.o.
6135 (common-exceptions.o): New rule.
6136 * utils.c (prepare_to_throw_exception): New function.
6137
6138 2014-08-29 Gary Benson <gbenson@redhat.com>
6139
6140 * config.in: Regenerate.
6141 * configure: Likewise.
6142
6143 2014-08-29 Gary Benson <gbenson@redhat.com>
6144
6145 * Makefile.in (SFILES): Add common/cleanups.c.
6146 (OBS): cleanups.o.
6147 (cleanups.o): New rule.
6148
6149 2014-08-29 Gary Benson <gbenson@redhat.com>
6150
6151 * utils.c (internal_vwarning): New function.
6152
6153 2014-08-28 Gary Benson <gbenson@redhat.com>
6154
6155 * utils.h (fatal): Remove declaration.
6156 * utils.c (fatal): Remove function.
6157
6158 2014-08-28 Gary Benson <gbenson@redhat.com>
6159
6160 * tracepoint.c (gdb_agent_init): Replace fatal with
6161 perror_with_name.
6162 (initialize_tracepoint): Likewise.
6163
6164 2014-08-28 Gary Benson <gbenson@redhat.com>
6165
6166 * remote-utils.c (remote_prepare): Replace fatal with error.
6167
6168 2014-08-28 Gary Benson <gbenson@redhat.com>
6169
6170 * linux-low.c (linux_async): Replace fatal with warning.
6171 Tidy up and return.
6172 (linux_start_non_stop): Return -1 if linux_async failed.
6173
6174 2014-08-28 Gary Benson <gbenson@redhat.com>
6175
6176 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6177 gdb_assert.
6178 (i386_dr_low_get_addr): Remove vague comment.
6179 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6180 gdb_assert.
6181
6182 2014-08-28 Gary Benson <gbenson@redhat.com>
6183
6184 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6185 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6186 internal_error.
6187 (linux_resume_one_lwp): Likewise.
6188 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6189 gdb_assert.
6190 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6191 with internal_error.
6192 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6193 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6194 (find_register_by_name): Replace fatal with internal_error.
6195 (find_regno): Likewise.
6196 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6197 * thread-db.c (thread_db_create_event): Likewise.
6198 (thread_db_load_search): Likewise.
6199 (try_thread_db_load_1): Likewise.
6200 * tracepoint.c (get_jump_space_head): Replace fatal with
6201 internal_error.
6202 (claim_trampoline_space): Likewise.
6203 (have_fast_tracepoint_trampoline_buffer): Likewise.
6204 (cmd_qtstart): Likewise.
6205 (stop_tracing): Likewise.
6206 (fast_tracepoint_collecting): Likewise.
6207 (target_malloc): Likewise.
6208 (download_tracepoint): Likewise.
6209 (download_trace_state_variables): Replace check with gdb_assert.
6210 (upload_fast_traceframes): Replace fatal with internal_error.
6211
6212 2014-08-19 Tom Tromey <tromey@redhat.com>
6213 Gary Benson <gbenson@redhat.com>
6214
6215 * Makefile.in (SFILES): Add common/common-debug.c.
6216 (OBS): Add common-debug.o.
6217 (common-debug.o): New rule.
6218 * debug.h (debug_printf): Don't declare.
6219 * debug.c (debug_printf): Renamed and rewritten as...
6220 (debug_vprintf): New function.
6221
6222 2014-08-19 Gary Benson <gbenson@redhat.com>
6223
6224 * utils.h: Do not include print-utils.h.
6225
6226 2014-08-19 Tom Tromey <tromey@redhat.com>
6227 Gary Benson <gbenson@redhat.com>
6228
6229 * server.h: Add static assertion.
6230 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6231
6232 2014-08-19 Tom Tromey <tromey@redhat.com>
6233 Gary Benson <gbenson@redhat.com>
6234
6235 * Makefile.in (SFILES): Add common/errors.c.
6236 (OBS): Add errors.o.
6237 (IPA_OBS): Add errors-ipa.o.
6238 (errors.o): New rule.
6239 (errors-ipa.o): Likewise.
6240 * utils.h (perror_with_name, error, warning): Don't declare.
6241 * utils.c (warning): Renamed and rewritten as...
6242 (vwarning): New function.
6243 (error): Renamed and rewritten as...
6244 (verror): New function.
6245 (internal_error): Renamed and rewritten as...
6246 (internal_verror): New function.
6247
6248 2014-08-07 Gary Benson <gbenson@redhat.com>
6249
6250 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6251 * configure: Regenerate.
6252 * config.in: Likewise.
6253 * server.h: Do not include errno.h.
6254 * event-loop.c: Likewise.
6255 * hostio-errno.c: Likewise.
6256 * linux-low.c: Likewise.
6257 * remote-utils.c: Likewise.
6258 * spu-low.c: Likewise.
6259 * utils.c: Likewise.
6260 * gdbreplay.c: Unconditionally include errno.h.
6261
6262 2014-08-07 Gary Benson <gbenson@redhat.com>
6263
6264 * server.h: Do not include string.h.
6265 * event-loop.c: Likewise.
6266 * linux-low.c: Likewise.
6267 * regcache.c: Likewise.
6268 * remote-utils.c: Likewise.
6269 * spu-low.c: Likewise.
6270 * utils.c: Likewise.
6271
6272 2014-08-07 Gary Benson <gbenson@redhat.com>
6273
6274 * server.h: Do not include gdb_assert.h.
6275
6276 2014-08-07 Gary Benson <gbenson@redhat.com>
6277
6278 * server.h: Do not include common-utils.h.
6279
6280 2014-08-07 Gary Benson <gbenson@redhat.com>
6281
6282 * server.h: Do not include ptid.h.
6283 * notif.h: Likewise.
6284
6285 2014-08-07 Gary Benson <gbenson@redhat.com>
6286
6287 * server.h: Do not include gdb_locale.h.
6288
6289 2014-08-07 Gary Benson <gbenson@redhat.com>
6290
6291 * server.h: Do not include gdb/signals.h.
6292 * win32-low.c: Likewise.
6293
6294 2014-08-07 Gary Benson <gbenson@redhat.com>
6295
6296 * server.h: Do not include pathmax.h.
6297
6298 2014-08-07 Gary Benson <gbenson@redhat.com>
6299
6300 * server.h: Do not include libiberty.h.
6301 * linux-bfin-low.c: Likewise.
6302
6303 2014-08-07 Gary Benson <gbenson@redhat.com>
6304
6305 * server.h: Do not include ansidecl.h.
6306
6307 2014-08-07 Gary Benson <gbenson@redhat.com>
6308
6309 * linux-x86-low.c: Do not include stddef.h.
6310 * lynx-ppc-low.c: Likewise.
6311 * tracepoint.c: Likewise.
6312
6313 2014-08-07 Gary Benson <gbenson@redhat.com>
6314
6315 * server.h: Do not include stdarg.h.
6316 * nto-low.c: Likewise.
6317
6318 2014-08-07 Gary Benson <gbenson@redhat.com>
6319
6320 * server.h: Do not include stdlib.h.
6321 * inferiors.c: Likewise.
6322 * linux-low.c: Likewise.
6323 * regcache.c: Likewise.
6324 * spu-low.c: Likewise.
6325 * tracepoint.c: Likewise.
6326 * utils.c: Likewise.
6327
6328 2014-08-07 Gary Benson <gbenson@redhat.com>
6329
6330 * server.h: Do not include stdio.h.
6331 * linux-low.c: Likewise.
6332 * remote-utils.c: Likewise.
6333 * spu-low.c: Likewise.
6334 * utils.c: Likewise.
6335 * wincecompat.c: Likewise.
6336
6337 2014-08-06 Gary Benson <gbenson@redhat.com>
6338
6339 * regcache.c (init_register_cache): Move conditionals inside if.
6340
6341 2014-08-06 Gary Benson <gbenson@redhat.com>
6342
6343 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6344
6345 2014-07-31 Gary Benson <gbenson@redhat.com>
6346
6347 * ax.h: Do not include server.h.
6348 * gdbthread.h: Likewise.
6349 * lynx-low.h: Likewise.
6350 * notif.h: Likewise.
6351
6352 2014-07-30 Gary Benson <gbenson@redhat.com>
6353
6354 * server.h: Include common-defs.h.
6355 Do not include config.h or build-gnulib-gdbserver/config.h.
6356
6357 2014-07-30 Gary Benson <gbenson@redhat.com>
6358
6359 * hostio-errno.c: Move server.h to top of includes list.
6360 * inferiors.c: Likewise.
6361 * linux-x86-low.c: Likewise.
6362 * notif.c: Include server.h.
6363
6364 2014-07-24 Tom Tromey <tromey@redhat.com>
6365 Gary Benson <gbenson@redhat.com>
6366
6367 * server.h (CORE_ADDR): Now unsigned.
6368
6369 2014-07-16 Pedro Alves <palves@redhat.com>
6370
6371 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6372
6373 2014-07-15 Pedro Alves <palves@redhat.com>
6374
6375 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6376 copy.
6377
6378 2014-07-11 Pedro Alves <palves@redhat.com>
6379
6380 * linux-low.c (kill_wait_lwp): New function, based on
6381 kill_one_lwp_callback, but use my_waitpid directly.
6382 (kill_one_lwp_callback, linux_kill): Use it.
6383
6384 2014-06-23 Pedro Alves <palves@redhat.com>
6385
6386 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6387 before setting DR0..DR3.
6388
6389 2014-06-20 Gary Benson <gbenson@redhat.com>
6390
6391 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6392 * configure: Regenerated.
6393 * config.in: Likewise.
6394
6395 2014-06-20 Gary Benson <gbenson@redhat.com>
6396
6397 * Makefile.in (SFILES): Update locations for files moved
6398 from common to nat.
6399 (object file files): Reordered.
6400
6401 2014-06-20 Gary Benson <gbenson@redhat.com>
6402
6403 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6404 (i386_dr_low_set_addr): Likewise.
6405 (i386_dr_low_get_addr): Likewise.
6406 (i386_dr_low_can_set_control): Likewise.
6407 (i386_dr_low_set_control): Likewise.
6408 (i386_dr_low_get_control): Likewise.
6409 (i386_dr_low_get_status): Likewise.
6410 (i386_get_debug_register_length): Likewise.
6411 * linux-x86-low.c (i386_dr_low_set_addr):
6412 Changed signature. Made static.
6413 (i386_dr_low_get_addr): Likewise.
6414 (i386_dr_low_set_control): Likewise.
6415 (i386_dr_low_get_control): Likewise.
6416 (i386_dr_low_get_status): Likewise.
6417 (i386_dr_low): New global variable.
6418 * win32-i386-low.c (i386_dr_low_set_addr):
6419 Changed signature. Made static.
6420 (i386_dr_low_get_addr): Likewise.
6421 (i386_dr_low_set_control): Likewise.
6422 (i386_dr_low_get_control): Likewise.
6423 (i386_dr_low_get_status): Likewise.
6424 (i386_dr_low): New global variable.
6425
6426 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6427
6428 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6429 * Makefile.in (AR, AR_FLAGS): Define.
6430 * configure: Regenerate.
6431
6432 2014-06-19 Gary Benson <gbenson@redhat.com>
6433
6434 * Makefile.in (i386-dregs.o): New rule.
6435 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6436 * i386-low.c (target.h): Remove include.
6437 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6438 (DR_CONTROL_SHIFT): Likewise.
6439 (DR_CONTROL_SIZE): Likewise.
6440 (DR_RW_EXECUTE): Likewise.
6441 (DR_RW_WRITE): Likewise.
6442 (DR_RW_READ): Likewise.
6443 (DR_RW_IORW): Likewise.
6444 (DR_LEN_1): Likewise.
6445 (DR_LEN_2): Likewise.
6446 (DR_LEN_4): Likewise.
6447 (DR_LEN_8): Likewise.
6448 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6449 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6450 (DR_ENABLE_SIZE): Likewise.
6451 (DR_LOCAL_SLOWDOWN): Likewise.
6452 (DR_GLOBAL_SLOWDOWN): Likewise.
6453 (DR_CONTROL_RESERVED): Likewise.
6454 (I386_DR_CONTROL_MASK): Likewise.
6455 (I386_DR_VACANT): Likewise.
6456 (I386_DR_LOCAL_ENABLE): Likewise.
6457 (I386_DR_GLOBAL_ENABLE): Likewise.
6458 (I386_DR_DISABLE): Likewise.
6459 (I386_DR_SET_RW_LEN): Likewise.
6460 (I386_DR_GET_RW_LEN): Likewise.
6461 (I386_DR_WATCH_HIT): Likewise.
6462 (i386_wp_op_t): Likewise.
6463 (i386_show_dr): Likewise.
6464 (i386_length_and_rw_bits): Likewise.
6465 (i386_insert_aligned_watchpoint): Likewise.
6466 (i386_remove_aligned_watchpoint): Likewise.
6467 (i386_handle_nonaligned_watchpoint): Likewise.
6468 i386_update_inferior_debug_regs(): Likewise.
6469 (i386_dr_insert_watchpoint): Likewise.
6470 (i386_dr_remove_watchpoint): Likewise.
6471 (i386_dr_region_ok_for_watchpoint): Likewise.
6472 (i386_dr_stopped_data_address): Likewise.
6473 (i386_dr_stopped_by_watchpoint): Likewise.
6474
6475 2014-06-19 Gary Benson <gbenson@redhat.com>
6476
6477 * i386-low.c (i386_dr_show): Renamed to
6478 i386_show_dr and made static. All uses updated.
6479 (i386_dr_length_and_rw_bits): Renamed to
6480 i386_length_and_rw_bits and made static.
6481 All uses updated.
6482 (i386_dr_insert_aligned_watchpoint): Renamed to
6483 i386_insert_aligned_watchpoint and made static.
6484 All uses updated.
6485 (i386_dr_remove_aligned_watchpoint): Renamed to
6486 i386_remove_aligned_watchpoint and made static.
6487 All uses updated.
6488 (i386_dr_update_inferior_debug_regs): Renamed to
6489 i386_update_inferior_debug_regs and made static.
6490 All uses updated.
6491
6492 2014-06-18 Gary Benson <gbenson@redhat.com>
6493
6494 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6495 (i386_dr_low_can_set_control): Likewise.
6496 (i386_get_debug_register_length): Likewise.
6497 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6498 (i386_dr_low_can_set_control): Likewise.
6499 (i386_get_debug_register_length): Likewise.
6500
6501 2014-06-17 Gary Benson <gbenson@redhat.com>
6502
6503 * i386-low.h (i386-dregs.h): New include.
6504 (DR_FIRSTADDR): Now in i386-dregs.h.
6505 (DR_LASTADDR): Likewise.
6506 (DR_NADDR): Likewise.
6507 (DR_STATUS): Likewise.
6508 (DR_CONTROL): Likewise.
6509 (i386_debug_reg_state): Likewise.
6510 (i386_dr_insert_watchpoint): Likewise.
6511 (i386_dr_remove_watchpoint): Likewise.
6512 (i386_dr_region_ok_for_watchpoint): Likewise.
6513 (i386_dr_stopped_data_address): Likewise.
6514 (i386_dr_stopped_by_watchpoint): Likewise.
6515 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6516
6517 2014-06-18 Gary Benson <gbenson@redhat.com>
6518
6519 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6520 i386_dr_insert_watchpoint.
6521 (i386_low_remove_watchpoint): Renamed to
6522 i386_dr_remove_watchpoint.
6523 (i386_low_region_ok_for_watchpoint): Renamed to
6524 i386_dr_region_ok_for_watchpoint.
6525 (i386_low_stopped_data_address): Renamed to
6526 i386_dr_stopped_data_address.
6527 (i386_low_stopped_by_watchpoint): Renamed to
6528 i386_dr_stopped_by_watchpoint.
6529 * i386-low.c (i386_show_dr): Renamed to
6530 i386_dr_show and made nonstatic. All uses updated.
6531 (i386_length_and_rw_bits): Renamed to
6532 i386_dr_length_and_rw_bits and made nonstatic.
6533 All uses updated.
6534 (i386_insert_aligned_watchpoint): Renamed to
6535 i386_dr_insert_aligned_watchpoint and made nonstatic.
6536 All uses updated.
6537 (i386_remove_aligned_watchpoint): Renamed to
6538 i386_dr_remove_aligned_watchpoint and made nonstatic.
6539 All uses updated.
6540 (i386_update_inferior_debug_regs): Renamed to
6541 i386_dr_update_inferior_debug_regs and made nonstatic.
6542 All uses updated.
6543 (i386_low_insert_watchpoint): Renamed to
6544 i386_dr_insert_watchpoint. All uses updated.
6545 (i386_low_remove_watchpoint): Renamed to
6546 i386_dr_remove_watchpoint. All uses updated.
6547 (i386_low_region_ok_for_watchpoint): Renamed to
6548 i386_dr_region_ok_for_watchpoint. All uses updated.
6549 (i386_low_stopped_data_address): Renamed to
6550 i386_dr_stopped_data_address. All uses updated.
6551 (i386_low_stopped_by_watchpoint): Renamed to
6552 i386_dr_stopped_by_watchpoint. All uses updated.
6553
6554 2014-06-18 Gary Benson <gbenson@redhat.com>
6555
6556 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6557 (i386_dr_low_can_set_control): Likewise.
6558 (i386_insert_aligned_watchpoint): New check.
6559
6560 2014-06-18 Gary Benson <gbenson@redhat.com>
6561
6562 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6563 Renamed to state.
6564
6565 2014-06-18 Gary Benson <gbenson@redhat.com>
6566
6567 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6568 instead of fatal and error.
6569 (i386_handle_nonaligned_watchpoint): Likewise.
6570
6571 2014-06-18 Gary Benson <gbenson@redhat.com>
6572
6573 * i386-low.c (i386_get_debug_register_length): New macro.
6574 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6575 (i386_show_dr): Use debug_printf instead of fprintf. Use
6576 phex to format values.
6577
6578 2014-06-18 Gary Benson <gbenson@redhat.com>
6579
6580 * i386-low.h: Comment changes.
6581 * i386-low.c: Likewise.
6582
6583 2014-06-18 Gary Benson <gbenson@redhat.com>
6584
6585 * i386-low.c: Whitespace changes.
6586
6587 2014-06-12 Tom Tromey <tromey@redhat.com>
6588
6589 * utils.c (freeargv): Remove.
6590
6591 2014-06-12 Tom Tromey <tromey@redhat.com>
6592
6593 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6594 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6595 (parse_debug_format_options): Likewise.
6596 (gdbserver_usage): Likewise.
6597 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6598 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6599 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6600 against libiberty.
6601 ($(LIBGNU)): Depend on libiberty.
6602 (all-lib): Recurse into all subdirs.
6603 (install-only): Invoke "install" target in subdirs.
6604 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6605 targets.
6606 * configure: Rebuild.
6607 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6608 for vasprintf, vsnprintf, or gettimeofday.
6609 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6610 srv_tgtobj.
6611
6612 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6613
6614 * development.sh: Delete.
6615 * Makefile.in (config.status): Adjust dependency on development.sh.
6616 * configure.ac: Adjust development.sh source call.
6617 * configure: Regenerate.
6618
6619 2014-06-02 Pedro Alves <palves@redhat.com>
6620
6621 * ax.c (gdb_free_agent_expr): New function.
6622 * ax.h (gdb_free_agent_expr): New declaration.
6623 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6624 list.
6625 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6626 static.
6627 (clear_breakpoint_conditions_and_commands): New function.
6628 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6629 (clear_breakpoint_conditions_and_commands): New declaration.
6630
6631 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6632
6633 * linux-aarch64-low.c (asm/ptrace.h): Include.
6634
6635 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6636
6637 Fix TLS access for -static -pthread.
6638 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6639 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6640 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6641
6642 2014-05-20 Pedro Alves <palves@redhat.com>
6643
6644 * linux-aarch64-low.c (aarch64_insert_point)
6645 (aarch64_remove_point): No longer check whether the type is
6646 supported here. Adjust to new interface.
6647 (the_low_target): Install aarch64_supports_z_point_type as
6648 supports_z_point_type method.
6649 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6650 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6651 instead of a Z packet char. Adjust.
6652 (arm_supports_z_point_type): New function.
6653 (arm_insert_point, arm_remove_point): Adjust to new interface.
6654 (the_low_target): Install arm_supports_z_point_type.
6655 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6656 (cris_insert_point, cris_remove_point): Adjust to new interface.
6657 Don't check whether the type is supported here.
6658 (the_low_target): Install cris_supports_z_point_type.
6659 * linux-low.c (linux_supports_z_point_type): New function.
6660 (linux_insert_point, linux_remove_point): Adjust to new interface.
6661 * linux-low.h (struct linux_target_ops) <insert_point,
6662 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6663 raw_breakpoint pointer parameter.
6664 <supports_z_point_type>: New method.
6665 * linux-mips-low.c (mips_supports_z_point_type): New function.
6666 (mips_insert_point, mips_remove_point): Adjust to new interface.
6667 Use mips_supports_z_point_type.
6668 (the_low_target): Install mips_supports_z_point_type.
6669 * linux-ppc-low.c (the_low_target): Install NULL as
6670 supports_z_point_type method.
6671 * linux-s390-low.c (the_low_target): Install NULL as
6672 supports_z_point_type method.
6673 * linux-sparc-low.c (the_low_target): Install NULL as
6674 supports_z_point_type method.
6675 * linux-x86-low.c (x86_supports_z_point_type): New function.
6676 (x86_insert_point): Adjust to new insert_point interface. Use
6677 insert_memory_breakpoint. Adjust to new
6678 i386_low_insert_watchpoint interface.
6679 (x86_remove_point): Adjust to remove_point interface. Use
6680 remove_memory_breakpoint. Adjust to new
6681 i386_low_remove_watchpoint interface.
6682 (the_low_target): Install x86_supports_z_point_type.
6683 * lynx-low.c (lynx_target_ops): Install NULL as
6684 supports_z_point_type callback.
6685 * nto-low.c (nto_supports_z_point_type): New.
6686 (nto_insert_point, nto_remove_point): Adjust to new interface.
6687 (nto_target_ops): Install nto_supports_z_point_type.
6688 * mem-break.c: Adjust intro comment.
6689 (struct raw_breakpoint) <raw_type, size>: New fields.
6690 <inserted>: Update comment.
6691 <shlib_disabled>: Delete field.
6692 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6693 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6694 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6695 (raw_bkpt_type_to_target_hw_bp_type): New function.
6696 (find_enabled_raw_code_breakpoint_at): New function.
6697 (find_raw_breakpoint_at): New type and size parameters. Use them.
6698 (insert_memory_breakpoint): New function, based off
6699 set_raw_breakpoint_at.
6700 (remove_memory_breakpoint): New function.
6701 (set_raw_breakpoint_at): Reimplement.
6702 (set_breakpoint): New, based on set_breakpoint_at.
6703 (set_breakpoint_at): Reimplement.
6704 (delete_raw_breakpoint): Go through the_target->remove_point
6705 instead of assuming memory breakpoints.
6706 (find_gdb_breakpoint_at): Delete.
6707 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6708 (find_gdb_breakpoint): New function.
6709 (set_gdb_breakpoint_at): Delete.
6710 (z_type_supported): New function.
6711 (set_gdb_breakpoint_1): New function, loosely based off
6712 set_gdb_breakpoint_at.
6713 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6714 (delete_gdb_breakpoint_at): Delete.
6715 (delete_gdb_breakpoint_1): New function, loosely based off
6716 delete_gdb_breakpoint_at.
6717 (delete_gdb_breakpoint): New function.
6718 (clear_gdb_breakpoint_conditions): Rename to ...
6719 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6720 breakpoint.
6721 (add_condition_to_breakpoint): Make static.
6722 (add_breakpoint_condition): Take a struct breakpoint pointer
6723 instead of an address. Adjust.
6724 (gdb_condition_true_at_breakpoint): Rename to ...
6725 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6726 z_type parameter.
6727 (gdb_condition_true_at_breakpoint): Reimplement.
6728 (add_breakpoint_commands): Take a struct breakpoint pointer
6729 instead of an address. Adjust.
6730 (gdb_no_commands_at_breakpoint): Rename to ...
6731 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6732 parameter. Return true if no breakpoint was found. Change debug
6733 output.
6734 (gdb_no_commands_at_breakpoint): Reimplement.
6735 (run_breakpoint_commands): Rename to ...
6736 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6737 and change return type to boolean.
6738 (run_breakpoint_commands): New function.
6739 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6740 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6741 breakpoint. Go through the_target->remove_point instead of
6742 assuming memory breakpoint.
6743 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6744 software and hardware breakpoints.
6745 (reinsert_raw_breakpoint): Go through the_target->insert_point
6746 instead of assuming memory breakpoint.
6747 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6748 software and hardware breakpoints.
6749 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6750 Check both software and hardware breakpoints.
6751 (validate_inserted_breakpoint): Assert the breakpoint is a
6752 software breakpoint. Set the inserted flag to -1 instead of
6753 setting shlib_disabled.
6754 (delete_disabled_breakpoints): Adjust.
6755 (validate_breakpoints): Only validate software breakpoints.
6756 Adjust to inserted flag change.
6757 (check_mem_read, check_mem_write): Skip breakpoint types other
6758 than software breakpoints. Adjust to inserted flag change.
6759 * mem-break.h (enum raw_bkpt_type): New enum.
6760 (raw_breakpoint, struct process_info): Forward declare.
6761 (Z_packet_to_target_hw_bp_type): Delete declaration.
6762 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6763 (set_gdb_breakpoint, delete_gdb_breakpoint)
6764 (clear_breakpoint_conditions): New declarations.
6765 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6766 (breakpoint_inserted_here): Update comment.
6767 (add_breakpoint_condition, add_breakpoint_commands): Replace
6768 address parameter with a breakpoint pointer parameter.
6769 (gdb_breakpoint_here): Update comment.
6770 (delete_gdb_breakpoint_at): Delete.
6771 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6772 * server.c (process_point_options): Take a struct breakpoint
6773 pointer instead of an address. Adjust.
6774 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6775 delete_gdb_breakpoint.
6776 * spu-low.c (spu_target_ops): Install NULL as
6777 supports_z_point_type method.
6778 * target.h: Include mem-break.h.
6779 (struct target_ops) <prepare_to_access_memory>: Update comment.
6780 <supports_z_point_type>: New field.
6781 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6782 instead of a char. Also take a raw breakpoint pointer.
6783 * win32-arm-low.c (the_low_target): Install NULL as
6784 supports_z_point_type.
6785 * win32-i386-low.c (i386_supports_z_point_type): New function.
6786 (i386_insert_point, i386_remove_point): Adjust to new interface.
6787 (the_low_target): Install i386_supports_z_point_type.
6788 * win32-low.c (win32_supports_z_point_type): New function.
6789 (win32_insert_point, win32_remove_point): Adjust to new interface.
6790 (win32_target_ops): Install win32_supports_z_point_type.
6791 * win32-low.h (struct win32_target_ops):
6792 <supports_z_point_type>: New method.
6793 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6794 instead of a char. Also take a raw breakpoint pointer.
6795
6796 2014-05-20 Pedro Alves <palves@redhat.com>
6797
6798 * mem-break.h: Include break-common.h.
6799 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6800 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6801 (Z_packet_to_target_hw_bp_type): New declaration.
6802 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6803 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6804 (Z_PACKET_ACCESS_WP): Delete macros.
6805 (Z_packet_to_hw_type): Delete function.
6806 * i386-low.h: Don't include break-common.h here.
6807 (Z_packet_to_hw_type): Delete declaration.
6808 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6809 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6810 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6811 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6812 * linux-aarch64-low.c: Don't include break-common.h here.
6813 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6814 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6815 (Z_packet_to_target_hw_bp_type): Delete function.
6816 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6817 function.
6818 (mips_insert_point, mips_remove_point): Use
6819 Z_packet_to_target_hw_bp_type.
6820
6821 2014-05-20 Pedro Alves <palves@redhat.com>
6822
6823 * linux-aarch64-low.c: Include break-common.h.
6824 (enum target_point_type): Delete.
6825 (Z_packet_to_point_type): Rename to ...
6826 (Z_packet_to_target_hw_bp_type): ... this, and return a
6827 target_hw_bp_type instead.
6828 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6829 instead of an enum target_point_type.
6830 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6831 breakpoint type.
6832 (aarch64_dr_state_insert_one_point)
6833 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6834 (aarch64_handle_aligned_watchpoint)
6835 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6836 Take an enum target_hw_bp_type instead of an enum
6837 target_point_type.
6838 (aarch64_supports_z_point_type): New function.
6839 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6840 use Z_packet_to_target_hw_bp_type.
6841
6842 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6843
6844 * configure.ac: Only use -Werror by default when DEVELOPMENT
6845 is true.
6846 * configure: Regenerate.
6847
6848 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6849
6850 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6851 * linux-x86-low.c (X86_64_USER_REGS): New.
6852 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6853
6854 2014-04-28 Yao Qi <yao@codesourcery.com>
6855
6856 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6857 name.
6858
6859 2014-04-25 Pedro Alves <palves@redhat.com>
6860
6861 PR server/16255
6862 * linux-low.c (linux_attach_fail_reason_string): New function.
6863 (linux_attach_lwp): Delete.
6864 (linux_attach_lwp_1): Rename to ...
6865 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6866 argument. Remove "initial" parameter. Return int instead of
6867 void. Don't error or warn here.
6868 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6869 failure to attach to the tgid. Call warning when failing to
6870 attach to an lwp.
6871 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6872 argument. Remove "initial" parameter. Return int instead of
6873 void. Don't error or warn here.
6874 (linux_attach_fail_reason_string): New declaration.
6875 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6876 interface change. Use linux_attach_fail_reason_string.
6877
6878 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6879 Walfred Tedeschi <walfred.tedeschi@intel.com>
6880
6881 * Makefile.in: Added rules to handle new files
6882 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6883 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6884 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6885 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6886 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6887 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6888 x32-avx512-linux.o.
6889 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6890 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6891 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6892 i386/x32-avx512.xml.
6893 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6894 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6895 i386/x32-avx512-linux.xml.
6896 * i387-fp.c (num_avx512_k_registers): New constant for number
6897 of K registers.
6898 (num_avx512_zmmh_low_registers): New constant for number of
6899 lower ZMM registers (0-15).
6900 (num_avx512_zmmh_high_registers): New constant for number of
6901 higher ZMM registers (16-31).
6902 (num_avx512_ymmh_registers): New contant for number of higher
6903 YMM registers (ymm16-31 added by avx521 on x86_64).
6904 (num_avx512_xmm_registers): New constant for number of higher
6905 XMM registers (xmm16-31 added by AVX512 on x86_64).
6906 (struct i387_xsave): Add space for AVX512 registers.
6907 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6908 Add code to handle AVX512 registers.
6909 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6910 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6911 prototypei from generated file.
6912 (tdesc_amd64_avx512_linux): Likewise.
6913 (init_registers_x32_avx512_linux): Likewise.
6914 (tdesc_x32_avx512_linux): Likewise.
6915 (init_registers_i386_avx512_linux): Likewise.
6916 (tdesc_i386_avx512_linux): Likewise.
6917 (x86_64_regmap): Add AVX512 registers.
6918 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6919 mask.
6920 (initialize_low_arch): Add code to initialize AVX512 registers.
6921
6922 2014-04-23 Pedro Alves <palves@redhat.com>
6923
6924 * mem-break.c (find_gdb_breakpoint_at): Make static.
6925 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6926
6927 2014-04-23 Pedro Alves <palves@redhat.com>
6928
6929 * i386-low.c: Don't include break-common.h here.
6930 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6931 prototype to take target_hw_bp_type as argument instead of a Z
6932 packet char.
6933 * i386-low.h: Include break-common.h here.
6934 (Z_packet_to_hw_type): Declare.
6935 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6936 prototypes.
6937 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6938 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6939 (x86_remove_point): Convert the packet number to a
6940 target_hw_bp_type before calling i386_low_remove_watchpoint.
6941 * win32-i386-low.c (i386_insert_point): Convert the packet number
6942 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6943 (i386_remove_point): Convert the packet number to a
6944 target_hw_bp_type before calling i386_low_remove_watchpoint.
6945
6946 2014-04-23 Pedro Alves <palves@redhat.com>
6947
6948 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6949
6950 2014-04-10 Pedro Alves <palves@redhat.com>
6951
6952 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6953 Check if the condition or command is NULL before checking if the
6954 breakpoint is known. On success, return true.
6955 * mem-break.h (add_breakpoint_condition): Document return.
6956 (add_breakpoint_commands): Add describing comment.
6957 * server.c (skip_to_semicolon): New function.
6958 (process_point_options): Use it.
6959
6960 2014-04-09 Pedro Alves <palves@redhat.com>
6961
6962 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6963 to lwpid_of.
6964
6965 2014-02-27 Pedro Alves <palves@redhat.com>
6966
6967 PR 12702
6968 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6969 macros.
6970 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6971 output.
6972 (last_thread_of_process_p): Take a PID argument instead of a
6973 thread pointer.
6974 (linux_wait_for_lwp): Delete.
6975 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6976 functions.
6977 (linux_low_filter_event): New function, party factored out from
6978 linux_wait_for_event.
6979 (linux_wait_for_event): Rename to ...
6980 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6981 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6982 sigsuspend. Check for zombie leaders.
6983 (linux_wait_for_event): Reimplement as wrapper around
6984 linux_wait_for_event_filtered.
6985 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6986 a normal or signal exit is seen, it's the whole process exiting.
6987 (wait_for_sigstop): No longer a for_each_inferior callback.
6988 Rewrite on top of linux_wait_for_event_filtered.
6989 (stop_all_lwps): Call wait_for_sigstop directly.
6990 * server.c (resume, handle_target_event): Handle
6991 TARGET_WAITKIND_NO_RESUMED.
6992
6993 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6994
6995 * win32-low.c (psapi_get_dll_name,
6996 * win32_CreateToolhelp32Snapshot): Delete.
6997 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6998 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6999 Delete.
7000 (handle_load_dll): Add function description.
7001 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7002
7003 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7004
7005 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7006 Add comment.
7007 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7008 base address when calling win32_add_one_solib.
7009 (handle_load_dll): Delete local variable load_addr.
7010 Remove 0x1000 offset applied to DLL base address when calling
7011 win32_add_one_solib.
7012 (handle_unload_dll): Add comment.
7013
7014 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7015
7016 * win32-low.c (win32_add_all_dlls): Renames
7017 win32_ensure_ntdll_loaded. Rewrite function documentation.
7018 Adjust implementation to always load all DLLs.
7019 Add 0x1000 offset to DLL base address when calling
7020 win32_add_one_solib.
7021 (child_initialization_done): New static global.
7022 (do_initial_child_stuff): Set child_initialization_done to
7023 zero during child initialization, and 1 after. Replace call
7024 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7025 Add comment.
7026 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7027 (handle_unload_dll): Add function documentation.
7028 (get_child_debug_event): Ignore load and unload DLL events
7029 during child initialization.
7030
7031 2014-02-20 Doug Evans <dje@google.com>
7032
7033 Remove global all_lwps.
7034 * inferiors.h (ptid_of): Move here from linux-low.h.
7035 (pid_of, lwpid_of): Ditto.
7036 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7037 parameter is a struct thread_info * now.
7038 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7039 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7040 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7041 directly.
7042 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7043 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7044 * linux-arm-low.c (update_registers_callback): Update, "entry"
7045 parameter is a struct thread_info * now.
7046 Fetch lwpid from current_inferior directly.
7047 (arm_insert_point): Pass &all_threads to find_inferior instead of
7048 &all_lwps.
7049 (arm_remove_point): Ditto.
7050 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7051 (arm_prepare_to_resume): Fetch pid from thread.
7052 (arm_read_description): Fetch lwpid from current_inferior directly.
7053 * linux-low.c (all_lwps): Delete.
7054 (delete_lwp): Delete call to remove_inferior.
7055 (handle_extended_wait): Fetch lwpid from thread.
7056 (add_lwp): Don't set lwp->entry.id. Remove call to
7057 add_inferior_to_list.
7058 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7059 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7060 (kill_one_lwp_callback): Ditto.
7061 (linux_kill): Don't dereference NULL pointer.
7062 Fetch ptid,lwpid from thread.
7063 (get_detach_signal): Fetch ptid from thread.
7064 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7065 Simplify call to regcache_invalidate_thread.
7066 (delete_lwp_callback): Update, "entry" parameter is a
7067 struct thread_info * now. Fetch pid from thread.
7068 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7069 (status_pending_p_callback): Update, "entry" parameter is a
7070 struct thread_info * now. Fetch ptid from thread.
7071 (find_lwp_pid): Update, "entry" parameter is a
7072 struct thread_info * now.
7073 (linux_wait_for_lwp): Fetch pid from thread.
7074 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7075 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7076 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7077 (dequeue_one_deferred_signal): Ditto.
7078 (cancel_breakpoint): Fetch ptid from current_inferior.
7079 (linux_wait_for_event): Pass &all_threads to find_inferior,
7080 not &all_lwps. Fetch ptid, lwpid from thread.
7081 (count_events_callback): Update, "entry" parameter is a
7082 struct thread_info * now.
7083 (select_singlestep_lwp_callback): Ditto.
7084 (select_event_lwp_callback): Ditto.
7085 (cancel_breakpoints_callback): Ditto.
7086 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7087 not &all_lwps.
7088 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7089 (unsuspend_one_lwp): Update, "entry" parameter is a
7090 struct thread_info * now.
7091 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7092 not &all_lwps.
7093 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7094 Fetch lwpid from thread, not lwp.
7095 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7096 Pass &all_threads to find_inferior, not &all_lwps.
7097 (send_sigstop): Fetch lwpid from thread, not lwp.
7098 (send_sigstop_callback): Update, "entry" parameter is a
7099 struct thread_info * now.
7100 (suspend_and_send_sigstop_callback): Ditto.
7101 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7102 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7103 struct thread_info * now.
7104 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7105 from thread, lwp.
7106 (lwp_running): Update, "entry" parameter is a
7107 struct thread_info * now.
7108 (stop_all_lwps): Fetch ptid from thread.
7109 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7110 (linux_resume_one_lwp): Fetch lwpid from thread.
7111 (linux_set_resume_request): Update, "entry" parameter is a
7112 struct thread_info * now. Fetch pid, lwpid from thread.
7113 (resume_status_pending_p): Update, "entry" parameter is a
7114 struct thread_info * now.
7115 (need_step_over_p): Ditto. Fetch lwpid from thread.
7116 (start_step_over): Fetch lwpid from thread.
7117 (linux_resume_one_thread): Update, "entry" parameter is a
7118 struct thread_info * now. Fetch lwpid from thread.
7119 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7120 (proceed_one_lwp): Update, "entry" parameter is a
7121 struct thread_info * now. Fetch lwpid from thread.
7122 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7123 struct thread_info * now.
7124 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7125 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7126 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7127 directly.
7128 (regsets_store_inferior_registers): Ditto.
7129 (fetch_register, store_register): Ditto.
7130 (linux_read_memory, linux_write_memory): Ditto.
7131 (linux_request_interrupt): Ditto.
7132 (linux_read_auxv): Ditto.
7133 (linux_xfer_siginfo): Ditto.
7134 (linux_qxfer_spu): Ditto.
7135 (linux_qxfer_libraries_svr4): Ditto.
7136 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7137 moved to inferiors.h.
7138 (get_lwp): Delete.
7139 (get_thread_lwp): Update.
7140 (struct lwp_info): Delete member "entry". Simplify comment for
7141 member "thread".
7142 (all_lwps): Delete.
7143 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7144 current_inferior directly.
7145 (update_watch_registers_callback): Update, "entry" parameter is a
7146 struct thread_info * now. Fetch pid from thread.
7147 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7148 (mips_insert_point): Fetch lwpid from current_inferior.
7149 Pass &all_threads to find_inferior, not &all_lwps.
7150 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7151 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7152 directly.
7153 (mips_stopped_data_address): Ditto.
7154 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7155 directly.
7156 * linux-tile-low.c (tile_arch_setup): Ditto.
7157 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7158 (update_debug_registers_callback): Update, "entry" parameter is a
7159 struct thread_info * now. Fetch pid from thread.
7160 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7161 Pass &all_threads to find_inferior, not &all_lwps.
7162 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7163 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7164 Pass &all_threads to find_inferior, not &all_lwps.
7165 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7166 (i386_dr_low_get_status): Ditto.
7167 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7168 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7169 (x86_linux_read_description): Ditto.
7170 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7171
7172 2014-02-20 Doug Evans <dje@google.com>
7173
7174 * inferiors.c (get_first_inferior): Fix buglet.
7175
7176 2014-02-19 Doug Evans <dje@google.com>
7177
7178 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7179 * inferiors.c (add_thread): Change result type to struct thread_info *.
7180 All callers updated.
7181 (add_lwp): Call add_thread here instead of in callers.
7182 All callers updated.
7183 * linux-low.h (get_lwp_thread): Rewrite.
7184 (struct lwp_info): New member "thread".
7185
7186 2014-02-19 Doug Evans <dje@google.com>
7187
7188 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7189 All callers updated.
7190
7191 2014-02-19 Doug Evans <dje@google.com>
7192
7193 * inferiors.c (add_thread): Fix whitespace.
7194
7195 2014-02-19 Doug Evans <dje@google.com>
7196
7197 * dll.c (clear_dlls): Replace accessing list implemention details
7198 with API function.
7199 * gdbthread.h (get_first_thread): Declare.
7200 * inferiors.c (for_each_inferior_with_data): New function.
7201 (get_first_thread): New function.
7202 (find_thread_ptid): Simplify.
7203 (get_first_inferior): New function.
7204 (clear_list): Delete.
7205 (one_inferior_p): New function.
7206 (clear_inferior_list): New function.
7207 (clear_inferiors): Update.
7208 * inferiors.h (for_each_inferior_with_data): Declare.
7209 (clear_inferior_list): Declare.
7210 (one_inferior_p): Declare.
7211 (get_first_inferior): Declare.
7212 * linux-low.c (linux_wait_for_event): Replace accessing list
7213 implemention details with API function.
7214 * server.c (target_running): Ditto.
7215 (accumulate_file_name_length): New function.
7216 (emit_dll_description): New function.
7217 (handle_qxfer_libraries): Replace accessing list implemention
7218 details with API function.
7219 (handle_qxfer_threads_worker): New function.
7220 (handle_qxfer_threads_proper): Replace accessing list implemention
7221 details with API function.
7222 (handle_query): Ditto.
7223 (visit_actioned_threads_callback_ftype): New typedef.
7224 (visit_actioned_threads_data): New struct.
7225 (visit_actioned_threads): Rewrite to be find_inferior callback.
7226 (resume): Call find_inferior.
7227 (handle_status): Replace accessing list implemention
7228 details with API function.
7229 (process_serial_event): Replace accessing list implemention details
7230 with API function.
7231 * target.c (set_desired_inferior): Replace accessing list implemention
7232 details with API function.
7233 * tracepoint.c (same_process_p): New function.
7234 (gdb_agent_about_to_close): Replace accessing list implemention
7235 details with API function.
7236 * win32-low.c (child_delete_thread): Replace accessing list
7237 implemention details with API function.
7238 (match_dll_by_basename): New function.
7239 (dll_is_loaded_by_basename): New function.
7240 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7241 details call to dll_is_loaded_by_basename.
7242
7243 2014-02-19 Doug Evans <dje@google.com>
7244
7245 * dll.h (struct dll_info): Add comment.
7246 * gdbthread.h (struct thread_info): Add comment.
7247 (current_ptid): Simplify.
7248 * inferiors.c (add_process): Update.
7249 (remove_process): Update.
7250 * inferiors.h (struct process_info): Rename member "head" to "entry".
7251 * linux-low.c (delete_lwp): Update.
7252 (add_lwp): Update.
7253 (last_thread_of_process_p): Update.
7254 (kill_one_lwp_callback, linux_kill): Update.
7255 (status_pending_p_callback): Update.
7256 (wait_for_sigstop): Update. Simplify read of ptid.
7257 (start_step_over): Update.
7258 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7259 (get_lwp_thread): Update.
7260 (struct lwp_info): Rename member "head" to "entry".
7261 * regcache.h (inferior_list_entry): Delete.
7262 * server.c (kill_inferior_callback): Update.
7263 (detach_or_kill_inferior_callback): Update.
7264 (print_started_pid): Update.
7265 (print_attached_pid): Update.
7266 (process_serial_event): Simplify read of ptid.
7267 * thread-db.c (thread_db_create_event): Update.
7268 (thread_db_get_tls_address): Update.
7269 * win32-low.c (current_inferior_ptid): Simplify.
7270
7271 2014-02-19 Tom Tromey <tromey@redhat.com>
7272
7273 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7274 argument.
7275 (target_supports_btrace): Update.
7276
7277 2014-02-14 Yao Qi <yao@codesourcery.com>
7278
7279 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7280 (rsp-low-ipa.o): New target.
7281
7282 2014-02-12 Tom Tromey <tromey@redhat.com>
7283
7284 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7285 convert_ascii_to_int.
7286 * regcache.c (registers_to_string): Likewise.
7287 * remote-utils.c (decode_M_packet): Likewise.
7288 * server.c (process_serial_event): Likewise.
7289
7290 2014-02-12 Tom Tromey <tromey@redhat.com>
7291
7292 * server.c (handle_query, handle_v_run): Use hex2bin, not
7293 unhexify.
7294 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7295
7296 2014-02-12 Tom Tromey <tromey@redhat.com>
7297
7298 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7299 convert_int_to_ascii.
7300 * regcache.c (registers_to_string, collect_register_as_string):
7301 Likewise.
7302 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7303 Likewise.
7304 * server.c (process_serial_event): Likewise.
7305 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7306 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7307
7308 2014-02-12 Tom Tromey <tromey@redhat.com>
7309
7310 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7311 bin2hex, not hexify.
7312 * tracepoint.c (cmd_qtstatus): Likewise.
7313
7314 2014-02-12 Tom Tromey <tromey@redhat.com>
7315
7316 * remote-utils.c (monitor_output): Pass explicit length to
7317 hexify.
7318
7319 2014-02-12 Tom Tromey <tromey@redhat.com>
7320
7321 * tracepoint.c: Include rsp-low.h.
7322 * server.c: Include rsp-low.h.
7323 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7324 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7325 declare.
7326 * remote-utils.c: Include rsp-low.h.
7327 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7328 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7329 (convert_int_to_ascii, convert_ascii_to_int): Move to
7330 common/rsp-low.c.
7331 * regcache.c: Include rsp-low.h.
7332 * ax.c: Include rsp-low.h.
7333 * Makefile.in (SFILES): Add common/rsp-low.c.
7334 (OBS): Add rsp-low.o.
7335 (rsp-low.o): New target.
7336
7337 2014-02-12 Tom Tromey <tromey@redhat.com>
7338
7339 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7340 Include print-utils.h.
7341 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7342 (plongest, thirty_two, phex_nz): Remove.
7343 * Makefile.in (SFILES): Add common/print-utils.c.
7344 (OBS): Add print-utils.o.
7345 (print-utils-ipa.o): New target.
7346 (print-utils.o): New target.
7347 (IPA_OBJS): Add print-utils-ipa.o.
7348
7349 2014-02-06 Tom Tromey <tromey@redhat.com>
7350
7351 * Makefile.in (SFILES): Fix indentation.
7352
7353 2014-02-05 Doug Evans <dje@google.com>
7354
7355 * linux-low.c (linux_wait_for_event): Improve comment.
7356 (linux_wait_1): Keep current_inferior in sync with event_child.
7357
7358 2014-01-22 Doug Evans <dje@google.com>
7359
7360 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7361
7362 2014-01-22 Doug Evans <dje@google.com>
7363
7364 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7365 * configure: Regenerate.
7366 * config.in: Regenerate.
7367 * Makefile.in (SFILES): Add debug.c.
7368 (OBS): Add debug.o.
7369 * debug.c: New file.
7370 * debug.h: New file.
7371 * linux-aarch64-low.c (*): Update all debugging printfs to use
7372 debug_printf instead of fprintf.
7373 * linux-arm-low.c (*): Ditto.
7374 * linux-cris-low.c (*): Ditto.
7375 * linux-crisv32-low.c (*): Ditto.
7376 * linux-m32r-low.c (*): Ditto.
7377 * linux-sparc-low.c (*): Ditto.
7378 * linux-x86.c (*): Ditto.
7379 * linux-low.c (*): Ditto.
7380 (linux_wait_1): Add calls to debug_enter, debug_exit.
7381 (linux_wait): Remove redundant debugging printf.
7382 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7383 (linux_resume, unstop_all_lwps): Ditto.
7384 * mem-break.c (*): Update all debugging printfs to use
7385 debug_printf instead of fprintf.
7386 * remote-utils.c (*): Ditto.
7387 * thread-db.c (*): Ditto.
7388 * server.c #include <ctype.h>, "gdb_vecs.h".
7389 (debug_threads): Moved to debug.c.
7390 (*): Update all debugging printfs to use debug_printf instead of
7391 fprintf.
7392 (start_inferior): Replace call to fflush with call to debug_flush.
7393 (monitor_show_help): Mention set debug-format.
7394 (parse_debug_format_options): New function.
7395 (handle_monitor_command): Handle "monitor set debug-format".
7396 (gdbserver_usage): Mention --debug-format.
7397 (main): Parse --debug-format.
7398 * server.h (debug_threads): Declaration moved to debug.h.
7399 #include "debug.h".
7400 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7401 trace_debug_1 that uses debug_printf.
7402 (tracepoint_look_up_symbols): Update all debugging printfs to use
7403 debug_printf instead of fprintf.
7404
7405 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7406
7407 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7408 sys/ptrace.h.
7409
7410 2014-01-17 Pedro Alves <palves@redhat.com>
7411
7412 PR build/16445
7413 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7414 defined after including gdb_proc_service.h.
7415
7416 2014-01-16 Doug Evans <dje@google.com>
7417
7418 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7419 (match_dll): Use it.
7420
7421 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7422
7423 * target.h (target_ops) <read_btrace>: Change parameters and
7424 return type to allow error reporting.
7425 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7426 trace reading errors on.
7427 * linux-low.c (linux_low_read_btrace): Pass trace reading
7428 errors on.
7429 (linux_low_disable_btrace): New.
7430
7431 2014-01-15 Doug Evans <dje@google.com>
7432
7433 * inferiors.c (thread_id_to_gdb_id): Delete.
7434 * inferiors.h (thread_id_to_gdb_id): Delete.
7435
7436 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7437
7438 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7439 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7440 versions.
7441
7442 2014-01-08 Pedro Alves <palves@redhat.com>
7443
7444 * server.c (handle_status): Don't discard previous queued stop
7445 replies or thread's pending status here.
7446 (main) <disconnection>: Do it here instead.
7447
7448 2014-01-08 Pedro Alves <palves@redhat.com>
7449
7450 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7451 * server.c (visit_actioned_threads, handle_pending_status): New
7452 function.
7453 (handle_v_cont): Factor out parts to ...
7454 (resume): ... this new function. If in all-stop, and a thread
7455 being resumed has a pending status, report it without actually
7456 resuming.
7457 (myresume): Adjust to use the new 'resume' function.
7458 (clear_pending_status_callback, set_pending_status_callback)
7459 (find_status_pending_thread_callback): New functions.
7460 (handle_status): Handle the case of multiple threads having
7461 interesting statuses to report. Report threads' real last signal
7462 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7463 with an interesting thread to report the status for, instead of
7464 always reporting the status of the first thread.
7465
7466 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7467
7468 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7469 * gdbreplay.c (gdbreplay_version): Likewise.
7470
7471 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7472
7473 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7474 iov.iov_len with the real length in use.
7475
7476 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7477
7478 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7479 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7480 for all targets that use win32-low.c.
7481 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7482 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7483
7484 2013-12-13 Pedro Alves <palves@redhat.com>
7485
7486 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7487 if equal to TARGET_WAITKIND_LOADED.
7488 * win32-low.c (cached_status): New static global.
7489 (win32_wait): Add declaration.
7490 (do_initial_child_stuff): Flush all initial pending debug events
7491 up to the initial breakpoint.
7492 (win32_wait): If CACHED_STATUS was set, return that instead
7493 of doing a real wait. Remove the code resuming the execution
7494 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7495 during the initial phase. Also remove the code changing
7496 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7497 TARGET_WAITKIND_STOPPED.
7498
7499 2013-12-11 Yao Qi <yao@codesourcery.com>
7500
7501 * notif.c (handle_notif_ack): Return 0 if no notification
7502 matches.
7503
7504 2013-11-20 Doug Evans <dje@google.com>
7505
7506 * linux-low.c (linux_set_resume_request): Fix comment.
7507
7508 2013-11-20 Doug Evans <dje@google.com>
7509
7510 * linux-low.c (resume_status_pending_p): Tweak comment.
7511
7512 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7513
7514 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7515 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7516 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7517 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7518 (srv_amd64_regobj): Add amd64-mpx.o.
7519 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7520 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7521 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7522 * i387-fp.c (num_pl_bnd_register) Added constant.
7523 (num_pl_bnd_cfg_registers) Added constant.
7524 (struct i387_xsave) Added reserved area and MPX fields.
7525 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7526 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7527 function.
7528 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7529 (init_registers_amd64_mpx_linux): Declare new function.
7530 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7531 (x86_64_regmap): Add MPX registers.
7532 (x86_linux_read_description): Add MPX case.
7533 (initialize_low_arch): Initialize MPX targets.
7534
7535 2013-11-18 Tom Tromey <tromey@redhat.com>
7536
7537 * configure: Rebuild.
7538 * configure.ac: Don't check for stdlib.h.
7539 * gdbreplay.c: Unconditionally include stdlib.h.
7540
7541 2013-11-18 Tom Tromey <tromey@redhat.com>
7542
7543 * config.in: Rebuild.
7544 * configure: Rebuild.
7545 * configure.ac: Don't use AC_HEADER_DIRENT.
7546
7547 2013-11-18 Tom Tromey <tromey@redhat.com>
7548
7549 * server.h: Don't check HAVE_STRING_H.
7550 * gdbreplay.c: Don't check HAVE_STRING_H.
7551 * configure: Rebuild.
7552
7553 2013-11-18 Tom Tromey <tromey@redhat.com>
7554
7555 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7556 LIBGNU.
7557
7558 2013-11-08 Tom Tromey <tromey@redhat.com>
7559
7560 * configure, config.in: Rebuild.
7561 * configure.ac: Remove unused configury.
7562
7563 2013-11-08 Tom Tromey <tromey@redhat.com>
7564
7565 * acinclude.m4: Include common.m4, codeset.m4.
7566 * configure, config.in: Rebuild.
7567 * configure.ac: Use GDB_AC_COMMON.
7568
7569 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7570
7571 * linux-s390-low.c (HWCAP_S390_TE): New define.
7572 (s390_arch_setup): Consider the TE field in the HWCAP for
7573 determining 'have_regset_tdb'.
7574
7575 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7576
7577 PR gdb/16014
7578 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7579 call to sizeof.
7580
7581 2013-10-02 Pedro Alves <palves@redhat.com>
7582
7583 * server.c (process_serial_event): Don't output "GDBserver
7584 exiting" if GDB is connected through stdio.
7585 * target.c (mywait): Likewise, be silent if GDB is connected
7586 through stdio.
7587
7588 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7589
7590 * lynx-low.c (lynx_add_threads_after_attach): New function.
7591 (lynx_attach): Remove call to add_thread. Add call to
7592 lynx_add_threads_after_attach instead.
7593
7594 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7595
7596 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7597 * config.in, configure: Regenerated.
7598
7599 2013-09-18 Yao Qi <yao@codesourcery.com>
7600
7601 PR server/15959
7602 * server.c (start_inferior): Clear 'resume_info'.
7603
7604 2013-09-16 Jiong Wang <jiwang@tilera.com>
7605
7606 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7607 for each register.
7608
7609 2013-09-16 Jiong Wang <jiwang@tilera.com>
7610
7611 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7612 linux-tile-low.o to srv_tgtobj.
7613
7614 2013-09-16 Will Newton <will.newton@linaro.org>
7615
7616 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7617 out regs.
7618
7619 2013-09-06 Pedro Alves <palves@redhat.com>
7620
7621 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7622 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7623 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7624 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7625 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7626 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7627
7628 2013-09-06 Pedro Alves <palves@redhat.com>
7629
7630 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7631 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7632
7633 2013-09-06 Pedro Alves <palves@redhat.com>
7634
7635 * linux-amd64-ipa.c: Include tracepoint.h.
7636 * linux-i386-ipa.c: Include tracepoint.h.
7637
7638 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7639
7640 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7641 (ps_get_thread_area): New function.
7642
7643 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7644
7645 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7646 (initialize_low_arch): Call init_registers_crisv32 rather than
7647 init_register_crisv32.
7648
7649 2013-09-05 Pedro Alves <palves@redhat.com>
7650
7651 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7652 to ...
7653 * hostio.h: ... this new file.
7654 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7655 win32-low.c: Include hostio.h.
7656
7657 2013-09-05 Pedro Alves <palves@redhat.com>
7658
7659 * server.h (gdb_client_data, handler_func, callback_handler_func)
7660 (delete_file_handler, add_file_handler, append_callback_event)
7661 (delete_callback_event, start_event_loop, initialize_event_loop):
7662 Move to event-loop.h and include it.
7663 * event-loop.h: New file.
7664
7665 2013-09-05 Pedro Alves <palves@redhat.com>
7666
7667 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7668 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7669 (loaded_dll, unloaded_dll): Move to ...
7670 * dll.h: ... this new file.
7671 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7672
7673 2013-09-05 Pedro Alves <palves@redhat.com>
7674
7675 * server.h (current_process, get_thread_process, all_processes)
7676 (add_inferior_to_list, for_each_inferior, current_inferior)
7677 (remove_inferior, add_process, remove_process, find_process_pid)
7678 (have_started_inferiors_p, have_attached_inferiors_p)
7679 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7680 (clear_inferiors, find_inferior, find_inferior_id)
7681 (inferior_target_data, set_inferior_target_data)
7682 (inferior_regcache_data, set_inferior_regcache_data): Move to
7683 inferiors.h, and include it.
7684 * inferiors.h: New file.
7685
7686 2013-09-05 Pedro Alves <palves@redhat.com>
7687
7688 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7689 Move ...
7690 * ax.h: ... here.
7691
7692 2013-09-05 Pedro Alves <palves@redhat.com>
7693
7694 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7695 tracepoint.h.
7696 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7697 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7698 (handle_tracepoint_general_set, handle_tracepoint_query)
7699 (tracepoint_finished_step, tracepoint_was_hit)
7700 (release_while_stepping_state_list, current_traceframe)
7701 (in_readonly_region, traceframe_read_mem)
7702 (fetch_traceframe_registers, traceframe_read_sdata)
7703 (traceframe_read_info, struct fast_tpoint_collect_status)
7704 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7705 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7706 (supply_fast_tracepoint_registers)
7707 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7708 (ipa_tdesc, claim_trampoline_space)
7709 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7710 (agent_mem_read, agent_get_trace_state_variable_value)
7711 (agent_set_trace_state_variable_value, agent_tsv_read)
7712 (agent_mem_read_string, get_raw_reg_func_addr)
7713 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7714 * tracepoint.h: ... this new file.
7715
7716 2013-09-05 Pedro Alves <palves@redhat.com>
7717
7718 * server.h (perror_with_name, error, fatal, warning, paddress)
7719 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7720 include it.
7721 * utils.h: New file.
7722
7723 2013-09-05 Pedro Alves <palves@redhat.com>
7724
7725 * server.h (remote_debug, noack_mode, transport_is_reliable)
7726 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7727 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7728 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7729 (write_enn, initialize_async_io, enable_async_io)
7730 (disable_async_io, check_remote_input_interrupt_request)
7731 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7732 (dead_thread_notify, prepare_resume_reply)
7733 (decode_address_to_semicolon, decode_address, decode_m_packet)
7734 (decode_M_packet, decode_X_packet, decode_xfer_write)
7735 (decode_search_memory_packet, unhexify, hexify)
7736 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7737 (look_up_one_symbol, relocate_instruction)
7738 (monitor_output): Move to remote-utils.h, and include it.
7739 * remote-utils.h: New file.
7740
7741 2013-09-05 Pedro Alves <palves@redhat.com>
7742
7743 * server.h (_): Delete.
7744
7745 2013-09-02 Pedro Alves <palves@redhat.com>
7746
7747 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7748 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7749 allocated.
7750 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7751
7752 2013-09-02 Pierre Muller <muller@sourceware.org>
7753
7754 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7755 or WriteProcessMemory complete successfully and handle
7756 ERROR_PARTIAL_COPY error.
7757
7758 2013-09-02 Pedro Alves <palves@redhat.com>
7759
7760 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7761 error instead of EIO.
7762
7763 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7764
7765 PR server/15604
7766 * linux-low.c: Include filestuff.h.
7767 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7768 * lynx-low.c: Include filestuff.h.
7769 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7770 * server.c: Include filestuff.h.
7771 (main): Call notice_open_fds.
7772 * spu-low.c: Include filestuff.h.
7773 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7774
7775 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7776
7777 * Makefile.in: Explain why ../target and ../nat are not
7778 listed as include file search paths.
7779 (linux-waitpid.o): New object file rule.
7780 * configure.srv (srv_native_linux_obj): New variable.
7781 Replace all occurrences of linux native object files with
7782 $srv_native_linux_obj.
7783 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7784 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7785 (linux_enable_event_reporting): Remove declaration.
7786 (my_waitpid): Moved to common/linux-waitpid.c.
7787 (linux_wait_for_event): Pass ptid when calling
7788 linux_enable_event_reporting.
7789 (linux_supports_tracefork_flag): Remove.
7790 (linux_enable_event_reporting): Likewise.
7791 (linux_tracefork_grandchild): Remove.
7792 (STACK_SIZE): Moved to common/linux-ptrace.c.
7793 (linux_tracefork_child): Remove.
7794 (linux_test_for_tracefork): Remove.
7795 (linux_look_up_symbols): Call linux_supports_traceclone.
7796 (initialize_low): Remove call to linux_test_for_tracefork.
7797 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7798 common/linux-ptrace.h.
7799 (PTRACE_TYPE_ARG4): Likewise.
7800 Include linux-ptrace.h.
7801
7802 2013-08-21 Pedro Alves <palves@redhat.com>
7803
7804 * config.in: Renegerate.
7805
7806 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7807
7808 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7809 (SFILES): Remove $(srcdir)/common/target-common.c and
7810 add $(srcdir)/target/waitstatus.c.
7811 (OBS): Remove target-common.o and add waitstatus.o.
7812 (server_h): Remove $(srcdir)/../common/target-common.h and
7813 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7814 and $(srcdir)/../target/waitstatus.h.
7815 (target-common.o): Remove.
7816 (waitstatus.o): New target object file.
7817 * target.h: Do not include target-common.h and
7818 include target/resume.h, target/wait.h and
7819 target/waitstatus.h.
7820
7821 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7822
7823 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7824 to PTRACE_TYPE_ARG3.
7825 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7826 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7827 PTRACE_TYPE_ARG4.
7828 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7829 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7830
7831 2013-07-27 Jie Zhang <jie@codesourcery.com>
7832 Daniel Jacobowitz <dan@codesourcery.com>
7833 Yao Qi <yao@codesourcery.com>
7834
7835 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7836 (mips-linux-watch.o): New rule.
7837 (mips_linux_watch_h): New variable.
7838 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7839 srv_tgtobj.
7840 * linux-mips-low.c: Include mips-linux-watch.h.
7841 (struct arch_process_info, struct arch_lwp_info): New.
7842 (update_watch_registers_callback): New function.
7843 (mips_linux_new_process, mips_linux_new_thread) New functions.
7844 (mips_linux_prepare_to_resume, mips_insert_point): New
7845 functions.
7846 (mips_remove_point, mips_stopped_by_watchpoint): New
7847 functions.
7848 (rsp_bp_type_to_target_hw_bp_type): New function.
7849 (mips_stopped_data_address): New function.
7850 (the_low_target): Add watchpoint support functions.
7851
7852 2013-07-27 Yao Qi <yao@codesourcery.com>
7853
7854 * i386-low.c: Include break-common.h.
7855 (enum target_hw_bp_type): Remove.
7856
7857 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7858
7859 * Makefile.in (SFILES): /common/target-common.c.
7860 (OBS): Add target-common.o.
7861 (server_h): Add $(srcdir)/../common/target-common.h.
7862 (target-common.o): New target.
7863 * server.c (queue_stop_reply_callback): Free
7864 status string after use.
7865 * target.c (target_waitstatus_to_string): Remove.
7866 * target.h: Include target-common.h.
7867 (resume_kind): Likewise.
7868 (target_waitkind): Likewise.
7869 (target_waitstatus): Likewise.
7870 (TARGET_WNOHANG): Likewise.
7871
7872 2013-07-04 Yao Qi <yao@codesourcery.com>
7873
7874 * Makefile.in (host_alias): Use @host_noncanonical@.
7875 (target_alias): Use @target_noncanonical@.
7876 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7877 ACX_NONCANONICAL_HOST.
7878 * configure: Regenerated.
7879
7880 Revert:
7881 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7882
7883 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7884 * configure: Rebuild.
7885 * Makefile.in (version_host, version_target): Get from configure.
7886 (version.c): Use $(version_host) and $(version_target).
7887
7888 2013-07-03 Pedro Alves <palves@redhat.com>
7889
7890 * Makefile.in (config.status): Depend on development.sh.
7891 * acinclude.m4: Include libmcheck.m4.
7892 * configure: Regenerate.
7893
7894 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7895
7896 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7897 attribute inside the parentheses.
7898 (winapi_DebugSetProcessKillOnExit): Ditto.
7899 (winapi_DebugBreakProcess): Ditto.
7900 (winapi_GenerateConsoleCtrlEvent): Ditto.
7901
7902 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7903
7904 * notif.h (notif_event): Add a dummy member to avoid compiler
7905 errors.
7906
7907 2013-07-01 Pedro Alves <palves@redhat.com>
7908
7909 * hostio.c (HOSTIO_PATH_MAX): Define.
7910 (require_filename, handle_open, handle_unlink, handle_readlink):
7911 Use it.
7912
7913 2013-07-01 Pedro Alves <palves@redhat.com>
7914
7915 * server.h: Include "pathmax.h".
7916 * linux-low.c: Don't include sys/param.h.
7917 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7918 MAXPATHLEN.
7919 * win32-low.c: Don't include sys/param.h.
7920 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7921
7922 2013-07-01 Pedro Alves <palves@redhat.com>
7923
7924 * event-loop.c: Don't check HAVE_UNISTD_H before including
7925 <unistd.h>.
7926 * gdbreplay.c: Likewise.
7927 * remote-utils.c: Likewise.
7928 * server.c: Likewise.
7929 * configure.ac: Don't check for unistd.h.
7930 * configure: Regenerate.
7931
7932 2013-06-28 Tom Tromey <tromey@redhat.com>
7933
7934 * Makefile.in (version.c): Use version.in, not
7935 common/version.in.
7936
7937 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7938
7939 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7940 * configure: Rebuild.
7941 * Makefile.in (version_host, version_target): Get from configure.
7942 (version.c): Use $(version_host) and $(version_target).
7943
7944 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7945
7946 Fix trace-status to output user name without trailing colon.
7947 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7948
7949 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7950
7951 Fix trace-status to output proper start-time and stop-time.
7952 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7953 output start time and stop time in hex as gdb expects.
7954
7955 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7956
7957 * tracepoint.c (build_traceframe_info_xml): Output trace state
7958 variables present in the trace buffer.
7959
7960 2013-06-24 Tom Tromey <tromey@redhat.com>
7961
7962 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7963 create-version.sh.
7964 (version.o): Remove.
7965 * gdbreplay.c: Include version.h.
7966 (version, host_name): Don't declare.
7967 * server.h: Include version.h.
7968 (version, host_name): Don't declare.
7969
7970 2013-06-12 Pedro Alves <palves@redhat.com>
7971
7972 * linux-x86-low.c (linux_is_elf64): Delete global.
7973 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7974 with local linux_pid_exe_is_elf_64_file use.
7975
7976 2013-06-11 Pedro Alves <palves@redhat.com>
7977
7978 * linux-low.c (regset_disabled, disable_regset): New functions.
7979 (regsets_fetch_inferior_registers)
7980 (regsets_store_inferior_registers): Use them.
7981 (initialize_regsets_info); Don't allocate the disabled_regsets
7982 array here.
7983 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7984 comment.
7985
7986 2013-06-11 Pedro Alves <palves@redhat.com>
7987
7988 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7989 xmalloc.
7990
7991 2013-06-11 Pedro Alves <palves@redhat.com>
7992
7993 * linux-x86-low.c (initialize_low_arch): Call
7994 init_registers_x32_avx_linux.
7995
7996 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7997
7998 Fix compatibility with Android Bionic.
7999 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8000 it is not empty.
8001
8002 2013-06-07 Pedro Alves <palves@redhat.com>
8003
8004 PR server/14823
8005 * Makefile.in (OBS): Add tdesc.o.
8006 (IPA_OBJS): Add tdesc-ipa.o.
8007 (tdesc-ipa.o): New rule.
8008 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8009 interface.
8010 * linux-low.c (new_inferior): Delete.
8011 (disabled_regsets, num_regsets): Delete.
8012 (linux_add_process): Adjust to set the new per-process
8013 new_inferior flag.
8014 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8015 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8016 was a stop. When calling arch_setup, switch the current inferior
8017 to the thread that got an event.
8018 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8019 (regsets_fetch_inferior_registers)
8020 (regsets_store_inferior_registers): New regsets_info parameter.
8021 Adjust to use it.
8022 (linux_register_in_regsets): New regs_info parameter. Adjust to
8023 use it.
8024 (register_addr, fetch_register, store_register): New usrregs_info
8025 parameter. Adjust to use it.
8026 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8027 parameter regs_info. Adjust to use it.
8028 (linux_fetch_registers): Get the current inferior's regs_info, and
8029 adjust to use it.
8030 (linux_store_registers): Ditto.
8031 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8032 (initialize_low): Don't initialize the target_regsets here. Call
8033 initialize_low_arch.
8034 * linux-low.h (target_regsets): Delete declaration.
8035 (struct regsets_info): New.
8036 (struct usrregs_info): New.
8037 (struct regs_info): New.
8038 (struct process_info_private) <new_inferior>: New field.
8039 (struct linux_target_ops): Delete the num_regs, regmap, and
8040 regset_bitmap fields. New field regs_info.
8041 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8042 * i387-fp.c (num_xmm_registers): Delete.
8043 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8044 calls to new interface.
8045 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8046 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8047 Infer the number of xmm registers from the regcache's target
8048 description.
8049 * i387-fp.h (num_xmm_registers): Delete.
8050 * inferiors.c (add_thread): Don't install the thread's regcache
8051 here.
8052 * proc-service.c (gregset_info): Fetch the current inferior's
8053 regs_info. Adjust to use it.
8054 * regcache.c: Include tdesc.h.
8055 (register_bytes, reg_defs, num_registers)
8056 (gdbserver_expedite_regs): Delete.
8057 (get_thread_regcache): If the thread doesn't have a regcache yet,
8058 create one, instead of aborting gdbserver.
8059 (regcache_invalidate_one): Rename to ...
8060 (regcache_invalidate_thread): ... this.
8061 (regcache_invalidate_one): New.
8062 (regcache_invalidate): Only invalidate registers of the current
8063 process.
8064 (init_register_cache): Add target_desc parameter, and use it.
8065 (new_register_cache): Ditto. Assert the target description has a
8066 non zero registers_size.
8067 (regcache_cpy): Add assertions. Adjust.
8068 (realloc_register_cache, set_register_cache): Delete.
8069 (registers_to_string, registers_from_string): Adjust.
8070 (find_register_by_name, find_regno, find_register_by_number)
8071 (register_cache_size): Add target_desc parameter, and use it.
8072 (free_register_cache_thread, free_register_cache_thread_one)
8073 (regcache_release, register_cache_size): New.
8074 (register_size): Add target_desc parameter, and use it.
8075 (register_data, supply_register, supply_register_zeroed)
8076 (supply_regblock, supply_register_by_name, collect_register)
8077 (collect_register_as_string, collect_register_by_name): Adjust.
8078 * regcache.h (struct target_desc): Forward declare.
8079 (struct regcache) <tdesc>: New field.
8080 (init_register_cache, new_register_cache): Add target_desc
8081 parameter.
8082 (regcache_invalidate_thread): Declare.
8083 (regcache_invalidate_one): Delete declaration.
8084 (regcache_release): Declare.
8085 (find_register_by_number, register_cache_size, register_size)
8086 (find_regno): Add target_desc parameter.
8087 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8088 declarations.
8089 * remote-utils.c: Include tdesc.h.
8090 (outreg, prepare_resume_reply): Adjust.
8091 * server.c: Include tdesc.h.
8092 (gdbserver_xmltarget): Delete declaration.
8093 (get_features_xml, process_serial_event): Adjust.
8094 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8095 declare.
8096 (struct process_info) <tdesc>: New field.
8097 (ipa_tdesc): Declare.
8098 * tdesc.c: New file.
8099 * tdesc.h: New file.
8100 * tracepoint.c: Include tdesc.h.
8101 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8102 (get_context_regcache): Adjust to pass ipa_tdesc down.
8103 (do_action_at_tracepoint): Adjust to get the register cache size
8104 from the context regcache's description.
8105 (traceframe_walk_blocks): Adjust to get the register cache size
8106 from the current trace frame's description.
8107 (traceframe_get_pc): Adjust to get current trace frame's
8108 description and pass it down.
8109 (gdb_collect): Adjust to get the register cache size from the
8110 IPA's description.
8111 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8112 (gdbserver_xmltarget): Delete.
8113 (initialize_low_tracepoint): Set the ipa's target description.
8114 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8115 (initialize_low_tracepoint): Set the ipa's target description.
8116 * linux-x86-low.c: Include tdesc.h.
8117 [__x86_64__] (is_64bit_tdesc): New.
8118 (ps_get_thread_area, x86_get_thread_area): Use it.
8119 (i386_cannot_store_register): Rename to ...
8120 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8121 (i386_cannot_fetch_register): Rename to ...
8122 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8123 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8124 to new interface.
8125 (target_regsets): Rename to ...
8126 (x86_regsets): ... this.
8127 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8128 interface.
8129 (x86_siginfo_fixup): Use is_64bit_tdesc.
8130 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8131 (tdesc_x32_avx_linux, tdesc_x32_linux)
8132 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8133 Declare.
8134 (x86_linux_update_xmltarget): Delete.
8135 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8136 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8137 (AMD64_LINUX_USER64_CS): New.
8138 (x86_linux_read_description): New, based on
8139 x86_linux_update_xmltarget.
8140 (same_process_callback): New.
8141 (x86_arch_setup_process_callback): New.
8142 (x86_linux_update_xmltarget): New.
8143 (x86_regsets_info): New.
8144 (amd64_linux_regs_info): New.
8145 (i386_linux_usrregs_info): New.
8146 (i386_linux_regs_info): New.
8147 (x86_linux_regs_info): New.
8148 (x86_arch_setup): Reimplement.
8149 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8150 (x86_emit_ops): Ditto.
8151 (the_low_target): Adjust. Install x86_linux_regs_info,
8152 x86_cannot_fetch_register, and x86_cannot_store_register.
8153 (initialize_low_arch): New.
8154 * linux-ia64-low.c (tdesc_ia64): Declare.
8155 (ia64_fetch_register): Adjust.
8156 (ia64_usrregs_info, regs_info): New globals.
8157 (ia64_regs_info): New function.
8158 (the_low_target): Adjust.
8159 (initialize_low_arch): New function.
8160 * linux-sparc-low.c (tdesc_sparc64): Declare.
8161 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8162 Adjust.
8163 (sparc_arch_setup): New function.
8164 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8165 (the_low_target): Adjust.
8166 (initialize_low_arch): New function.
8167 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8168 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8169 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8170 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8171 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8172 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8173 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8174 (tdesc_powerpc_isa205_vsx64l): Declare.
8175 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8176 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8177 (ppc_set_pc, ppc_get_hwcap): Adjust.
8178 (ppc_usrregs_info): Forward declare.
8179 (!__powerpc64__) ppc_regmap_adjusted: New global.
8180 (ppc_arch_setup): Adjust to the current process'es target
8181 description.
8182 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8183 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8184 (ppc_store_evrregset): Adjust.
8185 (target_regsets): Rename to ...
8186 (ppc_regsets): ... this, and make static.
8187 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8188 (ppc_regs_info): New function.
8189 (the_low_target): Adjust.
8190 (initialize_low_arch): New function.
8191 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8192 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8193 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8194 (tdesc_s390x_linux64v2): Declare.
8195 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8196 (s390_fill_gregset, s390_store_last_break): Adjust.
8197 (target_regsets): Rename to ...
8198 (s390_regsets): ... this, and make static.
8199 (s390_get_pc, s390_set_pc): Adjust.
8200 (s390_get_hwcap): New target_desc parameter, and use it.
8201 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8202 (s390_arch_setup): Adjust to set the current process'es target
8203 description. Don't adjust the regmap.
8204 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8205 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8206 (regs_info_3264): New globals.
8207 (s390_regs_info): New function.
8208 (the_low_target): Adjust.
8209 (initialize_low_arch): New function.
8210 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8211 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8212 [__mips64] (init_registers_mips_linux)
8213 (init_registers_mips_dsp_linux): Delete defines.
8214 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8215 (have_dsp): New global.
8216 (mips_read_description): New, based on mips_arch_setup.
8217 (mips_arch_setup): Reimplement.
8218 (get_usrregs_info): New function.
8219 (mips_cannot_fetch_register, mips_cannot_store_register)
8220 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8221 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8222 (target_regsets): Rename to ...
8223 (mips_regsets): ... this, and make static.
8224 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8225 (dsp_regs_info, regs_info): New globals.
8226 (mips_regs_info): New function.
8227 (the_low_target): Adjust.
8228 (initialize_low_arch): New function.
8229 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8230 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8231 Declare.
8232 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8233 (arm_read_description): New, with bits factored from
8234 arm_arch_setup.
8235 (arm_arch_setup): Reimplement.
8236 (target_regsets): Rename to ...
8237 (arm_regsets): ... this, and make static.
8238 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8239 (arm_regs_info): New function.
8240 (the_low_target): Adjust.
8241 (initialize_low_arch): New function.
8242 * linux-m68k-low.c (tdesc_m68k): Declare.
8243 (target_regsets): Rename to ...
8244 (m68k_regsets): ... this, and make static.
8245 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8246 (m68k_regs_info): New function.
8247 (m68k_arch_setup): New function.
8248 (the_low_target): Adjust.
8249 (initialize_low_arch): New function.
8250 * linux-sh-low.c (tdesc_sharch): Declare.
8251 (target_regsets): Rename to ...
8252 (sh_regsets): ... this, and make static.
8253 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8254 (sh_regs_info, sh_arch_setup): New functions.
8255 (the_low_target): Adjust.
8256 (initialize_low_arch): New function.
8257 * linux-bfin-low.c (tdesc_bfin): Declare.
8258 (bfin_arch_setup): New function.
8259 (bfin_usrregs_info, regs_info): New globals.
8260 (bfin_regs_info): New function.
8261 (the_low_target): Adjust.
8262 (initialize_low_arch): New function.
8263 * linux-cris-low.c (tdesc_cris): Declare.
8264 (cris_arch_setup): New function.
8265 (cris_usrregs_info, regs_info): New globals.
8266 (cris_regs_info): New function.
8267 (the_low_target): Adjust.
8268 (initialize_low_arch): New function.
8269 * linux-cris-low.c (tdesc_crisv32): Declare.
8270 (cris_arch_setup): New function.
8271 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8272 (cris_regs_info): New function.
8273 (the_low_target): Adjust.
8274 (initialize_low_arch): New function.
8275 * linux-m32r-low.c (tdesc_m32r): Declare.
8276 (m32r_arch_setup): New function.
8277 (m32r_usrregs_info, regs_info): New globals.
8278 (m32r_regs_info): Adjust.
8279 (initialize_low_arch): New function.
8280 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8281 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8282 (tic6x_usrregs_info): Forward declare.
8283 (tic6x_read_description): New function, based on ...
8284 (tic6x_arch_setup): ... this. Reimplement.
8285 (target_regsets): Rename to ...
8286 (tic6x_regsets): ... this, and make static.
8287 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8288 (tic6x_regs_info): New function.
8289 (the_low_target): Adjust.
8290 (initialize_low_arch): New function.
8291 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8292 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8293 (target_regsets): Rename to ...
8294 (xtensa_regsets): ... this, and make static.
8295 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8296 globals.
8297 (xtensa_arch_setup, xtensa_regs_info): New functions.
8298 (the_low_target): Adjust.
8299 (initialize_low_arch): New function.
8300 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8301 (nios2_arch_setup): Set the current process'es tdesc.
8302 (target_regsets): Rename to ...
8303 (nios2_regsets): ... this.
8304 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8305 (nios2_regs_info): New function.
8306 (the_low_target): Adjust.
8307 (initialize_low_arch): New function.
8308 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8309 (aarch64_arch_setup): Set the current process'es tdesc.
8310 (target_regsets): Rename to ...
8311 (aarch64_regsets): ... this.
8312 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8313 (aarch64_regs_info): New function.
8314 (the_low_target): Adjust.
8315 (initialize_low_arch): New function.
8316 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8317 globals.
8318 (target_regsets): Rename to ...
8319 (tile_regsets): ... this.
8320 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8321 (tile_regs_info): New function.
8322 (tile_arch_setup): Set the current process'es tdesc.
8323 (the_low_target): Adjust.
8324 (initialize_low_arch): New function.
8325 * spu-low.c (tdesc_spu): Declare.
8326 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8327 * win32-arm-low.c (tdesc_arm): Declare.
8328 (arm_arch_setup): New function.
8329 (the_low_target): Install arm_arch_setup instead of
8330 init_registers_arm.
8331 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8332 (init_windows_x86): Rename to ...
8333 (i386_arch_setup): ... this. Set `win32_tdesc'.
8334 (the_low_target): Adjust.
8335 * win32-low.c (win32_tdesc): New global.
8336 (child_add_thread): Don't create the thread cache here.
8337 (do_initial_child_stuff): Set the new process'es tdesc.
8338 * win32-low.h (struct target_desc): Forward declare.
8339 (win32_tdesc): Declare.
8340 * lynx-i386-low.c (tdesc_i386): Declare global.
8341 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8342 * lynx-low.c (lynx_tdesc): New global.
8343 (lynx_add_process): Set the new process'es tdesc.
8344 * lynx-low.h (struct target_desc): Forward declare.
8345 (lynx_tdesc): Declare global.
8346 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8347 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8348 * nto-low.c (nto_tdesc): New global.
8349 (do_attach): Set the new process'es tdesc.
8350 * nto-low.h (struct target_desc): Forward declare.
8351 (nto_tdesc): Declare.
8352 * nto-x86-low.c (tdesc_i386): Declare.
8353 (nto_x86_arch_setup): Set `nto_tdesc'.
8354
8355 2013-06-04 Gary Benson <gbenson@redhat.com>
8356
8357 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8358 to qSupported response when appropriate.
8359 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8360 with nonzero-length annex.
8361 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8362 arguments supplied in annex.
8363
8364 2013-05-31 Doug Evans <dje@google.com>
8365
8366 PR server/15594
8367 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8368 64 bits in 64-cross-32 environment.
8369
8370 2013-05-28 Pedro Alves <palves@redhat.com>
8371
8372 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8373 (aarch64-without-fpu.c): Delete rule.
8374 * configure.srv (aarch64*-*-linux*): Remove references to
8375 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8376 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8377 declaration.
8378
8379 2013-05-24 Pedro Alves <palves@redhat.com>
8380
8381 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8382 instead of strchr/decode_address. Error if the range isn't split
8383 with a ','. Don't assume there's be a ':' in the action.
8384
8385 2013-05-23 Yao Qi <yao@codesourcery.com>
8386 Pedro Alves <palves@redhat.com>
8387
8388 * linux-low.c (lwp_in_step_range): New function.
8389 (linux_wait_1): If the thread was range stepping and stopped
8390 outside the stepping range, report the stop to GDB. Otherwise,
8391 continue stepping. Add range stepping debug output.
8392 (linux_set_resume_request): Copy the step range from the resume
8393 request to the lwp.
8394 (linux_supports_range_stepping): New.
8395 (linux_target_ops) <supports_range_stepping>: Set to
8396 linux_supports_range_stepping.
8397 * linux-low.h (struct linux_target_ops)
8398 <supports_range_stepping>: New field.
8399 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8400 * linux-x86-low.c (x86_supports_range_stepping): New.
8401 (the_low_target) <supports_range_stepping>: Set to
8402 x86_supports_range_stepping.
8403 * server.c (handle_v_cont): Handle 'r' action.
8404 (handle_v_requests): Append ";r" if the target supports range
8405 stepping.
8406 * target.h (struct thread_resume) <step_range_start,
8407 step_range_end>: New fields.
8408 (struct target_ops) <supports_range_stepping>:
8409 New field.
8410 (target_supports_range_stepping): New macro.
8411
8412 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8413
8414 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8415 confusion in comment.
8416
8417 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8418
8419 * lynx-low.c (struct process_info_private): New type.
8420 (lynx_add_process): New function.
8421 (lynx_create_inferior, lynx_attach): Replace calls to
8422 add_process by calls to lynx_add_process.
8423 (lynx_resume): If PTID is null, then try using
8424 current_process()->private->last_wait_event_ptid.
8425 Add comments.
8426 (lynx_clear_inferiors): Delete. The contents of that function
8427 has been inlined in lynx_mourn;
8428 (lynx_wait_1): Save the ptid in the process's private data.
8429 (lynx_mourn): Free the process' private data. Replace call
8430 to lynx_clear_inferiors by call to clear_inferiors.
8431
8432 2013-05-17 Yao Qi <yao@codesourcery.com>
8433
8434 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8435 the right place.
8436
8437 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8438
8439 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8440 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8441 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8442 PT_TEXT_END_ADDR guards. Update comments.
8443 (linux_target_op) <read_offsets>: Conditionally define to
8444 linux_read_offsets if the target is UCLIBC and if it defines
8445 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8446
8447 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8448 Andrew Jenner <andrew@codesourcery.com>
8449
8450 * Makefile.in (SFILES): Add linux-nios2-low.c.
8451 (clean): Add action to delete nios2-linux.c.
8452 (nios2-linux.c): New rule.
8453 * configure.srv: Add nios2*-*-linux*.
8454 * linux-nios2-low.c: New.
8455
8456 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8457
8458 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8459
8460 2013-04-25 Hui Zhu <hui@codesourcery.com>
8461
8462 PR gdb/15186
8463 * ax.c (ax_printf): Add fflush.
8464
8465 2013-04-22 Tom Tromey <tromey@redhat.com>
8466
8467 * Makefile.in (SFILES): Add filestuff.c.
8468 (OBS): Add filestuff.o.
8469 (filestuff.o): New target.
8470 * config.in, configure: Rebuild.
8471 * configure.ac: Check for fdwalk, pipe2.
8472
8473 2013-04-17 Pedro Alves <palves@redhat.com>
8474
8475 * configure.ac (USE_THREAD_DB): Delete variable.
8476 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8477 Don't AC_SUBST USE_THREAD_DB.
8478 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8479 * config.in, configure: Regenerate.
8480
8481 2013-04-16 Pedro Alves <palves@redhat.com>
8482
8483 * linux-low.h (struct lwp_info) <thread_known>: Move under
8484 the USE_THREAD_DB #ifdef.
8485
8486 2013-04-16 Pedro Alves <palves@redhat.com>
8487
8488 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8489 (linux-low.o): Delete rule.
8490 * linux-low.h: Always include "gdb_thread_db.h" instead of
8491 conditionally including thread_db.h.
8492 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8493 HAVE_THREAD_DB_H.
8494
8495 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8496
8497 * Makefile.in (install-only): Fix make install regression.
8498
8499 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8500
8501 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8502 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8503 installation.
8504 * gdbserver.1: Remove.
8505
8506 2013-03-22 Pedro Alves <palves@redhat.com>
8507
8508 * linux-low.c (handle_extended_wait): Don't call
8509 linux_enable_event_reporting.
8510
8511 2013-03-15 Tony Theodore <tonyt@logyst.com>
8512
8513 PR build/9098:
8514 * Makefile.in (SHELL): Use @SHELL@.
8515
8516 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8517
8518 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8519 compiler warning.
8520
8521 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8522
8523 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8524 Remove extraneous NULL element.
8525
8526 2013-03-13 Yao Qi <yao@codesourcery.com>
8527
8528 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8529 'V' block in trace frame.
8530
8531 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8532
8533 * target.h (struct target_ops): Add btrace ops.
8534 (target_supports_btrace): New macro.
8535 (target_enable_btrace): New macro.
8536 (target_disable_btrace): New macro.
8537 (target_read_btrace): New macro.
8538 * gdbthread.h (struct thread_info): Add btrace field.
8539 * server.c: Include btrace-common.h.
8540 (handle_btrace_general_set): New function.
8541 (handle_btrace_enable): New function.
8542 (handle_btrace_disable): New function.
8543 (handle_general_set): Call handle_btrace_general_set.
8544 (handle_qxfer_btrace): New function.
8545 (struct qxfer qxfer_packets[]): Add btrace entry.
8546 * inferiors.c (remove_thread): Disable btrace.
8547 * linux-low: Include linux-btrace.h.
8548 (linux_low_enable_btrace): New function.
8549 (linux_low_read_btrace): New function.
8550 (linux_target_ops): Add btrace ops.
8551 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8552 Add srv_linux_btrace=yes.
8553 (x86_64-*-linux*): Add linux-btrace.o.
8554 Add srv_linux_btrace=yes.
8555 * configure.ac: Define HAVE_LINUX_BTRACE.
8556 * config.in: Regenerated.
8557 * configure: Regenerated.
8558
8559 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8560
8561 * server.c (handle_qxfer): Preserve error message if -3 is
8562 returned.
8563 (qxfer): Document the -3 return value.
8564
8565 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8566
8567 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8568 (linux_btrace_h): New variable.
8569 (linux-btrace.o): New rule.
8570
8571 2013-03-08 Stan Shebs <stan@codesourcery.com>
8572 Hafiz Abid Qadeer <abidh@codesourcery.com>
8573
8574 * tracepoint.c (trace_buffer_size): New global.
8575 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8576 (init_trace_buffer): Change to one-argument function. Allocate
8577 trace buffer memory.
8578 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8579 handle QTBuffer:size packet.
8580 (cmd_bigqtbuffer_size): New function.
8581 (initialize_tracepoint): Call init_trace_buffer with
8582 DEFAULT_TRACE_BUFFER_SIZE.
8583 * server.c (handle_query): Add QTBuffer:size in the
8584 supported packets.
8585
8586 2013-03-07 Yao Qi <yao@codesourcery.com>
8587
8588 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8589 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8590 of -1.
8591 (cmd_qtsp): Adjust condition. Do post increment.
8592 Set cur_action and cur_step_action back to 0.
8593
8594 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8595
8596 PR server/15236
8597 * linux-low.c (linux_write_memory): Return early success if LEN is
8598 zero.
8599
8600 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8601
8602 * configure.srv: Add x86_64-*-cygwin* as target.
8603
8604 2013-02-28 Tom Tromey <tromey@redhat.com>
8605
8606 * configure.ac: Invoke AC_SYS_LARGEFILE.
8607 * configure, config.in: Rebuild.
8608
8609 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8610
8611 * win32-low.c: Throughout, fix format strings and casts of
8612 printf-like functions to avoid type related warnings on all
8613 platforms.
8614 (get_child_debug_event): Print dwDebugEventCode as hex since
8615 that's how it's usually documented.
8616
8617 2013-02-28 Yao Qi <yao@codesourcery.com>
8618
8619 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8620 pulongest.
8621
8622 2013-02-27 Jiong Wang <jiwang@tilera.com>
8623
8624 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8625 (reg-tilegx32.c): New rule.
8626 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8627 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8628 different register info initializer according to elf class.
8629 (init_registers_tilgx32): New function. The tilegx32 register info
8630 initializer.
8631 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8632 (tile_store_gregset): Likewise.
8633
8634 2013-02-27 Yao Qi <yao@codesourcery.com>
8635
8636 * server.c (process_point_options): Print debug message when
8637 debug_threads is true.
8638
8639 2013-02-26 Yao Qi <yao@codesourcery.com>
8640
8641 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8642
8643 2013-02-19 Pedro Alves <palves@redhat.com>
8644 Kai Tietz <ktietz@redhat.com>
8645
8646 PR gdb/15161
8647
8648 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8649 instead of strtoul to extract address from packet.
8650 (process_serial_event) <'z'>: Likewise.
8651
8652 2013-02-18 Yao Qi <yao@codesourcery.com>
8653
8654 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8655
8656 2013-02-14 Pedro Alves <palves@redhat.com>
8657
8658 Plug memory leak.
8659
8660 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8661 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8662
8663 2013-02-14 Pedro Alves <palves@redhat.com>
8664
8665 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8666
8667 2013-02-14 Pedro Alves <palves@redhat.com>
8668
8669 * tracepoint.c (save_string): Delete.
8670 (add_tracepoint_action): Use savestring instead of save_string.
8671
8672 2013-02-12 Pedro Alves <palves@redhat.com>
8673
8674 * linux-xtensa-low.c: Ditto.
8675 * xtensa-xtregs.c: Ditto.
8676
8677 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8678
8679 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8680 thread_db.
8681
8682 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8683
8684 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8685 aarch64_num_wp_regs and aarch64_num_bp_regs to
8686 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8687
8688 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8689
8690 * linux-aarch64-low.c (ps_get_thread_area): Replace
8691 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8692
8693 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8694 Marcus Shawcroft <marcus.shawcroft@arm.com>
8695 Nigel Stephens <nigel.stephens@arm.com>
8696 Yufeng Zhang <yufeng.zhang@arm.com>
8697
8698 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8699 (aarch64.c, aarch64-without-fpu.c): New targets.
8700 * configure.srv (aarch64*-*-linux*): New.
8701 * linux-aarch64-low.c: New file.
8702
8703 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8704
8705 * linux-low.c (handle_extended_wait, linux_create_inferior)
8706 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8707 (dequeue_one_deferred_signal, linux_resume_one_thread)
8708 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8709 (linux_tracefork_grandchild, linux_test_for_tracefork)
8710 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8711 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8712 where the argument is 0.
8713
8714 2013-01-25 Yao Qi <yao@codesourcery.com>
8715
8716 * event-loop.c: Include "queue.h".
8717 (gdb_event_p): New typedef.
8718 (struct gdb_event) <next_event>: Remove.
8719 (event_queue): Change to QUEUE(gdb_event_p).
8720 (async_queue_event): Remove.
8721 (gdb_event_xfree): New.
8722 (initialize_event_loop): New.
8723 (process_event): Use API from QUEUE.
8724 (wait_for_event): Likewise.
8725 * server.c (main): Call initialize_event_loop.
8726 * server.h (initialize_event_loop): Declare.
8727
8728 2013-01-18 Yao Qi <yao@codesourcery.com>
8729
8730 * ax.h (struct eval_agent_expr_context): New.
8731 (gdb_eval_agent_expr): Update declaration.
8732 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8733 TFRAME. Add new argument CTX.
8734 * server.h (struct eval_agent_expr_context): Declare.
8735 (agent_mem_read, agent_tsv_read): Update declaration.
8736 (agent_mem_read_string): Likewise.
8737 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8738 (add_traceframe_block): Add new argument TPOINT.
8739 Increase TPOINT->traceframe_usage.
8740 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8741 eval_tracepoint_agent_expr.
8742 (condition_true_at_tracepoint): Likewise.
8743 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8744 (agent_mem_read_string, agent_tsv_read): Likewise.
8745
8746 2013-01-16 Yao Qi <yao@codesourcery.com>
8747
8748 * linux-low.c (linux_resume_one_lwp): Don't check
8749 'lwp->bp_reinsert != 0'.
8750
8751 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8752 Pedro Alves <palves@redhat.com>
8753
8754 * lynx-low.c (ptrace_request_to_str): Define a temporary
8755 macro and use it to simplify this function's implementation.
8756
8757 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8758
8759 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8760 sets errno.
8761
8762 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8763
8764 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8765
8766 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8767
8768 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8769
8770 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8771
8772 * lynx-low.c (lynx_resume): Use the resume_info parameter
8773 to determine the ptid for the lynx_ptrace call, unless
8774 it is equal to minus_one_ptid, in which case we use the
8775 ptid of the current_inferior.
8776 (lynx_wait_1): After having received a thread create/exit
8777 event, resume the inferior's execution using the signaling
8778 thread's ptid, rather than the old ptid.
8779
8780 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8781
8782 * lynx-low.c (lynx_resume): Delete variable ret.
8783
8784 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8785
8786 * gdbreplay.c (gdbreplay_version): Update copyright year.
8787 * server.c (gdbserver_version): Likewise.
8788
8789 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8790
8791 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8792 new thread.
8793
8794 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8795
8796 * lynx-low.c (ptrace_request_to_str): Add handling for
8797 PTRACE_GETTRACESIG.
8798
8799 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8800
8801 * lynx-low.c (lynx_attach): Delete variable new_process.
8802
8803 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8804
8805 * lynx-low.c (lynx_create_inferior): Delete variable
8806 new_process.
8807
8808 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8809
8810 * lynx-low.c (ptrace_request_to_str): Do not handle
8811 PTRACE_GETTHREADLIST if this macro does not exist.
8812
8813 2012-12-15 Yao Qi <yao@codesourcery.com>
8814
8815 * Makefile.in (OBS): Add notif.o.
8816 * notif.c, notif.h: New.
8817 * server.c: Include "notif.h".
8818 (struct vstop_notif) <next>: Remove.
8819 <base>: New field.
8820 (queue_stop_reply): Update.
8821 (push_event, send_next_stop_reply): Remove.
8822 (discard_queued_stop_replies): Update.
8823 (notif_stop): New variable.
8824 (handle_v_stopped): Remove.
8825 (handle_v_requests): Don't call handle_v_stopped. Call
8826 handle_ack_notif instead.
8827 (queue_stop_reply_callback): Call notif_event_enque instead
8828 of queue_stop_reply.
8829 (handle_status): Don't call send_next_stop_reply, call
8830 notif_write_event instead.
8831 (kill_inferior_callback): Likewise.
8832 (detach_or_kill_inferior_callback): Likewise.
8833 (main): Call initialize_notif.
8834 (process_serial_event): Call QUEUE_is_empty.
8835 (handle_target_event): Call notif_push instead of push event.
8836 * server.h (push_event): Remove declaration.
8837
8838 2012-12-10 Tom Tromey <tromey@redhat.com>
8839
8840 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8841 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8842 macros.
8843 (.c.o): Rewrite.
8844 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8845 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8846 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8847 (amd64-linux-ipa.o, ax.o): Rewrite.
8848 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8849 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8850 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8851 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8852 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8853 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8854 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8855 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8856 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8857 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8858 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8859 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8860 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8861 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8862 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8863 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8864 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8865 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8866 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8867 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8868 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8869 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8870 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8871 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8872 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8873 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8874 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8875 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8876 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8877 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8878 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8879 (reg-tilegx.o): Remove.
8880 (all_object_files): New macro.
8881 Include .deps files.
8882 * aclocal.m4, configure: Rebuild.
8883 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8884 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8885 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8886
8887 2012-12-05 Tom Tromey <tromey@redhat.com>
8888
8889 PR gdb/14917:
8890 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8891
8892 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8893
8894 * configure.ac: Check for linux/perf_event.h.
8895 * config.in: Regenerated.
8896 * configure: Regenerated.
8897
8898 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8899
8900 * hostio.c (handle_readlink): Decrease buffer size
8901 parameter passed to readlink by one byte.
8902
8903 2012-11-26 Yao Qi <yao@codesourcery.com>
8904
8905 * configure.ac (build_warnings): Append '-Wempty-body'.
8906 * configure: Regenerated.
8907 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8908 body.
8909
8910 2012-11-15 Pierre Muller <muller@sourceware.org>
8911
8912 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8913 * config.in: Regenerate.
8914 * configure: Regenerate.
8915 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8916 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8917 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8918 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8919 header.
8920 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8921 instead of <sys/wait.h> header.
8922 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8923
8924 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8925
8926 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8927 (various make rules): Remove -DGDBSERVER
8928
8929 2012-11-09 Yao Qi <yao@codesourcery.com>
8930
8931 * spu-low.c (current_ptid): Move it to ..
8932 * gdbthread.h: ... here. New.
8933 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8934 * server.c (myresume, process_serial_event): Likewise.
8935 * thread-db.c (thread_db_find_new_threads): Likewise.
8936 * tracepoint.c (run_inferior_command): Likewise.
8937
8938 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8939
8940 * server.c (handle_search_memory_1): Include access length in
8941 warning message.
8942
8943 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8944
8945 * linux-crisv32-low.c: Fix compile errors.
8946
8947 2012-09-04 Yao Qi <yao@codesourcery.com>
8948
8949 * tracepoint.c (cmd_qtsv): Adjust debug message.
8950 Don't check CUR_TPOINT.
8951
8952 2012-08-28 Yao Qi <yao@codesourcery.com>
8953
8954 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8955 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8956 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8957 Remove declarations of xmalloc, xreallloc, xstrdup and
8958 freeargv.
8959 * Makefile.in (libiberty_h): New.
8960 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8961 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8962
8963 2012-08-23 Yao Qi <yao@codesourcery.com>
8964
8965 * server.h: Remove declaration of 'xsnprintf'.
8966
8967 2012-08-22 Keith Seitz <keiths@redhat.com>
8968
8969 * server.h: Include build-gnulib-gbserver/config.h.
8970 * gdbreplay.c: Likewise.
8971
8972 2012-08-08 Doug Evans <dje@google.com>
8973
8974 * Makefile.in (SFILES): Add gdb_vecs.c.
8975 (OBS): Add gdb_vecs.o.
8976 (gdb_vecs_h, host_defs_h): New variables.
8977 (thread-db.o): Add $(gdb_vecs_h) dependency.
8978 (gdb_vecs.o): New rule.
8979 * thread-db.c: #include "gdb_vecs.h".
8980 (thread_db_load_search): Use a vector to iterate over path elements.
8981 Handle text appearing after "$pdir".
8982
8983 * configure.ac: Add check for strstr.
8984 * config.in: Regenerate.
8985 * configure: Regenerate.
8986
8987 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8988
8989 * hostio.c (handle_pread): If pread fails, fall back to attempting
8990 lseek/read.
8991 (handle_pwrite): Likewise for pwrite.
8992
8993 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8994
8995 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8996 between unsupported TYPE and unimplementable ADDR/LEN combination.
8997 (arm_insert_point): Act on new return value.
8998
8999 2012-07-31 Pedro Alves <palves@redhat.com>
9000
9001 * server.c (process_point_options): Only skip tokens if we find
9002 one that is unrecognized. Don't treat 'X' specially while
9003 skipping unrecognized tokens.
9004
9005 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9006
9007 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9008 to 4-byte-align HW breakpoint addresses for Thumb.
9009
9010 2012-07-27 Yao Qi <yao@codesourcery.com>
9011
9012 PR remote/14161.
9013
9014 * server.h: Declare gdb_agent_about_to_close.
9015 * target.c (kill_inferior): Include "agent.h".
9016 New. Send command 'kill'.
9017 * target.h (kill_inferior): Removed macro.
9018 * tracepoint.c (gdb_agent_about_to_close): New.
9019 (gdb_agent_helper_thread): Handle command 'close'.
9020 Wait endlessly until the inferior stops.
9021 Install gdb_agent_remove_socket to atexit hook.
9022 (agent_socket_name): New static variable.
9023 (gdb_agent_socket_init): Replace local variable 'name' with
9024 'agent_socket_name'.
9025 (gdb_agent_remove_socket): New.
9026
9027 2012-07-27 Yao Qi <yao@codesourcery.com>
9028
9029 * server.c (process_point_options): Stop at 'X' when parsing.
9030
9031 2012-07-19 Michael Eager <eager@eagercon.com>
9032
9033 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9034 to hw_execute.
9035 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9036 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9037 hardware breakpoint.
9038
9039 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9040
9041 * gdbserver/linux-low.c (initialize_low): Call
9042 linux_ptrace_init_warnings.
9043
9044 2012-07-02 Doug Evans <dje@google.com>
9045
9046 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9047 pointer to int.
9048
9049 2012-07-02 Stan Shebs <stan@codesourcery.com>
9050
9051 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9052 (ax.o): Add it to build rule.
9053 (ax-ipa.o): Ditto.
9054 (OBS): Add format.o.
9055 (IPA_OBS): Add format.o.
9056 * server.c (handle_query): Claim support for breakpoint commands.
9057 (process_point_options): Add command case.
9058 (process_serial_event): Leave running if there are printfs in
9059 effect.
9060 * mem-break.h (any_persistent_commands): Declare.
9061 (add_breakpoint_commands): Declare.
9062 (gdb_no_commands_at_breakpoint): Declare.
9063 (run_breakpoint_commands): Declare.
9064 * mem-break.c (struct point_command_list): New struct.
9065 (struct breakpoint): New field command_list.
9066 (any_persistent_commands): New function.
9067 (add_commands_to_breakpoint): New function.
9068 (add_breakpoint_commands): New function.
9069 (gdb_no_commands_at_breakpoint): New function.
9070 (run_breakpoint_commands): New function.
9071 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9072 locally.
9073 * ax.c: Include format.h.
9074 (ax_printf): New function.
9075 (gdb_eval_agent_expr): Add printf opcode.
9076
9077 2012-06-13 Yao Qi <yao@codesourcery.com>
9078
9079 * server.c (start_inferior): Remove duplicated writes to fields
9080 'last_resume_kind' and 'last_status' of 'current_inferior'.
9081
9082 2012-06-12 Yao Qi <yao@codesourcery.com>
9083 Pedro Alves <palves@redhat.com>
9084
9085 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9086 comment.
9087 * server.c (handle_v_cont): Extend comment.
9088
9089 2012-06-11 Yao Qi <yao@codesourcery.com>
9090
9091 * linux-low.c (linux_attach): Add 'static'.
9092
9093 2012-06-06 Yao Qi <yao@codesourcery.com>
9094
9095 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9096
9097 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9098
9099 Fix gcc -flto compilation warning.
9100 * server.c (main): Make variable multi_mode and attach volatile.
9101
9102 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9103
9104 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9105 if the platform doesn't know about it.
9106
9107 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9108
9109 * Makefile.in (SFILES): Add linux-tile-low.c.
9110 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9111 * configure.srv: Handle tilegx-*-linux*.
9112 * linux-tile-low.c: New file.
9113
9114 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9115
9116 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9117
9118 2012-05-24 Pedro Alves <palves@redhat.com>
9119
9120 PR gdb/7205
9121
9122 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9123
9124 2012-05-24 Pedro Alves <palves@redhat.com>
9125
9126 PR gdb/7205
9127
9128 Replace target_signal with gdb_signal throughout.
9129
9130 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9131
9132 * linux-low.c (linux_store_registers): Avoid the copying sequence
9133 when no data has been retrieved by ptrace.
9134
9135 2012-05-22 Will Deacon <will.deacon@arm.com>
9136
9137 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9138 Include asm/ptrace.h.
9139 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9140 already defined.
9141
9142 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9143
9144 * linux-low.c (linux_store_registers): Don't re-retrieve data
9145 with ptrace that has already been obtained from /proc. Always
9146 copy any data retrieved with ptrace to the buffer supplied.
9147
9148 2012-05-11 Yao Qi <yao@codesourcery.com>
9149 Pedro Alves <palves@redhat.com>
9150
9151 * linux-low.c (enum stopping_threads_kind): New.
9152 (stopping_threads): Change type to `enum stopping_threads_kind'.
9153 (handle_extended_wait): If stopping and suspending threads, leave
9154 the new_lwp suspended too.
9155 (linux_wait_for_event): Adjust.
9156 (stop_all_lwps): Set `stopping_threads' to
9157 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9158 whether we're suspending threads or just stopping them. Assert no
9159 recursion happens.
9160
9161 2012-04-29 Yao Qi <yao@codesourcery.com>
9162
9163 * server.h: Move some code to ...
9164 * gdbthread.h: ... here. New.
9165 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9166 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9167 (nto-low.o, win32-low.o): Likewise.
9168 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9169 * regcache.c, remote-utils.c, server.c: Likewise.
9170 * target.c, tracepoint.c, win32-low.c: Likewise.
9171
9172 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9173
9174 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9175 (PTRACE_ARG4_TYPE): Likewise.
9176 (PTRACE_XFER_TYPE): Likewise.
9177 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9178 ptrace to PTRACE_ARG3_TYPE.
9179 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9180 (PTRACE_ARG4_TYPE): Likewise.
9181 (PTRACE_XFER_TYPE): Likewise.
9182 (linux_detach_one_lwp): Cast fourth argument of
9183 ptrace to long then PTRACE_ARG4_TYPE.
9184 (regsets_fetch_inferior_registers): Cast third argument of
9185 ptrace to long then PTRACE_ARG3_TYPE.
9186 (regsets_store_inferior_registers): Likewise.
9187
9188 2012-04-20 Pedro Alves <palves@redhat.com>
9189
9190 * configure: Regenerate.
9191
9192 2012-04-19 Pedro Alves <palves@redhat.com>
9193
9194 * Makefile.in (GNULIB_BUILDDIR): New.
9195 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9196 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9197 (all, install-only, uninstall, clean-info, all-lib, clean): No
9198 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9199 (maintainer-clean realclean distclean): Use subdir_do.
9200 (subdir_do): New.
9201 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9202 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9203 * acinclude.m4: Include acx_configure_dir.m4.
9204 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9205 calls. Call AC_PROG_RANLIB. Configure gnulib using
9206 ACX_CONFIGURE_DIR.
9207 (GNULIB): New.
9208 (GNULIB_STDINT_H): Adjust.
9209 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9210 * gdbreplay.c: Include build-gnulib/config.h.
9211 * server.h: Likewise.
9212 * aclocal.m4: Regenerate.
9213 * config.in: Regenerate.
9214 * configure: Regenerate.
9215
9216 2012-04-19 Pedro Alves <palves@redhat.com>
9217
9218 * Makefile.in (LIBGNU, INCGNU): Adjust.
9219 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9220 (all, install-only, uninstall, clean-info, all-lib, clean)
9221 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9222 * configure.ac: Adjust AC_OUTPUT output.
9223 * aclocal.m4: Regenerate.
9224 * configure: Regenerate.
9225
9226 2012-04-19 Pedro Alves <palves@redhat.com>
9227
9228 * Makefile.in (generated_files): New.
9229 (server_h): Remove the explicit dependency on config.h, and depend
9230 on $generated_files.
9231
9232 2012-04-19 Pedro Alves <palves@redhat.com>
9233
9234 * Makefile.in (INCGNU): Add -Ignulib.
9235
9236 2012-04-19 Pedro Alves <palves@redhat.com>
9237
9238 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9239 (INCGNU): ... this, and spell out -I here.
9240 (GNULIB_LIB): Rename to ...
9241 (LIBGNU): ... this.
9242 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9243
9244 2012-04-19 Pedro Alves <palves@redhat.com>
9245
9246 * config.in: Regenerate.
9247
9248 2012-04-19 Pedro Alves <palves@redhat.com>
9249
9250 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9251 * server.h (memmem): Remove declaration.
9252 * config.in: Regenerate.
9253 * configure: Regenerate.
9254
9255 2012-04-19 Yao Qi <yao@codesourcery.com>
9256
9257 * Makefile.in (SFILES): Add common/vec.c.
9258 (OBS): Add vec.o.
9259 (vec.o): New rule.
9260
9261 2012-04-19 Yao Qi <yao@codesourcery.com>
9262
9263 * remote-utils.c (prepare_resume_reply): Replace with macro
9264 target_core_of_thread.
9265 * server.c (handle_qxfer_threads_proper): Likewise.
9266 * target.h (traget_core_of_thread): New macro.
9267
9268 2012-04-18 Pedro Alves <palves@redhat.com>
9269
9270 * aclocal.m4: Regenerate.
9271 * configure: Regenerate.
9272
9273 2012-04-16 Yao Qi <yao@codesourcery.com>
9274
9275 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9276 duplicated on address.
9277
9278 2012-04-16 Yao Qi <yao@codesourcery.com>
9279
9280 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9281 (struct tracepoint_action_ops) <send>: New field.
9282 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9283 (agent_expr_send, x_tracepoint_action_send): New.
9284 (l_tracepoint_action_send): New.
9285 (cmd_qtdp): Download and install tracepoint
9286 according to `use_agent'.
9287 (run_inferior_command): Add one more parameter `len'.
9288 Update callers.
9289 (tracepoint_send_agent): New.
9290 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9291
9292 2012-04-16 Yao Qi <yao@codesourcery.com>
9293
9294 * tracepoint.c (download_tracepoints): Moved to ...
9295 (cmd_qtstart): ... here.
9296
9297 2012-04-14 Yao Qi <yao@codesourcery.com>
9298
9299 * tracepoint.c: Include inttypes.h.
9300 (struct collect_memory_action): Use sized types.
9301 (struct tracepoint): Likewise.
9302 (cmd_qtdp, stop_tracing): Update print specifiers.
9303 (cmd_qtp, response_tracepoint): Likewise.
9304 (collect_data_at_tracepoint): Likewise.
9305 (collect_data_at_step): Likewise.
9306
9307 2012-04-14 Yao Qi <yao@codesourcery.com>
9308
9309 Import gnulib module inttypes.
9310 * aclocal.m4, config.in, configure: Regenerated.
9311
9312 2012-04-14 Yao Qi <yao@codesourcery.com>
9313
9314 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9315 Makefile and config.status at last.
9316
9317 2012-04-13 Yao Qi <yao@codesourcery.com>
9318
9319 * tracepoint.c: Include stdint.h unconditionally.
9320
9321 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9322
9323 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9324 on BFD_HAVE_SYS_PROCFS_TYPE.
9325 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9326 * configure: Regenerate.
9327 * config.in: Likewise.
9328
9329 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9330
9331 * Makefile.in (clean): Also remove x32.c x32-linux.c
9332 x32-avx.c x32-avx-linux.c.
9333 (x32.o): New target.
9334 (x32.c): Likewise.
9335 (x32-linux.o): Likewise.
9336 (x32-linux.c): Likewise.
9337 (x32-avx.o): Likewise.
9338 (x32-avx.c): Likewise.
9339 (x32-avx-linux.o): Likewise.
9340 (x32-avx-linux.c): Likewise.
9341
9342 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9343 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9344 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9345 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9346 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9347 i386/x32-avx-linux.xml.
9348
9349 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9350 (init_registers_x32_avx_linux): Likwise.
9351 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9352 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9353
9354 2012-04-13 Pedro Alves <palves@redhat.com>
9355
9356 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9357 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9358 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9359 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9360 the sub-make.
9361
9362 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9363
9364 * linux-x86-low.c (compat_x32_clock_t): New.
9365 (compat_x32_siginfo_t): Likewise.
9366 (compat_x32_siginfo_from_siginfo): Likewise.
9367 (siginfo_from_compat_x32_siginfo): Likewise.
9368 (linux_is_elf64): Likewise.
9369 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9370 and siginfo_from_compat_x32_siginfo for x32.
9371 (x86_arch_setup): Set linux_is_elf64.
9372
9373 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9374
9375 PR gdb/13969
9376 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9377 e_machine field.
9378 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9379 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9380 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9381 compatible with process.
9382
9383 2012-04-12 Yao Qi <yao@codesourcery.com>
9384
9385 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9386 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9387 (install-only, install-info, clean): Handle sub dir gnulib.
9388 (all-lib, am--refresh): New targets.
9389 (memmem.o): Remove target.
9390 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9391 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9392 (AC_REPLACE_FUNCS): Remove memmem.
9393 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9394 (AC_OUTPUT): Generate Makefile in gnulib/.
9395 * aclocal.m4, config.in, configure: Regenerated.
9396
9397 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9398
9399 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9400
9401 2012-04-05 Pedro Alves <palves@redhat.com>
9402
9403 -Werror=strict-aliasing
9404
9405 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9406 pointer.
9407
9408 2012-04-04 Pedro Alves <palves@redhat.com>
9409
9410 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9411 (sparc_store_gregset_from_stack, sparc_store_gregset)
9412 (sparc_breakpoint_at): Fix formatting.
9413
9414 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9415
9416 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9417 are available.
9418 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9419 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9420 * config.in: Regenerate.
9421 * configure: Likewise.
9422
9423 2012-03-29 Pedro Alves <palves@redhat.com>
9424
9425 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9426 Correct ptrace arguments.
9427
9428 2012-03-28 Pedro Alves <palves@redhat.com>
9429
9430 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9431 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9432 (IA64_FR1_REGNUM): New defines.
9433 (ia64_fetch_register): New.
9434 (the_low_target): Install it.
9435 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9436 field.
9437 * linux-low.c (linux_fetch_registers): Try the
9438 the_low_target.fetch_register hook first.
9439
9440 * linux-arm-low.c (the_low_target): Adjust.
9441 * linux-bfin-low.c (the_low_target): Adjust.
9442 * linux-cris-low.c (the_low_target): Adjust.
9443 * linux-crisv32-low.c (the_low_target): Adjust.
9444 * linux-m32r-low.c (the_low_target): Adjust.
9445 * linux-m68k-low.c (the_low_target): Adjust.
9446 * linux-mips-low.c (the_low_target): Adjust.
9447 * linux-ppc-low.c (the_low_target): Adjust.
9448 * linux-s390-low.c (the_low_target): Adjust.
9449 * linux-sh-low.c (the_low_target): Adjust.
9450 * linux-sparc-low.c (the_low_target): Adjust.
9451 * linux-tic6x-low.c (the_low_target): Adjust.
9452 * linux-x86-low.c (the_low_target): Adjust.
9453 * linux-xtensa-low.c (the_low_target): Adjust.
9454
9455 2012-03-26 Pedro Alves <palves@redhat.com>
9456
9457 * server.c (handle_qxfer_libraries): Don't bail early if
9458 the_target->qxfer_libraries_svr4 is not NULL.
9459
9460 2012-03-26 Pedro Alves <palves@redhat.com>
9461
9462 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9463
9464 2012-03-23 Pedro Alves <palves@redhat.com>
9465
9466 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9467 "library-list-svr4" element's start tag when the the DSO list is
9468 empty.
9469
9470 2012-03-23 Pedro Alves <palves@redhat.com>
9471
9472 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9473 a variable whose type size is the same as the inferior's pointer
9474 size.
9475
9476 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9477
9478 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9479 struct siginfo.
9480 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9481 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9482 * linux-low.h: Include <signal.h>.
9483 (struct siginfo): Remove forward declaration.
9484 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9485 struct siginfo.
9486
9487 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9488
9489 * .gitignore: Ignore more files.
9490
9491 2012-03-19 Pedro Alves <palves@redhat.com>
9492 Jan Kratochvil <jan.kratochvil@redhat.com>
9493
9494 * server.c (cont_thread, general_thread): Add describing comments.
9495 (start_inferior): Clear `cont_thread'.
9496 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9497 of a process.
9498
9499 2012-03-15 Yao Qi <yao@codesourcery.com>
9500
9501 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9502 handling to ...
9503 (cmd_qtdp): ... here.
9504
9505 2012-03-15 Yao Qi <yao@codesourcery.com>
9506
9507 * tracepoint.c (struct tracepoint_action_ops): New.
9508 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9509 (m_tracepoint_action_download): New.
9510 (r_tracepoint_action_download): New.
9511 (x_tracepoint_action_download): New.
9512 (l_tracepoint_action_download): New.
9513 (add_tracepoint_action): Install `action->ops' according type.
9514 (download_tracepoint_1): Move code `download' function pointer
9515 of various tracepoint_action_ops.
9516
9517 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9518
9519 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9520 linux_ptrace_attach_warnings.
9521
9522 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9523
9524 * Makefile.in (linux-ptrace.o): New.
9525 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9526 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9527 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9528 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9529 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9530 of these targets.
9531 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9532
9533 2012-03-08 Yao Qi <yao@codesourcery.com>
9534 Pedro Alves <palves@redhat.com>
9535
9536 Fix PR server/13392.
9537 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9538 offset of JMP insn.
9539 * tracepoint.c (remove_tracepoint): New.
9540 (cmd_qtdp): Call remove_tracepoint when failed to install.
9541
9542 2012-03-07 Pedro Alves <palves@redhat.com>
9543
9544 * linux-low.c (get_detach_signal): New.
9545 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9546 Pass on pending signals to PTRACE_DETACH. Check the result of the
9547 ptrace call.
9548 * server.c (program_signals, program_signals_p): New.
9549 (handle_general_set): Handle QProgramSignals.
9550 * server.h (program_signals, program_signals_p): Declare.
9551
9552 2012-03-05 Pedro Alves <palves@redhat.com>
9553 Jan Kratochvil <jan.kratochvil@redhat.com>
9554
9555 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9556 New comment why.
9557
9558 2012-03-03 Yao Qi <yao@codesourcery.com>
9559
9560 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9561 agent_look_up_symbols.
9562
9563 2012-03-03 Yao Qi <yao@codesourcery.com>
9564
9565 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9566 (linux-x86-low.o): Likewise.
9567 * server.h: Remove in_process_agent_loaded.
9568 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9569 common/agent.c.
9570 Update callers.
9571
9572 2012-03-03 Yao Qi <yao@codesourcery.com>
9573
9574 * tracepoint.c (gdb_agent_capability): New global.
9575 (in_process_agent_loaded_ust): Renamed to
9576 `in_process_agent_supports_ust'.
9577 Update callers.
9578 (in_process_agent_supports_ust): Call agent_capability_check.
9579 (clear_installed_tracepoints): Assert that agent supports
9580 agent.
9581
9582 2012-03-03 Yao Qi <yao@codesourcery.com>
9583
9584 * linux-low.c (linux_supports_agent): New.
9585 (linux_target_ops): Initialize field `supports_agent' with
9586 linux_supports_agent.
9587 * target.h (struct target_ops) <supports_agent>: New.
9588 (target_supports_agent): New macro.
9589 * server.c (handle_general_set): Handle packet 'QAgent'.
9590 (handle_query): Send `QAgent+'.
9591 * Makefile.in (server.o): Depends on agent.h.
9592
9593 2012-03-03 Yao Qi <yao@codesourcery.com>
9594
9595 * Makefile.in (OBS): Add agent.o.
9596 Add new rule for agent.o.
9597 Track dependence of tracepoint.c on agent.h.
9598 * tracepoint.c (run_inferior_command_1):
9599 (run_inferior_command): Call agent_run_command.
9600 (gdb_ust_connect_sync_socket): Deleted. Move it to
9601 common/agent.c.
9602 (resume_thread, stop_thread): Likewise.
9603 (gdb_ust_socket_init): Renamed to ...
9604 (gdb_agent_socket_init): ... New.
9605 (gdb_ust_thread): Renamed to ...
9606 (gdb_agent_helper_thread): ... New.
9607 (gdb_ust_init): Move some code to ...
9608 (gdb_agent_init): ... here. New.
9609 [HAVE_UST]: Call gdb_ust_init.
9610 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9611 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9612 * config.in, configure: Regenerated.
9613
9614 2012-03-02 Pedro Alves <palves@redhat.com>
9615
9616 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9617 * linux-low.c (struct simple_pid_list): New.
9618 (stopped_pids): New a struct simple_pid_list pointer.
9619 (add_to_pid_list, pull_pid_from_list): New.
9620 (handle_extended_wait): Don't assume the first signal new children
9621 report is SIGSTOP. Adjust call to pull_pid_from_list.
9622 (linux_wait_for_lwp): Adjust.
9623
9624 2012-03-02 Yao Qi <yao@codesourcery.com>
9625
9626 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9627 debug log.
9628
9629 2012-03-02 Yao Qi <yao@codesourcery.com>
9630
9631 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9632 `stop_pc' and `tpoint'. Update caller.
9633
9634 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9635
9636 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9637 * linux-low.c (use_linux_regsets): New macro.
9638 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9639 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9640 (linux_register_in_regsets): New function.
9641 (usr_fetch_inferior_registers): Skip registers covered by
9642 regsets.
9643 (usr_store_inferior_registers): Likewise.
9644 (usr_fetch_inferior_registers): New macro.
9645 (usr_store_inferior_registers): Likewise.
9646 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9647 (linux_store_registers): Likewise.
9648 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9649 prototype.
9650 (init_registers_mips64_dsp_linux): Likewise.
9651 (init_registers_mips_linux): New macro.
9652 (init_registers_mips_dsp_linux): Likewise.
9653 (mips_dsp_num_regs): Likewise.
9654 (DSP_BASE, DSP_CONTROL): New fallback macros.
9655 (mips_base_regs): New macro.
9656 (mips_regmap): Use it. Fix the size.
9657 (mips_dsp_regmap): New variable.
9658 (mips_dsp_regset_bitmap): Likewise.
9659 (mips_arch_setup): New function.
9660 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9661 than mips_regmap.
9662 (mips_cannot_store_register): Likewise.
9663 (the_low_target): Update .arch_setup, .num_regs and .regmap
9664 initializers. Add .regset_bitmap initializer.
9665 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9666 initializer.
9667 * linux-bfin-low.c (the_low_target): Likewise.
9668 * linux-cris-low.c (the_low_target): Likewise.
9669 * linux-crisv32-low.c (the_low_target): Likewise.
9670 * linux-ia64-low.c (the_low_target): Likewise.
9671 * linux-m32r-low.c (the_low_target): Likewise.
9672 * linux-m68k-low.c (the_low_target): Likewise.
9673 * linux-ppc-low.c (the_low_target): Likewise.
9674 * linux-s390-low.c (the_low_target): Likewise.
9675 * linux-sh-low.c (the_low_target): Likewise.
9676 * linux-sparc-low.c (the_low_target): Likewise.
9677 * linux-tic6x-low.c (the_low_target): Likewise.
9678 * linux-x86-low.c (the_low_target): Likewise.
9679 * linux-xtensa-low.c (the_low_target): Likewise.
9680 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9681 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9682 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9683 srv_xmlfiles.
9684 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9685 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9686
9687 2012-02-29 Yao Qi <yao@codesourcery.com>
9688 Pedro Alves <palves@redhat.com>
9689
9690 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9691 `step_over_finished' is true.
9692
9693 2012-02-27 Pedro Alves <palves@redhat.com>
9694
9695 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9696 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9697
9698 2012-02-27 Pedro Alves <palves@redhat.com>
9699
9700 PR server/9684
9701 * linux-low.c (pid_is_stopped): New.
9702 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9703
9704 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9705
9706 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9707 of conditions.
9708
9709 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9710
9711 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9712
9713 2012-02-24 Luis Machado <lgustavo@codesourcery>
9714
9715 * server.c (handle_query): Advertise support for target-side
9716 breakpoint condition evaluation.
9717 (process_point_options): New function.
9718 (process_serial_event): When inserting a breakpoint, check for
9719 a target-side condition that should be evaluated.
9720
9721 * mem-break.c: Include regcache.h and ax.h.
9722 (point_cond_list_t): New data structure.
9723 (breakpoint) <cond_list>: New field.
9724 (find_gdb_breakpoint_at): Make non-static.
9725 (delete_gdb_breakpoint_at): Clear any target-side
9726 conditions.
9727 (clear_gdb_breakpoint_conditions): New function.
9728 (add_condition_to_breakpoint): Likewise.
9729 (add_breakpoint_condition): Likewise.
9730 (gdb_condition_true_at_breakpoint): Likewise.
9731 (gdb_breakpoint_here): Return result directly instead
9732 of going through a local variable.
9733
9734 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9735 (clear_gdb_breakpoint_conditions): Likewise.
9736 (add_breakpoint_condition): Likewise.
9737 (gdb_condition_true_at_breakpoint): Likewise.
9738
9739 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9740 (need_step_over_p): Take target-side breakpoint condition into
9741 consideration.
9742
9743 2012-02-24 Luis Machado <lgustavo@codesourcery>
9744
9745 * server.h: Include tracepoint.h.
9746 (agent_mem_read, agent_get_trace_state_variable_value,
9747 agent_set_trace_state_variable_value,
9748 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9749 get_set_tsv_func_addr): New prototypes.
9750
9751 * ax.h: New include file.
9752 * ax.c: New source file.
9753
9754 * tracepoint.c: Include ax.h.
9755 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9756 agent_expr, eval_result_type): Move to ax.h.
9757 (parse_agent_expr): Rename to ...
9758 (gdb_parse_agent_expr): ... this, make it non-static and move
9759 to ax.h.
9760 (unparse_agent_expr) Rename to ...
9761 (gdb_unparse_agent_expr): ... this, make it non-static and move
9762 to ax.h.
9763 (eval_agent_expr): Rename to ...
9764 (eval_tracepoint_agent_expr): ... this.
9765 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9766 forward declarations.
9767 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9768 (agent_get_trace_state_variable_value): New function.
9769 (agent_set_trace_state_variable_value): New function.
9770 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9771 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9772 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9773 (condition_true_at_tracepoint): Likewise.
9774 (parse_agent_expr): Rename to ...
9775 (gdb_parse_agent_expr): ... this and move to ax.c.
9776 (unparse_agent_expr): Rename to ...
9777 (gdb_unparse_agent_expr): ... this and move to ax.c.
9778 (gdb_agent_op_name): Move to ax.c.
9779 (eval_agent_expr): Rename to ...
9780 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9781 and move to ax.c.
9782 (eval_tracepoint_agent_expr): New function.
9783 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9784 non-static.
9785 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9786 ax.c.
9787 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9788 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9789 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9790 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9791 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9792 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9793 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9794 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9795 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9796 (compile_bytecodes): Remove forward declaration.
9797 (is_goto_target): Move to ax.c.
9798 (compile_bytecodes): Move to ax.c and call
9799 agent_get_trace_state_variable_value (...) and
9800 agent_set_trace_state_variable_value (...).
9801
9802 * Makefile.in: Update ax.c and IPA dependencies.
9803
9804 2012-02-24 Pedro Alves <palves@redhat.com>
9805
9806 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9807 (cmd_bigqtbuffer_circular): ... this. Only handle
9808 'QTBuffer:circular:'.
9809 (handle_tracepoint_general_set): Adjust.
9810
9811 2012-02-16 Yao Qi <yao@codesourcery.com>
9812
9813 * inferiors.c: Move code to ...
9814 * dll.c: .... here. New.
9815 * server.h: Declare clear_dlls.
9816 * Makefile.in (SFILES): Add dll.c.
9817 (OBS): Add dll.o
9818 (dll.o): New rule.
9819
9820 2012-02-11 Yao Qi <yao@codesourcery.com>
9821
9822 * server.c: (handle_monitor_command): Add a new parameter
9823 `own_buf'.
9824 (handle_query): Update caller.
9825
9826 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9827
9828 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9829 * configure, config.in: Regenerate.
9830 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9831 is not defined.
9832
9833 2012-02-02 Pedro Alves <palves@redhat.com>
9834
9835 Try SIGKILL first, then PTRACE_KILL.
9836 * linux-low.c (linux_kill_one_lwp): New.
9837 (linux_kill_one_lwp): Rename to ...
9838 (kill_one_lwp_callback): ... this. Use the new
9839 linux_kill_one_lwp.
9840
9841 2012-02-02 Pedro Alves <palves@redhat.com>
9842
9843 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9844 inferior.
9845
9846 2012-01-27 Pedro Alves <palves@redhat.com>
9847
9848 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9849 (elf_64_file_p): Make static.
9850 (linux_pid_exe_is_elf_64_file): New.
9851 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9852 Delete declarations.
9853 (linux_pid_exe_is_elf_64_file): Declare.
9854 * linux-x86-low.c (x86_arch_setup): Use
9855 linux_pid_exe_is_elf_64_file.
9856
9857 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9858
9859 * linux-low.c (linux_wait_for_event_1): Rename to ...
9860 (linux_wait_for_event): ... here and merge it with former
9861 linux_wait_for_event - new variable wait_ptid, use it.
9862 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9863
9864 2012-01-23 Pedro Alves <palves@redhat.com>
9865
9866 * server.c (main): Avoid yet another case of infinite loop while
9867 detaching/killing after a longjmp.
9868
9869 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9870
9871 Code cleanup.
9872 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9873
9874 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9875
9876 * hostio.c (handle_readlink): New function.
9877 (handle_vFile): Call it to handle "vFile:readlink" packets.
9878
9879 2012-01-20 Pedro Alves <palves@redhat.com>
9880 Ulrich Weigand <ulrich.weigand@linaro.org>
9881
9882 * server.c (handle_v_requests): Only support vAttach and vRun to
9883 start multiple processes when in extended protocol mode.
9884
9885 2012-01-17 Pedro Alves <palves@redhat.com>
9886
9887 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9888 memalign plus mprotect to allocate the scratch buffer.
9889
9890 2012-01-13 Pedro Alves <palves@redhat.com>
9891
9892 * server.c (attach_inferior): Clear `cont_thread'.
9893
9894 2012-01-13 Pedro Alves <palves@redhat.com>
9895
9896 * server.c (main): Avoid infinite loop while detaching/killing
9897 after a longjmp.
9898
9899 2012-01-09 Doug Evans <dje@google.com>
9900
9901 * server.c (start_inferior): Set last_ptid in --wrapper case.
9902
9903 2012-01-06 Yao Qi <yao@codesourcery.com>
9904
9905 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9906 defined.
9907 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9908
9909 2012-01-04 Yao Qi <yao@codesourcery.com>
9910
9911 * tracepoint.c (cmd_qtdp): Print debug message
9912 for static tracepoint.
9913
9914 2012-01-04 Yao Qi <yao@codesourcery.com>
9915
9916 * tracepoint.c (trace_vdebug): Differentiate debug message
9917 between gdbserver and IPA.
9918
9919 2012-01-03 Yao Qi <yao@codesourcery.com>
9920
9921 * tracepoint.c (tracepoint_was_hit): Don't collect for
9922 static tracepoint.
9923
9924 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9925
9926 * terminal.h: Reformat copyright header.
9927
9928 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9929
9930 * server.c (gdbserver_version): Update copyright year.
9931 * gdbreplay.c (gdbreplay_version): Likewise.
9932
9933 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9934
9935 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9936
9937 Revert:
9938 2011-12-18 Hui Zhu <teawater@gmail.com>
9939 * linux-low.c (linux_create_inferior): Save return value to ret.
9940
9941 2011-12-18 Hui Zhu <teawater@gmail.com>
9942
9943 * linux-low.c (linux_create_inferior): Save return value to ret.
9944
9945 2011-12-16 Doug Evans <dje@google.com>
9946
9947 * linux-low.c (linux_create_inferior): If stdio connection,
9948 redirect stdin from /dev/null, stdout to stderr.
9949 * remote-utils.c (remote_is_stdio): New static global.
9950 (remote_connection_is_stdio): New function.
9951 (remote_prepare): Handle stdio connection.
9952 (remote_open): Ditto.
9953 (remote_close): Don't close stdin for stdio connections.
9954 (read_prim,write_prim): New functions. Replace all calls to
9955 read/write to these.
9956 * server.c (main): Watch for "-" argument. Move call to
9957 remote_prepare before start_inferior.
9958 * server.h (STDIO_CONNECTION_NAME): New macro.
9959 (remote_connection_is_stdio): Declare.
9960
9961 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9962 in debugging output.
9963
9964 2011-12-15 Yao Qi <yao@codesourcery.com>
9965
9966 * tracepoint.c: Include sys/syscall.h.
9967 (gdb_ust_thread): Remove preprocessor conditional.
9968
9969 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9970
9971 * linux-low.c (linux_detach_one_lwp): Call
9972 the_low_target.prepare_to_resume before detaching.
9973
9974 2011-12-14 Yao Qi <yao@codesourcery.com>
9975
9976 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9977 of write.
9978
9979 2011-12-14 Yao Qi <yao@codesourcery.com>
9980
9981 * i386-low.c (i386_low_stopped_data_address): Initialize local
9982 variable `control'.
9983
9984 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9985
9986 PR remote/13492
9987
9988 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9989 DR_CONTROL unless necessary. Extend comments.
9990 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9991 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9992
9993 2011-12-13 Yao Qi <yao@codesourcery.com>
9994
9995 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9996 macros.
9997 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9998
9999 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10000
10001 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10002 Print new debug message for such case.
10003
10004 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10005
10006 Fix overlapping memcpy.
10007 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10008 the read_inferior_memory transfer.
10009 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10010 write_inferior_memory transfer.
10011 (set_fast_tracepoint_jump): New variable buf. Use it for the
10012 read_inferior_memory and write_inferior_memory transfers.
10013 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10014 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10015 Use it for the write_inferior_memory transfer.
10016 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10017 buffers.
10018
10019 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10020
10021 * linux-low.c (fetch_register, store_register): Make code
10022 consistent, fix formatting.
10023
10024 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10025
10026 * linux-low.c (usr_store_inferior_registers): Factor out code
10027 to handle individual registers into...
10028 (store_register): ... this new function.
10029
10030 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10031
10032 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10033 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10034 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10035 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10036 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10037 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10038 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10039 (srv_xmlfiles): Add new XML files.
10040
10041 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10042 and <sys/uio.h>.
10043 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10044 (init_registers_s390_linux32v1): Add prototype.
10045 (init_registers_s390_linux32v2): Likewise.
10046 (init_registers_s390_linux64v1): Likewise.
10047 (init_registers_s390_linux64v2): Likewise.
10048 (init_registers_s390x_linux64v1): Likewise.
10049 (init_registers_s390x_linux64v2): Likewise.
10050 (s390_num_regs): Increment to 52.
10051 (s390_regmap): Add orig_r2 register.
10052 (s390_num_regs_3264): Increment to 68.
10053 (s390_regmap_3264): Add orig_r2 register.
10054 (s390_collect_ptrace_register): Handle orig_r2 register.
10055 (s390_supply_ptrace_register): Likewise.
10056 (s390_fill_last_break): New function.
10057 (s390_store_last_break): Likewise.
10058 (s390_fill_system_call): New function.
10059 (s390_store_system_call): Likewise.
10060 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10061 register sets.
10062 (s390_check_regset): New function.
10063 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10064 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10065 Update target_regsets for available register sets.
10066
10067 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10068 Jan Kratochvil <jan.kratochvil@redhat.com>
10069
10070 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10071 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10072 New.
10073 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10074 * linux-low.h (struct process_info_private): New member r_debug.
10075 * server.c (handle_qxfer_libraries): Call
10076 the_target->qxfer_libraries_svr4.
10077 (handle_qxfer_libraries_svr4): New function.
10078 (qxfer_packets): New entry "libraries-svr4".
10079 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10080 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10081 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10082 PACKET_qXfer_libraries_svr4.
10083
10084 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10085
10086 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10087 PSW address/mask between 8-byte and 16-byte formats.
10088 (s390_supply_ptrace_register): Likewise.
10089 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10090 basic addressing mode bit.
10091
10092 2011-11-24 Stan Shebs <stan@codesourcery.com>
10093
10094 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10095
10096 2011-11-17 Stan Shebs <stan@codesourcery.com>
10097
10098 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10099 (tracing_start_time): New global.
10100 (tracing_stop_time): New global.
10101 (tracing_user_name): New global.
10102 (tracing_notes): New global.
10103 (tracing_stop_note): New global.
10104 (cmd_qtstart): Set traceframe_usage, start_time.
10105 (stop_tracing): Set stop_time.
10106 (cmd_qtstatus): Report additional status.
10107 (cmd_qtp): New function.
10108 (handle_tracepoint_query): Call it.
10109 (cmd_qtnotes): New function.
10110 (handle_tracepoint_general_set): Call it.
10111 (get_timestamp): Rename from tsv_get_timestamp.
10112
10113 2011-11-14 Stan Shebs <stan@codesourcery.com>
10114 Kwok Cheung Yeung <kcy@codesourcery.com>
10115
10116 * linux-x86-low.c (small_jump_insn): New.
10117 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10118 trampoline and error message, build a trampoline and issue a small
10119 jump instruction to it.
10120 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10121 trampoline and error message.
10122 (x86_get_min_fast_tracepoint_insn_len): New.
10123 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10124 * linux-low.h (struct linux_target_ops): Add arguments to
10125 install_fast_tracepoint_jump_pad operation, add new operation.
10126 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10127 arguments.
10128 (linux_get_min_fast_tracepoint_insn_len): New function.
10129 (linux_target_op): Add new operation.
10130 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10131 (gdb_trampoline_buffer_end): Ditto.
10132 (gdb_trampoline_buffer_error): Ditto.
10133 (struct ipa_sym_addresses): Add fields for new IPA variables.
10134 (symbol_list): Add entries for new IPA variables.
10135 (struct tracepoint): Add fields to hold the address range of the
10136 trampoline used by the tracepoint.
10137 (trampoline_buffer_head): New static variable.
10138 (trampoline_buffer_tail): Ditto.
10139 (claim_trampoline_space): New function.
10140 (have_fast_tracepoint_trampoline_buffer): New function.
10141 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10142 structure.
10143 (install_fast_tracepoint): Ditto, also add error buffer argument.
10144 (cmd_qtminftpilen): New function.
10145 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10146 (fast_tracepoint_from_trampoline_address): New function.
10147 (fast_tracepoint_collecting): Handle trampoline as part of jump
10148 pad space.
10149 (set_trampoline_buffer_space): New function.
10150 (initialize_tracepoint): Initialize new IPA variables.
10151 * target.h (struct target_ops): Add arguments to
10152 install_fast_tracepoint_jump_pad operation, add new
10153 get_min_fast_tracepoint_insn_len operation.
10154 (target_get_min_fast_tracepoint_insn_len): New.
10155 (install_fast_tracepoint_jump_pad): Add arguments.
10156 * server.h (IPA_BUFSIZ): Define.
10157 * linux-i386-ipa.c: Include extra header files.
10158 (initialize_fast_tracepoint_trampoline_buffer): New function.
10159 (initialize_low_tracepoint): Call it.
10160 * server.h (set_trampoline_buffer_space): Declare.
10161 (claim_trampoline_space): Ditto.
10162 (have_fast_tracepoint_trampoline_buffer): Ditto.
10163
10164 2011-11-14 Yao Qi <yao@codesourcery.com>
10165
10166 * server.c (handle_query): Handle InstallInTrace for qSupported.
10167 * tracepoint.c (add_tracepoint): Sort list.
10168 (install_tracepoint, download_tracepoint): New.
10169 (cmd_qtdp): Call them to install and download tracepoints.
10170 (sort_tracepoints): Removed.
10171 (cmd_qtstart): Update.
10172
10173 2011-11-14 Yao Qi <yao@codesourcery.com>
10174
10175 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10176 * mem-break.h: Declare.
10177 * tracepoint.c (cmd_qtstart): Move some code to ...
10178 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10179 New.
10180 (download_tracepoints): Move some code to ...
10181 (download_tracepoint_1): ... here. New.
10182
10183 2011-11-08 Yao Qi <yao@codesourcery.com>
10184
10185 * remote-utils.c (relocate_instruction): A comment fix.
10186
10187 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10188
10189 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10190 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10191 dr_status_mirror and dr_control_mirror from debug_reg_state.
10192 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10193 (i386_initial_stuff): Remove use of deleted globals.
10194 (i386_get_thread_context, i386_set_thread_context,
10195 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10196 from debug_reg_state.
10197
10198 2011-11-05 Yao Qi <yao@codesourcery.com>
10199
10200 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10201 address as TPOINT's.
10202
10203 2011-11-02 Stan Shebs <stan@codesourcery.com>
10204
10205 * tracepoint.c (agent_mem_read_string): New function.
10206 (eval_agent_expr): Call it for tracenz.
10207 * server.c (handle_query): Report support for tracenz.
10208
10209 2011-11-02 Yao Qi <yao@codesourcery.com>
10210
10211 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10212
10213 2011-11-02 Yao Qi <yao@codesourcery.com>
10214
10215 * target.h: Fix a typo in comment.
10216
10217 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10218
10219 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10220 clobber the breakpoints' shadows with fast tracepoint jumps.
10221 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10222 * target.c (write_inferior_memory): Also pass MYADDR down to
10223 check_mem_write.
10224
10225 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10226
10227 * configure.ac: Check support for personality routine.
10228 * configure: Regenerate.
10229 * config.in: Likewise.
10230 * linux-low.c: Include <sys/personality.h>.
10231 Define ADDR_NO_RANDOMIZE if necessary.
10232 (linux_create_inferior): Disable address space randomization when
10233 forking inferior, if requested.
10234 (linux_supports_disable_randomization): New function.
10235 (linux_target_ops): Install it.
10236 * server.h (disable_randomization): Declare.
10237 * server.c (disable_randomization): New global variable.
10238 (handle_general_set): Handle QDisableRandomization.
10239 (handle_query): Likewise for qSupported.
10240 (main): Support --disable-randomization and --no-disable-randomization
10241 command line arguments.
10242 * target.h (struct target_ops): Add supports_disable_randomization.
10243 (target_supports_disable_randomization): New macro.
10244
10245 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10246
10247 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10248 ifdef check.
10249 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10250 [!PT_GETDSBT] (target_loadmap): New definition.
10251 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10252 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10253 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10254 and PT_GETDSBT to LINUX_LOADMAP.
10255 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10256 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10257
10258 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10259
10260 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10261 (arm_linux_hwbp_cap): New static variable.
10262 (arm_linux_get_hwbp_cap): Replace by ...
10263 (arm_linux_init_hwbp_cap): ... this new function.
10264 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10265 (arm_linux_get_hw_watchpoint_count): Likewise.
10266 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10267 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10268 (arm_prepare_to_resume): Use perror_with_name instead of error.
10269
10270 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10271
10272 * linux-arm-low.c: Include <signal.h>.
10273 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10274 (struct arm_linux_hwbp_cap): New data type.
10275 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10276 (struct arm_linux_hw_breakpoint): New data type.
10277 (MAX_BPTS, MAX_WPTS): Define.
10278 (struct arch_process_info, struct arch_lwp_info): New data types.
10279 (arm_linux_get_hwbp_cap): New function.
10280 (arm_linux_get_hw_breakpoint_count): Likewise.
10281 (arm_linux_get_hw_watchpoint_count): Likewise.
10282 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10283 (arm_hwbp_control_initialize): Likewise.
10284 (arm_hwbp_control_is_enabled): Likewise.
10285 (arm_hwbp_control_is_initialized): Likewise.
10286 (arm_hwbp_control_disable): Likewise.
10287 (arm_linux_hw_breakpoint_equal): Likewise.
10288 (arm_linux_hw_point_initialize): Likewise.
10289 (struct update_registers_data): New data structure.
10290 (update_registers_callback: New function.
10291 (arm_insert_point): Likewise.
10292 (arm_remove_point): Likewise.
10293 (arm_stopped_by_watchpoint): Likewise.
10294 (arm_stopped_data_address): Likewise.
10295 (arm_new_process): Likewise.
10296 (arm_new_thread): Likewise.
10297 (arm_prepare_to_resume): Likewise.
10298 (the_low_target): Register arm_insert_point, arm_remove_point,
10299 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10300 arm_new_thread, and arm_prepare_to_resume.
10301
10302 2011-09-15 Stan Shebs <stan@codesourcery.com>
10303
10304 * server.h (struct emit_ops): Add compare-goto fields.
10305 * tracepoint.c (gdb_agent_op_sizes): New table.
10306 (emit_eq_goto): New function.
10307 (emit_ne_goto): New function.
10308 (emit_lt_goto): New function.
10309 (emit_le_goto): New function.
10310 (emit_gt_goto): New function.
10311 (emit_ge_goto): New function.
10312 (is_goto_target): New function.
10313 (compile_bytecodes): Recognize special cases of compare-goto
10314 combinations and call specialized emitters for them.
10315 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10316 (amd64_emit_ne_goto): New function.
10317 (amd64_emit_lt_goto): New function.
10318 (amd64_emit_le_goto): New function.
10319 (amd64_emit_gt_goto): New function.
10320 (amd64_emit_ge_goto): New function.
10321 (amd64_emit_ops): Add the new functions.
10322 (i386_emit_eq_goto): New function.
10323 (i386_emit_ne_goto): New function.
10324 (i386_emit_lt_goto): New function.
10325 (i386_emit_le_goto): New function.
10326 (i386_emit_gt_goto): New function.
10327 (i386_emit_ge_goto): New function.
10328 (i386_emit_ops): Add the new functions.
10329
10330 2011-09-08 Stan Shebs <stan@codesourcery.com>
10331
10332 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10333 (i386_emit_epilogue): Restore %ebx.
10334
10335 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10336
10337 * server.c (step_thread): Remove definition.
10338 (process_serial_event): Don't handle Hs.
10339 * server.h (step_thread): Remove declaration.
10340 * target.c (set_desired_inferior): Remove use of step_thread.
10341
10342 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10343
10344 * linux-low.c: Include linux-procfs.h.
10345 (linux_attach_lwp_1): Update comments.
10346 (linux_attach): Scan for existing threads when attaching to a
10347 process that is the tgid.
10348 * Makefile.in: Update dependencies.
10349
10350 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10351
10352 * configure.srv: Add linux-procfs.o dependencies.
10353
10354 2011-08-14 Yao Qi <yao@codesourcery.com>
10355
10356 * target.h (struct target_ops): Fix indent.
10357 * win32-low.c (win32_target_ops): Fix comment.
10358
10359 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10360 Yao Qi <yao@codesourcery.com>
10361
10362 * Makefile.in (clean): Remove tic6x-*.c files.
10363 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10364 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10365 (tic6x-c64xp-linux.c): Likewise.
10366 * configure.srv: Add support for tic6x-*-uclinux.
10367 * linux-tic6x-low.c: New.
10368 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10369
10370 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10371 Yao Qi <yao@codesourcery.com>
10372
10373 * target.h (struct target_ops): Add read_loadmap.
10374 * linux-low.c (struct target_loadseg): New type.
10375 (struct target_loadmap): New type.
10376 (linux_read_loadmap): New function.
10377 (linux_target_ops): Add linux_read_loadmap.
10378 * server.c (handle_query): Support qXfer:fdpic:read packet.
10379 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10380 to NULL.
10381
10382 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10383
10384 * win32-low.c: Include <stdint.h>.
10385
10386 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10387
10388 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10389 to the inferior here.
10390 (i386_remove_aligned_watchpoint): Ditto.
10391 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10392 fit part of the watchpoint in the debug registers.
10393 (i386_update_inferior_debug_regs): New.
10394 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10395 registers, and only update the inferior on success.
10396 (i386_low_remove_watchpoint): Ditto.
10397
10398 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10399
10400 * linux-low.c (compare_ints, unique, list_threads, show_process,
10401 linux_core_of_thread): Delete.
10402 (linux_target_ops): Change linux_core_of_thread to
10403 linux_common_core_of_thread.
10404 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10405 * utils.c (malloc_failure): Change type of argument.
10406 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10407 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10408 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10409 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10410 (IPA_OBJS): Add common-utils-ipa.o.
10411 (ptid_h, linux_osdata_h): New macros.
10412 (server_h): Add common/common-utils.h, common/xml-utils.h,
10413 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10414 common/ptid.h.
10415 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10416 ptid.o, buffer.o): New rules.
10417 (linux-low.o): Add common/linux-osdata.h as a dependency.
10418 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10419 * configure.ac: Add AC_HEADER_DIRENT check.
10420 * config.in: Regenerate.
10421 * configure: Regenerate.
10422 * remote-utils.c (xml_escape_text): Delete.
10423 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10424 buffer_xml_printf): Move to common/buffer.c.
10425 * server.c (main): Remove call to initialize_inferiors.
10426 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10427 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10428 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10429 internal_error, gdb_assert, gdb_assert_fail): Delete.
10430 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10431 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10432 common/buffer.h.
10433 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10434 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10435 initialize_inferiors): Delete.
10436
10437 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10438
10439 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10440 symbol error.
10441
10442 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10443
10444 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10445 assertion.
10446 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10447
10448 2011-05-26 Yao Qi <yao@codesourcery.com>
10449
10450 * Makefile.in (thread-db.o): Track dependence to
10451 common/gdb_thread_db.h.
10452 * thread-db.c: include gdb_thread_db.h from right place.
10453
10454 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10455
10456 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10457 __FILE__ and __LINE__ to internal_error.
10458
10459 2011-05-13 Doug Evans <dje@google.com>
10460
10461 * thread-db.c (try_thread_db_load_from_sdir): New function.
10462 (try_thread_db_load_from_dir): New function.
10463 (thread_db_load_search): Handle $sdir, ignore $pdir.
10464 Remove trying of system directories if search of
10465 libthread-db-search-path fails, that is now done via $sdir.
10466
10467 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10468
10469 * server.c (handle_query): Add EnableDisableTracepoints to the list
10470 of supported features.
10471 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10472 tracepoints.
10473 (cmd_qtenable_disable): New.
10474 (cmd_qtstart): Install tracepoints even if disabled.
10475 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10476 receiving a QTEnable or QTDisable packet.
10477 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10478 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10479 tracepoints.
10480 (gdb_probe): Skip data collection if static tracepoint is disabled.
10481
10482 2011-05-10 Doug Evans <dje@google.com>
10483
10484 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10485
10486 2011-05-04 Doug Evans <dje@google.com>
10487
10488 * linux-low.c (linux_join): Skip process lookup.
10489 * spu-low.c (spu_join): Ditto.
10490 * server.c (join_inferiors_callback): Delete.
10491 (process_serial_event): For 'D' packet (detach) call join_inferior
10492 directly.
10493
10494 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10495
10496 * README: Don't mention xscale*-*-linux*.
10497 * configure.srv (xscale*-*-linux*): Don't handle target.
10498
10499 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10500
10501 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10502 casting pointers.
10503 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10504 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10505 (i386_emit_void_call_2): Likewise.
10506
10507 2011-04-26 Yao Qi <yao@codesourcery.com>
10508
10509 * linux-low.c: Move common macros to linux-ptrace.h.
10510 Include linux-ptrace.h.
10511 * Makefile.in (linux_ptrace_h): New.
10512 (linux-low.o): Depends on linux-ptrace.h.
10513
10514 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10515
10516 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10517 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10518 (remote_prepare): New function with most of the TCP code from ...
10519 (remote_open): ... here. Detect PORT here unconditionally. Move also
10520 setting transport_is_reliable.
10521 * server.c (run_once): New variable.
10522 (gdbserver_usage): Document it.
10523 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10524 the first run if RUN_ONCE.
10525 * server.h (run_once, remote_prepare): New declarations.
10526
10527 2011-04-19 Tom Tromey <tromey@redhat.com>
10528
10529 * win32-low.c (handle_load_dll): Remove duplicate "the".
10530
10531 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10532
10533 Remove support for old Cygwin 1.5 versions.
10534 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10535 function to avoid warning.
10536 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10537 warning.
10538
10539 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10540
10541 * gdbserver/server.h (Macro _): Define it if not available.
10542
10543 2011-03-14 Michael Snyder <msnyder@vmware.com>
10544
10545 * hostio.c (handle_close): Remove unnecessary null test.
10546
10547 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10548
10549 * Makefile.in (maintainer-clean realclean distclean): Remove
10550 "make ... subdir_do" command.
10551
10552 2011-03-10 Michael Snyder <msnyder@vmware.com>
10553
10554 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10555
10556 * server.c (handle_v_run): Free alloced buffer on early return.
10557
10558 2011-03-09 Yao Qi <yao@codesourcery.com>
10559
10560 Revert:
10561 2011-03-04 Yao Qi <yao@codesourcery.com>
10562
10563 * Makefile.in: Remove GNU make feature --directory.
10564
10565 2011-03-05 Yao Qi <yao@codesourcery.com>
10566
10567 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10568 (subdir_do): New make target. Copied from gdb/Makefile.
10569 (maintainer-clean, realclean, distclean, clean): Call corresponding
10570 make targets in common/Makefile.
10571
10572 2011-02-11 Yao Qi <yao@codesourcery.com>
10573
10574 * configure.ac: Call AC_PROG_RANLIB.
10575 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10576 * configure: Regenerate.
10577
10578 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10579
10580 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10581
10582 2011-03-06 Yao Qi <yao@codesourcery.com>
10583
10584 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10585
10586 2011-03-05 Yao Qi <yao@codesourcery.com>
10587
10588 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10589 (subdir_do): New make target. Copied from gdb/Makefile.
10590 (maintainer-clean, realclean, distclean, clean): Call corresponding
10591 make targets in common/Makefile.
10592
10593 2011-03-04 Yao Qi <yao@codesourcery.com>
10594
10595 * Makefile.in: Remove GNU make feature --directory.
10596
10597 2011-03-04 Michael Snyder <msnyder@vmware.com>
10598
10599 * server.c (queue_stop_reply): Call xmalloc not malloc.
10600
10601 2011-03-02 Michael Snyder <msnyder@vmware.com>
10602
10603 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10604
10605 2011-02-28 Michael Snyder <msnyder@vmware.com>
10606
10607 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10608 (cmd_qtframe): Ditto.
10609 (cmd_qtbuffer): Ditto.
10610 (cmd_bigqtbuffer): Ditto.
10611
10612 * utils.c (decimal2str): Initialize 'width' to nine, then
10613 don't mess with it.
10614
10615 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10616
10617 * hostio.c (require_data): Free *data, not data.
10618
10619 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10620
10621 * hostio.c (require_data): Use free, not xfree.
10622
10623 2011-02-27 Michael Snyder <msnyder@vmware.com>
10624
10625 * server.c (handle_query): Discard unused value.
10626
10627 * hostio.c (require_data): Free malloc memory before returning
10628 error.
10629
10630 2011-02-26 Michael Snyder <msnyder@vmware.com>
10631
10632 * linux-low.c (list_threads): Call closedir for dirent.
10633
10634 2011-02-27 Michael Snyder <msnyder@vmware.com>
10635
10636 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10637 a case statement falls through.
10638
10639 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10640
10641 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10642 in comparison.
10643
10644 2011-02-26 Michael Snyder <msnyder@vmware.com>
10645
10646 * utils.c (decimal2str): Eliminate dead code and dead param.
10647 (pulongest): Drop dead param from call to decimal2str.
10648 (plongest): Ditto.
10649
10650 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10651
10652 Revert the following patch (not approved yet):
10653 2011-02-21 Hui Zhu <teawater@gmail.com>
10654 * tracepoint.c (tp_printf): New function.
10655 (eval_agent_expr): Handle gdb_agent_op_printf.
10656
10657 2011-02-21 Hui Zhu <teawater@gmail.com>
10658
10659 * tracepoint.c (tp_printf): New function.
10660 (eval_agent_expr): Handle gdb_agent_op_printf.
10661
10662 2011-02-18 Tom Tromey <tromey@redhat.com>
10663
10664 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10665 (tracepoint.o): Likewise.
10666 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10667 (gdb_agent_op_names): Likewise.
10668
10669 2011-02-18 Tom Tromey <tromey@redhat.com>
10670
10671 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10672 gdb_agent_op_rot>: New constants.
10673 (gdb_agent_op_names): Add pick and roll.
10674 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10675 cases.
10676
10677 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10678
10679 * aclocal.m4: Regenerated with aclocal-1.11.1.
10680
10681 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10682
10683 * server.c (handle_qxfer_traceframe_info): New.
10684 (qxfer_packets): Register "traceframe-info".
10685 (handle_query): Report support for qXfer:traceframe-info:read+.
10686 * tracepoint.c (match_blocktype): New.
10687 (traceframe_find_block_type): Rename to ...
10688 (traceframe_walk_blocks): ... this. Add callback filter argument,
10689 and use it.
10690 (traceframe_find_block_type): New, reimplemented on top of
10691 traceframe_walk_blocks.
10692 (build_traceframe_info_xml): New.
10693 (traceframe_read_info): New.
10694 * server.h (traceframe_read_info): Declare.
10695
10696 2011-02-11 Yao Qi <yao@codesourcery.com>
10697
10698 * configure.ac: Call AC_PROG_RANLIB.
10699 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10700 * configure: Regenerate.
10701
10702 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10703
10704 * server.c (gdb_read_memory): Change return semantics to allow
10705 partial transfers.
10706 (handle_search_memory_1): Adjust.
10707 (process_serial_event) <'m' packet>: Handle partial transfers.
10708 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10709
10710 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10711
10712 * regcache.c (init_register_cache): Initialize
10713 regcache->register_status.
10714 (free_register_cache): Release regcache->register_status.
10715 (regcache_cpy): Copy register_status.
10716 (registers_to_string): Print 'x's for unavailable registers.
10717 (supply_register): Mark the register's status valid or
10718 unavailable, depending on whether a buffer was passed in or not.
10719 (supply_register_zeroed): New.
10720 (supply_regblock): Mark the registers' status valid or
10721 unavailable, depending on whether a buffer was passed in or not.
10722 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10723 (struct regcache): New `register_status' field.
10724 (supply_register_zeroed): Declare.
10725 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10726 supply_register_zeroed, rather than passing a NULL buffer to
10727 supply_register.
10728 * tracepoint.c (fetch_traceframe_registers): Update comment.
10729
10730 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10731
10732 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10733 buffer explicit.
10734
10735 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10736
10737 * server.h (decode_xfer_write): Change prototype.
10738 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10739 and don't extract the annex here.
10740 * server.c (decode_xfer_read): Remove `annex' parameter,
10741 and don't extract the annex here.
10742 (decode_xfer): New.
10743 (struct qxfer): New.
10744 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10745 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10746 (handle_qxfer_statictrace): New functions, abstracted out from
10747 handle_query, and made to use the struct qxfer interface.
10748 (handle_threads_qxfer_proper): Rename to ...
10749 (handle_qxfer_threads_proper): ... this.
10750 (handle_threads_qxfer): Rename to ...
10751 (handle_qxfer_threads): ... this. Adjust.
10752 (qxfer_packets): New array.
10753 (handle_qxfer): New function.
10754 (handle_query): Use handle_qxfer.
10755
10756 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10757
10758 * gdbreplay.c: Shorten lines of >= 80 columns.
10759 * linux-low.c: Ditto.
10760 * linux-ppc-low.c: Ditto.
10761 * linux-s390-low.c: Ditto.
10762 * linux-sparc-low.c: Ditto.
10763 * linux-x86-low.c: Ditto.
10764 * linux-xtensa-low.c: Ditto.
10765 * mem-break.c: Ditto.
10766 * nto-low.c: Ditto.
10767 * regcache.h: Ditto.
10768 * remote-utils.c: Ditto.
10769 * server.c: Ditto.
10770 * server.h: Ditto.
10771 * thread-db.c: Ditto.
10772 * tracepoint.c: Ditto.
10773 * utils.c: Ditto.
10774 * win32-low.h: Ditto.
10775
10776 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10777
10778 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10779 update.
10780
10781 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10782
10783 * server.c (gdbserver_version): Update copyright year in version
10784 output.
10785 * gdbreplay.c (gdbreplay_version): Ditto.
10786
10787 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10788
10789 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10790 * linux-bfin-low.c: New file.
10791 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10792 PT_DATA_ADDR for BFIN targets.
10793 * Makefile.in (SFILES): Add linux-bfin-low.c.
10794 (clean): Remove reg-bfin.c.
10795 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10796 * README: Mention supported Blackfin targets.
10797
10798 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10799
10800 * .gitignore: New file.
10801
10802 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10803
10804 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10805
10806 2010-10-22 Jie Zhang <jie@codesourcery.com>
10807
10808 * Makefile.in: Add FLAGS_TO_PASS variable.
10809 (install): Remove dependency of install-only and recursively
10810 invoke make for install-only.
10811
10812 2010-10-04 Doug Evans <dje@google.com>
10813
10814 * Makefile.in (uninstall): Use $(DESTDIR).
10815
10816 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10817
10818 PR gdb/11842
10819
10820 * linux-x86-low.c (compat_siginfo_from_siginfo)
10821 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10822 si_code is < 0. Check for si_code == SI_TIMER before checking for
10823 si_code < 0.
10824
10825 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10826
10827 * lynx-i386-low.c: New file.
10828 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10829
10830 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10831
10832 * lynx-low.c (ptrace_request_to_str): Remove handling for
10833 request values that have been removed in LynxOS 5.x.
10834
10835 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10836
10837 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10838 <ptrace.h>
10839
10840 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10841
10842 * configure.ac: Add --enable-inprocess-agent option.
10843 * configure: Rebuilt.
10844
10845 2010-09-06 Yao Qi <yao@codesourcery.com>
10846
10847 * linux-low.c (linux_kill): Remove unused variable.
10848 (linux_stabilize_threads): Likewise.
10849 * server.c (start_inferior): Likewise.
10850 (queue_stop_reply_callback): Likewise.
10851 * tracepoint.c (do_action_at_tracepoint): Likewise.
10852
10853 2010-09-06 Yao Qi <yao@codesourcery.com>
10854
10855 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10856 on return.
10857
10858 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10859
10860 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10861
10862 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10863
10864 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10865 "$(IPA_DEPFILES)".
10866
10867 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10868
10869 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10870 gdbserver/lynx-ppc-low.c: New files.
10871 * Makefile.in (lynx_low_h): New variable.
10872 (lynx-low.o, lynx-ppc-low.o): New rules.
10873 * configure.ac: On LynxOS, link with -lnetinet.
10874 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10875 * configure: regenerate.
10876
10877 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10878
10879 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10880 * configure.ac: Add check for vasprintf and vsnprintf.
10881 * configure, config.in: Regenerate.
10882 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10883
10884 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10885
10886 * gdbreplay.c: Move include of alloca.h up, next to include of
10887 malloc.h.
10888 * server.h: Add include of malloc.h.
10889 * mem-break.c: Remove include of malloc.h.
10890 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10891
10892 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10893
10894 * Makefile.in (memmem.o): Build with -Wno-error.
10895
10896 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10897
10898 * utils.c (xsnprintf): Make non-static.
10899 * server.h: Add xsnprintf declaration.
10900 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10901 replace calls to snprintf by calls to xsnprintf throughout.
10902
10903 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10904
10905 * configure.ac: Add configure check for alloca.
10906 * configure, config.in: Regenerate.
10907 * server.h: Include alloca.h if it exists.
10908 * gdbreplay.c: Include alloca.h if it exists.
10909
10910 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10911
10912 * linux-low.c (__SIGRTMIN): Define if not already defined.
10913 (linux_create_inferior): Check for __ANDROID__ rather than
10914 __SIGRTMIN.
10915 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10916 are already deferred.
10917 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10918 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10919 stopped and already has a pending signal to report.
10920 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10921 a pending signal to report or is moving out of a jump pad.
10922 (linux_init_signals): Check for __ANDROID__ rather than
10923 __SIGRTMIN.
10924
10925 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10926
10927 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10928 debug_threads check. Avoid a linear search when not doing debug
10929 output.
10930
10931 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10932
10933 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10934 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10935 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10936 (process_event): Change local fd's type to gdb_fildes_t.
10937 (create_file_handler): Adjust prototype.
10938 (delete_file_handler): Adjust prototype.
10939 (handle_file_event): Adjust prototype. Use pfildes.
10940 (create_file_event): Adjsut prototype.
10941 * remote-utils.c (remote_desc, listen_desc): Change type to
10942 gdb_fildes_t.
10943 * server.h: New gdb_fildes_t typedef.
10944 [USE_WIN32API]: Include winsock2.h.
10945 (delete_file_handler, add_file_handler): Adjust prototypes.
10946 (pfildes): Declare.
10947 * utils.c (pfildes): New.
10948
10949 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10950
10951 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10952 * configure: Regenerate.
10953
10954 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10955
10956 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10957 (linux_done_accessing_memory): ... this.
10958 (linux_target_ops): Adjust.
10959 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10960 * nto-low.c (nto_target_ops): Adjust comment.
10961 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10962 * spu-low.c (spu_target_ops): Adjust comment.
10963 * target.h (target_ops): Rename unprepare_to_access_memory field
10964 to done_accessing_memory.
10965 (unprepare_to_access_memory): Rename to ...
10966 (done_accessing_memory): ... this.
10967
10968 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10969
10970 * linux-low.c (linux_prepare_to_access_memory): New.
10971 (linux_unprepare_to_access_memory): New.
10972 (linux_target_ops): Install them.
10973 * server.c (read_memory): Rename to ...
10974 (gdb_read_memory): ... this. Use
10975 prepare_to_access_memory/prepare_to_access_memory.
10976 (write_memory): Rename to ...
10977 (gdb_write_memory): ... this. Use
10978 prepare_to_access_memory/prepare_to_access_memory.
10979 (handle_search_memory_1): Adjust.
10980 (process_serial_event): Adjust.
10981 * target.h (struct target_ops): New fields
10982 prepare_to_access_memory and unprepare_to_access_memory.
10983 (prepare_to_access_memory, unprepare_to_access_memory): New.
10984 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10985 prepare_to_access_memory/prepare_to_access_memory.
10986 * nto-low.c (nto_target_ops): Adjust.
10987 * spu-low.c (spu_target_ops): Adjust.
10988 * win32-low.c (win32_target_ops): Adjust.
10989
10990 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10991
10992 * Makefile.in (WARN_CFLAGS): Get it from configure.
10993 (WERROR_CFLAGS): New.
10994 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10995 * configure.ac: Introduce --enable-werror, which adds -Werror to
10996 the compiler command line. Enabled by default. Disable with
10997 --disable-werror. Add -Wdeclaration-after-statement
10998 Wpointer-arith and -Wformat-nonliteral to warning flags.
10999 * configure: Regenerate.
11000
11001 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11002
11003 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11004
11005 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11006
11007 * gdbreplay.c (remote_error): New.
11008 (gdbchar): New.
11009 (expect): Use gdbchar. Check for error reading from GDB.
11010 Clarify sync error output.
11011 (play): Check for errors writing to GDB.
11012 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11013 * remote-utils.c (getpkt): Check for errors writing to the remote
11014 descriptor.
11015
11016 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11017
11018 * linux-low.c (linux_wait_1): Move non-debugging code out of
11019 `debug_threads' control.
11020
11021 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11022
11023 * linux-low.c (linux_wait_1): Don't set last_status here.
11024 * server.c (push_event, queue_stop_reply_callback): Assert we're
11025 not pushing a TARGET_WAITKIND_IGNORE event.
11026 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11027 (myresume, handle_target_event): Set the thread's last_resume_kind
11028 and last_status from the target returned status.
11029
11030 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11031
11032 PR threads/10729
11033
11034 * linux-x86-low.c (update_debug_registers_callback): New.
11035 (i386_dr_low_set_addr): Use it.
11036 (i386_dr_low_get_addr): New.
11037 (i386_dr_low_set_control): Use update_debug_registers_callback.
11038 (i386_dr_low_get_control): New.
11039 (i386_dr_low_get_status): Adjust.
11040 * linux-low.c (linux_stop_lwp): New.
11041 * linux-low.h (linux_stop_lwp): Declare.
11042
11043 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11044 argument instead of a i386_debug_reg_state.
11045 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11046 a i386_debug_reg_state.
11047 (i386_insert_aligned_watchpoint): Adjust.
11048 (i386_remove_aligned_watchpoint): Adjust.
11049 (i386_low_stopped_data_address): Read the debug registers from the
11050 inferior instead of from the mirrors.
11051 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11052 (i386_dr_low_get_addr): Declare.
11053 (i386_dr_low_get_control): Declare.
11054 (i386_dr_low_get_status): Change prototype.
11055
11056 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11057 (i386_dr_low_get_addr): New.
11058 (i386_dr_low_get_control): New.
11059 (i386_dr_low_get_status): Adjust prototype. Return
11060 dr_status_mirror.
11061 (i386_initial_stuff): Clear dr_status_mirror and
11062 dr_control_mirror.
11063 (i386_get_thread_context): Adjust.
11064 (i386_set_thread_context): Adjust.
11065 (i386_thread_added): Adjust.
11066
11067 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11068
11069 * linux-low.h (linux_thread_area): Delete declaration.
11070
11071 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11072
11073 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11074 after its termination.
11075
11076 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11077
11078 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11079 (gdb_wants_all_stopped): Delete.
11080 (linux_wait_1): Don't call them.
11081 * server.c (handle_v_cont): Tag all threads as want-stopped.
11082 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11083 stopped as "client-wants-stopped".
11084
11085 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11086
11087 * Makefile.in (signals_h): New.
11088 (server_h): Depend on it.
11089 (server.o): Don't depend on $(signals_def).
11090 (signals.o): Depend on $(signals_def).
11091
11092 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11093
11094 * Makefile.in (signals_def): New.
11095 (server_h): Append include/gdb/signals.h and signals_def.
11096 (server.o): Append signals_def.
11097
11098 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11099
11100 * server.c (handle_target_event): Use target_signal_to_host for
11101 resume_info.sig initialization.
11102 * target.h (struct thread_resume) <sig>: New comment.
11103
11104 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11105
11106 * server.c (handle_query): strcpy() the returned string from paddress()
11107 instead of sprintf().
11108 * utils.c (paddress): Return phex_nz().
11109
11110 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11111
11112 * server.c (handle_v_cont): Call mourn_inferior if process
11113 just exited.
11114 (myresume): Likewise.
11115
11116 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11117
11118 Static tracepoints, and integration with UST.
11119
11120 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11121 * mem-break.c (uninsert_all_breakpoints)
11122 (reinsert_all_breakpoints): New.
11123 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11124 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11125 (gdb_agent_ust_loaded, helper_thread_id)
11126 (gdb_agent_helper_thread_id): New macros.
11127 (struct ipa_sym_addresses): Add addr_ust_loaded,
11128 addr_helper_thread_id, addr_cmd_buf.
11129 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11130 (in_process_agent_loaded_ust): New.
11131 (write_e_ust_not_loaded): New.
11132 (maybe_write_ipa_ust_not_loaded): New.
11133 (struct collect_static_trace_data_action): New.
11134 (enum tracepoint_type) <static_tracepoint>: New.
11135 (struct tracepoint) <handle>: Mention static tracepoints.
11136 (struct static_tracepoint_ctx): New.
11137 (CMD_BUF_SIZE): New.
11138 (add_tracepoint_action): Handle static tracepoint actions.
11139 (unprobe_marker_at): New.
11140 (clear_installed_tracepoints): Handle static tracepoints.
11141 (cmd_qtdp): Handle static tracepoints.
11142 (probe_marker_at): New.
11143 (cmd_qtstart): Handle static tracepoints.
11144 (response_tracepoint): Handle static tracepoints.
11145 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11146 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11147 (get_context_regcache): Handle static tracepoints.
11148 (do_action_at_tracepoint): Handle static tracepoint actions.
11149 (traceframe_find_block_type): Handle static trace data blocks.
11150 (traceframe_read_sdata): New.
11151 (download_tracepoints): Download static tracepoint actions.
11152 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11153 (GDB_PROBE_NAME): New.
11154 (ust_ops): New.
11155 (GET_UST_SYM): New.
11156 (USTF): New.
11157 (dlsym_ust): New.
11158 (ust_marker_to_static_tracepoint): New.
11159 (gdb_probe): New.
11160 (collect_ust_data_at_tracepoint): New.
11161 (gdb_ust_probe): New.
11162 (UNIX_PATH_MAX, SOCK_DIR): New.
11163 (gdb_ust_connect_sync_socket): New.
11164 (resume_thread, stop_thread): New.
11165 (run_inferior_command): New.
11166 (init_named_socket): New.
11167 (gdb_ust_socket_init): New.
11168 (cstr_to_hexstr): New.
11169 (next_st): New.
11170 (first_marker, next_marker): New.
11171 (response_ust_marker): New.
11172 (cmd_qtfstm, cmd_qtsstm): New.
11173 (unprobe_marker_at, probe_marker_at): New.
11174 (cmd_qtstmat, gdb_ust_thread): New.
11175 (gdb_ust_init): New.
11176 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11177 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11178 (ST_REGENTRY): New.
11179 (x86_64_st_collect_regmap): New.
11180 (X86_64_NUM_ST_COLLECT_GREGS): New.
11181 (AMD64_RIP_REGNUM): New.
11182 (supply_static_tracepoint_registers): New.
11183 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11184 (ST_REGENTRY): New.
11185 (i386_st_collect_regmap): New.
11186 (i386_NUM_ST_COLLECT_GREGS): New.
11187 (supply_static_tracepoint_registers): New.
11188 * server.c (handle_query): Handle qXfer:statictrace:read.
11189 <qSupported>: Report support for StaticTracepoints, and
11190 qXfer:statictrace:read features.
11191 * server.h (traceframe_read_sdata)
11192 (supply_static_tracepoint_registers): Declare.
11193 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11194 (unpack_varlen_hex): Include in IPA build.
11195 * Makefile.in (ustlibs, ustinc): New.
11196 (IPA_OBJS): Add remote-utils-ipa.o.
11197 ($(IPA_LIB)): Link -ldl and -lpthread.
11198 (UST_CFLAGS): New.
11199 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11200 * config.in, configure: Regenerate.
11201
11202 2010-06-20 Ian Lance Taylor <iant@google.com>
11203 Pedro Alves <pedro@codesourcery.com>
11204
11205 * linux-x86-low.c (always_true): Delete.
11206 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11207 trying to fool the compiler with always_true.
11208
11209 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11210
11211 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11212 conditions in gdbserver.
11213
11214 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11215
11216 * spu-low.c (spu_read_memory): Wrap around local store limit.
11217 (spu_write_memory): Likewise.
11218
11219 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11220
11221 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11222 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11223 LONGEST uses.
11224 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11225 uses.
11226 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11227 uses with LONGEST uses.
11228
11229 2010-06-14 Stan Shebs <stan@codesourcery.com>
11230 Pedro Alves <pedro@codesourcery.com>
11231
11232 Bytecode compiler.
11233
11234 * linux-x86-low.c: Include limits.h.
11235 (add_insns): New.
11236 (always_true): New.
11237 (EMIT_ASM): New.
11238 (EMIT_ASM32): New.
11239 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11240 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11241 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11242 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11243 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11244 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11245 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11246 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11247 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11248 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11249 (amd64_emit_void_call_2): New.
11250 (amd64_emit_ops): New.
11251 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11252 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11253 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11254 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11255 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11256 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11257 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11258 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11259 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11260 (i386_emit_stack_adjust, i386_emit_int_call_1)
11261 (i386_emit_void_call_2): New.
11262 (i386_emit_ops): New.
11263 (x86_emit_ops): New.
11264 (the_low_target): Install x86_emit_ops.
11265 * server.h (struct emit_ops): New.
11266 (get_raw_reg_func_addr): Declare.
11267 (current_insn_ptr, emit_error): Declare.
11268 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11269 (set_trace_state_variable_value): New defines.
11270 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11271 addr_get_trace_state_variable_value and
11272 addr_set_trace_state_variable_value.
11273 (symbol_list): New fields for get_raw_reg,
11274 get_trace_state_variable_value and set_trace_state_variable_value.
11275 (condfn): New typedef.
11276 (struct tracepoint): New field `compiled_cond'.
11277 (do_action_at_tracepoint): Clear compiled_cond.
11278 (get_trace_state_variable_value, set_trace_state_variable_value):
11279 Export in the IPA.
11280 (condition_true_at_tracepoint): If there's a compiled condition,
11281 run that.
11282 (current_insn_ptr, emit_error): New globals.
11283 (struct bytecode_address): New.
11284 (get_raw_reg_func_addr): New.
11285 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11286 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11287 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11288 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11289 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11290 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11291 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11292 (compile_tracepoint_condition, compile_bytecodes): New.
11293 * target.h (emit_ops): Forward declare.
11294 (struct target_ops): New field emit_ops.
11295 (target_emit_ops): New.
11296 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11297 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11298 * linux-low.c (linux_emit_ops): New.
11299 (linux_target_ops): Install it.
11300 * linux-low.h (struct linux_target_ops): New field emit_ops.
11301
11302 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11303
11304 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11305 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11306
11307 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11308 Stan Shebs <stan@codesourcery.com>
11309
11310 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11311 (all): Depend on $(extra_libraries).
11312 (install-only): Install the IPA.
11313 (IPA_OBJS, IPA_LIB): New.
11314 (clean): Remove the IPA lib.
11315 (IPAGENT_CFLAGS): New.
11316 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11317 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11318 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11319 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11320 * configure.ac: Check for atomic builtins support in the compiler.
11321 (IPA_DEPFILES, extra_libraries): Define.
11322 * configure.srv (ipa_obj): Add description.
11323 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11324 (i[34567]86-*-linux*): Set ipa_obj.
11325 (x86_64-*-linux*): Set ipa_obj.
11326 * linux-low.c (stabilizing_threads): New.
11327 (supports_fast_tracepoints): New.
11328 (linux_detach): Stabilize threads before detaching.
11329 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11330 the lwp is either not stabilizing, or is moving out of a jump pad.
11331 (linux_fast_tracepoint_collecting): New.
11332 (maybe_move_out_of_jump_pad): New.
11333 (enqueue_one_deferred_signal): New.
11334 (dequeue_one_deferred_signal): New.
11335 (linux_wait_for_event_1): If moving out of a jump pad, defer
11336 pending signals to later.
11337 (linux_stabilize_threads): New.
11338 (linux_wait_1): Check if threads need moving out of jump pads, and
11339 do it if so.
11340 (stuck_in_jump_pad_callback): New.
11341 (move_out_of_jump_pad_callback): New.
11342 (lwp_running): New.
11343 (linux_resume_one_lwp): Handle moving out of jump pads.
11344 (linux_set_resume_request): Dequeue deferred signals.
11345 (need_step_over_p): Also step over fast tracepoint jumps.
11346 (start_step_over): Also uninsert fast tracepoint jumps.
11347 (finish_step_over): Also reinsert fast tracepoint jumps.
11348 (linux_install_fast_tracepoint_jump): New.
11349 (linux_target_ops): Install linux_stabilize_threads and
11350 linux_install_fast_tracepoint_jump_pad.
11351 * linux-low.h (linux_target_ops) <get_thread_area,
11352 install_fast_tracepoint_jump_pad>: New fields.
11353 (struct lwp_info) <collecting_fast_tracepoint,
11354 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11355 (linux_get_thread_area): Declare.
11356 * linux-x86-low.c (jump_insn): New.
11357 (x86_get_thread_area): New.
11358 (append_insns): New.
11359 (push_opcode): New.
11360 (amd64_install_fast_tracepoint_jump_pad): New.
11361 (i386_install_fast_tracepoint_jump_pad): New.
11362 (x86_install_fast_tracepoint_jump_pad): New.
11363 (the_low_target): Install x86_get_thread_area and
11364 x86_install_fast_tracepoint_jump_pad.
11365 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11366 (struct fast_tracepoint_jump): New.
11367 (fast_tracepoint_jump_insn): New.
11368 (fast_tracepoint_jump_shadow): New.
11369 (find_fast_tracepoint_jump_at): New.
11370 (fast_tracepoint_jump_here): New.
11371 (delete_fast_tracepoint_jump): New.
11372 (set_fast_tracepoint_jump): New.
11373 (uninsert_fast_tracepoint_jumps_at): New.
11374 (reinsert_fast_tracepoint_jumps_at): New.
11375 (set_breakpoint_at): Use write_inferior_memory.
11376 (uninsert_raw_breakpoint): Use write_inferior_memory.
11377 (check_mem_read): Mask out fast tracepoint jumps.
11378 (check_mem_write): Mask out fast tracepoint jumps.
11379 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11380 (set_fast_tracepoint_jump): Declare.
11381 (delete_fast_tracepoint_jump)
11382 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11383 (reinsert_fast_tracepoint_jumps_at): Declare.
11384 * regcache.c: Don't compile many functions when building the
11385 in-process agent library.
11386 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11387 the register buffer in the heap.
11388 (free_register_cache): If the register buffer isn't owned by the
11389 regcache, don't free it.
11390 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11391 pre-existing register caches.
11392 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11393 type.
11394 (convert_ascii_to_int): : Constify `from' parameter type.
11395 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11396 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11397 the needed buffer in-place.
11398 (relocate_instruction): New.
11399 * server.c (handle_query) <qSymbols>: If the target supports
11400 tracepoints, give it a chance of looking up symbols. Report
11401 support for fast tracepoints.
11402 (handle_status): Stabilize threads.
11403 (process_serial_event): Adjust.
11404 * server.h (struct fast_tracepoint_jump): Forward declare.
11405 (struct process_info) <fast_tracepoint_jumps>: New field.
11406 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11407 (decode_X_packet, decode_M_packet): Adjust.
11408 (relocate_instruction): Declare.
11409 (in_process_agent_loaded): Declare.
11410 (tracepoint_look_up_symbols): Declare.
11411 (struct fast_tpoint_collect_status): Declare.
11412 (fast_tracepoint_collecting): Declare.
11413 (force_unlock_trace_buffer): Declare.
11414 (handle_tracepoint_bkpts): Declare.
11415 (initialize_low_tracepoint)
11416 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11417 * target.h (struct target_ops) <stabilize_threads,
11418 install_fast_tracepoint_jump_pad>: New fields.
11419 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11420 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11421 [HAVE_STDINT_H]: Include stdint.h.
11422 (trace_debug_1): Rename to ...
11423 (trace_vdebug): ... this.
11424 (trace_debug): Rename to ...
11425 (trace_debug_1): ... this. Add `level' parameter.
11426 (trace_debug): New.
11427 (ATTR_USED, ATTR_NOINLINE): New.
11428 (IP_AGENT_EXPORT): New.
11429 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11430 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11431 (about_to_request_buffer_space, trace_buffer_is_full)
11432 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11433 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11434 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11435 (traceframe_write_count, traceframes_created)
11436 (trace_state_variables)
11437 New renaming defines.
11438 (struct ipa_sym_addresses): New.
11439 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11440 (symbol_list): New.
11441 (ipa_sym_addrs): New.
11442 (all_tracepoint_symbols_looked_up): New.
11443 (in_process_agent_loaded): New.
11444 (write_e_ipa_not_loaded): New.
11445 (maybe_write_ipa_not_loaded): New.
11446 (tracepoint_look_up_symbols): New.
11447 (debug_threads) [IN_PROCESS_AGENT]: New.
11448 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11449 (UNKNOWN_SIDE_EFFECTS): New.
11450 (stop_tracing): New.
11451 (flush_trace_buffer): New.
11452 (stop_tracing_bkpt): New.
11453 (flush_trace_buffer_bkpt): New.
11454 (read_inferior_integer): New.
11455 (read_inferior_uinteger): New.
11456 (read_inferior_data_pointer): New.
11457 (write_inferior_data_pointer): New.
11458 (write_inferior_integer): New.
11459 (write_inferior_uinteger): New.
11460 (struct collect_static_trace_data_action): Delete.
11461 (enum tracepoint_type): New.
11462 (struct tracepoint) <type>: New field `type'.
11463 <actions_str, step_actions, step_actions_str>: Only include in
11464 GDBserver.
11465 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11466 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11467 (tracepoints): Use IP_AGENT_EXPORT.
11468 (last_tracepoint): Don't include in the IPA.
11469 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11470 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11471 (alloced_trace_state_variables): New.
11472 (trace_state_variables): Use IP_AGENT_EXPORT.
11473 (traceframe_t): Delete unused variable.
11474 (circular_trace_buffer): Don't include in the IPA.
11475 (trace_buffer_start): Delete.
11476 (struct trace_buffer_control): New.
11477 (trace_buffer_free): Delete.
11478 (struct ipa_trace_buffer_control): New.
11479 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11480 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11481 New.
11482 (trace_buffer_ctrl): New.
11483 (TRACE_BUFFER_CTRL_CURR): New.
11484 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11485 Reimplement as macros.
11486 (trace_buffer_wrap): Delete.
11487 (traceframe_write_count, traceframe_read_count)
11488 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11489 (struct tracepoint_hit_ctx) <type>: New field.
11490 (struct fast_tracepoint_ctx): New.
11491 (memory_barrier): New.
11492 (cmpxchg): New.
11493 (record_tracepoint_error): Update atomically in the IPA.
11494 (clear_inferior_trace_buffer): New.
11495 (about_to_request_buffer_space): New.
11496 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11497 updating the same buffer.
11498 (add_tracepoint): Default the tracepoint's type to trap
11499 tracepoint, and orig_size to -1.
11500 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11501 internal variables.
11502 (create_trace_state_variable): New parameter `gdb'. Handle it.
11503 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11504 (cmd_qtdp): Handle fast tracepoints.
11505 (cmd_qtdv): Adjust.
11506 (max_jump_pad_size): New.
11507 (gdb_jump_pad_head): New.
11508 (get_jump_space_head): New.
11509 (claim_jump_space): New.
11510 (sort_tracepoints): New.
11511 (MAX_JUMP_SIZE): New.
11512 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11513 IPA.
11514 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11515 support. Upload fast traceframes, and delete internal IPA
11516 breakpoints.
11517 (stop_tracing_handler): New.
11518 (flush_trace_buffer_handler): New.
11519 (cmd_qtstop): Upload fast tracepoints.
11520 (response_tracepoint): Handle fast tracepoints.
11521 (tracepoint_finished_step): Upload fast traceframes. Set the
11522 tracepoint hit context's tracepoint type.
11523 (handle_tracepoint_bkpts): New.
11524 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11525 type. Add comment about fast tracepoints.
11526 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11527 non-existing action_str field.
11528 (get_context_regcache): Handle fast tracepoints.
11529 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11530 to the regcache.
11531 (fast_tracepoint_from_jump_pad_address): New.
11532 (fast_tracepoint_from_ipa_tpoint_address): New.
11533 (collecting_t): New.
11534 (force_unlock_trace_buffer): New.
11535 (fast_tracepoint_collecting): New.
11536 (collecting): New.
11537 (gdb_collect): New.
11538 (write_inferior_data_ptr): New.
11539 (target_tp_heap): New.
11540 (target_malloc): New.
11541 (download_agent_expr): New.
11542 (UALIGN): New.
11543 (download_tracepoints): New.
11544 (download_trace_state_variables): New.
11545 (upload_fast_traceframes): New.
11546 (IPA_FIRST_TRACEFRAME): New.
11547 (IPA_NEXT_TRACEFRAME_1): New.
11548 (IPA_NEXT_TRACEFRAME): New.
11549 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11550 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11551 (gdb_jump_pad_buffer_end): New.
11552 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11553 (initialize_tracepoint): Adjust.
11554 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11555 buffer. Initialize the low module.
11556 * utils.c (PREFIX, TOOLNAME): New.
11557 (malloc_failure): Use PREFIX.
11558 (error): In the IPA, an error causes an exit.
11559 (fatal, warning): Use PREFIX.
11560 (internal_error): Use TOOLNAME.
11561 (NUMCELLS): Increase to 10.
11562 * configure, config.in: Regenerate.
11563
11564 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11565
11566 * server.c (handle_query) <qSupported>: Do two passes over the
11567 qSupported string to avoid nesting strtok.
11568
11569 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11570
11571 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11572 (CDEPS): New.
11573 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11574 -Wl,--dynamic-list.
11575 * configure: Regenerate.
11576 * proc-service.list: New.
11577
11578 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11579
11580 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11581 New comment.
11582
11583 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11584
11585 * gdbreplay.c (remote_open): Check error return from socket() call by
11586 its equality to -1 not by it being negative.
11587 * remote-utils.c (remote_open): Likewise.
11588
11589 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11590
11591 * config.h: Regenerate.
11592
11593 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11594
11595 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11596 doesn't provide PTRACE_GET_THREAD_AREA.
11597
11598 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11599
11600 * linux-m68k-low.c: Include <asm/ptrace.h>
11601 (ps_get_thread_area): Implement.
11602
11603 2010-05-03 Doug Evans <dje@google.com>
11604
11605 * event-loop.c (struct callback_event): New struct.
11606 (callback_list): New global.
11607 (append_callback_event, delete_callback_event): New functions.
11608 (process_callback): New function.
11609 (start_event_loop): Call it.
11610 * remote-utils.c (NOT_SCHEDULED): Define.
11611 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11612 moved out of readchar.
11613 (readchar): Rewrite. Call reschedule before returning.
11614 (reset_readchar): New function.
11615 (remote_close): Call it.
11616 (process_remaining, reschedule): New functions.
11617 * server.h (callback_handler_func): New typedef.
11618 (append_callback_event, delete_callback_event): Declare.
11619
11620 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11621
11622 * proc-service.c (ps_pglobal_lookup): Use
11623 thread_db_look_up_one_symbol.
11624 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11625 parameter. Use it instead of all_symbols_looked_up.
11626 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11627 field.
11628 (all_symbols_looked_up): Don't declare.
11629 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11630 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11631 field.
11632 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11633 Set all_symbols_looked_up here.
11634 (thread_db_look_up_one_symbol): New.
11635 (thread_db_get_tls_address): Adjust.
11636 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11637 thread_db object on the heap, and tentatively set it in the
11638 process structure.
11639 (thread_db_init): Don't set all_symbols_looked_up here.
11640 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11641
11642 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11643
11644 * linux-low.c (linux_kill, linux_detach): Adjust.
11645 (status_pending_p_callback): Remove redundant statement. Check
11646 for !TARGET_WAITIKIND_IGNORE, instead of
11647 TARGET_WAITKIND_STOPPED.
11648 (handle_tracepoints): Make sure LWP is locked. Adjust.
11649 (linux_wait_for_event_1): Adjust.
11650 (linux_cancel_breakpoints): New.
11651 (unsuspend_one_lwp): New.
11652 (unsuspend_all_lwps): New.
11653 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11654 (send_sigstop_callback): Change return type to int, add new
11655 `except' parameter and handle it.
11656 (suspend_and_send_sigstop_callback): New.
11657 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11658 pass them down. If SUSPEND, also increment the lwp's suspend
11659 count.
11660 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11661 (need_step_over_p): Don't consider suspended LWPs.
11662 (start_step_over): Adjust.
11663 (proceed_one_lwp): Change return type to int, add new `except'
11664 parameter and handle it.
11665 (unsuspend_and_proceed_one_lwp): New.
11666 (proceed_all_lwps): Use find_inferior instead of
11667 for_each_inferior.
11668 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11669 also decrement the suspend count of LWPs. Pass `except' down,
11670 instead of hacking its suspend count.
11671 (linux_pause_all): Add `freeze' parameter. Adjust.
11672 (linux_unpause_all): New.
11673 (linux_target_ops): Install linux_unpause_all.
11674 * server.c (handle_status): Adjust.
11675 * target.h (struct target_ops): New fields `unpause_all' and
11676 `cancel_breakpoints'. Add new parameter to `pause_all'.
11677 (pause_all): Add new `freeze' parameter.
11678 (unpause_all): New.
11679 (cancel_breakpoints): New.
11680 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11681 cancel breakpoints.
11682 (cmd_qtstart): Pause threads.
11683 (stop_tracing): Pause threads, and cancel breakpoints.
11684 * win32-low.c (win32_target_ops): Adjust.
11685
11686 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11687
11688 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11689 the inferior right away from here...
11690 (linux_wait_1): ... to here, and adjust to check the thread's
11691 last_resume_kind instead of the lwp's step or stop_expected flags.
11692
11693 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11694
11695 * README: Use consistent `GDB' and `GDBserver' spellings.
11696
11697 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11698
11699 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11700 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11701 (linux_detach_one_lwp): Assume the lwp is stopped.
11702 (any_thread_of): Delete.
11703 (linux_detach): Stop all lwps here. Don't blindly delete all
11704 breakpoints.
11705 (delete_lwp_callback): New.
11706 (linux_mourn): Delete all lwps of the process that is gone.
11707 (linux_wait_1): Don't delete the last lwp of the process here.
11708 * mem-break.h (mark_breakpoints_out): Declare.
11709 * mem-break.c (mark_breakpoints_out): New.
11710 (free_all_breakpoints): Use it.
11711 * server.c (handle_target_event): If the process is gone, mark
11712 breakpoints out.
11713 * thread-db.c (struct thread_db) <create_bp>: New field.
11714 (thread_db_enable_reporting): Fix prototype. Store a thread event
11715 breakpoint reference in the thread_db struct.
11716 (thread_db_load_search): Clear the thread_db object.
11717 (try_thread_db_load_1): Ditto.
11718 (switch_to_process): New.
11719 (disable_thread_event_reporting): Use it.
11720 (remove_thread_event_breakpoints): New.
11721 (thread_db_detach, thread_db_mourn): Use it.
11722
11723 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11724
11725 * linux-low.c (linux_enable_event_reporting): New.
11726 (linux_wait_for_event_1, handle_extended_wait): Use it.
11727
11728 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11729
11730 * linux-low.c (linux_kill_one_lwp, linux_kill)
11731 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11732 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11733 SIGSTOP even if the LWP is stopped.
11734 (send_sigstop_callback): New.
11735 (stop_all_lwps): Use send_sigstop_callback instead.
11736 (linux_resume_one_thread): Adjust.
11737 (proceed_one_lwp): Still proceed an LWP that the client has
11738 requested to stop, if we haven't reported it as stopped yet. Make
11739 sure that LWPs the client want stopped, have a pending SIGSTOP.
11740
11741 2010-04-26 Doug Evans <dje@google.com>
11742
11743 * server.c (handle_general_set): Make static.
11744
11745 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11746 Print received char after testing for error/eof instead of before.
11747 (input_interrupt): Tweak comment.
11748
11749 2010-04-23 Doug Evans <dje@google.com>
11750
11751 * server.c (start_inferior): Print inferior argv if --debug.
11752
11753 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11754
11755 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11756 * nto-x86-low.c: Include server.h
11757
11758 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11759
11760 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11761 be consistent with other sources of this directory.
11762 (init_registers_amd64): Correct name of source file of this function
11763 in the comment.
11764
11765 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11766
11767 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11768 64-bit executables.
11769
11770 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11771
11772 * win32-i386-low.c: Add 64-bit support.
11773 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11774 (init_registers_amd64): Declare.
11775 (mappings): Add 64-bit version of array.
11776 (init_windows_x86): New function.
11777 (the_low_target): Change init_arch field to init_windows_x86.
11778
11779 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11780
11781 * win32-low.c: Adapt to support also 64-bit architecture.
11782 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11783 (get_image_name): Use SIZE_T type for local variable `done'.
11784 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11785 (toolhelp_get_dll_name): Idem.
11786 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11787 Use uintptr_t typecast to avoid warning.
11788 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11789 (handle_exception): Use phex_nz to avoid warning.
11790 (win32_wait): Remove unused local variable `process'.
11791
11792 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11793
11794 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11795 `amd64-avx.o'.
11796
11797 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11798
11799 * configure.ac: Use `ws2_32' library for srv_mingw.
11800 * configure: Regenerate.
11801 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11802 * remote-utils.c: Likewise.
11803
11804 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11805
11806 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11807 if __x86_64__ is defined.
11808
11809 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11810
11811 * configure: Regenerate.
11812
11813 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11814
11815 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11816 * target.h (target_ops): New get_tib_address field.
11817 * win32-low.h (win32_thread_info): Add thread_local_base field.
11818 * win32-low.c (child_add_thread): Add tlb argument.
11819 Set thread_local_base field to TLB.
11820 (get_child_debug_event): Adapt to child_add_thread change.
11821 (win32_get_tib_address): New function.
11822 (win32_target_ops): Set get_tib_address field to
11823 win32_get_tib_address.
11824 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11825
11826 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11827
11828 * linux-low.c (linux_mourn): Also remove the process.
11829 * server.c (handle_target_event): Don't remove the process here.
11830 * nto-low.c (nto_mourn): New.
11831 (nto_target_ops): Install it.
11832 * spu-low.c (spu_mourn): New.
11833 (spu_target_ops): Install it.
11834 * win32-low.c (win32_mourn): New.
11835 (win32_target_ops): Install it.
11836
11837 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11838
11839 * server.h (buffer_xml_printf): Remove redundant `;'.
11840
11841 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11842
11843 * regcache.c (set_register_cache): Invalidate regcaches before
11844 changing the register cache layout.
11845 (regcache_invalidate_one): Allow a NULL regcache.
11846 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11847 regcaches before changing the register cache layout or the target
11848 regsets.
11849
11850 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11851
11852 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11853 variable warning on Linux/x86-64.
11854
11855 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11856
11857 GDBserver disconnected tracing support.
11858
11859 * linux-low.c (linux_remove_process): Delete.
11860 (add_lwp): Don't set last_resume_kind here.
11861 (linux_kill): Use `mourn'.
11862 (linux_detach): Use `thread_db_detach', and `mourn'.
11863 (linux_mourn): New.
11864 (linux_attach_lwp_1): Adjust comment.
11865 (linux_attach): last_resume_kind moved the thread_info; adjust.
11866 (status_pending_p_callback): Adjust.
11867 (linux_wait_for_event_1): Adjust.
11868 (count_events_callback, select_singlestep_lwp_callback)
11869 (select_event_lwp_callback, cancel_breakpoints_callback)
11870 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11871 (proceed_one_lwp): Adjust.
11872 (linux_async): Add debug output.
11873 (linux_thread_stopped): New.
11874 (linux_pause_all): New.
11875 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11876 linux_pause_all.
11877 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11878 (thread_db_free): Delete declaration.
11879 (thread_db_detach, thread_db_mourn): Declare.
11880 * thread-db.c (thread_db_init): Use thread_db_mourn.
11881 (thread_db_free): Delete, split in two.
11882 (disable_thread_event_reporting): New.
11883 (thread_db_detach): New.
11884 (thread_db_mourn): New.
11885
11886 * server.h (struct thread_info) <last_resume_kind>: New field.
11887 <attached>: Add comment.
11888 <gdb_detached>: New field.
11889 (handler_func): Change return type to int.
11890 (handle_serial_event, handle_target_event): Ditto.
11891 (gdb_connected): Declare.
11892 (tracing): Delete.
11893 (disconnected_tracing): Declare.
11894 (stop_tracing): Declare.
11895
11896 * server.c (handle_query) <qSupported>: Report support for
11897 disconnected tracing.
11898 (queue_stop_reply_callback): Account for running threads.
11899 (gdb_wants_thread_stopped): New.
11900 (gdb_wants_all_threads_stopped): New.
11901 (gdb_reattached_process): New.
11902 (handle_status): Clear the `gdb_detached' flag of all processes.
11903 In all-stop, stop all threads.
11904 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11905 (process_serial_event): If the remote connection breaks, or if an
11906 exit was forced with "monitor exit", force an event loop exit.
11907 Handle disconnected tracing on detach.
11908 (handle_serial_event): Adjust.
11909 (handle_target_event): If GDB isn't connected, forward events back
11910 to the inferior, unless the last process exited, in which case,
11911 exit gdbserver. Adjust interface.
11912
11913 * remote-utils.c (remote_open): Don't block in accept. Instead
11914 register an event loop source on the listen socket file
11915 descriptor. Refactor bits into ...
11916 (listen_desc): ... this new global.
11917 (gdb_connected): ... this new function.
11918 (enable_async_notification): ... this new function.
11919 (handle_accept_event): ... this new function.
11920 (remote_close): Clear remote_desc.
11921
11922 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11923
11924 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11925 New fields.
11926 (mourn_inferior): Define.
11927 (target_process_qsupported): Avoid the dangling else problem.
11928 (thread_stopped): Define.
11929 (pause_all): Define.
11930 (target_waitstatus_to_string): Declare.
11931 * target.c (target_waitstatus_to_string): New.
11932
11933 * tracepoint.c (tracing): Make extern.
11934 (disconnected_tracing): New.
11935 (stop_tracing): Make extern. Handle tracing stops due to GDB
11936 disconnecting.
11937 (cmd_qtdisconnected): New.
11938 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11939 (handle_tracepoint_general_set): Handle QTDisconnected.
11940
11941 * event-loop.c (event_handler_func): Change return type to int.
11942 (process_event): Bail out if the event handler wants the event
11943 loop to stop.
11944 (handle_file_event): Ditto.
11945 (start_event_loop): Bail out if the event handler wants the event
11946 loop to stop.
11947
11948 * nto-low.c (nto_target_ops): Adjust.
11949 * spu-low.c (spu_wait): Don't remove the process here.
11950 (spu_target_ops): Adjust.
11951 * win32-low.c (win32_wait): Don't remove the process here.
11952 (win32_target_ops): Adjust.
11953
11954 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11955
11956 * regcache.c (realloc_register_cache): Invalidate inferior's
11957 regcache before recreating it.
11958
11959 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11960
11961 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11962
11963 2010-04-09 Stan Shebs <stan@codesourcery.com>
11964 Pedro Alves <pedro@codesourcery.com>
11965
11966 * server.h (LONGEST): New.
11967 (struct thread_info) <while_stepping>: New field.
11968 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11969 Declare.
11970 (initialize_tracepoint, handle_tracepoint_general_set)
11971 (handle_tracepoint_query, tracepoint_finished_step)
11972 (tracepoint_was_hit, release_while_stepping_state_list):
11973 (current_traceframe): Declare.
11974 * server.c (handle_general_set): Handle tracepoint packets.
11975 (read_memory): New.
11976 (write_memory): New.
11977 (handle_search_memory_1): Use read_memory.
11978 (handle_query): Report support for conditional tracepoints, trace
11979 state variables, and tracepoint sources. Handle tracepoint
11980 queries.
11981 (main): Initialize the tracepoints module.
11982 (process_serial_event): Handle traceframe reads/writes.
11983
11984 * linux-low.c (handle_tracepoints): New.
11985 (linux_wait_1): Call it.
11986 (linux_resume_one_lwp): Handle while-stepping.
11987 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11988 (linux_target_ops): Install them.
11989 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11990 New field.
11991 * linux-x86-low.c (x86_supports_tracepoints): New.
11992 (the_low_target). Install it.
11993
11994 * mem-break.h (delete_breakpoint): Declare.
11995 * mem-break.c (delete_breakpoint): Make external.
11996
11997 * target.h (struct target_ops): Add `supports_tracepoints',
11998 `read_pc', and `write_pc' fields.
11999 (target_supports_tracepoints): Define.
12000 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12001 (phex_nz): New.
12002
12003 * regcache.h (struct regcache) <registers_owned>: New field.
12004 (init_register_cache, regcache_cpy): Declare.
12005 (regcache_read_pc, regcache_write_pc): Declare.
12006 (register_cache_size): Declare.
12007 (supply_regblock): Declare.
12008 * regcache.c (init_register_cache): New.
12009 (new_register_cache): Use it.
12010 (regcache_cpy): New.
12011 (register_cache_size): New.
12012 (supply_regblock): New.
12013 (regcache_read_pc, regcache_write_pc): New.
12014
12015 * tracepoint.c: New.
12016
12017 * Makefile.in (OBS): Add tracepoint.o.
12018 (tracepoint.o): New rule.
12019
12020 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12021
12022 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12023 (i386-mmx.o): New.
12024 (i386-mmx.c): Likewise.
12025 (i386-mmx-linux.o): Likewise.
12026 (i386-mmx-linux.c): Likewise.
12027
12028 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12029 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12030 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12031 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12032
12033 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12034 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12035 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12036
12037 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12038
12039 * Makefile.in (clean): Updated.
12040 (i386-avx.o): New.
12041 (i386-avx.c): Likewise.
12042 (i386-avx-linux.o): Likewise.
12043 (i386-avx-linux.c): Likewise.
12044 (amd64-avx.o): Likewise.
12045 (amd64-avx.c): Likewise.
12046 (amd64-avx-linux.o): Likewise.
12047 (amd64-avx-linux.c): Likewise.
12048
12049 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12050 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12051 (srv_amd64_regobj): Add amd64-avx.o.
12052 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12053 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12054 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12055 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12056 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12057 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12058 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12059
12060 * i387-fp.c: Include "i386-xstate.h".
12061 (i387_xsave): New.
12062 (i387_cache_to_xsave): Likewise.
12063 (i387_xsave_to_cache): Likewise.
12064 (x86_xcr0): Likewise.
12065
12066 * i387-fp.h (i387_cache_to_xsave): Likewise.
12067 (i387_xsave_to_cache): Likewise.
12068 (x86_xcr0): Likewise.
12069
12070 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12071 * linux-crisv32-low.c (target_regsets): Likewise.
12072 * linux-m68k-low.c (target_regsets): Likewise.
12073 * linux-mips-low.c (target_regsets): Likewise.
12074 * linux-ppc-low.c (target_regsets): Likewise.
12075 * linux-s390-low.c (target_regsets): Likewise.
12076 * linux-sh-low.c (target_regsets): Likewise.
12077 * linux-sparc-low.c (target_regsets): Likewise.
12078 * linux-xtensa-low.c (target_regsets): Likewise.
12079
12080 * linux-low.c: Include <sys/uio.h>.
12081 (regsets_fetch_inferior_registers): Support nt_type.
12082 (regsets_store_inferior_registers): Likewise.
12083 (linux_process_qsupported): New.
12084 (linux_target_ops): Add linux_process_qsupported.
12085
12086 * linux-low.h (regset_info): Add nt_type.
12087 (linux_target_ops): Add process_qsupported.
12088
12089 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12090 and <sys/uio.h>.
12091 (init_registers_i386_avx_linux): New.
12092 (init_registers_amd64_avx_linux): Likewise.
12093 (xmltarget_i386_linux_no_xml): Likewise.
12094 (xmltarget_amd64_linux_no_xml): Likewise.
12095 (PTRACE_GETREGSET): Likewise.
12096 (PTRACE_SETREGSET): Likewise.
12097 (x86_fill_xstateregset): Likewise.
12098 (x86_store_xstateregset): Likewise.
12099 (use_xml): Likewise.
12100 (x86_linux_update_xmltarget): Likewise.
12101 (x86_linux_process_qsupported): Likewise.
12102 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12103 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12104 init_registers_i386_linux here. Call
12105 x86_linux_update_xmltarget.
12106 (the_low_target): Add x86_linux_process_qsupported.
12107
12108 * server.c (handle_query): Call target_process_qsupported.
12109
12110 * target.h (target_ops): Add process_qsupported.
12111 (target_process_qsupported): New.
12112
12113 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12114
12115 * inferiors.c (add_thread): Set last_status kind to
12116 TARGET_WAITKIND_IGNORE.
12117 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12118 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12119 (linux_wait_1): Move `thread' local definition to block that uses
12120 it. Don't NULL initialize `event_child'.
12121 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12122 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12123 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12124
12125 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12126
12127 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12128 an extended waitstatus, or by a watchpoint.
12129 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12130 thread was stepping or has been stopped by a watchpoint.
12131
12132 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12133
12134 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12135 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12136 of another, then delete the previous, and validate all
12137 breakpoints.
12138 (validate_inserted_breakpoint): New.
12139 (delete_disabled_breakpoints): New.
12140 (validate_breakpoints): New.
12141 (check_mem_read): Validate breakpoints before trusting their
12142 shadow. Delete disabled breakpoints.
12143 (check_mem_write): Validate breakpoints before trusting they
12144 should be inserted. Delete disabled breakpoints.
12145 * mem-break.h (validate_breakpoints):
12146 * server.c (handle_query): Validate breakpoints when we see a
12147 qSymbol query.
12148
12149 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12150
12151 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12152 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12153 if we could tell there's a GDB breakpoint at stop_pc.
12154 (need_step_over_p): Don't do a step over if we find a GDB
12155 breakpoint at the resume PC.
12156
12157 * mem-break.c (struct raw_breakpoint): New.
12158 (enum bkpt_type): New type `gdb_breakpoint'.
12159 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12160 fields. New field `raw'.
12161 (find_raw_breakpoint_at): New.
12162 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12163 breakpoint instead.
12164 (set_breakpoint_at): Adjust.
12165 (delete_raw_breakpoint): New.
12166 (release_breakpoint): New.
12167 (delete_breakpoint): Rename to...
12168 (delete_breakpoint_1): ... this. Add proc parameter. Use
12169 release_breakpoint. Return ENOENT.
12170 (delete_breakpoint): Reimplement.
12171 (find_breakpoint_at): Delete.
12172 (find_gdb_breakpoint_at): New.
12173 (delete_breakpoint_at): Delete.
12174 (set_gdb_breakpoint_at): New.
12175 (delete_gdb_breakpoint_at): New.
12176 (gdb_breakpoint_here): New.
12177 (set_reinsert_breakpoint): Use release_breakpoint.
12178 (uninsert_breakpoint): Rename to ...
12179 (uninsert_raw_breakpoint): ... this.
12180 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12181 (reinsert_raw_breakpoint): Change parameter type to
12182 raw_breakpoint.
12183 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12184 instead.
12185 (check_breakpoints): Adjust. Use release_breakpoint.
12186 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12187 (breakpoint_inserted_here): Ditto.
12188 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12189 Don't trust the breakpoint's shadow if it is not inserted.
12190 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12191 (delete_all_breakpoints): Adjust.
12192 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12193 use delete_breakpoint_1.
12194
12195 * mem-break.h (breakpoints_supported): Delete declaration.
12196 (set_gdb_breakpoint_at): Declare.
12197 (gdb_breakpoint_here): Declare.
12198 (delete_breakpoint_at): Delete.
12199 (delete_gdb_breakpoint_at): Declare.
12200
12201 * server.h (struct raw_breakpoint): Forward declare.
12202 (struct process_info): New field `raw_breakpoints'.
12203
12204 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12205 breakpoints.
12206
12207 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12208
12209 * linux-low.c (status_pending_p_callback): Fix comment.
12210 (linux_wait_for_event_1): Move most of the internal breakpoint
12211 handling from here...
12212 (linux_wait_1): ... to here.
12213 (count_events_callback): New.
12214 (select_singlestep_lwp_callback): New.
12215 (select_event_lwp_callback): New.
12216 (cancel_breakpoints_callback): New.
12217 (select_event_lwp): New.
12218 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12219 priority to all LWPs that have had events that should be reported
12220 to the client. Cancel breakpoints when about to reporting the
12221 event to the client, not while stopping lwps. No longer cancel
12222 finished single-steps here.
12223 (cancel_finished_single_step): Delete.
12224 (cancel_finished_single_steps): Delete.
12225
12226 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12227
12228 * mem-break.c (enum bkpt_type): New.
12229 (struct breakpoint): New field `type'.
12230 (set_breakpoint_at): Change return type to struct breakpoint
12231 pointer. Set type to `other_breakpoint' by default.
12232 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12233 in the breakpoint list.
12234 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12235 (reinsert_breakpoint): Rename to ...
12236 (reinsert_raw_breakpoint): ... this.
12237 (reinsert_breakpoints_at): Adjust.
12238 * mem-break.h (struct breakpoint): Declare.
12239 (set_breakpoint_at): Change return type to struct breakpoint
12240 pointer.
12241
12242 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12243
12244 * server.c (handle_query): Assign, not compare.
12245
12246 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12247
12248 Teach linux gdbserver to step-over-breakpoints.
12249
12250 * linux-low.c (can_hardware_single_step): New.
12251 (supports_breakpoints): New.
12252 (handle_extended_wait): If stopping threads, read the stop pc of
12253 the new cloned LWP.
12254 (get_pc): New.
12255 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12256 low target doesn't support retrieving the PC.
12257 (add_lwp): Set last_resume_kind to resume_continue.
12258 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12259 (linux_attach): Don't clear stop_expected. Set the lwp's
12260 last_resume_kind to resume_stop.
12261 (linux_detach_one_lwp): Don't check for removed breakpoints.
12262 (check_removed_breakpoint): Delete.
12263 (status_pending_p): Rename to ...
12264 (status_pending_p_callback): ... this. Don't check for removed
12265 breakpoints. Don't consider threads that are stopped from GDB's
12266 perspective.
12267 (linux_wait_for_lwp): Always read the stop_pc here.
12268 (cancel_breakpoint): New.
12269 (step_over_bkpt): New global.
12270 (linux_wait_for_event_1): Implement stepping over breakpoints.
12271 (gdb_wants_lwp_stopped): New.
12272 (gdb_wants_all_stopped): New.
12273 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12274 single-step traps here. Store the thread's last reported target
12275 wait status.
12276 (send_sigstop): Don't clear stop_expected. Always set it,
12277 instead.
12278 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12279 (cancel_finished_single_step): New.
12280 (cancel_finished_single_steps): New.
12281 (wait_for_sigstop): Don't cancel finished single-step traps here.
12282 (linux_resume_one_lwp): Don't check for removed breakpoints.
12283 Don't set `step' on non-hardware step archs.
12284 (linux_set_resume_request): Ignore resume_stop requests if already
12285 stopping or stopped. Set the lwp's last_resume_kind.
12286 (resume_status_pending_p): Don't check for removed breakpoints.
12287 (need_step_over_p): New.
12288 (start_step_over): New.
12289 (finish_step_over): New.
12290 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12291 requests. Clear the thread's last reported target waitstatus.
12292 Don't use the `suspended' flag. Don't consider pending breakpoints.
12293 (linux_resume): Start a step-over if necessary.
12294 (proceed_one_lwp): New.
12295 (proceed_all_lwps): New.
12296 (unstop_all_lwps): New.
12297 * linux-low.h (struct lwp_info): Rewrite comment for the
12298 `suspended' flag. Add the `stop_pc' field. Delete the
12299 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12300 Add `'last_resume_kind' and `need_step_over' fields.
12301 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12302 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12303 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12304 (set_raw_breakpoint_at): New.
12305 (set_breakpoint_at): Rewrite to use it.
12306 (reinsert_breakpoint_handler): Delete.
12307 (set_reinsert_breakpoint): New.
12308 (reinsert_breakpoint_by_bp): Delete.
12309 (delete_reinsert_breakpoints): New.
12310 (uninsert_breakpoint): Rewrite.
12311 (uninsert_breakpoints_at): New.
12312 (reinsert_breakpoint): Rewrite.
12313 (reinsert_breakpoints_at): New.
12314 (check_breakpoints): Rewrite.
12315 (breakpoint_here): New.
12316 (breakpoint_inserted_here): New.
12317 (check_mem_read): Adjust.
12318 * mem-break.h (breakpoints_supported, breakpoint_here)
12319 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12320 (reinsert_breakpoint_by_bp): Delete declaration.
12321 (delete_reinsert_breakpoints): Declare.
12322 (reinsert_breakpoint): Delete declaration.
12323 (reinsert_breakpoints_at): Declare.
12324 (uninsert_breakpoint): Delete declaration.
12325 (uninsert_breakpoints_at): Declare.
12326 (check_breakpoints): Adjust prototype.
12327 * server.h: Adjust include order.
12328 (struct thread_info): Declare here. Add a `last_status' field.
12329
12330 2010-03-23 Michael Snyder <msnyder@vmware.com>
12331
12332 * server.c (crc32): New function.
12333 (handle_query): Add handling for 'qCRC:' request.
12334
12335 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12336
12337 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12338 lwp had been stopped by a watchpoint.
12339
12340 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12341
12342 * server.h (internal_error): Declare.
12343 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12344 * utils.c (internal_error): New function.
12345
12346 2010-03-15 Andreas Schwab <schwab@redhat.com>
12347
12348 * configure.srv: Fix typo setting srv_regobj.
12349
12350 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12351
12352 * linux-low.c (fetch_register): Avoid passing a non string literal
12353 format to `error'.
12354 (usr_store_inferior_registers): Ditto.
12355
12356 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12357
12358 * linux-low.c (linux_write_memory): Bail out early if peeking
12359 memory failed.
12360
12361 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12362
12363 * linux-low.h (struct lwp_info): New fields
12364 `stopped_by_watchpoint' and `stopped_data_address'.
12365 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12366 here, and cache them in the lwp object.
12367 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12368 directly.
12369 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12370 field.
12371 (linux_stopped_by_watchpoint): Rewrite.
12372 (linux_stopped_data_address): Rewrite.
12373
12374 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12375
12376 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12377 switching the current inferior, not before.
12378
12379 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12380
12381 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12382 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12383 i386-linux.c and amd64-linux.c.
12384 (reg-i386.o): Removed.
12385 (reg-i386.c): Likewise.
12386 (reg-i386-linux.o): Likewise.
12387 (reg-i386-linux.c): Likewise.
12388 (reg-x86-64.o): Likewise.
12389 (reg-x86-64.c): Likewise.
12390 (reg-x86-64-linux.o): Likewise.
12391 (reg-x86-64-linux.c): Likewise.
12392 (i386.o): New.
12393 (i386.c): Likewise.
12394 (i386-linux.o): Likewise.
12395 (i386-linux.c): Likewise.
12396 (amd64.o): Likewise.
12397 (amd64.c): Likewise.
12398 (amd64-linux.o): Likewise.
12399 (amd64-linux.c): Likewise.
12400
12401 * configure.srv (srv_i386_regobj): New.
12402 (srv_i386_linux_regobj): Likewise.
12403 (srv_amd64_regobj): Likewise.
12404 (srv_amd64_linux_regobj): Likewise.
12405 (srv_i386_32bit_xmlfiles): Likewise.
12406 (srv_i386_64bit_xmlfiles): Likewise.
12407 (srv_i386_xmlfiles): Likewise.
12408 (srv_amd64_xmlfiles): Likewise.
12409 (srv_i386_linux_xmlfiles): Likewise.
12410 (srv_amd64_linux_xmlfiles): Likewise.
12411 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12412 srv_xmlfiles to $srv_i386_xmlfiles.
12413 (i[34567]86-*-mingw32ce*): Likewise.
12414 (i[34567]86-*-mingw*): Likewise.
12415 (i[34567]86-*-nto*): Likewise.
12416 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12417 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12418 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12419 (x86_64-*-linux*): Likewise.
12420
12421 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12422 (init_registers_amd64_linux): New.
12423 (x86_arch_setup): Replace init_registers_x86_64_linux with
12424 init_registers_amd64_linux.
12425
12426 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12427
12428 * configure.ac: Check for libdl. If it is not available link against
12429 static libthread_db.
12430 * configure: Regenerate.
12431
12432 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12433
12434 PR9605
12435
12436 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12437 handing a read watchpoint.
12438 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12439
12440 2010-02-12 Doug Evans <dje@google.com>
12441
12442 * linux-low.c (linux_supports_tracefork_flag): Document.
12443 (linux_look_up_symbols): Add comment.
12444
12445 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12446
12447 * regcache.c (supply_register): Clear regcache if buf is NULL.
12448
12449 2010-02-02 Nicolas Roche <roche@sourceware.org>
12450 Joel Brobecker <brobecker@adacore.com>
12451
12452 * inferiors.c (find_inferior): Add function documentation.
12453 (unloaded_dll): Handle the case where the unloaded dll has not
12454 been previously registered in the dll list.
12455
12456 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12457
12458 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12459 (thumb2_breakpoint): New.
12460 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12461
12462 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12463
12464 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12465 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12466 breakpoints.
12467
12468 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12469
12470 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12471
12472 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12473
12474 * linux-s390-low.c (s390_collect_ptrace_register)
12475 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12476
12477 2010-01-21 Doug Evans <dje@google.com>
12478
12479 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12480 (PTRACE_ARG4_TYPE): New macro.
12481 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12482 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12483 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12484 (usr_store_inferior_registers): Ditto.
12485 (linux_read_memory, linux_write_memory): Ditto.
12486 (linux_test_for_tracefork): Ditto.
12487
12488 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12489 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12490
12491 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12492
12493 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12494 target.
12495
12496 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12497
12498 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12499 prototype to take a regcache. Adjust.
12500
12501 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12502
12503 * regcache.h (struct thread_info): Forward declare.
12504 (struct regcache): New.
12505 (new_register_cache): Adjust prototype.
12506 (get_thread_regcache): Declare.
12507 (free_register_cache): Adjust prototype.
12508 (registers_to_string, registers_from_string): Ditto.
12509 (supply_register, supply_register_by_name, collect_register)
12510 (collect_register_as_string, collect_register_by_name): Ditto.
12511 * regcache.c (struct inferior_regcache_data): Delete.
12512 (get_regcache): Rename to ...
12513 (get_thread_regcache): ... this. Adjust. Switch inferior before
12514 fetching registers.
12515 (regcache_invalidate_one): Adjust.
12516 (regcache_invalidate): Fix prototype.
12517 (new_register_cache): Return the new register cache.
12518 (free_register_cache): Change prototype.
12519 (realloc_register_cache): Adjust.
12520 (registers_to_string): Change prototype to take a regcache. Adjust.
12521 (registers_from_string): Ditto.
12522 (register_data): Ditto.
12523 (supply_register): Ditto.
12524 (supply_register_by_name): Ditto.
12525 (collect_register): Ditto.
12526 (collect_register_as_string): Ditto.
12527 (collect_register_by_name): Ditto.
12528 * server.c (process_serial_event): Adjust.
12529 * linux-low.h (regset_fill_func, regset_store_func): Change
12530 prototype.
12531 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12532 Change prototype.
12533 * linux-low.c (get_stop_pc): Adjust.
12534 (check_removed_breakpoint): Adjust.
12535 (linux_wait_for_event): Adjust.
12536 (linux_resume_one_lwp): Adjust.
12537 (fetch_register): Add regcache parameter. Adjust.
12538 (usr_store_inferior_registers): Ditto.
12539 (regsets_fetch_inferior_registers): Ditto.
12540 (regsets_store_inferior_registers): Ditto.
12541 (linux_fetch_registers, linux_store_registers): Ditto.
12542 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12543 regcache. Adjust.
12544 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12545 Ditto.
12546 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12547 prototype to take a regcache.
12548 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12549 * remote-utils.c (convert_ascii_to_int, outreg)
12550 (prepare_resume_reply): Change prototype to take a regcache.
12551 Adjust.
12552 * target.h (struct target_ops) <fetch_registers, store_registers>:
12553 Change prototype to take a regcache.
12554 (fetch_inferior_registers, store_inferior_registers): Change
12555 prototype to take a regcache. Adjust.
12556 * proc-service.c (ps_lgetregs): Adjust.
12557 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12558 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12559 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12560 take a regcache. Adjust.
12561 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12562 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12563 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12564 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12565 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12566 (cris_cannot_fetch_register):
12567 (cris_breakpoint_at): Change prototype to take a regcache.
12568 Adjust.
12569 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12570 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12571 to take a regcache. Adjust.
12572 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12573 Adjust.
12574 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12575 take a regcache. Adjust.
12576 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12577 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12578 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12579 * linux-mips-low.c (mips_get_pc):
12580 (mips_set_pc): Change prototype to take a regcache. Adjust.
12581 (mips_reinsert_addr): Adjust.
12582 (mips_collect_register): Change prototype to take a regcache.
12583 Adjust.
12584 (mips_supply_register):
12585 (mips_collect_register_32bit, mips_supply_register_32bit)
12586 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12587 (mips_store_fpregset): Ditto.
12588 * linux-ppc-low.c (ppc_supply_ptrace_register)
12589 (ppc_supply_ptrace_register): Ditto.
12590 (parse_spufs_run): Adjust.
12591 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12592 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12593 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12594 take a regcache. Adjust.
12595 * linux-s390-low.c (s390_collect_ptrace_register)
12596 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12597 (s390_set_pc): Change prototype to take a regcache. Adjust.
12598 (s390_arch_setup): Adjust.
12599 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12600 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12601 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12602 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12603 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12604 regcache. Adjust.
12605 (sparc_breakpoint_at): Adjust.
12606 * linux-xtensa-low.c (xtensa_fill_gregset):
12607 (xtensa_store_gregset):
12608 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12609 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12610 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12611 prototype to take a regcache. Adjust.
12612 * win32-arm-low.c (arm_fetch_inferior_register)
12613 (arm_store_inferior_register): Change prototype to take a
12614 regcache. Adjust.
12615 * win32-i386-low.c (i386_fetch_inferior_register)
12616 (i386_store_inferior_register): Change prototype to take a
12617 regcache. Adjust.
12618 * win32-low.c (child_fetch_inferior_registers)
12619 (child_store_inferior_registers): Change prototype to take a
12620 regcache. Adjust.
12621 (win32_wait): Adjust.
12622 (win32_fetch_inferior_registers): Change prototype to take a
12623 regcache. Adjust.
12624 (win32_store_inferior_registers): Adjust.
12625 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12626 store_inferior_register>: Change prototype to take a regcache.
12627
12628 2010-01-20 Doug Evans <dje@google.com>
12629
12630 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12631 #ifdef.
12632 (linux_wait_for_event1, linux_init_signals): Ditto.
12633 (W_STOPCODE): Provide definition if missing.
12634
12635 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12636
12637 * linux-low.c (linux_core_of_thread): New.
12638 (compare_ints, show_process, list_threads): New.
12639 (linux_qxfer_osdata): Report threads and cores.
12640 (linux_target_op): Register linux_core_of_thread.
12641 * remote-utils.c (prepare_resume_reply): Report the core.
12642 (buffer_xml_printf): Support %d specifier.
12643 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12644 New.
12645 (handle_query): Handle qXfer:threads. Announce availability
12646 thereof.
12647 * target.h (struct target_ops): New field core_of_thread.
12648
12649 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12650
12651 * Makefile.in (clean): Remove new generated files.
12652 (reg-s390.o, reg-s390.c): Remove rules.
12653 (reg-s390x.o, reg-s390x.c): Likewise.
12654 (s390-linux32.o, s390-linux32.c): Add rules.
12655 (s390-linux64.o, s390-linux64.c): Likewise.
12656 (s390x-linux64.o, s390x-linux64.c): Likewise.
12657 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12658 * linux-s390-low.c: Include <elf.h>.
12659 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12660 (init_registers_s390): Remove prototype.
12661 (init_registers_s390x): Likewise.
12662 (init_registers_s390_linux32): Add prototype.
12663 (init_registers_s390_linux64): Likewise.
12664 (init_registers_s390x_linux64): Likewise.
12665 (s390_num_regs_3264): New define.
12666 (s390_regmap_3264): New global variable.
12667 (s390_cannot_fetch_register): Remove obsolete check.
12668 (s390_cannot_store_register): Likewise.
12669 (s390_collect_ptrace_register): Handle upper/lower register halves.
12670 (s390_supply_ptrace_register): Likewise.
12671 (s390_fill_gregset): Update to register number changes.
12672 (s390_get_hwcap): New routine.
12673 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12674 Install appropriate regmap and register set.
12675
12676 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12677
12678 * server.c (gdbserver_version): Update copyright year to 2010.
12679 * gdbreplay.c (gdbreplay_version): Likewise.
12680
12681 2009-12-28 Doug Evans <dje@google.com>
12682
12683 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12684 elf/external.h. Include <elf.h> instead but only if necessary.
12685
12686 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12687
12688 * linux-low.c (linux_remove_process): Remove `detaching'
12689 parameter. Don't release/detach from thread_db here.
12690 (linux_kill): Release/detach from thread_db here, ...
12691 (linux_detach): ... and here, before actually detaching.
12692 (linux_wait_1): ... and here, when a process exits.
12693 * thread-db.c (any_thread_of): New.
12694 (thread_db_free): Switch the current inferior to a thread of the
12695 passed in process.
12696
12697 2009-12-21 Doug Evans <dje@google.com>
12698
12699 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12700
12701 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12702 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12703 warning ifndef __NR_tkill. Move setting of errno there too.
12704 Delete unnecessary resetting of errno after syscall.
12705 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12706
12707 * configure.ac: Check for dladdr.
12708 * config.in: Regenerate.
12709 * configure: Regenerate.
12710 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12711 (try_thread_db_load): Update.
12712
12713 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12714
12715 2009-12-18 Doug Evans <dje@google.com>
12716
12717 * event-loop.c: Include unistd.h if it exists.
12718
12719 * linux-low.c (my_waitpid): Move definition away from being in
12720 between linux_tracefork_child/linux_test_for_tracefork.
12721
12722 * gdb_proc_service.h (psaddr_t): Fix type.
12723 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12724 signature to match glibc.
12725
12726 2009-12-16 Doug Evans <dje@google.com>
12727
12728 * linux-low.c (linux_read_memory): Fix argument to read.
12729
12730 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12731
12732 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12733 events, don't leave current_inferior pointing at null.
12734
12735 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12736
12737 * win32-low.c (LOG): Delete.
12738 (OUTMSG): Output to stderr.
12739 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12740 on compile time LOG macro.
12741 (win32_wait): Fix debug output.
12742
12743 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12744
12745 * win32-low.c (win32_add_one_solib): If the dll name is
12746 "ntdll.dll", prepend the system directory to the dll path.
12747
12748 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12749
12750 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12751
12752 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12753 Vladimir Prus <vladimir@codesourcery.com>
12754
12755 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12756 * configure.ac: Check for __mcoldfire__ and set
12757 gdb_cv_m68k_is_coldfire.
12758 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12759 reg-cf.o and reg-m68k.o.
12760 * configure: Regenerated.
12761
12762 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12763
12764 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12765 Pass it to thread_db_free.
12766 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12767 proper `detaching' argument to linux_remove_process.
12768 * linux-low.h (thread_db_free): Add `detaching' parameter.
12769 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12770 to thread_db_free.
12771 (thread_db_free): Add `detaching' parameter. Only
12772 call td_ta_clear_event if detaching from process.
12773
12774 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12775
12776 * thread-db.c (thread_db_free): Fix typo.
12777
12778 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12779
12780 PR gdb/10838
12781 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12782
12783 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12784
12785 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12786 with an i686 compiler.
12787 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12788 needed.
12789 * configure: Rebuilt.
12790
12791 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12792
12793 PR gdb/10783
12794
12795 * server.c (handle_search_memory_1): Correct read_addr initialization
12796 in loop for searching subsequent chunks.
12797
12798 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12799
12800 * configure.ac: New --with-libthread-db option.
12801 * thread-db.c: Allow direct dependence on libthread_db.
12802 (thread_db_free): Adjust.
12803 * config.in: Regenerate.
12804 * configure: Likewise.
12805
12806 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12807
12808 PR gdb/10757
12809 * thread-db.c (attach_thread): New function.
12810 (maybe_attach_thread): Return success/failure.
12811 (find_new_threads_callback): Adjust.
12812 (thread_db_find_new_threads): Loop until no new threads.
12813
12814 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12815
12816 * proc-service.c (ps_lgetregs): Formatting.
12817
12818 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12819
12820 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12821 * configure.ac: Adjust.
12822 * linux-low.h (struct process_info_private): Move members to struct
12823 thread_db.
12824 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12825 * linux-low.c (linux_remove_process): Adjust.
12826 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12827 * server.c (handle_query): Move code ...
12828 (handle_monitor_command): ... here. New function.
12829 * target.h (struct target_ops): New member.
12830 * thread-db.c (struct thread_db): New.
12831 (libthread_db_search_path): New variable.
12832 (thread_db_create_event, thread_db_enable_reporting)
12833 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12834 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12835 (try_thread_db_load_1, dladdr_to_soname): New functions.
12836 (try_thread_db_load, thread_db_load_search): New functions.
12837 (thread_db_init): Search for libthread_db.
12838 (thread_db_free): New function.
12839 (thread_db_handle_monitor_command): Likewise.
12840 * config.in: Regenerate.
12841 * configure: Regenerate.
12842
12843 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12844
12845 * spu-low.c (spu_kill): Wait for inferior to terminate.
12846 Call clear_inferiors.
12847 (spu_detach): Call clear_inferiors.
12848
12849 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12850
12851 * aclocal.m4: Regenerate.
12852 * config.in: Likewise.
12853 * configure: Likewise.
12854
12855 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12856
12857 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12858 (parse_spufs_run): New function.
12859 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12860 (ppc_breakpoint_at): Handle SPU breakpoints.
12861
12862 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12863
12864 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12865 (SPUFS_MAGIC): Define.
12866 (spu_enumerate_spu_ids): New function.
12867 (linux_qxfer_spu): New function.
12868 (linux_target_ops): Install linux_qxfer_spu.
12869
12870 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12871
12872 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12873 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12874 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12875 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12876 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12877 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12878 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12879 (init_registers_powerpc_cell32l): Add prototype.
12880 (init_registers_powerpc_cell64l): Likewise.
12881 (ppc_arch_setup): Detect Cell/B.E. architecture.
12882
12883 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12884
12885 * Makefile.in (datarootdir): New variable.
12886
12887 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12888
12889 * linux-low.c (linux_write_memory): Update debugging output.
12890 * Makefile.in (clean): Add new descriptions.
12891 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12892 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12893 * configure.srv: Add new files for arm*-*-linux*.
12894 * linux-arm-low.c: Add new declarations.
12895 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12896 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12897 (HWCAP_VFPv3D16): New.
12898 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12899 instead of __IWMMXT__.
12900 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12901 (arm_arch_setup): New.
12902 (target_regsets): Remove #ifdef. Add VFP regset.
12903 (the_low_target): Use arm_arch_setup.
12904
12905 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12906
12907 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12908 the main thread again.
12909
12910 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12911
12912 Adding Neutrino gdbserver.
12913 * configure: Regenerated.
12914 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12915 * configure.srv (i[34567]86-*-nto*): New target.
12916 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12917 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12918 (nto_comctrl) [__QNX__]: New function.
12919 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12920
12921 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12922
12923 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12924 srv_tgtobj.
12925
12926 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12927 Pedro Alves <pedro@codesourcery.com>
12928
12929 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12930 don't support CONTEXT_EXTENDED_REGISTERS.
12931 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12932 (the_low_target): Install them.
12933 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12934 failing with ERROR_PIPE_NOT_CONNECTED.
12935
12936 2009-06-30 Doug Evans <dje@google.com>
12937 Pierre Muller <muller@ics.u-strasbg.fr>
12938
12939 Add h/w watchpoint support to x86-linux, win32-i386.
12940 * Makefile.in (SFILES): Add i386-low.c
12941 (i386_low_h): Define.
12942 (i386-low.o): Add dependencies.
12943 (linux-x86-low.o): Add i386-low.h dependency.
12944 (win32-i386-low.o): Ditto.
12945 * i386-low.c: New file.
12946 * i386-low.h: New file.
12947 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12948 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12949 * linux-low.c (linux_add_process): Initialize arch_private.
12950 (linux_remove_process): Free arch_private.
12951 (add_lwp): Initialize arch_private.
12952 (delete_lwp): Free arch_private.
12953 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12954 provided.
12955 * linux-low.h (process_info_private): New member arch_private.
12956 (lwp_info): New member arch_private.
12957 (linux_target_ops): New members new_process, new_thread,
12958 prepare_to_resume.
12959 (ptid_of): New macro.
12960 * linux-x86-low.c: Include stddef.h, i386-low.h.
12961 (arch_process_info): New struct.
12962 (arch_lwp_info): New struct.
12963 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12964 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12965 (i386_dr_low_get_status): New function.
12966 (x86_insert_point, x86_remove_point): New functions.
12967 (x86_stopped_by_watchpoint): New function.
12968 (x86_stopped_data_address): New function.
12969 (x86_linux_new_process, x86_linux_new_thread): New functions.
12970 (x86_linux_prepare_to_resume): New function.
12971 (the_low_target): Add entries for insert_point, remove_point,
12972 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12973 prepare_to_resume.
12974 * server.c (debug_hw_points): New global.
12975 (monitor_show_help): Document set debug-hw-points.
12976 (handle_query): Process "set debug-hw-points".
12977 * server.h (debug_hw_points): Declare.
12978 (paddress): Declare.
12979 * utils.c (NUMCELLS, CELLSIZE): New macros.
12980 (get_sell, xsnprintf, paddress): New functions.
12981 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12982 remove_point, stopped_by_watchpoint, stopped_data_address.
12983 * win32-i386-low.c: Include i386-low.h.
12984 (debug_reg_state): Replaces dr.
12985 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12986 (i386_dr_low_get_status): New function.
12987 (i386_insert_point, i386_remove_point): New functions.
12988 (i386_stopped_by_watchpoint): New function.
12989 (i386_stopped_data_address): New function.
12990 (i386_initial_stuff): Update.
12991 (get_thread_context,set_thread_context,i386_thread_added): Update.
12992 (the_low_target): Add entries for insert_point,
12993 remove_point, stopped_by_watchpoint, stopped_data_address.
12994 * win32-low.c (win32_insert_watchpoint): New function.
12995 (win32_remove_watchpoint): New function.
12996 (win32_stopped_by_watchpoint): New function.
12997 (win32_stopped_data_address): New function.
12998 (win32_target_ops): Add entries for insert_watchpoint,
12999 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13000 * win32-low.h (win32_target_ops): New members insert_point,
13001 remove_point, stopped_by_watchpoint, stopped_data_address.
13002
13003 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13004
13005 * server.c (process_serial_event): Re-return unsupported, not
13006 error, if the type isn't recognized. Re-allow supporting only
13007 insert or remove packets. Also call require_running for
13008 breakpoints. Add missing break statement to default case. Tidy.
13009 * target.h (struct target_ops): Rename insert_watchpoint to
13010 insert_point, and remove_watchpoint to remove_point.
13011
13012 * linux-low.h (struct linux_target_ops): Likewise.
13013 * linux-low.c (linux_insert_watchpoint): Rename to ...
13014 (linux_insert_point): ... this. Adjust.
13015 (linux_remove_watchpoint): Rename to ...
13016 (linux_remove_point): ... this. Adjust.
13017 (linux_target_ops): Adjust.
13018 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13019 (cris_insert_point): ... this.
13020 (cris_remove_watchpoint): Rename to ...
13021 (cris_remove_point): ... this.
13022 (the_low_target): Adjust.
13023
13024 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13025
13026 * server.c (handle_v_kill): Pass signal_pid to
13027 kill_inferior if multi_process is zero.
13028
13029 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13030
13031 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13032 * target.h (target_ops): Comment for *_watchpoint to make it clear
13033 the functions can get types '0' and '1'.
13034
13035 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13036
13037 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13038 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13039 * regcache.c (get_regcache): Likewise.
13040 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13041 * win32-low.c (child_fetch_inferior_registers): Remove check for
13042 regno 0.
13043
13044 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13045 Pedro Alves <pedro@codesourcery.com>
13046
13047 * target.h (struct target_ops) <supports_multi_process>: New
13048 callback.
13049 (target_supports_multi_process): New.
13050 * server.c (handle_query): Even if GDB reports support, only
13051 enable multi-process if the target also supports it. Report
13052 multi-process support only if the target backend supports it.
13053 * linux-low.c (linux_supports_multi_process): New function.
13054 (linux_target_ops): Install it as target_supports_multi_process
13055 callback.
13056
13057 2009-05-24 Doug Evans <dje@google.com>
13058
13059 Global renaming of find_thread_pid to find_thread_ptid.
13060 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13061 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13062 All callers updated.
13063
13064 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13065 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13066 directly.
13067
13068 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13069 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13070 (linux_resume_one_lwp): Ditto.
13071
13072 2009-05-23 Doug Evans <dje@google.com>
13073
13074 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13075 from struct inferior_list_entry * to struct lwp_info *.
13076 All callers updated.
13077
13078 2009-05-13 Doug Evans <dje@google.com>
13079
13080 * linux-x86-low.c: Don't include assert.h.
13081 (x86_siginfo_fixup): Use fatal, not assert.
13082 (x86_arch_setup): Fix comment.
13083
13084 2009-05-12 Doug Evans <dje@google.com>
13085
13086 Biarch support for i386/amd64 gdbserver.
13087 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13088 Add linux-x86-low.c.
13089 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13090 (linux-x86-low.o): Add.
13091 * linux-x86-64-low.c: Delete.
13092 * linux-i386-low.c: Delete.
13093 * linux-x86-low.c: New file.
13094 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13095 linux-x86-low.o.
13096 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13097 linux-x86-low.o.
13098 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13099 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13100 (linux_child_pid_to_exec_file): New function.
13101 (elf_64_header_p, elf_64_file_p): New functions.
13102 (siginfo_fixup): New function.
13103 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13104 give target a chance to convert layout.
13105 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13106 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13107
13108 2009-05-07 Doug Evans <dje@google.com>
13109
13110 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13111 (regsets_store_inferior_registers): Ditto.
13112
13113 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13114
13115 PR server/10048
13116
13117 * linux-low.c (must_set_ptrace_flags): Delete.
13118 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13119 of the global.
13120 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13121 `lwp->must_set_ptrace_flags' instead.
13122 (linux_wait_for_event_1): Set ptrace options here.
13123 (linux_wait_1): ... not here.
13124
13125 2009-04-30 Doug Evans <dje@google.com>
13126
13127 * inferiors.c (started_inferior_callback): New function.
13128 (attached_inferior_callback): New function.
13129 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13130 * server.c (print_started_pid, print_attached_pid): New functions.
13131 (detach_or_kill_for_exit): New function.
13132 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13133 * server.h (have_started_inferiors_p): Declare.
13134 (have_attached_inferiors_p): Declare.
13135
13136 * inferiors.c (remove_process): Fix memory leak, free process.
13137 * linux-low.c (linux_remove_process): New function.
13138 (linux_kill): Call it instead of remove_process.
13139 (linux_detach, linux_wait_1): Ditto.
13140
13141 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13142
13143 * configure.srv: Add x86 Windows CE target.
13144
13145 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13146
13147 * inferiors.c (get_thread_process): Make global.
13148 * server.h (get_thread_process): Add prototype.
13149 * thread-db.c (find_one_thread): Use get_thread_process
13150 instead of current_process.
13151 (thread_db_get_tls_address): Do not crash if called when
13152 thread layer is not yet initialized.
13153
13154 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13155
13156 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13157 * spu-low.c (current_tid): Rename to ...
13158 (current_ptid): ... this.
13159 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13160 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13161 ptid_get_lwp (current_ptid) instead of current_tid.
13162 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13163 instead of current_tid. Use find_process_pid to verify pid
13164 argument is valid. Pass proper argument to remove_process.
13165 (spu_thread_alive): Compare current_ptid instead of current_tid.
13166 (spu_resume): Likewise.
13167
13168 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13169
13170 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13171 variable.
13172
13173 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13174
13175 Implement the multiprocess extensions, and add linux multiprocess
13176 support.
13177
13178 * server.h (ULONGEST): Declare.
13179 (struct ptid, ptid_t): New.
13180 (minus_one_ptid, null_ptid): Declare.
13181 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13182 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13183 (struct inferior_list_entry): Change `id' type from unsigned from
13184 to ptid_t.
13185 (struct sym_cache, struct breakpoint, struct
13186 process_info_private): Forward declare.
13187 (struct process_info): Declare.
13188 (current_process): Declare.
13189 (all_processes): Declare.
13190 (initialize_inferiors): Declare.
13191 (add_thread): Adjust to use ptid_t.
13192 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13193 (add_process, remove_process, find_thread_pid): Declare.
13194 (find_inferior_id): Adjust to use ptid_t.
13195 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13196 (multi_process): Declare.
13197 (push_event): Adjust to use ptid_t.
13198 (read_ptid, write_ptid): Declare.
13199 (prepare_resume_reply): Adjust to use ptid_t.
13200 (clear_symbol_cache): Declare.
13201 * inferiors.c (all_processes): New.
13202 (null_ptid, minus_one_ptid): New.
13203 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13204 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13205 (add_thread): Change unsigned long to ptid. Remove gdb_id
13206 parameter. Adjust.
13207 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13208 (gdb_id_to_thread): Rename to ...
13209 (find_thread_pid): ... this. Change unsigned long to ptid.
13210 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13211 (loaded_dll, pull_pid_from_list): Adjust.
13212 (add_process, remove_process, find_process_pid)
13213 (get_thread_process, current_process, initialize_inferiors): New.
13214 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13215 (struct target_waitstatus) <related_pid>: Ditto.
13216 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13217 return type to int.
13218 (struct target_ops) <join>: Add `pid' argument.
13219 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13220 (struct target_ops) <wait>: Add `ptid' field. Change return type
13221 to ptid.
13222 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13223 (mywait): Add `ptid' argument. Change return type to ptid_t.
13224 (target_pid_to_str): Declare.
13225 * target.c (set_desired_inferior): Adjust to use ptids.
13226 (mywait): Add new `ptid' argument. Adjust.
13227 (target_pid_to_str): New.
13228 * mem-break.h (free_all_breakpoints): Declare.
13229 * mem-break.c (breakpoints): Delelete.
13230 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13231 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13232 to use per-process breakpoint list.
13233 (free_all_breakpoints): New.
13234 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13235 (symbol_cache, all_symbols_looked_up): Delete.
13236 (hexchars): New.
13237 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13238 read_ptid): New.
13239 (prepare_resume_reply): Change ptid argument's type from unsigned
13240 long to ptid_t. Adjust. Implement W;process and X;process.
13241 (free_sym_cache, clear_symbol_cache): New.
13242 (look_up_one_symbol): Adjust to per-process symbol cache. *
13243 * server.c (cont_thread, general_thread, step_thread): Change type
13244 to ptid_t.
13245 (attached): Delete.
13246 (multi_process): New.
13247 (last_ptid): Change type to ptid_t.
13248 (struct vstop_notif) <ptid>: Change type to ptid_t.
13249 (queue_stop_reply, push_event): Change `ptid' argument's type to
13250 ptid_t.
13251 (discard_queued_stop_replies): Add `pid' argument.
13252 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13253 changes. Don't reference the `attached' global.
13254 (attach_inferior): Adjust to mywait interface changes.
13255 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13256 features. Handle and report "multiprocess+". Handle
13257 "qAttached:PID".
13258 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13259 changes.
13260 (handle_v_kill): New.
13261 (handle_v_stopped): Adjust to use target_pid_to_str.
13262 (handle_v_requests): Allow multiple attaches and runs when
13263 multiprocess extensions are in effect. Handle "vKill".
13264 (myresume): Adjust to use ptids.
13265 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13266 (handle_status): Adjust to discard_queued_stop_replies interface
13267 change.
13268 (first_thread_of, kill_inferior_callback)
13269 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13270 (main): Call initialize_inferiors. Adjust to use ptids, killing
13271 and detaching from all inferiors. Handle multiprocess packet
13272 variants.
13273 * linux-low.h: Include gdb_proc_service.h.
13274 (struct process_info_private): New.
13275 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13276 <lwpid_of>: Use ptid_get_lwp.
13277 (get_lwp_thread): Adjust.
13278 (struct lwp_info): Add `dead' member.
13279 (find_lwp_pid): Declare.
13280 * linux-low.c (thread_db_active): Delete.
13281 (new_inferior): Adjust comment.
13282 (inferior_pid): Delete.
13283 (linux_add_process): New.
13284 (handle_extended_wait): Adjust.
13285 (add_lwp): Change unsigned long to ptid.
13286 (linux_create_inferior): Add process to processes table. Adjust
13287 to use ptids. Don't set new_inferior here.
13288 (linux_attach_lwp): Rename to ...
13289 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13290 it. Adjust to use ptids.
13291 (linux_attach_lwp): New.
13292 (linux_attach): Add process to processes table. Don't set
13293 new_inferior here.
13294 (struct counter): New.
13295 (second_thread_of_pid_p, last_thread_of_process_p): New.
13296 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13297 multiple processes.
13298 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13299 processes. Remove process from process table.
13300 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13301 to multiple processes.
13302 (any_thread_of): New.
13303 (linux_detach): Add `pid' argument, and handle it. Remove process
13304 from processes table.
13305 (linux_join): Add `pid' argument. Handle it.
13306 (linux_thread_alive): Change unsighed long argument to ptid_t.
13307 Consider dead lwps as not being alive.
13308 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13309 threads we're not interested in.
13310 (same_lwp, find_lwp_pid): New.
13311 (linux_wait_for_lwp): Change `pid' argument's type from int to
13312 ptid_t. Adjust.
13313 (linux_wait_for_event): Rename to ...
13314 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13315 from int to ptid_t. Adjust.
13316 (linux_wait_for_event): New.
13317 (linux_wait_1): Add `ptid' argument. Change return type to
13318 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13319 that exit from the process table.
13320 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13321 Adjust.
13322 (mark_lwp_dead): New.
13323 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13324 stopping all threads, mark its main lwp as dead.
13325 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13326 ptids.
13327 (fetch_register, usr_store_inferior_registers)
13328 (regsets_fetch_inferior_registers)
13329 (regsets_store_inferior_registers, linux_read_memory)
13330 (linux_write_memory): Inline `inferior_pid'.
13331 (linux_look_up_symbols): Adjust to use per-process
13332 `thread_db_active'.
13333 (linux_request_interrupt): Adjust to use ptids.
13334 (linux_read_auxv): Inline `inferior_pid'.
13335 (initialize_low): Don't reference thread_db_active.
13336 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13337 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13338 (ps_getpid): Return the pid of the current inferior.
13339 * thread-db.c (proc_handle, thread_agent): Delete.
13340 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13341 per-process data.
13342 (find_one_thread): Change argument type to ptid_t. Adjust to
13343 per-process data.
13344 (maybe_attach_thread): Adjust to per-process data and ptids.
13345 (thread_db_find_new_threads): Ditto.
13346 (thread_db_init): Ditto.
13347 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13348 processes table. Adjust to use ptids.
13349 (spu_kill, spu_detach): Adjust interface. Remove process from
13350 processes table.
13351 (spu_join, spu_thread_alive): Adjust interface.
13352 (spu_wait): Adjust interface. Remove process from processes
13353 table. Adjust to use ptids.
13354 * win32-low.c (current_inferior_tid): Delete.
13355 (current_inferior_ptid): New.
13356 (debug_event_ptid): New.
13357 (thread_rec): Take a ptid. Adjust.
13358 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13359 (child_delete_thread): Ditto.
13360 (do_initial_child_stuff): Add `attached' argument. Add process to
13361 processes table.
13362 (child_fetch_inferior_registers, child_store_inferior_registers):
13363 Adjust.
13364 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13365 (win32_attach): Pass 1 to do_initial_child_stuff.
13366 (win32_kill): Adjust interface. Remove process from processes
13367 table.
13368 (win32_detach): Ditto.
13369 (win32_join): Adjust interface.
13370 (win32_thread_alive): Take a ptid.
13371 (win32_resume): Adjust to use ptids.
13372 (get_child_debug_event): Ditto.
13373 (win32_wait): Adjust interface. Remove exiting process from
13374 processes table.
13375
13376 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13377
13378 Non-stop mode support.
13379
13380 * server.h (non_stop): Declare.
13381 (gdb_client_data, handler_func): Declare.
13382 (delete_file_handler, add_file_handler, start_event_loop):
13383 Declare.
13384 (handle_serial_event, handle_target_event, push_event)
13385 (putpkt_notif): Declare.
13386 * target.h (enum resume_kind): New.
13387 (struct thread_resume): Replace `step' field by `kind' field.
13388 (TARGET_WNOHANG): Define.
13389 (struct target_ops) <wait>: Add `options' argument.
13390 <supports_non_stop, async, start_non_stop>: New fields.
13391 (target_supports_non_stop, target_async): New.
13392 (start_non_stop): Declare.
13393 (mywait): Add `options' argument.
13394 * target.c (mywait): Add `options' argument. Print child exit
13395 notifications here.
13396 (start_non_stop): New.
13397 * server.c (non_stop, own_buf, mem_buf): New globals.
13398 (struct vstop_notif): New.
13399 (notif_queue): New global.
13400 (queue_stop_reply, push_event, discard_queued_stop_replies)
13401 (send_next_stop_reply): New.
13402 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13403 interface changes.
13404 (attach_inferior): In non-stop mode, don't wait for the target
13405 here.
13406 (handle_general_set): Handle QNonStop.
13407 (handle_query): When handling qC, return the current general
13408 thread, instead of the first thread of the list.
13409 (handle_query): If the backend supports non-stop mode, include
13410 QNonStop+ in the qSupported query response.
13411 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13412 and non-stop mode.
13413 (handle_v_attach, handle_v_run): Handle non-stop mode.
13414 (handle_v_stopped): New.
13415 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13416 (myresume): Adjust to use resume_kind. Handle non-stop.
13417 (queue_stop_reply_callback): New.
13418 (handle_status): Handle non-stop mode.
13419 (main): Clear non_stop flag on reconnection. Use the event-loop.
13420 Refactor serial protocol handling from here ...
13421 (process_serial_event): ... to this new function. When GDB
13422 selects any thread, select one here. In non-stop mode, wait until
13423 GDB acks all pending events before exiting.
13424 (handle_serial_event, handle_target_event): New.
13425 * remote-utils.c (remote_open): Install remote_desc in the event
13426 loop.
13427 (remote_close): Remove remote_desc from the event loop.
13428 (putpkt_binary): Rename to...
13429 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13430 (putpkt_binary): New as wrapper around putpkt_binary_1.
13431 (putpkt_notif): New.
13432 (prepare_resume_reply): In non-stop mode, don't change the
13433 general_thread.
13434 * event-loop.c: New.
13435 * Makefile.in (OBJ): Add event-loop.o.
13436 (event-loop.o): New rule.
13437
13438 * linux-low.h (pid_of): Moved here.
13439 (lwpid_of): New.
13440 (get_lwp_thread): Use lwpid_of.
13441 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13442 * linux-low.c (pid_of): Delete.
13443 (inferior_pid): Use lwpid_of.
13444 (linux_event_pipe): New.
13445 (target_is_async_p): New.
13446 (delete_lwp): New.
13447 (handle_extended_wait): Use lwpid_of.
13448 (add_lwp): Don't set lwpid field.
13449 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13450 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13451 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13452 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13453 first. Adjust to linux_wait_for_event interface changes. Use
13454 lwpid_of.
13455 (linux_detach): Don't delete the main lwp here.
13456 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13457 (status_pending_p): Don't consider explicitly suspended lwps.
13458 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13459 pointer. Add OPTIONS argument. Change return type to int. Use
13460 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13461 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13462 pointer. Add status pointer argument. Return a pid instead of a
13463 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13464 changes. In non-stop mode, don't switch to a random thread.
13465 (linux_wait): Rename to...
13466 (linux_wait_1): ... this. Add target_options argument, and handle
13467 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13468 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13469 clean exit and signal exit code. Don't stop all threads in
13470 non-stop mode. In all-stop mode, only stop all threads when
13471 reporting a stop to GDB. Handle explicit thread stop requests.
13472 (async_file_flush, async_file_mark): New.
13473 (linux_wait): New.
13474 (send_sigstop): Use lwpid_of.
13475 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13476 interface changes. In non-stop mode, don't switch to a random
13477 thread.
13478 (linux_resume_one_lwp): Use lwpid_of.
13479 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13480 (linux_resume_one_thread): ... this. Handle resume_stop. In
13481 non-stop mode, don't look for pending flag in all threads.
13482 (resume_status_pending_p): Don't consider explicitly suspended
13483 threads.
13484 (my_waitpid): Reimplement. Emulate __WALL.
13485 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13486 Use lwpid_of.
13487 (sigchld_handler, linux_supports_non_stop, linux_async)
13488 (linux_start_non_stop): New.
13489 (linux_target_ops): Register linux_supports_non_stop, linux_async
13490 and linux_start_non_stop.
13491 (initialize_low): Install SIGCHLD handler.
13492 * thread-db.c (thread_db_create_event, find_one_thread)
13493 (thread_db_get_tls_address): Use lwpid_of.
13494 * win32-low.c (win32_detach): Adjust to use resume_kind.
13495 (win32_wait): Add `options' argument.
13496 * spu-low.c (spu_resume): Adjust to use resume_kind.
13497 (spu_wait): Add `options' argument.
13498
13499 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13500
13501 Decouple target code from remote protocol.
13502
13503 * target.h (enum target_waitkind): New.
13504 (struct target_waitstatus): New.
13505 (struct target_ops) <wait>: Return an unsigned long. Take a
13506 target_waitstatus pointer instead of a char pointer.
13507 (mywait): Likewise.
13508 * target.c (mywait): Change prototype to return an unsigned long.
13509 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13510 * server.h (thread_from_wait, old_thread_from_wait): Delete
13511 declarations.
13512 (prepare_resume_reply): Change prototype to take a
13513 target_waitstatus.
13514 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13515 (last_status, last_ptid): New.
13516 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13517 pid instead of a signal.
13518 (attach_inferior): Remove "status" and "signal" parameters.
13519 Adjust.
13520 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13521 not as an address.
13522 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13523 (handle_v_requests, myresume): Remove "status" and "signal"
13524 parameters. Adjust.
13525 (handle_status): New.
13526 (main): Delete local `status'. Adjust.
13527 * remote-utils.c: Include target.h.
13528 (prepare_resume_reply): Change prototype to take a
13529 target_waitstatus. Adjust.
13530
13531 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13532 interface.
13533 * spu-low.c (spu_wait): Adjust.
13534 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13535 Delete.
13536 (win32_wait): Adjust.
13537
13538 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13539
13540 * target.h (struct thread_resume): Delete leave_stopped member.
13541 (struct target_ops): Add a `n' argument to the `resume' callback.
13542 * server.c (start_inferior): Adjust.
13543 (handle_v_cont, myresume): Adjust.
13544 * linux-low.c (check_removed_breakpoint): Adjust to resume
13545 interface change, and to removed leave_stopped field.
13546 (resume_ptr): Delete.
13547 (struct thread_resume_array): New.
13548 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13549 resume interface change.
13550 (linux_continue_one_thread, linux_queue_one_thread)
13551 (resume_status_pending_p): Check if the resume field is NULL
13552 instead of checking the leave_stopped member.
13553 (linux_resume): Adjust to the target resume interface change.
13554 * spu-low.c (spu_resume): Adjust to the target resume interface
13555 change.
13556 * win32-low.c (win32_detach, win32_resume): Ditto.
13557
13558 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13559
13560 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13561 flag.
13562 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13563 pending.
13564 (linux_continue_one_thread): Only preserve the stepping flag if
13565 there's a pending breakpoint.
13566
13567 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13568
13569 * server.c (main): After the inferior having exited, call
13570 remote_close before exiting gdbserver.
13571
13572 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13573
13574 Fix size of FPSCR in Power 7 processors.
13575 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13576 (PPC_FEATURE_HAS_DFP): New #define.
13577 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13578 size of the FPSCR.
13579
13580 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13581
13582 * server.c (handle_query) Whitespace and formatting.
13583
13584 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13585
13586 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13587 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13588 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13589 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13590 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13591 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13592 Makefile.in, configure.ac: Fix whitespace throughout.
13593 * configure: Regenerate.
13594
13595 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13596
13597 * inferiors.c (find_inferior): Make it safe for the callback
13598 function to delete the currently iterated inferior.
13599
13600 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13601
13602 * Makefile.in (linuw_low_h): Move higher.
13603 (thread-db.o): Depend on $(linux_low_h).
13604
13605 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13606
13607 Rename "process" to "lwp" throughout.
13608
13609 * linux-low.c (all_processes): Rename to...
13610 (all_lwps): ... this.
13611 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13612 (add_process): Rename to ...
13613 (add_lwp): ... this. Adjust.
13614 (linux_create_inferior): Adjust.
13615 (linux_attach_lwp): Adjust.
13616 (linux_attach): Adjust.
13617 (linux_kill_one_process): Rename to ...
13618 (linux_kill_one_lwp): ... this. Adjust.
13619 (linux_kill): Adjust.
13620 (linux_detach_one_process): Rename to ...
13621 (linux_detach_one_lwp): ... this. Adjust.
13622 (linux_detach): Adjust.
13623 (check_removed_breakpoint): Adjust.
13624 (status_pending_p): Adjust.
13625 (linux_wait_for_process): Rename to ...
13626 (linux_wait_for_lwp): ... this. Adjust.
13627 (linux_wait_for_event): Adjust.
13628 (send_sigstop): Adjust.
13629 (wait_for_sigstop): Adjust.
13630 (stop_all_processes): Rename to ...
13631 (stop_all_lwps): ... this.
13632 (linux_resume_one_process): Rename to ...
13633 (linux_resume_one_lwp): ... this. Adjust.
13634 (linux_set_resume_request, linux_continue_one_thread)
13635 (linux_queue_one_thread, resume_status_pending_p)
13636 (usr_store_inferior_registers, regsets_store_inferior_registers)
13637 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13638 Adjust.
13639 * linux-low.h (get_process): Rename to ...
13640 (get_lwp): ... this. Adjust.
13641 (get_thread_process): Rename to ...
13642 (get_thread_lwp): ... this. Adjust.
13643 (get_process_thread): Rename to ...
13644 (get_lwp_thread): ... this. Adjust.
13645 (struct process_info): Rename to ...
13646 (struct lwp_info): ... this.
13647 (all_processes): Rename to ...
13648 (all_lwps): ... this.
13649 * proc-service.c (ps_lgetregs): Adjust.
13650 * thread-db.c (thread_db_create_event, find_one_thread)
13651 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13652
13653 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13654
13655 * server.c (handle_query): Handle "qAttached".
13656
13657 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13658
13659 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13660 GPLv3, update license URL.
13661
13662 2009-03-01 Doug Evans <dje@google.com>
13663
13664 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13665 (server_h): Add gdb_signals.h.
13666 (signals.o): Update.
13667 * server.h (target_signal_from_host,target_signal_to_host_p)
13668 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13669
13670 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13671
13672 * remote-utils.c (getpkt): Also generate remote-debug
13673 information if noack_mode is set.
13674
13675 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13676
13677 * server.c (handle_query): Report qXfer:siginfo:read and
13678 qXfer:siginfo:write as supported and handle them.
13679 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13680 * linux-low.c (linux_xfer_siginfo): New.
13681 (linux_target_ops): Set it.
13682
13683 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13684
13685 * server.c (gdbserver_usage): Mention --remote-debug.
13686 (main): Accept '--remote-debug' switch.
13687
13688 2009-01-18 Doug Evans <dje@google.com>
13689
13690 * regcache.c (new_register_cache): No need to check result of xcalloc.
13691 * server.c (handle_search_memory): Back out calls to xmalloc,
13692 result is checked and error is returned to user upon failure.
13693 (handle_query): Ditto. Add more checks for result of malloc.
13694 (handle_v_cont): Check result of malloc, report error back to
13695 user upon failure.
13696 (handle_v_run): Ditto. Call freeargv.
13697 * server.h (freeargv): Declare.
13698 * utils.c (freeargv): New fn.
13699
13700 2009-01-15 Doug Evans <dje@google.com>
13701
13702 * gdbreplay.c (perror_with_name): Make arg const char *.
13703 * server.h (target_signal_to_name): Make return type const char *.
13704 * thread-db.c (thread_db_err_str): Make return type const char *.
13705 * utils.c (perror_with_name): Make arg const char *.
13706
13707 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13708
13709 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13710 when handling a EXIT_PROCESS_DEBUG_EVENT.
13711
13712 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13713
13714 * gdbreplay.c (gdbreplay_version): Update copyright year.
13715 * server.c (gdbserver_version): Likewise.
13716
13717 2009-01-05 Doug Evans <dje@google.com>
13718
13719 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13720 (handle_extended_wait): Improve comment.
13721
13722 2008-12-13 Doug Evans <dje@google.com>
13723
13724 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13725 * server.h (ATTR_MALLOC): New macro.
13726 (xmalloc,xcalloc,xstrdup): Declare.
13727 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13728 * inferiors.c: Ditto.
13729 * linux-low.c: Ditto.
13730 * mem-break.c: Ditto.
13731 * regcache.c: Ditto.
13732 * remote-utils.c: Ditto.
13733 * server.c: Ditto.
13734 * target.c: Ditto.
13735 * win32-low.c: Ditto.
13736
13737 2008-12-12 Doug Evans <dje@google.com>
13738
13739 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13740 in debugging printf.
13741
13742 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13743
13744 2008-12-09 Doug Evans <dje@google.com>
13745
13746 * linux-low.h (struct process_info): Delete member tid, unused.
13747 * thread-db.c (find_one_thread): Update.
13748 (maybe_attach_thread): Update.
13749
13750 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13751
13752 * target.h (struct target_ops): Add qxfer_osdata member.
13753 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13754 and dirent.h.
13755 (linux_qxfer_osdata): New functions.
13756 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13757 callback.
13758 * server.c (handle_query): Handle "qXfer:osdata:read:".
13759 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13760 (buffer_xml_printf): New functions.
13761 * server.h (struct buffer): New.
13762 (buffer_grow_str, buffer_grow_str0): New macros.
13763 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13764 (buffer_xml_printf): Declare.
13765
13766 2008-11-24 Doug Evans <dje@google.com>
13767
13768 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13769
13770 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13771
13772 * server.c (handle_v_run): Always use the supplied argument list.
13773
13774 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13775
13776 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13777 (xtensa_regmap_table): Add entry for scompare1.
13778
13779 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13780
13781 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13782 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13783 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13784 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13785 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13786 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13787 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13788 XML target descriptions.
13789 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13790 when inferior is running on an ISA 2.05 or later processor. Add
13791 special case to return offset for full 64-bit slot of FPSCR when
13792 in 32-bits.
13793
13794 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13795
13796 * Makefile.in (SFILES, clean): Added sparc64 files.
13797 (reg-sparc64.o, reg-sparc64.c): New.
13798 * configure.srv (sparc*-*-linux*): New configuration.
13799 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13800 syscall arguments for SPARC.
13801 (regsets_store_inferior_registers): Likewise.
13802 * linux-sparc-low.c: New file.
13803
13804 2008-10-21 Doug Evans <dje@google.com>
13805
13806 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13807 (READLINE_DIR,READLINE_DEP): Delete.
13808 (INTERNAL_CFLAGS): Update.
13809 (LINTFLAGS): Update.
13810
13811 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13812
13813 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13814 whole argv from the last run, not just argv[0].
13815
13816 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13817
13818 * regcache.c (new_register_cache): Return NULL if the register
13819 cache size isn't known yet.
13820 (free_register_cache): Avoid dereferencing a NULL regcache.
13821
13822 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13823
13824 * configure.srv: Merge MIPS and MIPS64.
13825
13826 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13827
13828 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13829
13830 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13831
13832 * Makefile.in: Add required vsx dependencies.
13833
13834 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13835 Declare init_registers_powerpc_vsx32l.
13836 Declare init_registers_powerpc_vsx64l.
13837 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13838 (ppc_arch_setup): Check for VSX in hwcap.
13839 (ppc_fill_vsxregset): New function.
13840 (ppc_store_vsxregset): New function.
13841 Add new VSX entry in regset_info target_regsets.
13842
13843 * configure.srv: Add new VSX dependencies.
13844
13845 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13846
13847 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13848 (remote_open): Set or clear transport_is_reliable.
13849 (putpkt_binary): Don't expect acks in noack mode.
13850 (getpkt): Don't send ack/nac in noack mode.
13851 * server.c (handle_general_set): Handle QStartNoAckMode.
13852 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13853 qSupported.
13854 (main): Reset noack_mode on every connection.
13855 * server.h (noack_mode): Declare.
13856
13857 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13858
13859 * Makefile.in (GDBREPLAY_OBS): New variable.
13860 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13861
13862 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13863 Daniel Jacobowitz <dan@codesourcery.com>
13864
13865 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13866 (usr_store_inferior_registers): Likewise.
13867 (regsets_store_inferior_registers): Likewise.
13868
13869 2008-07-31 Rolf Jansen <rj@surtec.com>
13870 Pedro Alves <pedro@codesourcery.com>
13871
13872 * configure.ac: Check for memmem declaration.
13873 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13874 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13875 (disable_packet_qfThreadInfo): Unconditionally compile.
13876 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13877 * configure, config.in: Regenerate.
13878
13879 2008-07-28 Doug Kwan <dougkwan@google.com>
13880
13881 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13882 (linux_write_memory): Remove declaration of errno.
13883
13884 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13885
13886 * linux-low.c (handle_extended_wait): Do not use "status"
13887 variable uninitialized.
13888
13889 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13890
13891 * server.c (handle_v_attach): Inhibit reporting dll changes.
13892
13893 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13894
13895 * remote-utils.c (prepare_resume_reply): If requested, don't
13896 output "thread:TID" in the T stop reply.
13897
13898 * server.c (disable_packet_vCont, disable_packet_Tthread)
13899 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13900 (handle_query): If requested, disable support for qC, qfThreadInfo
13901 and qsThreadInfo.
13902 (handle_v_requests): If requested, disable support for vCont.
13903 (gdbserver_show_disableable): New.
13904 (main): Handle --disable-packet and --disable-packet=LIST.
13905
13906 * server.h (disable_packet_vCont, disable_packet_Tthread)
13907 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13908
13909 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13910
13911 * server.c (gdbserver_usage): Mention --version.
13912
13913 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13914
13915 * Makefile.in (gdbreplay.o): New rule.
13916
13917 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13918
13919 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13920 message, not gdbserver.
13921
13922 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13923 Nathan Sidwell <nathan@codesourcery.com>
13924 Joseph Myers <joseph@codesourcery.com>
13925
13926 * acinclude.m4: Include ../../config/acx.m4.
13927 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13928 * configure, config.in: Regenerate.
13929 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13930 * server.c (gdbserver_version): Print PKGVERSION.
13931 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13932 (main): Adjust gdbserver_usage calls.
13933 * gdbreplay.c (version, host_name): Add declarations.
13934 (gdbreplay_version, gdbreplay_usage): New.
13935 (main): Accept --version and --help options.
13936
13937 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13938
13939 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13940 (arm_breakpoint_at): Handle Thumb.
13941 (the_low_target): Add comment.
13942
13943 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13944
13945 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13946
13947 2008-05-09 Doug Evans <dje@google.com>
13948
13949 * server.h (decode_search_memory_packet): Declare.
13950 * remote-utils.c (decode_search_memory_packet): New fn.
13951 * server.c (handle_search_memory_1): New fn.
13952 (handle_search_memory): New fn.
13953 (handle_query): Process qSearch:memory packets.
13954
13955 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13956
13957 * regcache.c (registers_length): Remove.
13958 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13959 full register packet.
13960 * regcache.h (registers_length): Remove prototype.
13961 * server.h (PBUFSIZ): Define to 16384.
13962
13963 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13964
13965 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13966 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13967 powerpc-64l.o, and powerpc-altivec64l.o.
13968 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13969 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13970 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13971 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13972 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13973 to srv_xmlfiles.
13974
13975 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13976 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13977 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13978 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13979 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13980 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13981 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13982 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13983 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13984 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13985 (clean): Update.
13986
13987 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13988 (init_registers_powerpc_32l): ... this new prototype.
13989 (init_registers_powerpc_32): Remove, replace by ...
13990 (init_registers_powerpc_altivec32l): ... this new prototype.
13991 (init_registers_powerpc_e500): Remove, replace by ...
13992 (init_registers_powerpc_e500l): ... this new prototype.
13993 (init_registers_ppc64): Remove, replace by ...
13994 (init_registers_powerpc_64l): ... this new prototype.
13995 (init_registers_powerpc_64): Remove, replace by ...
13996 (init_registers_powerpc_altivec64l): ... this new prototype.
13997 (ppc_num_regs): Set to 73.
13998 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13999 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14000 (ppc_cannot_store_register): Handle orig_r3 and trap.
14001 (ppc_arch_setup): Update init_registers_... calls.
14002 (ppc_fill_gregset): Handle orig_r3 and trap.
14003
14004 * inferiors.c (clear_inferiors): Reset current_inferior.
14005
14006 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14007
14008 * acinclude.m4: Add override.m4.
14009 * configure: Regenerate.
14010
14011 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14012
14013 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14014 initial call to init_register_ppc64.
14015
14016 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14017
14018 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14019 single powerpc*-*-linux* case.
14020 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14021
14022 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14023
14024 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14025 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14026 from reg_xmlfiles.
14027 * linux-ppc-low.c: Include <elf.h>.
14028 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14029 (ppc_hwcap): New global variable.
14030 (ppc_regmap): Remove __SPE__ #ifdef sections.
14031 (ppc_regmap_e500): New global variable.
14032 (ppc_cannot_store_register): Update __SPE__ special case.
14033 (ppc_get_hwcap): New function.
14034 (ppc_arch_setup): Use it to determine whether inferior supports
14035 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14036 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14037 Do not access registers if target does not support AltiVec.
14038 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14039 Do not access registers if target does not support SPE.
14040 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14041
14042 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14043
14044 * linux-low.c (disabled_regsets, num_regsets): New.
14045 (use_regsets_p): Delete.
14046 (linux_wait_for_process): Clear disabled_regsets.
14047 (regsets_fetch_inferior_registers): Check and set it.
14048 (regsets_store_inferior_registers): Likewise.
14049 (linux_fetch_registers, linux_store_registers): Do not use
14050 use_regsets_p.
14051 (initialize_low): Allocate disabled_regsets.
14052
14053 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14054
14055 * Makefile.in (LIBOBJS): New.
14056 (OBS): Use LIBOBJS.
14057 (memmem.o): New rule.
14058 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14059 * configure: Regenerated.
14060
14061 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14062
14063 * server.c (handle_query): Never return "unsupported" for
14064 qXfer:features:read queries.
14065
14066 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14067
14068 * server.c (get_features_xml): Fix inverted condition.
14069 (handle_query): Always support qXfer:feature:read.
14070
14071 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14072
14073 * server.c (wrapper_argv): New.
14074 (start_inferior): Handle wrapper_argv. If set, expect an extra
14075 trap.
14076 (gdbserver_usage): Document --wrapper.
14077 (main): Parse --wrapper.
14078
14079 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14080
14081 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14082 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14083 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14084 (ppc_set_pc): Likewise.
14085 (ppc_arch_setup): New function.
14086 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14087 of collect_register.
14088 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14089
14090 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14091
14092 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14093 instead of linux-ppc64-low.o.
14094 * linux-ppc64-low.c: Remove file.
14095 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14096 (linux-ppc64-low.o): Remove rule.
14097
14098 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14099 (init_registers_powerpc_64): Likewise.
14100 (ppc_regmap): Conditionally define depending on __powerpc64__.
14101 (ppc_cannot_store_register): Do not special-case "fpscr" when
14102 compiled on __powerpc64__.
14103 (ppc_collect_ptrace_register): New function.
14104 (ppc_supply_ptrace_register): New function.
14105 (ppc_breakpoint): Change type to "unsigned int".
14106 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14107 (the_low_target): Conditionally provide initializers for the
14108 arch_setup member depending on __powerpc64__. Install
14109 collect_ptrace_register and supply_ptrace_register members.
14110
14111 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14112
14113 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14114 * server.c (gdbserver_xmltarget): Define.
14115 (get_features_xml): Use it to replace "target.xml" and arch_string.
14116
14117 * configure.srv: Remove srv_xmltarget. Add XML files that were
14118 mentioned there to srv_xmlfiles instead. Remove conditional tests
14119 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14120 srv_xmlfiles and srv_regobj to include all possible choices.
14121 * configure.ac (srv_xmltarget): Remove.
14122 (srv_xmlfiles): Do not add "target.xml".
14123 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14124 checks for supplementary target information.
14125 * configure: Regenerate.
14126 * Makefile.in (XML_TARGET): Remove.
14127 (target.xml): Remove rule.
14128 (clean): Do not clean up target.xml.
14129 (.PRECIOUS): Do not mention target.xml.
14130
14131 * target.h (struct target_ops): Remove arch_string member.
14132 * linux-low.c (linux_arch_string): Remove.
14133 (linux_target_ops): Remove arch_string initializer.
14134 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14135 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14136 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14137 * spu-low.c (spu_arch_string): Remove.
14138 (spu_target_ops): Remove arch_string initializer.
14139 * win32-low.c (win32_arch_string): Remove.
14140 (win32_target_ops): Remove arch_string initializer.
14141 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14142 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14143 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14144
14145 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14146
14147 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14148 by collect_ptrace_register and supply_ptrace_register hooks.
14149 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14150 instead of checking for the_low_target.left_pad_xfer.
14151 (usr_store_inferior_registers): Use collect_ptrace_register callback
14152 instead of checking for the_low_target.left_pad_xfer.
14153
14154 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14155 (s390_supply_ptrace_register): Likewise.
14156 (s390_fill_gregset): Call s390_collect_ptrace_register.
14157 (the_low_target): Update.
14158
14159 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14160 (ppc_supply_ptrace_register): Likewise.
14161 (the_low_target): Update.
14162
14163 * linux-i386-low.c (the_low_target): Update.
14164 * linux-x86-64-low.c (the_low_target): Update.
14165
14166 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14167
14168 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14169 reg-s390.o and reg-s390x.o.
14170
14171 * linux-low.c (new_inferior): New global variable.
14172 (linux_create_inferior, linux_attach): Set it.
14173 (linux_wait_for_process): Call the_low_target.arch_setup after the
14174 target has stopped for the first time.
14175 (initialize_low): Do not call the_low_target.arch_setup.
14176
14177 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14178 (s390_set_pc): Likewise.
14179 (s390_arch_setup): New function.
14180 (the_low_target): Use s390_arch_setup as arch_setup routine.
14181
14182 * regcache.c (realloc_register_cache): New function.
14183 (set_register_cache): Call it for each existing regcache.
14184
14185 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14186
14187 * server.h (init_registers): Remove prototype.
14188
14189 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14190 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14191 instead of init_registers ().
14192 * linux-arm-low.c (init_registers_arm): Add prototype.
14193 (init_registers_arm_with_iwmmxt): Likewise.
14194 (the_low_target): Add initializer for arch_setup field.
14195 * linux-cris-low.c (init_registers_cris): Add prototype.
14196 (the_low_target): Add initializer for arch_setup field.
14197 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14198 (the_low_target): Add initializer for arch_setup field.
14199 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14200 (the_low_target): Add initializer for arch_setup field.
14201 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14202 (the_low_target): Add initializer for arch_setup field.
14203 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14204 (the_low_target): Add initializer for arch_setup field.
14205 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14206 (the_low_target): Add initializer for arch_setup field.
14207 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14208 (init_registers_mips64_linux): Likewise.
14209 (the_low_target): Add initializer for arch_setup field.
14210 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14211 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14212 (the_low_target): Add initializer for arch_setup field.
14213 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14214 (init_registers_powerpc_64): Likewise.
14215 (the_low_target): Add initializer for arch_setup field.
14216 * linux-s390-low.c (init_registers_s390): Add prototype.
14217 (init_registers_s390x): Likewise.
14218 (the_low_target): Add initializer for arch_setup field.
14219 * linux-sh-low.c (init_registers_sh): Add prototype.
14220 (the_low_target): Add initializer for arch_setup field.
14221 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14222 (the_low_target): Add initializer for arch_setup field.
14223 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14224 (the_low_target): Add initializer for arch_setup field.
14225
14226 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14227 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14228 instead of init_registers ().
14229 * win32-arm-low.c (init_registers_arm): Add prototype.
14230 (the_low_target): Add initializer for arch_setup field.
14231 * win32-i386-low.c (init_registers_i386): Add prototype.
14232 (the_low_target): Add initializer for arch_setup field.
14233
14234 * spu-low.c (init_registers_spu): Add prototype.
14235 (initialize_low): Call initialie_registers_spu () instead of
14236 initialize_registers ().
14237
14238 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14239
14240 * server.c (handle_v_requests): When handling the vRun and vAttach
14241 packets, if already debugging a process, don't kill it. Return an
14242 error instead.
14243
14244 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14245
14246 * server.c (handle_query): Correct length check.
14247
14248 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14249
14250 * win32-low.c (do_initial_child_stuff): Add process handle
14251 parameter. Set current_process_handle and current_process_id from the
14252 parameters. Clear globals.
14253 (win32_create_inferior): Don't set current_process_handle and
14254 current_process_id here. Instead pass them on the call to
14255 do_initial_child_stuff.
14256 (win32_attach): Likewise.
14257 (win32_clear_inferiors): New.
14258 (win32_kill): Don't close the current process handle or the
14259 current thread handle here. Instead call win32_clear_inferiors.
14260 (win32_detach): Don't open a new handle to the process. Call
14261 win32_clear_inferiors.
14262 (win32_join): Don't rely on current_process_handle; open a new
14263 handle using the process id.
14264 (win32_wait): Call win32_clear_inferiors when the inferior process
14265 has exited.
14266
14267 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14268
14269 * server.c (monitor_show_help): Add "exit".
14270
14271 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14272
14273 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14274 (clean): Add reg-xtensa.c.
14275 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14276 * configure.srv (xtensa*-*-linux*) New target.
14277 * linux-xtensa-low.c: New.
14278 * xtensa-xtregs.c: New.
14279
14280 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14281
14282 * hostio.c: Don't include errno.h.
14283 (errno_to_fileio_errno): Move to hostio-errno.
14284 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14285 error number outputting to the target->hostio_last_error callback.
14286 (hostio_packet_error): Use FILEIO_EINVAL directly.
14287 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14288 calls to hostio_error.
14289 * hostio-errno.c: New.
14290 * server.h (hostio_last_error_from_errno): Declare.
14291 * target.h (target_ops): Add hostio_last_error member.
14292 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14293 as hostio_last_error handler.
14294 * spu-low.c (spu_target_ops): Likewise.
14295 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14296 (wince_hostio_last_error): New functions.
14297 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14298 as hostio_last_error handler.
14299 (win32_target_ops) [!_WIN32_WCE]: Register
14300 hostio_last_error_from_errno as hostio_last_error handler.
14301 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14302 (hostio-errno.o): New rule.
14303 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14304 * configure.srv (srv_hostio_err_objs): New variable. Default to
14305 hostio-errno.o.
14306 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14307 * configure: Regenerate.
14308
14309 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14312 (linux_kill, linux_detach): Clean up the process list.
14313 * remote-utils.c (remote_open): Improve port number parsing.
14314 (putpkt_binary, input_interrupt): Only send interrupts if the target
14315 is running.
14316 * server.c (extended_protocol): Make static.
14317 (attached): Define earlier.
14318 (exit_requested, response_needed, program_argv): New variables.
14319 (target_running): New.
14320 (start_inferior): Clear attached here.
14321 (attach_inferior): Set attached here.
14322 (require_running): Define.
14323 (handle_query): Use require_running and target_running. Implement
14324 "monitor exit".
14325 (handle_v_attach, handle_v_run): New.
14326 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14327 (gdbserver_usage): Update.
14328 (main): Redo argument parsing. Handle --debug and --multi. Handle
14329 --attach along with other options or after the port. Save
14330 program_argv. Support no initial program. Resynchronize
14331 communication with GDB after an error. Handle "monitor exit".
14332 Use require_running and target_running. Always allow the extended
14333 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14334 restart in extended mode.
14335 * README: Refer to the GDB manual. Update --attach usage.
14336
14337 2007-12-20 Andreas Schwab <schwab@suse.de>
14338
14339 * linux-low.c (STACK_SIZE): Define.
14340 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14341 (linux_test_for_tracefork): Likewise.
14342
14343 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * linux-low.c (linux_wait_for_event): Update messages. Do not
14346 reinsert auto-delete breakpoints.
14347 * mem-break.c (struct breakpoint): Change return type of handler to
14348 int.
14349 (set_breakpoint_at): Update handler type.
14350 (reinsert_breakpoint_handler): Return 1 instead of calling
14351 delete_breakpoint.
14352 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14353 setting a new one.
14354 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14355 * mem-break.h (set_breakpoint_at): Update handler type.
14356 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14357 * win32-low.c (auto_delete_breakpoint): New.
14358 (get_child_debug_event): Use it.
14359
14360 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14361
14362 * configure.ac: Check for pread and pwrite.
14363 * hostio.c (handle_pread): Fall back to lseek and read.
14364 (handle_pwrite): Fall back to lseek and write.
14365 * config.in, configure: Regenerated.
14366
14367 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * server.c (myresume): Add own_buf argument.
14370 (main): Update calls.
14371
14372 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14375 * remote-utils.c (remote_open): Do not call disable_async_io.
14376 (block_async_io): Delete.
14377 (unblock_async_io): Make static.
14378 (initialize_async_io): New.
14379 * server.c (handle_v_cont): Handle async I/O here.
14380 (myresume): Likewise. Move other common resume tasks here...
14381 (main): ... from here. Call initialize_async_io. Disable async
14382 I/O before the main loop.
14383 * server.h (initialize_async_io): Declare.
14384 (block_async_io, unblock_async_io): Delete prototypes.
14385 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14386
14387 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14388
14389 * remote-utils.c (readchar): Allow binary data in received messages.
14390
14391 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14392
14393 * win32-low.c (attaching): New global.
14394 (win32_create_inferior): Clear the `attaching' global.
14395 (win32_attach): Set the `attaching' global.
14396 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14397 attaching. Only set a breakpoint at the entry point if not
14398 attaching.
14399
14400 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14401
14402 * server.c (main): Don't report dll events on the initial
14403 connection on attaches.
14404
14405 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14406
14407 * server.c (main): Relax numerical bases supported for the pid of
14408 the --attach command line argument.
14409
14410 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14411
14412 * win32-low.c (win32_attach): Call OpenProcess before
14413 DebugActiveProcess, not after. Add last error output to error
14414 call.
14415
14416 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14417
14418 * win32-low.c (win32_get_thread_context)
14419 (win32_set_thread_context): New functions.
14420 (thread_rec): Use win32_get_thread_context.
14421 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14422 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14423 field.
14424
14425 2007-12-03 Leo Zayas
14426 Pedro Alves <pedro_alves@portugalmail.pt>
14427
14428 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14429 global variables.
14430 (child_add_thread): Minor cleanup.
14431 (child_continue): Resume artificially suspended threads before
14432 calling ContinueDebugEvent.
14433 (suspend_one_thread): New.
14434 (fake_breakpoint_event): New.
14435 (get_child_debug_event): Change return type to int. Check here if
14436 gdb sent an interrupt request. If a soft interrupt was requested,
14437 fake a breakpoint event. Return 0 if there is no event to handle,
14438 and 1 otherwise.
14439 (win32_wait): Don't check here if gdb sent an interrupt request.
14440 Ensure there is a valid event to handle.
14441 (win32_request_interrupt): Add soft interruption method as last
14442 resort.
14443
14444 2007-12-03 Leo Zayas
14445 Pedro Alves <pedro_alves@portugalmail.pt>
14446
14447 * win32-low.h (win32_thread_info): Add descriptions to the
14448 structure members. Replace `suspend_count' counter by a
14449 `suspended' flag.
14450 * win32-low.c (thread_rec): Update condition of when to get the
14451 context from the inferior. Rely on ContextFlags being set if it
14452 has already been retrieved. Only suspend the inferior thread if
14453 we haven't already. Warn if that fails.
14454 (continue_one_thread): s/suspend_count/suspended/. Only call
14455 ResumeThread once. Warn if that fails.
14456
14457 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14458
14459 * win32-low.c (win32_wait): Don't read from the inferior when it
14460 has already exited.
14461
14462 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14463
14464 * Makefile.in (win32_low_h): New variable.
14465 (win32-low.o): Add dependency on $(win32_low_h).
14466 (win32-arm-low.o, win32-i386-low.o): New rules.
14467
14468 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14469
14470 * hostio.c: Correct copyright year.
14471
14472 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * Makefile.in (OBS): Add hostio.o.
14475 (hostio.o): New rule.
14476 * server.h (handle_vFile): Declare.
14477 * hostio.c: New file.
14478 * server.c (handle_v_requests): Take packet_len and new_packet_len
14479 for binary packets. Call handle_vFile.
14480 (main): Update call to handle_v_requests.
14481
14482 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14483
14484 * linux-low.c: Include <sched.h>.
14485
14486 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14487
14488 * linux-low.c (linux_tracefork_grandchild): New.
14489 (linux_tracefork_child): Use clone.
14490 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14491
14492 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14493
14494 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14495
14496 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14499
14500 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14501
14502 * inferiors.c (change_inferior_id): Delete.
14503 (add_pid_to_list, pull_pid_from_list): New.
14504 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14505 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14506 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14507 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14508 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14509 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14510 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14511 (using_threads): Always set to 1.
14512 (handle_extended_wait): New.
14513 (add_process): Do not set TID.
14514 (linux_create_inferior): Set must_set_ptrace_flags.
14515 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14516 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14517 (linux_thread_alive): Rename TID argument to LWPID.
14518 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14519 (linux_wait_for_event): Do not use TID or check using_threads. Update
14520 call to dead_thread_notify. Call handle_extended_wait.
14521 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14522 (send_sigstop): Delete sigstop_sent.
14523 (wait_for_sigstop): Avoid TID.
14524 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14525 (linux_test_for_tracefork): New.
14526 (linux_lookup_signals): Use thread_db_active and
14527 linux_supports_tracefork_flag.
14528 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14529 * linux-low.h (get_process_thread): Avoid TID.
14530 (struct process_ifo): Move thread_known and tid to the end. Remove
14531 sigstop_sent.
14532 (linux_attach_lwp, thread_db_init): Update prototypes.
14533 * server.h (change_inferior_id): Delete prototype.
14534 (add_pid_to_list, pull_pid_from_list): New prototypes.
14535 * thread-db.c (thread_db_use_events): New.
14536 (find_first_thread): Rename to...
14537 (find_one_thread): ...this. Update callers and messages. Do not
14538 call fatal. Check thread_db_use_events. Do not call
14539 change_inferior_id or new_thread_notify.
14540 (maybe_attach_thread): Update. Do not call new_thread_notify.
14541 (thread_db_init): Set thread_db_use_events. Check use_events.
14542 * utils.c (fatal, warning): Correct message prefix.
14543
14544 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14545
14546 * Makefile.in (clean): Remove new files.
14547 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14548 (powerpc-64.o, powerpc-64.c): New rules.
14549 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14550 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14551 with SPE.
14552 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14553 SPE targets.
14554 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14555 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14556 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14557 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14558 (target_regsets): Add AltiVec and SPE register sets.
14559 * configure.ac: Check for AltiVec and SPE.
14560 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14561 (ppc_fill_vrregset, ppc_store_vrregset): New.
14562 (target_regsets): Add AltiVec register set.
14563 * configure: Regenerated.
14564
14565 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14566
14567 * linux-low.c (O_LARGEFILE): Define.
14568 (linux_read_memory): Use /proc/PID/mem.
14569 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14570 * configure, config.in: Regenerated.
14571
14572 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14573
14574 * linux-low.c (linux_wait_for_event): Do not pass signals while
14575 single-stepping.
14576
14577 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14578
14579 * win32-low.c (create_process): New.
14580 (win32_create_inferior): Use create_process instead of
14581 CreateProcess. If create_process failed retry appending an ".exe"
14582 suffix. Store the GetLastError result immediatelly after
14583 create_process calls and use it on the call to error.
14584
14585 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14586
14587 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14588
14589 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14590
14591 * configure.ac: Switch license to GPLv3.
14592
14593 2007-08-01 Michael Snyder <msnyder@access-company.com>
14594
14595 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14596
14597 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14598
14599 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14600 typedef.
14601 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14602 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14603 CloseToolhelp32Snapshot.
14604 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14605 CloseToolhelp32Snapshot.
14606
14607 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14608
14609 * server.c (main): Check for inferior exit before main loop.
14610
14611 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14612
14613 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14614 instead of on tmp_desc.
14615
14616 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14617 Daniel Jacobowitz <dan@codesourcery.com>
14618
14619 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14620 (add_thread): Minor cleanups.
14621 (clear_inferiors): Move lower in the file. Clear the DLL
14622 list.
14623 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14624 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14625 (xml_escape_text): New.
14626 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14627 for qSupported.
14628 (handle_v_cont): Report errors.
14629 (gdbserver_version): Update.
14630 (main): Correct size of own_buf. Do not report initial DLL events.
14631 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14632 (unloaded_dll, xml_escape_text): New.
14633 * win32-low.c (enum target_waitkind): Update comments.
14634 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14635 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14636 (win32_EnumProcessModules, win32_GetModuleInformation)
14637 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14638 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14639 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14640 (win32_Module32First, win32_Module32Next, load_toolhelp)
14641 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14642 (get_child_debug_event): Handle DLL events.
14643 (win32_wait): Likewise.
14644
14645 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14646
14647 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14648 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14649
14650 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14651
14652 * win32-low.c (handle_output_debug_string): Ignore event if not
14653 waiting.
14654
14655 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14656
14657 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14658
14659 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14660
14661 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14662
14663 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14664
14665 * inferiors.c (change_inferior_id): Add comment.
14666 * linux-low.c (check_removed_breakpoint): Add an early
14667 prototype. Improve debug output.
14668 (linux_attach): Doc update.
14669 (linux_detach_one_process, linux_detach): Clean up before releasing
14670 each process.
14671 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14672 * linux-low.h (struct process_info): Doc improvement.
14673 * mem-break.c (delete_all_breakpoints): New.
14674 * mem-break.h (delete_all_breakpoints): New prototype.
14675 * thread-db.c (find_first_thread): New.
14676 (thread_db_create_event): Call it instead of
14677 thread_db_find_new_threads. Clean up unused variables.
14678 (maybe_attach_thread): Remove first thread handling.
14679 (thread_db_find_new_threads): Use find_first_thread.
14680 (thread_db_get_tls_address): Likewise.
14681
14682 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14683
14684 * thread-db.c (thread_db_find_new_threads): Add prototype.
14685 (thread_db_create_event): Check for the main thread before adding
14686 a new thread.
14687 (maybe_attach_thread): Only enable event reporting if TID == 0.
14688 (thread_db_get_tls_address): Check for new threads.
14689
14690 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14691
14692 * linux-low.c (linux_create_inferior): Try execv before execvp.
14693 * spu-low.c (spu_create_inferior): Likewise.
14694
14695 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14696
14697 * linux-low.c (linux_create_inferior): Change execv to execvp.
14698 * spu-low.c (spu_create_inferior): Likewies.
14699
14700 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14701
14702 * Makefile.in (clean): Clean new files instead of deleted ones.
14703 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14704 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14705 rules.
14706 * configure.srv: Specify XML files and new regformats for MIPS and
14707 MIPS64 GNU/Linux.
14708 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14709 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14710 an entry for the restart register.
14711 (mips_cannot_fetch_register, mips_cannot_store_register)
14712 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14713 register names to match the XML descriptions.
14714 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14715 restart register instead of $0.
14716
14717 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14718 Markus Deuling <deuling@de.ibm.com>
14719
14720 * remote-utils.c (decode_xfer_write): New function.
14721 * server.h (decode_xfer_write): Add prototype.
14722 * server.c (handle_query): Add PACKET_LEN argument. Support
14723 qXfer:spu:read and qXfer:spu:write packets.
14724 (main): Pass packet_len to handle_query.
14725 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14726 * target.h (target_ops): Add qxfer_spu.
14727
14728 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14729
14730 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14731 accessing non-seekable spufs files.
14732
14733 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14734
14735 * server.c (handle_query): Add reply for qC packet.
14736
14737 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14738 Leo Zayas <lerele@champenstudios@com>
14739
14740 * server.h (check_remote_input_interrupt_request): New function.
14741 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14742 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14743 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14744 (check_remote_input_interrupt_request): New function.
14745 * server.h (check_remote_input_interrupt_request): Declare.
14746 * win32-low.c (winapi_DebugBreakProcess,
14747 winapi_GenerateConsoleCtrlEvent): New typedefs.
14748 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14749 to 250 ms.
14750 (win32_wait): Check for remote interrupt request
14751 with check_remote_input_interrupt_request.
14752 (win32_request_interrupt): New function.
14753 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14754
14755 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14756
14757 * win32-low.c (debug_registers_changed,
14758 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14759 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14760 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14761 (thread_rec): Get context using the low target.
14762 (child_add_thread): Call thread_added on the low target,
14763 which does the same thing.
14764 (regptr): Delete.
14765 (do_initial_child_stuff): Remove debug registers references.
14766 Set context using the low target. Resume threads after
14767 setting the contexts.
14768 (child_continue): Remove dead variable. Remove debug
14769 registers references.
14770 (child_fetch_inferior_registers): Go through the low target.
14771 (do_child_store_inferior_registers): Remove.
14772 (child_store_inferior_registers): Go through the low target.
14773 (win32_resume): Remove debug registers references.
14774 Set context using the low target.
14775 (handle_exception): Change return type to void. Don't record
14776 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14777 first chance exception.
14778 (get_child_debug_event): Change return type to void. Remove
14779 goto loop. Always return after waiting for debug event.
14780 (win32_wait): Convert to switch statement. Handle spurious
14781 events.
14782
14783 * win32-i386-low.c (debug_registers_changed,
14784 debug_registers_used): New.
14785 (initial_stuff): Rename to ...
14786 (i386_initial_stuff): ... this. Clear debug registers
14787 state variables.
14788 (store_debug_registers): Delete.
14789 (i386_get_thread_context): New.
14790 (load_debug_registers): Delete.
14791 (i386_set_thread_context): New.
14792 (i386_thread_added): New.
14793 (single_step): Rename to ...
14794 (i386_single_step): ... this.
14795 (do_fetch_inferior_registers): Rename to ...
14796 (i386_fetch_inferior_register): ... this.
14797 (i386_store_inferior_register): New.
14798 (the_low_target): Adapt to new interface.
14799
14800 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14801 (arm_get_thread_context): New.
14802 (arm_set_thread_context): New.
14803 (regptr): New.
14804 (do_fetch_inferior_registers): Rename to ...
14805 (arm_fetch_inferior_register): ... this.
14806 (arm_store_inferior_register): New.
14807 (arm_wince_breakpoint): Reimplement as unsigned long.
14808 (arm_wince_breakpoint_len): Define.
14809 (the_low_target): Adapt to new interface.
14810
14811 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14812 load_debug_registers. Add get_thread_context, set_thread_context,
14813 thread_added and store_inferior_register. Rename
14814 fetch_inferior_registers to fetch_inferior_register.
14815 (regptr): Remove declaration.
14816
14817 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14818
14819 * linux-low.c (linux_detach): Change return type to int. Return 0.
14820 * spu-low.c (spu_detach): Likewise.
14821
14822 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14823
14824 * target.h (target_ops): Change return type of detach to int.
14825 Add join.
14826 (join_inferior): New.
14827 * server.c (main): Don't skip detach support on mingw32.
14828 If the inferior doesn't support detaching return error.
14829 Call join_inferior instead of using waitpid.
14830 * linux-low.c (linux_join): New.
14831 (linux_target_op): Add linux_join.
14832 * spu-low.c (spu_join): New.
14833 (spu_target_ops): Add spu_join.
14834 * win32-low.c (win32_detach): Adapt to new interface.
14835 Reopen current_process_handle before detaching. Issue a child
14836 resume before detaching.
14837 (win32_join): New.
14838 (win32_target_op): Add win32_join.
14839
14840 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14841
14842 * win32-low.c (win32-attach): Fix return value.
14843 * target.h (target_ops): Describe ATTACH return values.
14844
14845 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14846
14847 * win32-low.c (GETPROCADDRESS): Define.
14848 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14849 (winapi_DebugSetProcessKillOnExit): Likewise.
14850 (win32_create_inferior): Force usage of ansi CreateProcessA.
14851 (win32_attach): Use GETPROCADDRESS.
14852 (win32_detach): Likewise.
14853
14854 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14855
14856 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14857
14858 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14859
14860 * win32-low.c: Commit leftover changes from 2007-03-29.
14861
14862 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14863
14864 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14865 fields short instead of int. Add explicit padding.
14866 (i387_cache_to_fsave): Remove unnecessary casts.
14867 (i387_fsave_to_cache): Doc fix.
14868 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14869
14870 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14871
14872 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14873 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14874
14875 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14876
14877 * configure.srv (arm*-*-mingw32ce*): Move near the other
14878 arm targets.
14879
14880 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14881
14882 * configure.ac: Add errno checking.
14883 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14884 sys/file.h and malloc.h.
14885 (AC_CHECK_DECLS): Add perror.
14886 (srv_mingwce): Handle.
14887 * configure.srv (i[34567]86-*-cygwin*): Add
14888 win32-i386-low.o to srv_tgtobj.
14889 (i[34567]86-*-mingw*): Likewise.
14890 (arm*-*-mingw32ce*): Add case.
14891 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14892 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14893 [__MINGW32CE__] (strerror): New function.
14894 [__MINGW32CE__] (errno): Define to GetLastError.
14895 [__MINGW32CE__] (COUNTOF): New macro.
14896 (remote_open): Remove extra close call.
14897 * mem-break.c (delete_breakpoint_at): New function.
14898 * mem-break.h (delete_breakpoint_at): Declare.
14899 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14900 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14901 [USE_WIN32API] (read, write): Add char* casts.
14902 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14903 * server.h: Include wincecompat.h on Windows CE.
14904 [HAVE_ERRNO_H]: Check.
14905 (perror): Declare if not declared.
14906 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14907 (perror_with_name): Remove errno declaration.
14908 * wincecompat.h: New.
14909 * wincecompat.c: New.
14910 * win32-low.h: New.
14911 * win32-arm-low.c: New.
14912 * win32-i386-low.c: New.
14913 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14914 (OUTMSG2): Make it safe.
14915 (_T): New macro.
14916 (COUNTOF): New macro.
14917 (NUM_REGS): Get it from the low target.
14918 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14919 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14920 (thread_rec): Let low target handle debug registers.
14921 (child_add_thread): Likewise.
14922 (child_init_thread_list): Likewise.
14923 (continue_one_thread): Likewise.
14924 (regptr): New.
14925 (do_child_fetch_inferior_registers): Move to ...
14926 * win32-i386-low.c: ... here, and rename to ...
14927 (do_fetch_inferior_registers): ... this.
14928 * win32-low.c (child_fetch_inferior_registers):
14929 Go through the low target.
14930 (do_child_store_inferior_registers): Use regptr.
14931 (strwinerror): New function.
14932 (win32_create_inferior): Handle Windows CE.
14933 Use strwinerror instead of strerror on Windows error
14934 codes. Add program to the error output.
14935 Don't close the main thread handle on Windows CE.
14936 (win32_attach): Use coredll.dll on Windows CE.
14937 (win32_kill): Close current process and current
14938 thread handles.
14939 (win32_detach): Use coredll.dll on Windows CE.
14940 (win32_resume): Let low target handle debug registers, and
14941 step request.
14942 (handle_exception): Add/Remove initial breakpoint. Avoid
14943 non-existant WSTOPSIG on Windows CE.
14944 (win32_read_inferior_memory): Cast to remove warning.
14945 (win32_arch_string): Go through the low target.
14946 (initialize_low): Call set_breakpoint_data with the low
14947 target's breakpoint.
14948 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14949 FOP_REGNUM, mappings): Move to ...
14950 * win32-i386-low.c: ... here.
14951 * win32-low.c (win32_thread_info): Move to ...
14952 * win32-low.h: ... here.
14953 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14954 win32-arm-low.c and wincecompat.c.
14955 (all:): Add $EXEEXT.
14956 (install-only:): Likewise.
14957 (gdbserver:): Likewise.
14958 (gdbreplay:): Likewise.
14959 * config.in: Regenerate.
14960 * configure: Regenerate.
14961
14962 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14963
14964 * win32-low.c: Rename typedef thread_info to
14965 win32_thread_info throughout.
14966
14967 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14968
14969 * win32-i386-low.c: Rename to ...
14970 * win32-low.c: ... this.
14971 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14972 * Makefile.in: Likewise.
14973
14974 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14975
14976 * remote-utils.c (monitor_output): Constify msg parameter.
14977 * server.h (monitor_output): Likewise.
14978 * win32-i386-low.c (handle_output_debug_string): New.
14979 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14980 handle_output_debug_string.
14981 (get_child_debug_event): Likewise.
14982
14983 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14984
14985 * server.c (main): Correct strtoul check.
14986
14987 2007-03-27 Jon Ringle <jon@ringle.org>
14988
14989 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14990
14991 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14992
14993 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14994
14995 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14996
14997 * terminal.h: Check HAVE_SGTTY_H.
14998
14999 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15000
15001 * remote-utils.c (remote_open): Print out the assigned port number.
15002
15003 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15004
15005 * remote-utils.c (monitor_output): New function.
15006 * server.c (debug_threads): Define here.
15007 (monitor_show_help): New function.
15008 (handle_query): Handle qRcmd.
15009 (main): Do not handle 'd' packet.
15010 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15011 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15012 of debug_threads.
15013
15014 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15015
15016 * Makefile.in (EXEEXT): New.
15017 (clean): Use $(EXEEXT).
15018
15019 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15020
15021 * target.h (target_ops): Rename send_signal to request_interrupt,
15022 and remove enum target_signal parameter.
15023 * linux-low.c (linux_request_interrupt): Rename from
15024 linux_send_signal, and always send SIGINT.
15025 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15026 and always send SIGINT.
15027 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15028 of send_signal.
15029 (input_interrupt): Likewise.
15030
15031 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15032
15033 * server.c (get_features_xml): Check if target implemented
15034 arch_string.
15035 * win32-i386-low.c (win32_arch_string): New.
15036 (win32_target_ops): Add win32_arch_string as arch_string member.
15037
15038 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15039
15040 * spu-low.c (spu_arch_string): New.
15041 (spu_target_ops): Add spu_arch_string.
15042
15043 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15046 * configure.ac: Do not check for terminal.h.
15047 * configure, config.in: Regenerated.
15048
15049 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15050
15051 * Makefile.in (OBS): Add $(XML_BUILTIN).
15052 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15053 (clean): Update.
15054 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15055 (arm-with-iwmmxt.c): New.
15056 * config.in, configure: Regenerate.
15057 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15058 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15059 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15060 (arm*-*-linux*): Add iWMMXt and regset support.
15061 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15062 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15063 (arm_store_wmmxregset, target_regsets): New.
15064 * server.c (get_features_xml): Take annex argument. Check builtin
15065 XML documents.
15066 (handle_query): Handle multiple annexes.
15067
15068 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15069
15070 * remote-utils.c [USE_WIN32API] (read, write): Define.
15071 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15072 write.
15073
15074 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15075
15076 * linux-i386-low.c (the_low_target): Set arch_string.
15077 * linux-x86-64-low.c (the_low_target): Likewise.
15078 * linux-low.c (linux_arch_string): New.
15079 (linux_target_ops): Add it.
15080 * linux-low.h (struct linux_target_ops): Add arch_string.
15081 * server.c (write_qxfer_response): Use const void * for DATA.
15082 (get_features_xml): New.
15083 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15084 * target.h (struct target_ops): Add arch_string method.
15085
15086 2007-01-03 Denis Pilat <denis.pilat@st.com>
15087 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * linux-low.c (linux_kill): Handle being called with no threads.
15090 * win32-i386-low.c (win32_kill): Likewise.
15091 (get_child_debug_event): Clear current_process_handle.
15092
15093 2006-12-30 Denis PILAT <denis.pilat@st.com>
15094 Daniel Jacobowitz <dan@codesourcery.com>
15095
15096 * remote-utils.c (remote_open): Check the type of specified
15097 serial port devices before opening them.
15098 * server.c (main): Kill the inferior if an error occurs during
15099 the first remote_open.
15100
15101 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15102
15103 * README: Update supported targets.
15104
15105 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15106
15107 * Makefile.in (clean): Remove reg-mips64.c.
15108 (reg-mips64.c, reg-mips64.o): New rules.
15109 * configure.srv: Handle mips64. Include regset support for mips.
15110 * linux-mips-low.c (union mips_register): New.
15111 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15112 (mips_breakpoint, mips_breakpoint_at): Use int.
15113 (mips_collect_register, mips_supply_register)
15114 (mips_collect_register_32bit, mips_supply_register_32bit)
15115 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15116 (mips_store_fpregset, target_regsets): New.
15117 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15118
15119 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15120
15121 * configure.srv: Add target "spu*-*-*".
15122 * Makefile.in (clean): Remove reg-spu.c.
15123 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15124 * spu-low.c: New file.
15125
15126 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15127
15128 * configure.ac: Correct td_thr_tls_get_addr test.
15129 * configure: Regenerated.
15130
15131 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15132
15133 * linux-low.c (linux_wait_for_event): Reformat. Use the
15134 pass_signals array.
15135 * remote-utils.c (decode_address_to_semicolon): New.
15136 * server.c (pass_signals, handle_general_set): New.
15137 (handle_query): Mention QPassSignals for qSupported.
15138 (main): Call handle_general_set.
15139 * server.h (pass_signals, decode_address_to_semicolon): New.
15140
15141 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15142
15143 * server.c (handle_query): Correct error handling for read_auxv.
15144
15145 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15146
15147 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15148 and srv_linux_thread_db to yes.
15149 * linux-s390-low.c (s390_fill_gregset): New function.
15150 (target_regsets): Define data structure.
15151
15152 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15153
15154 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15155 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15156 * config.in, configure: Regenerated.
15157 * inferiors.c (gdb_id_to_thread): New function.
15158 (gdb_id_to_thread_id): Use it.
15159 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15160 * linux-low.h (struct process_info): Add th member.
15161 (thread_db_get_tls_address): New prototype.
15162 * remote-utils.c (decode_address): Make non-static.
15163 * server.c (handle_query): Handle qGetTLSAddr.
15164 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15165 * target.h (struct target_ops): Add get_tls_address.
15166 * thread-db.c (maybe_attach_thread): Save the thread handle.
15167 (thread_db_get_tls_address): New.
15168
15169 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15170
15171 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15172 (linux_resume_one_process): Take a siginfo_t *. Update all
15173 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15174 (struct pending_signals): Add a siginfo_t.
15175 (linux_wait_for_process): Always set last_status.
15176 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15177 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15178 * linux-low.h (struct process_info): Add last_status.
15179
15180 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15181
15182 * remote-utils.c (try_rle): New function.
15183 (putpkt_binary): Use it.
15184
15185 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15186
15187 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15188 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15189 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15190 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15191 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15192 point registers.
15193
15194 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15195
15196 * server.c (terminal_fd): New variable.
15197 (old_foreground_pgrp): Likewise.
15198 (restore_old_foreground_pgrp): New function.
15199 (start_inferior): Record the terminal file descriptor in terminal_fd
15200 and its original foreground group in old_foreground_pgrp. Register
15201 restore_old_foreground_pgrp with atexit().
15202
15203 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15204
15205 * server.c (handle_query): Correct qPart to qXfer.
15206
15207 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15208
15209 * configure.ac: Check for more headers which are missing on
15210 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15211 * configure.srv: Add Cygwin and mingw32.
15212 * remote-utils.c: Don't include headers unconditionally which
15213 are missing on mingw32. Include <winsock.h> for mingw32.
15214 (remote_open): Adjust for mingw32 support. Flush
15215 standard error after writing to it.
15216 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15217 (unblock_async_io, enable_async_io, disable_async_io)
15218 (readchar, getpkt): Update for Winsock support.
15219 (prepare_resume_reply): Expect a protocol signal number.
15220 * server.c: Disable <sys/wait.h> on mingw32.
15221 (start_inferior): Adjust for mingw32 support. Flush
15222 standard error after writing to it.
15223 (attach_inferior): Likewise. Use protocol signal
15224 numbers.
15225 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15226 and names.
15227 * win32-i386-low.c: New file.
15228 * Makefile.in (XM_CLIBS): Set.
15229 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15230 (win32-i386-low.o): New dependency rule.
15231 * linux-low.c (linux_wait): Use target signal numbers.
15232 * target.h (struct target_ops): Doc fix.
15233 * server.h (target_signal_to_name): New prototype.
15234 * gdbreplay.c: Don't include headers unconditionally which
15235 are missing on mingw32. Include <winsock.h> for mingw32.
15236 (remote_close, remote_open): Adjust for Winsock support.
15237 * configure, config.in: Regenerated.
15238
15239 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15240
15241 * server.c (decode_xfer_read, write_qxfer_response): New.
15242 (handle_query): Take a packet length argument. Handle
15243 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15244 the qSupported response.
15245 (main): Update call to handle_query.
15246
15247 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15248
15249 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15250 (putpkt_binary): Renamed from putpkt and adjusted for binary
15251 data.
15252 (putpkt): New wrapper for putpkt_binary.
15253 (readchar): Don't mask off the high bit.
15254 (decode_X_packet): New function.
15255 * server.c (main): Call putpkt_binary if a handler sets the packet
15256 length. Save the length of the incoming packet. Handle 'X'.
15257 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15258
15259 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15260
15261 * server.c (handle_query): Handle qSupported.
15262
15263 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15264
15265 * remote-utils.c (all_symbols_looked_up): New variable.
15266 (look_up_one_symbol): Check it.
15267 * server.h (look_up_one_symbol): New declaration.
15268 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15269
15270 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15271
15272 * Makefile.in (linux-arm-low.o): Update dependencies.
15273 * linux-arm-low.c: Include "gdb_proc_service.h".
15274 (PTRACE_GET_THREAD_AREA): Define.
15275 (ps_get_thread_area): New function.
15276
15277 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15278
15279 * configure.srv (m68k*-*-uclinux*): New target.
15280 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15281 (linux_resume_one_process): Remove extraneous cast.
15282 (linux_read_offsets): New.
15283 (linux_target_op): Add linux_read_offsets on mmuless systems.
15284 * server.c (handle_query): Add qOffsets logic.
15285 * target.h (struct target_ops): Add read_offsets.
15286
15287 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15288
15289 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15290 (PTRACE_GET_THREAD_AREA): Define.
15291 (ps_get_thread_area): New function.
15292 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15293 (linux-x86-64-low.o): Update.
15294
15295 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15296
15297 * configure.ac: Remove checks for prfpregset_t.
15298 * gdb_proc_service.h: New file.
15299 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15300 new "gdb_proc_service.h".
15301 * proc-service.c: Likewise.
15302 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15303 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15304 * Makefile.in (gdb_proc_service_h): Updated.
15305 * configure, config.in: Regenerated.
15306
15307 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15308
15309 * remote-utils.c (prepare_resume_reply): Move declaration
15310 of gdb_id_from_wait to the top of the block.
15311
15312 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15313
15314 * linux-low.c (regsets_store_inferior_registers): Read the regset
15315 from the target before filling it.
15316
15317 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15318
15319 * server.c (attach_inferior): Return SIGTRAP for a successful
15320 attach.
15321
15322 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15323
15324 * Makefile.in (OBS): Add version.o.
15325 (STAGESTUFF): Delete.
15326 (version.o): Add dependencies.
15327 (version.c): Replace rule.
15328 (clean): Remove version.c.
15329 * server.c (gdbserver_version): New.
15330 (gdbserver_usage): Use printf.
15331 (main): Handle --version and --help.
15332 * server.h (version, host_name): Add declarations.
15333
15334 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15335
15336 * linux-arm-low.c:
15337 * linux-arm-low.c:
15338 * inferiors.c:
15339 * i387-fp.h:
15340 * i387-fp.c:
15341 * gdbreplay.c:
15342 * regcache.c:
15343 * proc-service.c:
15344 * mem-break.h:
15345 * mem-break.c:
15346 * linux-x86-64-low.c:
15347 * linux-sh-low.c:
15348 * linux-s390-low.c:
15349 * linux-ppc64-low.c:
15350 * linux-ppc-low.c:
15351 * linux-mips-low.c:
15352 * linux-m68k-low.c:
15353 * linux-m32r-low.c:
15354 * linux-low.h:
15355 * linux-low.c:
15356 * linux-ia64-low.c:
15357 * linux-i386-low.c:
15358 * linux-crisv32-low.c:
15359 * thread-db.c:
15360 * terminal.h:
15361 * target.h:
15362 * target.c:
15363 * server.h:
15364 * server.c:
15365 * remote-utils.c:
15366 * regcache.h:
15367 * utils.c:
15368 * Makefile.in:
15369 * configure.ac:
15370 * gdbserver.1: Add (C) after Copyright. Update the FSF
15371 address.
15372
15373 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15374
15375 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15376 (arm_breakpoint_at): Recognize both breakpoints.
15377 (the_low_target): Use the correct breakpoint instruction.
15378
15379 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15380
15381 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15382 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15383 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15384 (the_low_target): Update.
15385
15386 2005-10-25 Andreas Schwab <schwab@suse.de>
15387
15388 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15389
15390 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15391 (ia64_num_regs): Reduce to 462.
15392
15393 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15394
15395 * acinclude.m4: Correct quoting.
15396 * aclocal.m4: Regenerated.
15397
15398 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15399 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15400 (thread_db_init): Call thread_db_err_str.
15401 * configure.ac: Check for TD_VERSION.
15402 * config.in, configure: Regenerated.
15403
15404 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15405
15406 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15407
15408 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15409
15410 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15411 is not available. Define HAVE_PTRACE_GETREGS if it is.
15412 * config.in, configure: Regenerated.
15413 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15414 * linux-i386-low.c, linux-m68k-low.c: Update to use
15415 HAVE_PTRACE_GETREGS.
15416 * linux-low.c (regsets_fetch_inferior_registers)
15417 (regsets_store_inferior_registers): Only return 0 if we processed
15418 GENERAL_REGS.
15419 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15420 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15421
15422 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15423
15424 * inferiors.c (struct thread_info): Add gdb_id.
15425 (add_thread): Add gdb_id argument.
15426 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15427 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15428 calls to add_thread.
15429 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15430 * server.c (handle_query): Use thread_to_gdb_id.
15431 (handle_v_cont, main): Use gdb_id_to_thread_id.
15432 * server.h (add_thread): Update prototype.
15433 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15434 prototypes.
15435
15436 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15437
15438 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15439 left-padded registers.
15440 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15441 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15442
15443 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15444
15445 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15446 * configure: Regenerate.
15447 * config.in: Regenerate.
15448 * server.h (NEED_DECLARATION_STRERROR):
15449 Replace with !HAVE_DECL_STRERROR.
15450
15451 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15452
15453 * linux-low.c (linux_wait, linux_send_signal): Don't test
15454 an unsigned long variable for > 0 if it could be MAX_ULONG.
15455 * server.c (myresume): Likewise.
15456 * target.c (set_desired_inferior): Likewise.
15457
15458 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15459
15460 * configure.ac: Simplify and improve check for socklen_t.
15461 * configure, config.in: Regenerate.
15462
15463 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15464
15465 * acconfig.h: Remove.
15466 * configure.ac: Add a test for socklen_t. Use three-argument
15467 AC_DEFINE throughout.
15468 * config.in: Regenerated using autoheader 2.59.
15469 * configure: Regenerated.
15470
15471 * gdbreplay.c (socklen_t): Provide a default.
15472 (remote_open): Use socklen_t.
15473 * remote-utils.c (socklen_t): Provide a default.
15474 (remote_open): Use socklen_t.
15475 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15476 unsigned char.
15477
15478 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15479 char for buffers.
15480 * linux-low.c (linux_read_memory, linux_write_memory)
15481 (linux_read_auxv): Likewise.
15482 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15483 (check_mem_write): Likewise.
15484 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15485 Likewise.
15486 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15487 (registers_from_string, register_data): Likewise.
15488 * server.c (handle_query, main): Likewise.
15489 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15490 (decode_M_packet): Likewise.
15491 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15492 * target.h (struct target_ops): Update read_memory, write_memory,
15493 and read_auxv.
15494 (read_inferior_memory, write_inferior_memory): Update.
15495 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15496 to unsigned char *.
15497 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15498 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15499 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15500 linux-s390-low.c, linux-sh-low.c: Update for changes in
15501 read_inferior_memory and the_low_target->breakpoint.
15502
15503 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15504
15505 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15506 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15507 * configure.srv: Add powerpc64-*-linux*.
15508 * linux-ppc64-low.c: New file.
15509
15510 2005-05-23 Orjan Friberg <orjanf@axis.com>
15511
15512 * linux-cris-low.c: New file with support for CRIS.
15513 * linux-crisv32-low.c: Ditto for CRISv32.
15514 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15515 (clean): Add reg-cris.c and reg-crisv32.c.
15516 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15517 reg-crisv32.o, and reg-crisv32.c to make rules.
15518 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15519 recognized targets.
15520
15521 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15522
15523 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15524 of sizeof (PTRACE_XFER_TYPE).
15525 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15526
15527 2005-05-12 Orjan Friberg <orjanf@axis.com>
15528
15529 * target.h (struct target_ops): Add insert_watchpoint,
15530 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15531 pointers for hardware watchpoint support.
15532 * linux-low.h (struct linux_target_ops): Ditto.
15533 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15534 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15535 to linux_target_ops.
15536 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15537 reply packet.
15538 * server.c (main): Recognize 'Z' and 'z' packets.
15539
15540 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15541
15542 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15543 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15544 (the_low_target): Add new members.
15545
15546 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * proc-service.c (ps_lgetregs): Search all_processes instead of
15549 all_threads.
15550
15551 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15552
15553 * server.c (start_inferior): Change return type to int.
15554 (attach_inferior): Change sigptr to int *.
15555 (handle_v_cont, handle_v_requests): Change signal to int *.
15556 (main): Change signal to int.
15557
15558 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15559
15560 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15561 * configure.srv: Add m32r*-*-linux*.
15562 * linux-m32r-low.c: New file.
15563
15564 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15567
15568 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15569
15570 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15571 Take unsigned long arguments for PIDs.
15572 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15573 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15574 (wait_for_sigstop, linux_resume_one_process)
15575 (regsets_fetch_inferior_registers, linux_send_signal)
15576 (linux_read_auxv): Likewise. Update the types of variables holding
15577 PIDs. Update format string specifiers.
15578 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15579 * remote-utils.c (prepare_resume_reply): Likewise.
15580 * server.c (cont_thread, general_thread, step_thread)
15581 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15582 unsigned long.
15583 (handle_query): Update format specifiers.
15584 (handle_v_cont, main): Use strtoul for thread IDs.
15585 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15586 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15587 (general_thread, step_thread, thread_from_wait)
15588 (old_thread_from_wait): Update.
15589 * target.h (struct thread_resume): Use unsigned long for THREAD.
15590 (struct target_ops): Use unsigned long for arguments to attach and
15591 thread_alive.
15592
15593 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15594
15595 * acinclude.m4: Include bfd/bfd.m4 directly.
15596 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15597 <agriffis@toolchain.org>.
15598 * aclocal.m4, configure: Regenerated.
15599
15600 2005-01-07 Andrew Cagney <cagney@gnu.org>
15601
15602 * configure.ac: Rename configure.in, require autoconf 2.59.
15603 * configure: Re-generate.
15604
15605 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15606
15607 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15608 LIBS when finished.
15609 * aclocal.m4: Regenerated.
15610 * configure: Regenerated.
15611
15612 2004-11-21 Andreas Schwab <schwab@suse.de>
15613
15614 * linux-m68k-low.c (m68k_num_gregs): Define.
15615 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15616 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15617 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15618 (m68k_breakpoint_at): New. Add to the_low_target.
15619
15620 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15621 srv_linux_thread_db to yes.
15622
15623 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15624
15625 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15626 (ARCH_SET_FS): Likewise.
15627 (ARCH_GET_FS): Likewise.
15628 (ARCH_GET_GS): Likewise.
15629
15630 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15631
15632 * linux-i386-low.c (ps_get_thread_area): New.
15633 * linux-x86-64-low.c (ps_get_thread_area): New.
15634 * linux-low.c: Include <sys/syscall.h>.
15635 (linux_kill_one_process): Don't kill the first thread here.
15636 (linux_kill): Kill the first thread here.
15637 (kill_lwp): New function.
15638 (send_sigstop, linux_send_signal): Use it.
15639 * proc-service.c: Clean up #ifdefs.
15640 (fpregset_info): Delete.
15641 (ps_lgetregs): Update and enable implementation.
15642 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15643 implementations.
15644 * remote-utils.c (struct sym_cache, symbol_cache): New.
15645 (input_interrupt): Print a clearer message.
15646 (async_io_enabled): New variable.
15647 (enable_async_io, disable_async_io): Use it. Update comments.
15648 (look_up_one_symbol): Use the symbol cache.
15649 * thread-db.c (thread_db_look_up_symbols): New function.
15650 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15651
15652 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15653
15654 * configure.in: Test for -rdynamic.
15655 * configure: Regenerated.
15656 * Makefile (INTERNAL_LDFLAGS): New.
15657 (gdbserver, gdbreplay): Use it.
15658
15659 2004-09-02 Andrew Cagney <cagney@gnu.org>
15660
15661 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15662
15663 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15664
15665 * linux-low.c (linux_wait): Clear all_processes list also.
15666
15667 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15668
15669 * linux-low.c: Include <errno.h>. Remove extern declaration of
15670 errno.
15671
15672 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15673
15674 * gdbreplay.c, server.h, utils.c: Update copyright years.
15675
15676 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15677
15678 * server.c (main): Print child status or termination signal from
15679 variable 'signal', not 'sig'.
15680
15681 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15682
15683 * linux-low.c (linux_read_memory): Change return type to
15684 int. Check for and return error from ptrace().
15685 * target.c (read_inferior_memory): Change return type to int. Pass
15686 back return status from the_target->read_memory().
15687 * target.h (struct target_ops): Adapt *read_memory() prototype.
15688 Update comment.
15689 (read_inferior_memory): Adapt prototype.
15690 * server.c (main): Return an error packet if
15691 read_inferior_memory() returns an error.
15692
15693 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15694
15695 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15696 Unify with other clean targets.
15697
15698 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15699
15700 * server.c (handle_v_cont): Call set_desired_inferior.
15701
15702 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15703
15704 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15705
15706 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15707
15708 * linux-low.c (linux_wait): Unblock async I/O.
15709 (linux_resume): Block and enable async I/O.
15710 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15711 * server.h (block_async_io, unblock_async_io): Add prototypes.
15712
15713 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15714
15715 * remote-utils.c (remote_open): Print a status notice after
15716 opening a TCP port.
15717 * server.c (attach_inferior): Print a status notice after
15718 attaching.
15719
15720 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15721
15722 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15723
15724 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15725
15726 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15727 error packet.
15728 * server.c, target.h: Update copyright years.
15729
15730 2004-02-25 Roland McGrath <roland@redhat.com>
15731
15732 * target.h (struct target_ops): New member `read_auxv'.
15733 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15734 * linux-low.c (linux_read_auxv): New function.
15735 (linux_target_ops): Initialize `read_auxv' member to that.
15736
15737 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15738
15739 Committed by Jim Blandy <jimb@redhat.com>.
15740
15741 * linux-s390-low.c (s390_num_regs): Update.
15742 (s390_regmap): Remove control registers. Use __s390x__ predefine
15743 instead of GPR_SIZE to distiguish s390 and s390x targets.
15744
15745 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15746
15747 * linux-low.c: Update copyright year.
15748 (check_removed_breakpoint): Clear pending_is_breakpoint.
15749 (linux_set_resume_request, linux_queue_one_thread)
15750 (resume_status_pending_p): New functions.
15751 (linux_continue_one_thread): Use process->resume.
15752 (linux_resume): Only resume threads if there are no pending events.
15753 * linux-low.h (struct process_info): Add resume request
15754 pointer.
15755
15756 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15757
15758 * regcache.c (new_register_cache): Clear the allocated register
15759 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15760
15761 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15762
15763 * linux-low.c (linux_resume): Take a struct thread_resume *
15764 argument.
15765 (linux_wait): Update call.
15766 (resume_ptr): New static variable.
15767 (linux_continue_one_thread): Renamed from
15768 linux_continue_one_process. Use resume_ptr.
15769 (linux_resume): Use linux_continue_one_thread.
15770 * server.c (handle_v_cont, handle_v_requests): New functions.
15771 (myresume): New function.
15772 (main): Handle 'v' case.
15773 * target.h (struct thread_resume): New type.
15774 (struct target_ops): Change argument of "resume" to struct
15775 thread_resume *.
15776 (myresume): Delete macro.
15777
15778 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15779
15780 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15781 (uninstall): Support DESTDIR.
15782
15783 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15784
15785 * configure.srv: Add xscale*linux copy of arm*linux entry.
15786
15787 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15788
15789 * linux-arm-low.c (arm_reinsert_addr): New function.
15790 (the_low_target): Add arm_reinsert_addr.
15791
15792 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15793
15794 * mem-break.c: Remove whitespace at end of file.
15795
15796 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15797
15798 * configure.in: Check whether we need to prototype strerror.
15799 * server.h: Optionally prototype strerror.
15800 * gdbreplay.c (perror_with_name): Use strerror.
15801 * linux-low.c (linux_attach_lwp): Use strerror.
15802 * utils.c (perror_with_name): Use strerror.
15803 * config.in, configure: Regenerated.
15804
15805 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15806
15807 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15808 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15809
15810 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15811
15812 * Makefile.in (SFILES): Update.
15813 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15814 low-sun3.c: Remove files.
15815
15816 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15817
15818 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15819 (linux_detach_one_process, linux_detach): New functions.
15820 (linux_target_ops): Add linux_detach.
15821 * server.c (main): Handle 'D' packet.
15822 * target.h (struct target_ops): Add "detach" member.
15823 (detach_inferior): Define.
15824
15825 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15826
15827 From Kelley Cook <kelleycook@wideopenwest.com>:
15828 * configure.srv: Accept i[34567]86 variants.
15829
15830 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15831
15832 * linux-low.c (linux_wait_for_event): Correct comment typos.
15833 (linux_resume_one_process): Call check_removed_breakpoint.
15834 (linux_send_signal): New function.
15835 (linux_target_ops): Add linux_send_signal.
15836 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15837 of kill.
15838 * target.h (struct target_ops): Add send_signal.
15839
15840 2003-05-29 Jim Blandy <jimb@redhat.com>
15841
15842 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15843 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15844 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15845 away part of the register's value.
15846
15847 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15848
15849 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15850 (linux_wait_for_event, linux_init_signals): Likewise.
15851
15852 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15853
15854 * configure.in: Check for stdlib.h.
15855 * configure: Regenerated.
15856 * config.in: Regenerated.
15857
15858 2003-01-04 Andreas Schwab <schwab@suse.de>
15859
15860 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15861
15862 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15863
15864 * Makefile.in: Remove obsolete code.
15865
15866 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15867
15868 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15869 defined(PT_FPR0_HI).
15870
15871 2002-11-17 Stuart Hughes <seh@zee2.com>
15872
15873 * linux-arm-low.c (arm_num_regs): Increase.
15874 (arm_regmap): Include status register.
15875
15876 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15877
15878 * linux-low.c (register_addr): Remove incorrect -1 check.
15879
15880 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15881
15882 * linux-low.c (linux_create_inferior): Call setpgid. Return
15883 the new PID.
15884 (unstopped_p, linux_signal_pid): Remove.
15885 (linux_target_ops): Remove linux_signal_pid.
15886 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15887 global instead of target method.
15888 * target.h (struct target_ops): Remove signal_pid. Update comment
15889 for create_inferior.
15890 * server.c (signal_pid): New variable.
15891 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15892 gdbserver. Set the child to be the foreground process group.
15893 (attach_inferior): Set signal_pid.
15894
15895 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15896
15897 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15898
15899 2002-08-20 Jim Blandy <jimb@redhat.com>
15900
15901 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15902 default for this.
15903
15904 2002-08-01 Andrew Cagney <cagney@redhat.com>
15905
15906 * Makefile.in: Make chill references obsolete.
15907
15908 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15909
15910 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15911 * configure: Regenerate.
15912 * config.in: Regenerate.
15913
15914 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15915
15916 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15917 (perror_with_name, remote_close, remote_open, expect, play): Static.
15918
15919 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15920
15921 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15922 byte offsets instead of an array of indexes.
15923 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15924
15925 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15926
15927 * regcache.c: Add comment.
15928
15929 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15930
15931 * thread-db.c: New file.
15932 * proc-service.c: New file.
15933 * acinclude.m4: New file.
15934 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15935 proc-service.o, and thread-db.o.
15936 (linux-low.o): Add USE_THREAD_DB.
15937 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15938 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15939 * aclocal.m4: Regenerated.
15940 * config.in: Regenerated.
15941 * configure: Regenerated.
15942 * configure.in: Check for proc_service.h, sys/procfs.h,
15943 thread_db.h, and linux/elf.h headrs.
15944 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15945 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15946 Check for -lthread_db and thread support.
15947 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15948 PowerPC, and SuperH.
15949 * i387-fp.c: Constify arguments.
15950 * i387-fp.h: Likewise.
15951 * inferiors.c: (struct thread_info): Renamed from
15952 `struct inferior_info'. Remove PID member. Use generic inferior
15953 list header. All uses updated.
15954 (inferiors, signal_pid): Removed.
15955 (all_threads): New variable.
15956 (get_thread): Define.
15957 (add_inferior_to_list): New function.
15958 (for_each_inferior): New function.
15959 (change_inferior_id): New function.
15960 (add_inferior): Removed.
15961 (remove_inferior): New function.
15962 (add_thread): New function.
15963 (free_one_thread): New function.
15964 (remove_thread): New function.
15965 (clear_inferiors): Use for_each_inferior and free_one_thread.
15966 (find_inferior): New function.
15967 (find_inferior_id): New function.
15968 (inferior_target_data): Update argument type.
15969 (set_inferior_target_data): Likewise.
15970 (inferior_regcache_data): Likewise.
15971 (set_inferior_regcache_data): Likewise.
15972 * linux-low.c (linux_bp_reinsert): Remove.
15973 (all_processes, stopping_threads, using_thrads)
15974 (struct pending_signals, debug_threads, pid_of): New.
15975 (inferior_pid): Replace with macro.
15976 (struct inferior_linux_data): Remove.
15977 (get_stop_pc, add_process): New functions.
15978 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15979 Use add_process and add_thread.
15980 (linux_attach_lwp): New function, based on old linux_attach. Use
15981 add_process and add_thread. Set stop_expected for new threads.
15982 (linux_attach): New function.
15983 (linux_kill_one_process): New function.
15984 (linux_kill): Kill all LWPs.
15985 (linux_thread_alive): Use find_inferior_id.
15986 (check_removed_breakpoints, status_pending_p): New functions.
15987 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15988 Update. Use WNOHANG. Wait for cloned processes also. Update process
15989 struct for the found process.
15990 (linux_wait_for_event): New function.
15991 (linux_wait): Use it. Support LWPs.
15992 (send_sigstop, wait_for_sigstop, stop_all_processes)
15993 (linux_resume_one_process, linux_continue_one_process): New functions.
15994 (linux_resume): Support LWPs.
15995 (REGISTER_RAW_SIZE): Remove.
15996 (fetch_register): Use register_size instead. Call supply_register.
15997 (usr_store_inferior_registers): Likewise. Call collect_register.
15998 Fix recursive case.
15999 (regsets_fetch_inferior_registers): Improve error message.
16000 (regsets_store_inferior_registers): Add debugging.
16001 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16002 (unstopped_p, linux_signal_pid): New functions.
16003 (linux_target_ops): Add linux_signal_pid.
16004 (linux_init_signals): New function.
16005 (initialize_low): Call it. Initialize using_threads.
16006 * regcache.c (inferior_regcache_data): Add valid
16007 flag.
16008 (get_regcache): Fetch registers lazily. Add fetch argument
16009 and update all callers.
16010 (regcache_invalidate_one, regcache_invalidate): New
16011 functions.
16012 (new_register_cache): Renamed from create_register_cache.
16013 Return the new regcache.
16014 (free_register_cache): Change argument to a void *.
16015 (registers_to_string, registers_from_string): Call get_regcache
16016 with fetch flag set.
16017 (register_data): Make static. Pass fetch flag to get_regcache.
16018 (supply_register): Call get_regcache with fetch flag clear.
16019 (collect_register): Call get_regcache with fetch flag set.
16020 (collect_register_as_string): New function.
16021 * regcache.h: Update.
16022 * remote-utils.c (putpkt): Flush after debug output and use
16023 stderr.
16024 Handle input interrupts while waiting for an ACK.
16025 (input_interrupt): Use signal_pid method.
16026 (getpkt): Flush after debug output and use stderr.
16027 (outreg): Use collect_register_as_string.
16028 (new_thread_notify, dead_thread_notify): New functions.
16029 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16030 and general_thread.
16031 (look_up_one_symbol): Flush after debug output.
16032 * server.c (step_thread, server_waiting): New variables.
16033 (start_inferior): Don't use signal_pid. Update call to mywait.
16034 (attach_inferior): Update call to mywait.
16035 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16036 (main): Don't fetch/store registers explicitly. Use
16037 set_desired_inferior. Support proposed ``Hs'' packet. Update
16038 calls to mywait.
16039 * server.h: Update.
16040 (struct inferior_list, struct_inferior_list_entry): New.
16041 * target.c (set_desired_inferior): New.
16042 (write_inferior_memory): Constify.
16043 (mywait): New function.
16044 * target.h: Update.
16045 (struct target_ops): New signal_pid method.
16046 (mywait): Removed macro, added prototype.
16047
16048 * linux-low.h (regset_func): Removed.
16049 (regset_fill_func, regset_store_func): New.
16050 (enum regset_type): New.
16051 (struct regset_info): Add type field. Use new operation types.
16052 (struct linux_target_ops): stop_pc renamed to get_pc.
16053 Add decr_pc_after_break and breakpoint_at.
16054 (get_process, get_thread_proess, get_process_thread)
16055 (strut process_info, all_processes, linux_attach_lwp)
16056 (thread_db_init): New.
16057
16058 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16059 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16060 (the_low_target): Add new members.
16061 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16062 (i386_store_fpxregset): Constify.
16063 (target_regsets): Add new kind identifier.
16064 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16065 (i386_set_pc): Add debugging.
16066 (i386_breakpoint_at): New function.
16067 (the_low_target): Add new members.
16068 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16069 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16070 (mips_breakpoint_at): New.
16071 (the_low_target): Add new members.
16072 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16073 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16074 (the_low_target): Add new members.
16075 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16076 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16077 (the_low_target): Add new members.
16078 * linux-x86-64-low.c (target_regsets): Add new kind
16079 identifier.
16080
16081 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16082
16083 From Martin Pool <mbp@samba.org>:
16084 * server.c (gdbserver_usage): New function.
16085 (main): Call it.
16086
16087 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16088
16089 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16090 stop_at -> stop_pc.
16091
16092 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16093
16094 * Makefile.in: Remove obsolete code.
16095
16096 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16097
16098 * linux-low.c (regsets_fetch_inferior_registers),
16099 (regsets_store_inferior_registers): Removed cast to int from
16100 ptrace() calls.
16101 * regcache.h: Added declaration of struct inferior_info.
16102
16103 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16104
16105 * inferiors.c (struct inferior_info): Add regcache_data.
16106 (add_inferior): Call create_register_cache.
16107 (clear_inferiors): Call free_register_cache.
16108 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16109 * regcache.c (struct inferior_regcache_data): New.
16110 (registers): Remove.
16111 (get_regcache): New function.
16112 (create_register_cache, free_register_cache): New functions.
16113 (set_register_cache): Don't initialize the register cache here.
16114 (registers_to_string, registers_from_string, register_data): Call
16115 get_regcache.
16116 * regcache.h: Add prototypes.
16117 * server.h: Likewise.
16118
16119 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16120
16121 * mem-break.c: New file.
16122 * mem-break.h: New file.
16123 * Makefile.in: Add mem-break.o rule; update server.h
16124 dependencies.
16125 * inferiors.c (struct inferior_info): Add target_data
16126 member.
16127 (clear_inferiors): Free target_data member if set.
16128 (inferior_target_data, set_inferior_target_data): New functions.
16129 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16130 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16131 * linux-low.c (linux_bp_reinsert): New variable.
16132 (struct inferior_linux_data): New.
16133 (linux_create_inferior): Use set_inferior_target_data.
16134 (linux_attach): Likewise. Call add_inferior.
16135 (linux_wait_for_one_inferior): New function.
16136 (linux_wait): Call it.
16137 (linux_write_memory): Add const.
16138 (initialize_low): Call set_breakpoint_data.
16139 * linux-low.h (struct linux_target_ops): Add breakpoint
16140 handling members.
16141 * server.c (attach_inferior): Remove extra add_inferior
16142 call.
16143 * server.h: Include mem-break.h. Update inferior.c
16144 prototypes.
16145 * target.c (read_inferior_memory)
16146 (write_inferior_memory): New functions.
16147 * target.h (read_inferior_memory)
16148 (write_inferior_memory): Change macros to prototypes.
16149 (struct target_ops): Update comments. Add const to write_memory
16150 definition.
16151
16152 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16153
16154 * linux-low.c (usr_store_inferior_registers): Support
16155 registers which are allowed to fail to store.
16156 * linux-low.h (linux_target_ops): Likewise.
16157 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16158 (ppc_cannot_store_register): FPSCR may not be storable.
16159
16160 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16161
16162 * server.h: Include <string.h> if HAVE_STRING_H.
16163 * ChangeLog: Correct paths in last ChangeLog entry.
16164
16165 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16166
16167 * linux-low.h: Remove obsolete prototypes.
16168 (struct linux_target_ops): New.
16169 (extern the_low_target): New.
16170 * linux-low.c (num_regs, regmap): Remove declarations.
16171 (register_addr): Use the_low_target explicitly.
16172 (fetch_register): Likewise.
16173 (usr_fetch_inferior_registers): Likewise.
16174 (usr_store_inferior_registers): Likewise.
16175 * linux-arm-low.c (num_regs): Remove.
16176 (arm_num_regs): Define.
16177 (arm_regmap): Renamed from regmap, made static.
16178 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16179 made static.
16180 (arm_cannot_store_register): Renamed from cannot_store_register,
16181 made static.
16182 (the_low_target): New.
16183 * linux-i386-low.c (num_regs): Remove.
16184 (i386_num_regs): Define.
16185 (i386_regmap): Renamed from regmap, made static.
16186 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16187 made static.
16188 (i386_cannot_store_register): Renamed from cannot_store_register,
16189 made static.
16190 (the_low_target): New.
16191 * linux-ia64-low.c (num_regs): Remove.
16192 (ia64_num_regs): Define.
16193 (ia64_regmap): Renamed from regmap, made static.
16194 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16195 made static.
16196 (ia64_cannot_store_register): Renamed from cannot_store_register,
16197 made static.
16198 (the_low_target): New.
16199 * linux-m68k-low.c (num_regs): Remove.
16200 (m68k_num_regs): Define.
16201 (m68k_regmap): Renamed from regmap, made static.
16202 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16203 made static.
16204 (m68k_cannot_store_register): Renamed from cannot_store_register,
16205 made static.
16206 (the_low_target): New.
16207 * linux-mips-low.c (num_regs): Remove.
16208 (mips_num_regs): Define.
16209 (mips_regmap): Renamed from regmap, made static.
16210 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16211 made static.
16212 (mips_cannot_store_register): Renamed from cannot_store_register,
16213 made static.
16214 (the_low_target): New.
16215 * linux-ppc-low.c (num_regs): Remove.
16216 (ppc_num_regs): Define.
16217 (ppc_regmap): Renamed from regmap, made static.
16218 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16219 made static.
16220 (ppc_cannot_store_register): Renamed from cannot_store_register,
16221 made static.
16222 (the_low_target): New.
16223 * linux-s390-low.c (num_regs): Remove.
16224 (s390_num_regs): Define.
16225 (s390_regmap): Renamed from regmap, made static.
16226 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16227 made static.
16228 (s390_cannot_store_register): Renamed from cannot_store_register,
16229 made static.
16230 (the_low_target): New.
16231 * linux-sh-low.c (num_regs): Remove.
16232 (sh_num_regs): Define.
16233 (sh_regmap): Renamed from regmap, made static.
16234 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16235 made static.
16236 (sh_cannot_store_register): Renamed from cannot_store_register,
16237 made static.
16238 (the_low_target): New.
16239 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16240 (the_low_target): New.
16241
16242 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16243
16244 * Makefile.in: Add stamp-h target.
16245 * configure.in: Create stamp-h.
16246 * configure: Regenerated.
16247
16248 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16249
16250 * inferiors.c: New file.
16251 * target.c: New file.
16252 * target.h: New file.
16253 * Makefile.in: Add target.o and inferiors.o. Update
16254 dependencies.
16255 * linux-low.c (inferior_pid): New static variable,
16256 moved from server.c.
16257 (linux_create_inferior): Renamed from create_inferior.
16258 Call add_inferior. Return 0 on success instead of a PID.
16259 (linux_attach): Renamed from myattach.
16260 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16261 (linux_thread_alive): Renamed from mythread_alive.
16262 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16263 child dies.
16264 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16265 (regsets_store_inferior_registers): Correct error message.
16266 Add missing ``return 0''.
16267 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16268 (linux_store_registers): Renamed from store_inferior_registers.
16269 (linux_read_memory): Renamed from read_inferior_memory.
16270 (linux_write_memory): Renamed from write_inferior_memory.
16271 (linux_target_ops): New structure.
16272 (initialize_low): Call set_target_ops ().
16273 * remote-utils.c (unhexify): New function.
16274 (hexify): New function.
16275 (input_interrupt): Send signals to ``signal_pid''.
16276 * server.c (inferior_pid): Remove.
16277 (start_inferior): Update create_inferior call.
16278 (attach_inferior): Call add_inferior.
16279 (handle_query): New function.
16280 (main): Call handle_query for `q' packets.
16281 * server.h: Include "target.h". Remove obsolete prototypes.
16282 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16283
16284 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16285
16286 * Makefile.in: Add WARN_CFLAGS. Update configury
16287 dependencies.
16288 * configure.in: Check for <string.h>
16289 * configure: Regenerate.
16290 * config.in: Regenerate.
16291 * gdbreplay.c: Include needed system headers.
16292 (remote_open): Remove strchr prototype.
16293 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16294 * regcache.c (supply_register): Change buf argument to const void *.
16295 (supply_register_by_name): Likewise.
16296 (collect_register): Change buf argument to void *.
16297 (collect_register_by_name): Likewise.
16298 * regcache.h: Add missing prototypes.
16299 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16300 * server.c (handle_query): New function.
16301 (attached): New static variable, moved out of main.
16302 (main): Quiet longjmp clobber warnings.
16303 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16304 * utils.c (error): Remove NORETURN.
16305 (fatal): Likewise.
This page took 0.399829 seconds and 4 git commands to generate.