b88fc9f7062c1d72a09cc2bdf028065f83148417
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2
3 * tdesc.c: Remove xml parameter.
4
5 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6
7 * server.c (get_features_xml): Remove cast.
8 * tdesc.c (void target_desc::accept): Fill in function.
9 (tdesc_get_features_xml): Remove old xml creation.
10 (print_xml_feature::visit_pre): Add xml vistor.
11 * tdesc.h (struct target_desc): Make xmltarget mutable.
12 (tdesc_get_features_xml): Remove declaration.
13
14 2018-04-18 Alan Hayward <alan.hayward@arm.com>
15
16 * tdesc.c (tdesc_architecture_name): Add new function.
17 (tdesc_osabi_name): Likewise.
18 (tdesc_get_features_xml): Use new functions.
19
20 2018-04-18 Alan Hayward <alan.hayward@arm.com>
21
22 * tdesc.c (tdesc_create_flags): Remove.
23 (tdesc_add_flag): Likewise.
24 (tdesc_named_type): Likewise.
25 (tdesc_create_union): Likewise.
26 (tdesc_create_struct): Likewise.
27 (tdesc_create_vector): Likewise.
28 (tdesc_add_bitfield): Likewise.
29 (tdesc_add_field): Likewise.
30 (tdesc_set_struct_size): Likewise.
31
32 2018-04-18 Alan Hayward <alan.hayward@arm.com>
33
34 * tdesc.c (~target_desc): Remove implictly deleted items.
35 (init_target_desc): Iterate all features.
36 (tdesc_get_features_xml): Use vector.
37 (tdesc_create_feature): Create feature.
38 * tdesc.h (tdesc_feature) Remove
39 (target_desc): Add features.
40
41 2018-04-18 Alan Hayward <alan.hayward@arm.com>
42
43 * Makefile.in: Add common/tdesc.c
44 * tdesc.c (init_target_desc): init all reg_defs from register
45 vector.
46 (tdesc_create_reg): Create tdesc_reg.
47 * tdesc.h (tdesc_feature): Add register vector.
48
49 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
50
51 * tdesc.h (struct target_desc) <features>: Change type to
52 std::vector<std::string>.
53 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
54 changes.
55 (tdesc_get_features_xml): Likewise.
56 (tdesc_create_feature): Likewise.
57
58 2018-03-26 Alan Hayward <alan.hayward@arm.com>
59
60 * regcache.c (find_register_by_number): Return a ref.
61 (find_regno): Use references.
62 (register_size): Likewise.
63 (register_data): Likewise.
64 * tdesc.c (target_desc::~target_desc): Remove free calls.
65 (target_desc::operator==): Use std::vector compare.
66 (init_target_desc): Use reference.
67 (tdesc_create_reg): Use reg constructors.
68 * tdesc.h (struct target_desc): Replace pointer with object.
69
70 2018-03-23 Alan Hayward <alan.hayward@arm.com>
71
72 * regcache.c (find_register_by_number): Make static.
73 (find_regno): Use find_register_by_number
74 * regcache.h (struct reg): Remove declaration.
75
76 2018-03-23 Alan Hayward <alan.hayward@arm.com>
77
78 * tdesc.c (target_desc::~target_desc): Move to here.
79 (target_desc::operator==): Likewise.
80 * tdesc.h (target_desc::~target_desc): Move from here.
81 (target_desc::operator==): Likewise.
82
83 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
84
85 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
86
87 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
88
89 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
90 S390_TDESC_GS.
91 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
92 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
93 and init_registers_s390_gs_linux64.
94
95 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
96
97 * linux-s390-low.c (s390_fill_gs): Remove function.
98 (s390_fill_gsbc): Remove function.
99 (s390_regsets): Set fill functions for the guarded storage regsets
100 to NULL.
101
102 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
103
104 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
105 the word size. Add comment.
106 (s390_get_wordsize): New function.
107 (s390_arch_setup): No longer select a temporary tdesc to fetch the
108 pswm with it. Instead, use s390_get_wordsize to determine the
109 word size first and derive the correct tdesc from that directly.
110
111 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
112
113 * Makefile.in: Include silent-rules.mk.
114 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
115 (COMPILE): Add ECHO_CXX.
116 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
117 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
118 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
119 (version-generated.c): Add ECHO_GEN.
120 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
121 (IPAGENT_COMPILE): Add ECHO_CXX.
122 (%-generated.c): Add ECHO_REGDAT.
123
124 2018-03-14 Tom Tromey <tom@tromey.com>
125
126 PR cli/14977:
127 * ax.c (ax_printf): Special case for NULL.
128
129 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
130
131 * linux-low.c (linux_qxfer_libraries_svr4): Use
132 xml_escape_text_append.
133
134 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
135
136 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
137
138 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
139
140 * server.c (handle_general_set): Remove unnecessary xstrdup.
141
142 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
143
144 * server.c (parse_debug_format_options): Adjust to
145 delim_string_to_char_ptr_vec changes.
146 * thread-db.c (thread_db_load_search): Adjust to
147 dirnames_to_char_ptr_vec changes.
148
149 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
150
151 * target.h (target_enable_btrace, target_disable_btrace)
152 (target_read_btrace, target_read_btrace_conf): Turn macro into
153 inline function. Throw error if target method is not defined.
154 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
155 check for btrace target method. Be prepared to handle exceptions
156 from btrace target methods.
157
158 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
159
160 * server.c (captured_main): Change order of error message printed
161 when the current working directory cannot be found.
162
163 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
164
165 * server.c: Include "filenames.h" and "pathstuff.h".
166 (program_name): Delete variable.
167 (program_path): New anonymous class.
168 (get_exec_wrapper): Use "program_path" instead of
169 "program_name".
170 (handle_v_run): Likewise.
171 (captured_main): Likewise.
172 (process_serial_event): Likewise.
173
174 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
175
176 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
177 (OBJS): Add "pathstuff.o".
178 * server.c (current_directory): New global variable.
179 (captured_main): Initialize "current_directory".
180
181 2018-02-26 Alan Hayward <alan.hayward@arm.com>
182
183 * tdesc.c: Use common/tdesc.h.
184 * tdesc.h: Likewise.
185
186 2018-02-20 Alan Hayward <alan.hayward@arm.com>
187 Simon Marchi <simon.marchi@ericsson.com>
188
189 * Makefile.in: Switch order of make rules.
190
191 2018-02-19 Alan Hayward <alan.hayward@arm.com>
192
193 * Makefile.in: Add common directory in build.
194 * configure.ac: Add common reference.
195 * configure: Regenerate.
196
197 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
198
199 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
200 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
201 * spu-low.c (spu_target_ops): Likewise.
202 * win32-low.c (win32_target_ops): Likewise.
203 * server.c (supported_btrace_packets): Report packets unconditionally.
204 * target.h (target_ops) <supports_btrace>: Remove.
205 (target_supports_btrace): Remove.
206
207 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
208
209 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
210 (handle_btrace_disable): Change return type to void. Use exceptions
211 to report errors.
212 (handle_btrace_general_set): Catch exception and copy message to
213 return message.
214
215 2018-02-08 Tom Tromey <tom@tromey.com>
216
217 * linux-low.c (install_software_single_step_breakpoints): Use
218 make_scoped_restore.
219 * inferiors.c (make_cleanup_restore_current_thread): Remove.
220 (do_restore_current_thread_cleanup): Remove.
221 * gdbthread.h (make_cleanup_restore_current_thread): Don't
222 declare.
223
224 2018-02-08 Tom Tromey <tom@tromey.com>
225
226 * mem-break.c (set_raw_breakpoint_at): Use
227 gdb::unique_xmalloc_ptr.
228
229 2018-01-30 Pedro Alves <palves@redhat.com>
230
231 PR gdb/13211
232 * target.c (target_terminal::terminal_state): Rename to ...
233 (target_terminal::m_terminal_state): ... this.
234
235 2018-01-19 James Clarke <jrtc27@jrtc27.com>
236
237 * linux-low.c (handle_extended_wait): Surround call to
238 thread_db_notice_clone with #ifdef USE_THREAD_DB.
239
240 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
241
242 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
243 linux_ptrace_attach_fail_reason_string now returning an
244 std::string.
245 (linux_attach): Likewise.
246 * thread-db.c (attach_thread): Likewise.
247
248 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
249
250 PR gdb/21559
251 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
252 checking for fs_base/gs_base fields in struct user_regs_struct.
253 * configure: Regenerate.
254
255 2018-01-16 Yao Qi <yao.qi@linaro.org>
256
257 PR gdb/18749
258 * linux-low.c (fetch_register): Call supply_register instead of
259 error.
260
261 2018-01-08 Yao Qi <yao.qi@linaro.org>
262 Simon Marchi <simon.marchi@ericsson.com>
263
264 * Makefile.in (OBS): Remove selftest.o.
265 * configure.ac: Set srv_selftest_objs if $development is true.
266 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
267 * configure: Re-generated.
268 * server.c (captured_main): Wrap variable selftest_filter with
269 GDB_SELF_TEST.
270
271 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
272
273 * server.c (parse_debug_format_options): Return std::string.
274 (handle_monitor_command, captured_main): Adjust.
275
276 2018-01-05 Pedro Alves <palves@redhat.com>
277
278 PR gdb/18653
279 * server.c (captured_main): Pass quiet=false to
280 save_original_signals_state.
281
282 2018-01-01 Joel Brobecker <brobecker@adacore.com>
283
284 * gdbreplay.c (gdbreplay_version): Update copyright year in
285 version message.
286 * server.c (gdbserver_version): Likewise.
287
288 2017-12-08 Tom Tromey <tom@tromey.com>
289
290 * ax.c (ax_printf): Update.
291
292 2017-12-07 Yao Qi <yao.qi@linaro.org>
293
294 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
295 aarch64_linux_read_description.
296 * linux-amd64-ipa.c (idx2mask): New array.
297 (get_ipa_tdesc): Move idx2mask out.
298 (initialize_low_tracepoint): Initialize target descriptions.
299 * linux-i386-ipa.c (idx2mask): New array.
300 (get_ipa_tdesc): Move idx2mask out.
301 (initialize_low_tracepoint): Initialize target descriptions.
302
303 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
304
305 * tdesc.c (struct tdesc_type): Change return type.
306 (tdesc_add_flag): Change parameter type.
307 (tdesc_add_bitfield): Likewise.
308 (tdesc_add_field): Likewise.
309 (tdesc_set_struct_size): Likewise.
310
311 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
312
313 * regcache.c (registers_to_string): Remove unused variable.
314
315 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * inferiors.c (for_each_inferior_with_data): Remove.
318 * inferiors.h (for_each_inferior_with_data): Remove.
319 * server.c (handle_qxfer_threads_worker): Change parameter type.
320 (handle_qxfer_threads_proper): Use for_each_thread.
321
322 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
323
324 * inferiors.c (for_each_inferior): Remove.
325 (clear_inferiors): Use for_each_thread.
326 * inferiors.h (for_each_inferior): Remove.
327 * linux-low.c (linux_wait_for_event_filtered): Use
328 for_each_thread.
329 (linux_stabilize_threads): Likewise.
330 * regcache.c (regcache_release): Likewise.
331 * server.c (gdb_wants_all_threads_stopped): Likewise.
332 (clear_pending_status_callback): Remove.
333 (handle_status): Use for_each_thread.
334 (captured_main): Likewise.
335 * win32-low.c (child_init_thread_list): Likewise.
336 (win32_clear_inferiors): Likewise.
337 (fake_breakpoint_event): Likewise.
338
339 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
340
341 * inferiors.h (find_inferior): Remove.
342 * inferiors.c (find_inferior): Remove.
343
344 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
345
346 * linux-low.c (resume_status_pending_p): Update comment.
347 (need_step_over_p): Update comment.
348
349 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
350
351 * linux-low.c (proceed_one_lwp): Return void, change parameter
352 type.
353 (unsuspend_and_proceed_one_lwp): Likewise.
354 (proceed_all_lwps): Use for_each_thread.
355 (unstop_all_lwps): Likewise.
356
357 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * linux-low.c (linux_resume_one_thread): Return void, take
360 parameter directly.
361 (linux_resume): Use for_each_thread.
362
363 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
364
365 * linux-low.c (send_sigstop_callback): Return void, change
366 parameter type. Rename to...
367 (send_sigstop): ... this.
368 (suspend_and_send_sigstop_callback): Return void, change parameter
369 type. Rename to...
370 (suspend_and_send_sigstop): ... this.
371 (stop_all_lwps): Use for_each_thread.
372
373 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
374
375 * linux-low.c (lwp_running): Return bool, remove unused
376 argument.
377 (linux_stabilize_threads): Use find_thread.
378
379 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
380
381 * linux-low.c (select_singlestep_lwp_callback): Remove.
382 (count_events_callback): Remove.
383 (select_event_lwp_callback): Remove.
384 (select_event_lwp): Use find_thread/for_each_thread.
385
386 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
387
388 * linux-low.c (not_stopped_callback): Return bool, take filter
389 argument directly.
390 (linux_wait_for_event_filtered): Use find_thread.
391 (linux_wait_1): Likewise.
392
393 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * linux-low.c (same_lwp): Remove.
396 (find_lwp_pid): Use find_thread.
397
398 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
399
400 * linux-low.c (delete_lwp_callback): Remove.
401 (linux_mourn): Use for_each_thread.
402
403 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
404
405 * linux-low.c (linux_detach_lwp_callback): Return void, remove
406 args parameter, don't check for pid.
407 (linux_detach): Use for_each_thread.
408
409 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
410
411 * linux-low.c (struct counter): Remove.
412 (second_thread_of_pid_p): Remove.
413 (last_thread_of_process_p): Use find_thread.
414
415 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
416
417 * inferiors.c (find_inferior_in_random): Remove.
418 * inferiors.h (find_inferior_in_random): Remove.
419 * linux-low.c (status_pending_p_callback): Return bool, accept
420 parameter ptid directly.
421 (linux_wait_for_event_filtered): Use find_thread_in_random.
422 (linux_wait_1): Likewise.
423
424 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
425
426 * inferiors.c (find_inferior_id): Remove.
427 (find_thread_ptid): Move implemention from find_inferior_id to
428 here.
429 * inferiors.h (find_inferior_id): Remove.
430 * server.c (handle_status): Use find_thread_ptid.
431 (process_serial_event): Likewise.
432 * thread-db.c (find_one_thread): Likewise.
433 (thread_db_thread_handle): Likewise.
434 * win32-low.c (thread_rec): Likewise.
435 (child_delete_thread): Likewise.
436 (win32_thread_alive): Likewise.
437 (get_child_debug_event): Likewise.
438
439 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
440
441 * linux-mips-low.c (update_watch_registers_callback): Return
442 void, remove pid_p parameter, don't check for pid.
443 (mips_insert_point, mips_remove_point): Use for_each_thread.
444
445 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
446
447 * lynx.low (lynx_delete_thread_callback): Remove.
448 (lynx_mourn): Use for_each_thread.
449
450 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
451
452 * regcache.c (regcache_invalidate_one): Remove.
453 (regcache_invalidate_pid): use for_each_thread.
454
455 2017-11-26 Tom Tromey <tom@tromey.com>
456
457 * linux-low.c (linux_create_inferior): Update.
458
459 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
460
461 * spu-low.c (spu_create_inferior): Fix typo in argument name.
462
463 2017-11-24 Alan Hayward <alan.hayward@arm.com>
464
465 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
466 * linux-aarch64-low.c (initialize_low_arch): Call init func.
467 * linux-aarch64-tdesc-selftest.c: New file.
468 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
469
470 2017-11-24 Alan Hayward <alan.hayward@arm.com>
471
472 * configure.srv: Add new file.
473 * linux-aarch64-low.c (initialize_low_arch): Call init func.
474 * linux-aarch64-tdesc-selftest.c: New file.
475 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
476
477 2017-11-24 Alan Hayward <alan.hayward@arm.com>
478
479 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
480 * linux-aarch64-low.c (initialize_low_arch): Remove init.
481 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
482
483 2017-11-24 Alan Hayward <alan.hayward@arm.com>
484
485 * configure.srv: Add new files.
486 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
487 aarch64_linux_read_description.
488 * linux-aarch64-low.c (aarch64_linux_read_description):
489 Merge with aarch64_arch_setup.
490 (aarch64_arch_setup): Call aarch64_linux_read_description.
491 * linux-aarch64-tdesc.c: New file.
492 * linux-aarch64-tdesc.h: New file.
493
494 2017-11-24 Yao Qi <yao.qi@linaro.org>
495
496 * configure.srv: Set $srv_regobj for tic6x-linux.
497 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
498 (tic6x_read_description): Move some code to tic6x_arch_setup.
499 (tic6x_tdesc_test): New function.
500 (initialize_low_arch): Call selftests::register_test.
501
502 2017-11-22 Yao Qi <yao.qi@linaro.org>
503
504 * remote-utils.c (prepare_resume_reply): Use memcpy.
505
506 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
507
508 * linux-low.c (kill_one_lwp_callback): Return void, take
509 argument directly, don't filter on pid.
510 (linux_kill): Use for_each_thread.
511
512 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
513
514 * linux-low.c (need_step_over_p): Return bool, remove dummy
515 argument.
516 (linux_resume, proceed_all_lwps): Use find_thread.
517
518 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
519
520 * linux-low.c (resume_status_pending_p): Return bool, remove
521 flag_p argument.
522 (linux_resume): Use find_thread.
523
524 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
525
526 * linux-low.c (struct thread_resume_array): Remove.
527 (linux_set_resume_request): Return void, take arguments
528 directly.
529 (linux_resume): Use for_each_thread.
530
531 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
532
533 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
534 return bool, remove data argument.
535 (linux_stabilize_threads): Use find_thread.
536
537 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
538
539 * linux-low.c (unsuspend_one_lwp): Remove.
540 (unsuspend_all_lwps): Use for_each_thread, inline code from
541 unsuspend_one_lwp.
542
543 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
544
545 * gdbthread.h (find_thread): Add overload with ptid_t filter.
546 * linux-low.c (struct iterate_over_lwps_args): Remove.
547 (iterate_over_lwps_filter): Remove.
548 (iterate_over_lwps): Use find_thread.
549
550 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
551
552 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
553 (linux_handle_new_gdb_connection): Use for_each_thread, inline
554 code from reset_lwp_ptrace_options_callback.
555
556 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
557
558 * linux-arm-low.c (struct update_registers_data): Remove.
559 (update_registers_callback): Return void, take arguments
560 directly, don't check thread's pid.
561 (arm_insert_point, arm_remove_point): Use for_each_thread.
562
563 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
564
565 * win32-low.c (continue_one_thread): Return void, take argument
566 directly.
567 (child_continue): Use for_each_thread.
568
569 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
570
571 * win32-i386-low.c (update_debug_registers_callback): Rename
572 to ...
573 (update_debug_registers): ... this, return void, remove pid_p arg.
574 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
575
576 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * inferiors.h (struct process_info): Add constructor, initialize
579 fields..
580 <syscalls_to_catch>: Change type to std::vector<int>.
581 * inferiors.c (add_process): Allocate process_info with new.
582 (remove_process): Free process_info with delete.
583 * linux-low.c (handle_extended_wait): Adjust.
584 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
585 * server.c (handle_general_set): Adjust.
586
587 2017-11-16 Pedro Alves <palves@redhat.com>
588
589 * remote-utils.c (remote_close): Block SIGIO signals instead of
590 uninstalling the SIGIO handler.
591
592 2017-11-16 Alan Hayward <alan.hayward@arm.com>
593
594 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
595
596 2017-11-16 Yao Qi <yao.qi@linaro.org>
597
598 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
599 (tic6x_store_gregset): Likewise.
600 (tic6x_usrregs_info): Move it up.
601
602 2017-11-15 Alan Hayward <alan.hayward@arm.com>
603
604 * Makefile.in: Update arch rules.
605 * configure.srv: Explicitly mark arch/ files.
606
607 2017-11-13 Andreas Schwab <schwab@suse.de>
608
609 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
610 function.
611 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
612
613 2017-11-06 Pedro Alves <palves@redhat.com>
614
615 * config.in, configure: Regenerate.
616
617 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
618
619 * target.c (struct thread_search): Remove.
620 (thread_search_callback): Remove.
621 (prepare_to_access_memory): Use for_each_thread instead of
622 find_inferior. Inline code from thread_search_callback.
623
624 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
625
626 * server.c (struct visit_actioned_threads_data): Remove.
627 (visit_actioned_threads): Change prototype to take arguments
628 directly.
629 (resume): Use find_thread instead of find_inferior.
630
631 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
632
633 * server.c (queue_stop_reply_callback): Change prototype, return
634 void.
635 (find_status_pending_thread_callback): Remove.
636 (handle_status): Replace find_inferior with find_thread and
637 for_each_thread.
638
639 2017-10-25 Alan Hayward <alan.hayward@arm.com>
640
641 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
642 with REGNO.
643 (aarch64_store_gregset): Likewise.
644 (aarch64_fill_fpregset): Likewise.
645 (aarch64_store_fpregset): Likewise.
646
647 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
648
649 * gdbthread.h (find_thread, for_each_thread): New functions.
650 * inferiors.c (thread_of_pid): Remove.
651 (find_any_thread_of_pid): Use find_thread.
652 * linux-low.c (num_lwps): Use for_each_thread.
653
654 2017-10-17 Yao Qi <yao.qi@linaro.org>
655
656 * Makefile.in: Remove one rule.
657 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
658
659 2017-10-17 Yao Qi <yao.qi@linaro.org>
660
661 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
662 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
663
664 2017-10-17 Yao Qi <yao.qi@linaro.org>
665
666 * configure.srv: Rename arm.o with arch/arm.o.
667
668 2017-10-17 Yao Qi <yao.qi@linaro.org>
669
670 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
671 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
672 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
673 (arch-i386.o, arch-amd64.o): Remove rules.
674 (arch/%.o): New rule.
675 Update POSTCOMPILE and COMPILE.pre.
676 * configure.ac: Invoke AC_CONFIG_COMMANDS.
677 * configure: Re-generated.
678 * configure.srv: Replace arch-i386.o with arch/i386.o.
679 Replace arch-amd64.o with arch/amd64.o.
680
681 2017-10-16 Yao Qi <yao.qi@linaro.org>
682
683 * configure: Regenerated.
684
685 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
686
687 * inferiors.h: (struct inferior_list): Remove.
688 (struct inferior_list_entry); Remove.
689 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
690 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
691 get_first_inferior): Remove.
692 (for_each_inferior, for_each_inferior_with_data, find_inferior,
693 find_inferior_id, find_inferior_in_random): Change signature.
694 * inferiors.c (all_threads): Change type to
695 std::list<thread_info *>.
696 (get_thread): Remove macro.
697 (find_inferior, find_inferior_id): Change signature, implement
698 using find_thread.
699 (find_inferior_in_random): Change signature, implement using
700 find_thread_in_random.
701 (for_each_inferior, for_each_inferior_with_data): Change
702 signature, implement using for_each_thread.
703 (add_inferior_to_list, remove_inferior): Remove.
704 (add_thread, get_first_thread, thread_of_pid,
705 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
706 (get_first_inferior, one_inferior_p, clear_inferior_list):
707 Remove.
708 (clear_inferiors, get_thread_process): Update.
709 * gdbthread.h: Include <list>.
710 (struct thread_info) <entry>: Remove field.
711 <id>: New field.
712 (all_threads): Change type to std::list<thread_info *>.
713 (get_first_inferior): Add doc.
714 (find_thread, for_each_thread, find_thread_in_random): New
715 functions.
716 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
717 * linux-arm-low.c (update_registers_callback): Update.
718 * linux-low.c (second_thread_of_pid_p): Update.
719 (kill_one_lwp_callback, linux_detach_lwp_callback,
720 delete_lwp_callback, status_pending_p_callback, same_lwp,
721 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
722 iterate_over_lwps, not_stopped_callback,
723 resume_stopped_resumed_lwps, count_events_callback,
724 select_singlestep_lwp_callback, select_event_lwp_callback,
725 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
726 suspend_and_send_sigstop_callback, wait_for_sigstop,
727 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
728 lwp_running, linux_set_resume_request, resume_status_pending_p,
729 need_step_over_p, start_step_over, linux_resume_one_thread,
730 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
731 reset_lwp_ptrace_options_callback): Update.
732 * linux-mips-low.c (update_watch_registers_callback): Update.
733 * regcache.c (regcache_invalidate_one, regcache_invalidate):
734 Update.
735 (free_register_cache_thread_one): Remove.
736 (regcache_release): Update.
737 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
738 handle_qxfer_threads_worker): Update.
739 (handle_query): Update, use list iterator.
740 (visit_actioned_threads, handle_pending_status,
741 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
742 clear_pending_status_callback, set_pending_status_callback,
743 find_status_pending_thread_callback, handle_status,
744 process_serial_event): Update.
745 * target.c (thread_search_callback): Update.
746 * thread-db.c (thread_db_get_tls_address): Update.
747 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
748 Update.
749 * win32-i386-low.c (update_debug_registers_callback): Update.
750 * win32-low.c (delete_thread_info, child_delete_thread,
751 continue_one_thread, suspend_one_thread,
752 get_child_debug_event): Adjust.
753
754 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
755
756 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
757 * inferiors.h: Include <list>.
758 (struct process_info) <entry>: Remove field.
759 <pid>: New field.
760 (pid_of): Change macro to function.
761 (ptid_of, lwpid_of): Remove macro.
762 (all_processes): Change type to std::list<process_info *>.
763 (ALL_PROCESSES): Remove macro.
764 (for_each_process, find_process): New function.
765 * inferiors.c (all_processes): Change type to
766 std::list<process_info *>.
767 (find_thread_process): Adjust.
768 (add_process): Likewise.
769 (remove_process): Likewise.
770 (find_process_pid): Likewise.
771 (get_first_process): Likewise.
772 (started_inferior_callback): Remove.
773 (have_started_inferiors_p): Adjust.
774 (attached_inferior_callback): Remove.
775 (have_attached_inferiors_p): Adjust.
776 * linux-low.c (check_zombie_leaders): Likewise.
777 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
778 (x86_linux_update_xmltarget): Adjust.
779 * server.c (handle_query): Likewise.
780 (gdb_reattached_process): Remove.
781 (handle_status): Adjust.
782 (kill_inferior_callback): Likewise.
783 (detach_or_kill_inferior): Remove.
784 (print_started_pid): Likewise.
785 (print_attached_pid): Likewise.
786 (detach_or_kill_for_exit): Update.
787 (process_serial_event): Likewise.
788 * linux-arm-low.c (arm_new_fork): Likewise.
789
790 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
791
792 * dll.h: Include <list>.
793 (struct dll_info): Add constructor.
794 <entry>: Remove field.
795 (all_dlls): Change type to std::list<dll_info>.
796 * dll.c: Include <algorithm>.
797 (get_dll): Remove macro.
798 (all_dlls): Change type to std::list<dll_info *>.
799 (free_one_dll): Remove.
800 (match_dll): Likewise.
801 (loaded_dll): Adjust.
802 (unloaded_dll): Adjust to all_dlls type change, use
803 std::find_if. Inline code from match_dll.
804 (clear_dlls): Adjust to all_dlls type change.
805 * server.c (emit_dll_description): Remove.
806 (handle_qxfer_libraries): Adjust to all_dlls type change,
807 integrate emit_dll_description's functionality.
808
809 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
810
811 * linux-low.h (struct linux_target_ops) <delete_process>: New
812 field.
813 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
814 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
815 (struct linux_target_ops): Add delete_process callback.
816 * linux-arm-low.c (arm_delete_process): New.
817 (struct linux_target_ops): Add delete_process callback.
818 * linux-bfin-low.c (struct linux_target_ops): Likewise.
819 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
820 * linux-m32r-low.c (struct linux_target_ops): Likewise.
821 * linux-mips-low.c (mips_linux_delete_process): New.
822 (struct linux_target_ops): Add delete_process callback.
823 * linux-ppc-low.c (struct linux_target_ops): Likewise.
824 * linux-s390-low.c (struct linux_target_ops): Likewise.
825 * linux-sh-low.c (struct linux_target_ops): Likewise.
826 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
827 * linux-tile-low.c (struct linux_target_ops): Likewise.
828 * linux-x86-low.c (x86_linux_delete_process): New.
829 (struct linux_target_ops): Add delete_process callback.
830 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
831
832 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
833
834 * linux-aarch64-low.c (the_low_target): Add thread delete
835 callback.
836 * linux-arm-low.c (arm_delete_thread): New function.
837 (the_low_target): Add thread delete callback.
838 * linux-bfin-low.c (the_low_target): Likewise.
839 * linux-crisv32-low.c (the_low_target): Likewise.
840 * linux-low.c (delete_lwp): Invoke delete_thread callback if
841 set.
842 * linux-low.h (struct linux_target_ops) <delete_thread>: New
843 field.
844 * linux-m32r-low.c (the_low_target): Add thread delete callback.
845 * linux-mips-low.c (mips_linux_delete_thread): New function.
846 (the_low_target): Add thread delete callback.
847 * linux-ppc-low.c (the_low_target): Likewise.
848 * linux-s390-low.c (the_low_target): Likewise.
849 * linux-sh-low.c (the_low_target): Likewise.
850 * linux-tic6x-low.c (the_low_target): Likewise.
851 * linux-tile-low.c (the_low_target): Likewise.
852 * linux-x86-low.c (the_low_target): Likewise.
853 * linux-xtensa-low.c (the_low_target): Likewise.
854
855 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
856
857 * win32-low.c: Include "common-inferior.h".
858
859 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
860
861 * inferiors.c (set_inferior_cwd): New function.
862 * server.c (handle_general_set): Handle QSetWorkingDir packet.
863 (handle_query): Inform that QSetWorkingDir is supported.
864 * win32-low.c (create_process): Pass the inferior's cwd to
865 CreateProcess.
866
867 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
868
869 * inferiors.c (current_inferior_cwd): New global variable.
870 (get_inferior_cwd): New function.
871 * inferiors.h (struct process_info) <cwd>: New field.
872
873 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
874
875 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
876 (OBS): Add gdb_tilde_expand.o.
877
878 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
879
880 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
881 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
882
883 2017-09-29 Pedro Alves <palves@redhat.com>
884
885 * ax.c (gdb_parse_agent_expr): Constify.
886 * ax.h (gdb_parse_agent_expr): Constify.
887 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
888 Constify.
889 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
890 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
891 * remote-utils.h (read_ptid): Constify.
892 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
893 (process_point_options, process_serial_event): Constify.
894 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
895 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
896 (cmd_qtbuffer): Constify.
897
898 2017-09-29 Pedro Alves <palves@redhat.com>
899
900 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
901 fails.
902
903 2017-09-29 Pedro Alves <palves@redhat.com>
904
905 * linux-low.c (handle_extended_wait): Pass parent thread instead
906 of process to thread_db_notice_clone.
907 * linux-low.h (thread_db_notice_clone): Replace parent process
908 parameter with parent thread parameter.
909 * thread-db.c (find_one_thread): Add comment.
910 (thread_db_notice_clone): Replace parent process parameter with
911 parent thread parameter. Temporarily switch to the parent thread.
912
913 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
914
915 * gdbthread.h: Include "common-gdbthread.h".
916 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
917 "if" when validating the ptid.
918 * remote-utils.c: Include "gdbthread.h".
919 (prepare_resume_reply): Use "switch_to_thread".
920 * target.c (done_accessing_memory): Likewise.
921
922 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
923
924 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
925 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
926 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
927 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
928 s390x-gs-linux64-ipa.o to ipa_obj.
929 * linux-s390-low.c (HWCAP_S390_GS): New define.
930 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
931 New functions.
932 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
933 (s390_arch_setup): Check for guarded-storage support and choose
934 appropriate tdesc.
935 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
936 init_registers_s390x_gs_linux64.
937 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
938 enum value.
939 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
940 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
941
942 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
943
944 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
945
946 2017-09-21 Kevin Buettner <kevinb@redhat.com>
947
948 * linux-low.h (struct lwp_info): Add new field, thread_handle.
949 (thread_db_thread_handle): Declare.
950 * linux-low.c (linux_target_ops): Initialize thread_handle.
951 * server.c (handle_qxfer_threads_worker): Add support for
952 "handle" attribute.
953 * target.h (struct target_ops): Add new function pointer,
954 thread_handle.
955 (target_thread_handle): Define.
956 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
957 field in lwp.
958 (thread_db_thread_handle): New function.
959
960 2017-09-21 Kevin Buettner <kevinb@redhat.com>
961
962 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
963 * linux-low.h (thread_db_notice_clone): Declare.
964 * thread-db.c (thread_db_notice_clone): New function.
965
966 2017-09-21 Pedro Alves <palves@redhat.com>
967
968 * server.c (gdb_read_memory, handle_status, process_serial_event)
969 (handle_serial_event, handle_target_event): Adjust to
970 set_desired_thread prototype change.
971 * target.c (set_desired_thread): Remove 'use_general' parameter
972 and adjust.
973 * target.h (set_desired_thread): Remove 'use_general' parameter.
974
975 2017-09-20 Tom Tromey <tom@tromey.com>
976
977 * target.c (target_terminal::terminal_state): Define.
978 (target_terminal::init): Rename from target_terminal_init.
979 (target_terminal::inferior): Rename from
980 target_terminal_inferior.
981 (target_terminal::ours): Rename from target_terminal_ours.
982 (target_terminal::ours_for_output, target_terminal::info): New.
983
984 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
985
986 * server.c (accumulate_file_name_length): Remove.
987 (emit_dll_description): Adjust to std::string change.
988 (handle_qxfer_libraries): Use std::string to hold document.
989
990 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
991
992 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
993 return type of xml_escape_text.
994 * server.c (emit_dll_description): Likewise.
995
996 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
997
998 * server.c (captured_main): Accept argument for --selftest.
999 Update run_tests call.
1000 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1001 when registering selftests.
1002
1003 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1004
1005 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1006 instead of "VEC" for "target_desc.reg_defs".
1007 (regcache_cpy): Likewise.
1008 (registers_to_string): Likewise.
1009 (registers_from_string): Likewise.
1010 (find_regno): Likewise.
1011 (supply_regblock): Likewise.
1012 (regcache_raw_read_unsigned): Likewise.
1013 * tdesc.c (init_target_desc): Likewise.
1014 (tdesc_create_reg): Likewise.
1015 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1016 (struct target_desc) <reg_defs>: Convert to "std::vector".
1017 (target_desc): Do not initialize "reg_defs".
1018 (~target_desc): Update code to use "std::vector" instead of "VEC"
1019 for "target_desc.reg_defs".
1020 (operator==): Likewise.
1021
1022 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1023
1024 * inferiors.h (thread_to_gdb_id): Remove.
1025 * inferiors.c (thread_to_gdb_id): Remove.
1026 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1027 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1028 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1029 Likewise.
1030 * nto-low.c (nto_fetch_registers, nto_store_registers,
1031 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1032
1033 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1034
1035 * inferiors.h (gdb_id_to_thread_id): Remove.
1036 * inferiors.c (gdb_id_to_thread_id): Remove.
1037 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1038 removal. Move pid declaration closer to where it's used.
1039
1040 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1041
1042 * server.c (handle_detach): New function.
1043 (process_serial_event): Move code out, call handle_detach.
1044
1045 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1046
1047 * server.c (require_running): Rename to ...
1048 (require_running_or_return): ... this ...
1049 (require_running_or_break): ... and this.
1050 (handle_query, process_serial_event): Adjust.
1051
1052 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1053
1054 * linux-low.c (linux_set_resume_request): Remove unused
1055 variables.
1056
1057 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1058
1059 * server.c (first_thread_of): Remove.
1060 (process_serial_event): Replace usage of first_thread_of with
1061 find_any_thread_of_pid.
1062 * tracepoint.c (same_process_p): Remove.
1063 (gdb_agent_about_to_close): Replace usage of same_process_p with
1064 find_any_thread_of_pid.
1065 * linux-x86-low.c (same_process_callback): Remove.
1066 (x86_arch_setup_process_callback): Replace usage of
1067 same_process_callback with find_any_thread_of_pid.
1068 * thread-db.c (any_thread_of): Remove.
1069 (switch_to_process): Replace usage of any_thread_of with
1070 find_any_thread_of_pid.
1071 * inferiors.c (thread_pid_matches_callback): Remove.
1072 (find_thread_process): Adjust to use find_any_thread_of_pid.
1073
1074 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1075
1076 * regcache.c (get_thread_regcache): Guard calls to "memset"
1077 with "!VEC_empty".
1078
1079 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1080
1081 * linux-low.c (handle_extended_wait): Use
1082 "allocate_target_description" instead of "XNEW".
1083 * linux-x86-low.c (initialize_low_arch): Likewise.
1084
1085 2017-09-05 Yao Qi <yao.qi@linaro.org>
1086
1087 * configure.srv (srv_i386_regobj): Remove.
1088 (srv_amd64_regobj): Remove.
1089 (srv_regobj): Set it to "" for x86 non-linux targets.
1090 * linux-x86-tdesc.c (i386_linux_read_description):
1091 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1092 (init_registers_i386): Remove the declaration.
1093 (tdesc_i386): Remove the declaration.
1094 (lynx_i386_arch_setup): Call i386_create_target_description.
1095 * nto-x86-low.c: Likewise.
1096 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1097 [!__x86_64__]: include arch/i386.h.
1098 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1099
1100 2017-09-05 Yao Qi <yao.qi@linaro.org>
1101
1102 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1103 i386/amd64-XXX-linux from it.
1104
1105 2017-09-05 Yao Qi <yao.qi@linaro.org>
1106
1107 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1108 false.
1109 (ipa_amd64_linux_regobj): Remove.
1110 (ipa_x32_linux_regobj): Remove.
1111
1112 2017-09-05 Yao Qi <yao.qi@linaro.org>
1113
1114 * Makefile.in (arch-amd64.o): New rule.
1115 * configure.srv: Append arch-amd64.o.
1116 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1117 (get_ipa_tdesc): Call amd64_linux_read_description.
1118 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1119 and init_registers_amd64_XXX.
1120 * linux-x86-low.c (x86_linux_read_description): Call
1121 amd64_linux_read_description.
1122 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1123 (initialize_low_arch): Don't call init_registers_x32_XXX and
1124 init_registers_amd64_XXX.
1125 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1126 and tdesc_amd64_XXX.
1127 [__x86_64__] (amd64_tdesc_test): New function.
1128 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1129 and init_registers_amd64_XXX.
1130 * linux-x86-tdesc.c: Include arch/amd64.h.
1131 (xcr0_to_tdesc_idx): New function.
1132 (i386_linux_read_description): New function.
1133 (amd64_get_ipa_tdesc_idx): New function.
1134 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1135 (amd64_get_ipa_tdesc): Declare.
1136
1137 2017-09-05 Yao Qi <yao.qi@linaro.org>
1138
1139 * configure.srv (srv_i386_linux_xmlfiles): Remove
1140 i386/i386-XXX-linux.xml from it.
1141
1142 2017-09-05 Yao Qi <yao.qi@linaro.org>
1143
1144 * configure.srv: Set srv_i386_linux_regobj empty if $development
1145 is false.
1146 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1147 initialize_low_tdesc.
1148 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1149 with #if initialize_low_tdesc.
1150 * linux-x86-tdesc-selftest.c: New file.
1151 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1152
1153 2017-09-05 Yao Qi <yao.qi@linaro.org>
1154
1155 * Makefile.in (arch-i386.o): New rule.
1156 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1157 (x86_64-*-linux*): Likewise.
1158 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1159 include arch/i386.h.
1160 (i386_linux_read_description): Remove code and call
1161 i386_create_target_description.
1162 * tdesc.c (allocate_target_description): New function.
1163 * tdesc.h (set_tdesc_architecture): Remove declaration.
1164 (set_tdesc_osabi): Likewise.
1165
1166 2017-09-05 Yao Qi <yao.qi@linaro.org>
1167
1168 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1169 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1170 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1171 .xmltarget.
1172 * server.c (get_features_xml): Call tdesc_get_features_xml.
1173 * tdesc.c (set_tdesc_architecture): New function.
1174 (set_tdesc_osabi): New function.
1175 (tdesc_get_features_xml): New function.
1176 (tdesc_create_feature): Add an argument.
1177 * tdesc.h (struct target_desc) <features>: New field.
1178 <arch, osabi>: New field.
1179 (~target_desc): xfree features, arch, and osabi.
1180 (target_desc::oerator==): Don't compare .xmltarget.
1181 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1182 (set_tdesc_osabi): Likewise.
1183 (tdesc_get_features_xml): Likewise.
1184
1185 2017-09-05 Yao Qi <yao.qi@linaro.org>
1186
1187 * linux-x86-tdesc.c: Include selftest.h.
1188 (i386_tdesc_test): New function.
1189 (initialize_low_tdesc): Call selftests::register_test.
1190 * tdesc.h: Include regdef.h.
1191 (target_desc): Override operator == and !=.
1192
1193 2017-09-05 Yao Qi <yao.qi@linaro.org>
1194
1195 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1196 (ipa_obj): Likewise.
1197 * linux-i386-ipa.c: Include common/x86-xstate.h
1198 (get_ipa_tdesc): Call i386_linux_read_description.
1199 (initialize_low_tracepoint): Don't call init_registers_XXX
1200 functions, call initialize_low_tdesc instead.
1201 * linux-x86-low.c (x86_linux_read_description): Call
1202 i386_linux_read_description.
1203 (initialize_low_arch): Don't call init_registers_i386_XXX
1204 functions, call initialize_low_tdesc.
1205 * linux-x86-tdesc.c: New file.
1206 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1207 (i386_get_ipa_tdesc_idx): Declare.
1208 (i386_get_ipa_tdesc): Declare.
1209 (initialize_low_tdesc): Declare.
1210
1211 2017-09-05 Yao Qi <yao.qi@linaro.org>
1212
1213 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1214 instead of 0.
1215
1216 2017-09-05 Yao Qi <yao.qi@linaro.org>
1217
1218 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1219 * regcache.c (get_thread_regcache): Use VEC_length.
1220 (init_register_cache): Likewise.
1221 (regcache_cpy): Likewise.
1222 (registers_to_string): Iterate reg_defs via VEC_iterate.
1223 (find_regno): Likewise.
1224 (find_register_by_number): Use VEC_index.
1225 (register_size): Call find_register_by_number.
1226 (register_data): Call find_register_by_number.
1227 (supply_regblock): Use VEC_length.
1228 (regcache_raw_read_unsigned): Likewise.
1229 * tdesc.c (init_target_desc): Iterate reg_defs via
1230 VEC_iterate.
1231 (default_description): Update initializer.
1232 (copy_target_description): Don't update field num_registers.
1233 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1234 <num_registers>: Remove.
1235
1236 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * Makefile.in (.SECONDARY): Define target.
1239
1240 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1241
1242 * linux-low.c (linux_wait_1): Adjust.
1243 * server.c (queue_stop_reply_callback): Adjust.
1244
1245 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1246
1247 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1248 QEnvironmentUnset and QEnvironmentReset packets.
1249 (handle_query): Inform remote that QEnvironmentHexEncoded,
1250 QEnvironmentUnset and QEnvironmentReset are supported.
1251
1252 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1253
1254 * inferiors.h (inferior_target_data): Rename to ...
1255 (thread_target_data): ... this.
1256 (inferior_regcache_data): Rename to ...
1257 (thread_regcache_data): ... this.
1258 (set_inferior_regcache_data): Rename to ...
1259 (set_thread_regcache_data): ... this.
1260 * inferiors.c (inferior_target_data): Rename to ...
1261 (thread_target_data): ... this.
1262 (inferior_regcache_data): Rename to ...
1263 (thread_regcache_data): ... this.
1264 (set_inferior_regcache_data): Rename to ...
1265 (set_thread_regcache_data): ... this.
1266 (free_one_thread): Update.
1267 * linux-low.h (get_thread_lwp): Update.
1268 * regcache.c (get_thread_regcache): Update.
1269 (regcache_invalidate_thread): Update.
1270 (free_register_cache_thread): Update.
1271 * win32-i386-low.c (update_debug_registers_callback): Update.
1272 (win32_get_current_dr): Update.
1273 * win32-low.c (thread_rec): Update.
1274 (delete_thread_info): Update.
1275 (continue_one_thread): Update.
1276 (suspend_one_thread): Update.
1277
1278 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * inferiors.c (set_inferior_target_data): Remove.
1281 * inferiors.h (set_inferior_target_data): Remove.
1282
1283 2017-08-18 Yao Qi <yao.qi@linaro.org>
1284
1285 * Makefile.in (OBS): Add selftest.o.
1286 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1287 * configure, config.in: Re-generated.
1288 * server.c: Include common/sefltest.h.
1289 (captured_main): Handle option --selftest.
1290
1291 2017-08-09 Yao Qi <yao.qi@linaro.org>
1292
1293 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1294 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1295 i386-avx-mpx.o and i386-mmx.o.
1296 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1297 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1298 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1299 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1300 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1301 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1302 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1303 i386/amd64-avx-mpx.xml.
1304
1305 2017-08-09 Yao Qi <yao.qi@linaro.org>
1306
1307 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1308 and x32-avx-avx512.o.
1309 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1310 i386/x32-avx-avx512.xml.
1311
1312 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1313
1314 * tracepoint.h (enum class fast_tpoint_collect_result): New
1315 enumeration.
1316 (fast_tracepoint_collecting): Change return type to
1317 fast_tpoint_collect_result.
1318 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1319 * linux-low.h: Include tracepoint.h.
1320 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1321 fast_tpoint_collect_result.
1322 * linux-low.c (handle_tracepoints): Adjust.
1323 (linux_fast_tracepoint_collecting): Change return type to
1324 fast_tpoint_collect_result.
1325 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1326 linux_wait_1, stuck_in_jump_pad_callback,
1327 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1328 proceed_one_lwp): Adjust to type change.
1329
1330 2017-07-10 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1333
1334 2017-06-29 Yao Qi <yao.qi@linaro.org>
1335
1336 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1337 Remove.
1338 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1339
1340 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1341
1342 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1343
1344 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1345
1346 * linux-low.c (linux_create_inferior): Adjust code to access the
1347 environment information via 'gdb_environ' class.
1348 * lynx-low.c (lynx_create_inferior): Likewise.
1349 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1350 (get_environ): Return a pointer to 'our_environ'.
1351 (captured_main): Initialize 'our_environ'.
1352 * server.h (get_environ): Adjust prototype.
1353 * spu-low.c (spu_create_inferior): Adjust code to access the
1354 environment information via 'gdb_environ' class.
1355
1356 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1359 usage of "register" keyword.
1360
1361 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1362
1363 * configure: Re-generate.
1364
1365 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1366
1367 * configure: Re-generate.
1368
1369 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1370
1371 * Makefile.in (COMPILE.pre): Add "-x c++".
1372
1373 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1374
1375 * fork-child.c: Conditionally include <signal.h>.
1376
1377 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1378
1379 * server.c (handle_general_set): Handle new packet
1380 "QStartupWithShell".
1381 (handle_query): Add "QStartupWithShell" to the list of supported
1382 packets.
1383 (gdbserver_usage): Add help text explaining the
1384 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1385 options.
1386 (captured_main): Recognize and act upon the presence of the new
1387 CLI options.
1388
1389 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1390 Pedro Alves <palves@redhat.com>
1391
1392 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1393 * configure: Regenerate.
1394 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1395 "fork-inferior.o".
1396 (i[34567]86-*-lynxos*): Likewise.
1397 (spu*-*-*): Likewise.
1398 * fork-child.c: New file.
1399 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1400 and "environ.h".
1401 (linux_ptrace_fun): New function.
1402 (linux_create_inferior): Adjust function prototype to reflect
1403 change on "target.h". Adjust function code to use
1404 "fork_inferior".
1405 (linux_request_interrupt): Delete "signal_pid".
1406 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1407 (lynx_ptrace_fun): New function.
1408 (lynx_create_inferior): Adjust function prototype to reflect
1409 change on "target.h". Adjust function code to use
1410 "fork_inferior".
1411 * nto-low.c (nto_create_inferior): Adjust function prototype and
1412 code to reflect change on "target.h". Update comments.
1413 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1414 "common-terminal.h" and "environ.h".
1415 (terminal_fd): Moved to fork-child.c.
1416 (old_foreground_pgrp): Likewise.
1417 (restore_old_foreground_pgrp): Likewise.
1418 (last_status): Make it global.
1419 (last_ptid): Likewise.
1420 (our_environ): New variable.
1421 (startup_with_shell): Likewise.
1422 (program_name): Likewise.
1423 (program_argv): Rename to...
1424 (program_args): ...this.
1425 (wrapper_argv): New variable.
1426 (start_inferior): Delete function.
1427 (get_exec_wrapper): New function.
1428 (get_exec_file): Likewise.
1429 (get_environ): Likewise.
1430 (prefork_hook): Likewise.
1431 (post_fork_inferior): Likewise.
1432 (postfork_hook): Likewise.
1433 (postfork_child_hook): Likewise.
1434 (handle_v_run): Update code to deal with arguments coming from the
1435 remote host. Update calls from "start_inferior" to
1436 "create_inferior".
1437 (captured_main): Likewise. Initialize environment variable. Call
1438 "have_job_control".
1439 * server.h (post_fork_inferior): New prototype.
1440 (get_environ): Likewise.
1441 (last_status): Declare.
1442 (last_ptid): Likewise.
1443 (signal_pid): Likewise.
1444 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1445 (spu_ptrace_fun): New function.
1446 (spu_create_inferior): Adjust function prototype to reflect change
1447 on "target.h". Adjust function code to use "fork_inferior".
1448 * target.c (target_terminal_init): New function.
1449 (target_terminal_inferior): Likewise.
1450 (target_terminal_ours): Likewise.
1451 * target.h: Include <vector>.
1452 (struct target_ops) <create_inferior>: Update prototype.
1453 (create_inferior): Update macro.
1454 * utils.c (gdb_flush_out_err): New function.
1455 * win32-low.c (win32_create_inferior): Adjust function prototype
1456 and code to reflect change on "target.h".
1457
1458 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1459
1460 * inferiors.c (switch_to_thread): New function.
1461
1462 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1463
1464 * Makefile.in (SFILE): Add "common/job-control.c".
1465 (OBS): Add "job-control.o".
1466
1467 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1468
1469 * Makefile: Remove "@host_makefile_frag@".
1470
1471 2017-05-05 Pedro Alves <palves@redhat.com>
1472
1473 * configure: Regenerate.
1474
1475 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1476
1477 * configure: Regenerate.
1478
1479 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1480
1481 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1482 software_single_step change of return type to
1483 std::vector<CORE_ADDR>.
1484 * linux-low.c (install_software_single_step_breakpoints):
1485 Likewise.
1486 * linux-low.h (install_software_single_step_breakpoints):
1487 Likewise.
1488
1489 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1490
1491 * remote-utils.c: Include "gdb_termios.h" instead of
1492 "terminal.h".
1493 * terminal.h: Delete file.
1494
1495 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1496
1497 * server.c: Include <vector>.
1498 <program_argv, wrapper_argv>: Convert to std::vector.
1499 (start_inferior): Rewrite function to use C++.
1500 (handle_v_run): Likewise. Update code that calculates the argv
1501 based on the vRun packet; use C++.
1502 (captured_main): Likewise.
1503
1504 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1505
1506 * server.c (handle_v_cont): Initialize thread_resume::thread
1507 with null_ptid.
1508
1509 2017-04-05 Pedro Alves <palves@redhat.com>
1510
1511 * configure: Regenerate.
1512
1513 2017-04-05 Pedro Alves <palves@redhat.com>
1514
1515 * gdbreplay.c (sync_error): Constify.
1516 * linux-x86-low.c (push_opcode): Constify.
1517
1518 2017-04-05 Pedro Alves <palves@redhat.com>
1519
1520 * win32-low.c (get_child_debug_event)
1521 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1522 Report TARGET_WAITKIND_SPURIOUS instead.
1523
1524 2017-04-05 Pedro Alves <palves@redhat.com>
1525
1526 * remote-utils.c (remote_prepare, remote_open): Constify.
1527 * remote-utils.h (remote_prepare, remote_open): Constify.
1528 * server.c (captured_main): Constify 'port' handling.
1529
1530 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1531
1532 * Makefile.in (clean): Clear .deps.
1533
1534 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1535
1536 * .gitignore: Remove generated files, replace with wildcard.
1537 * (clean): Replace removal of generated files with wildcard.
1538 (version.c): Replace with...
1539 (version-generated.c): ...this.
1540 (xml-builtin.c): Replace with...
1541 (xml-builtin-generated.c): ...this.
1542 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1543 (%.c: *regformats*): Replace with...
1544 (%-generated.c: *regformats*): ...this.
1545
1546 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1547
1548 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1549 (xtensa_fill_gregset): Call collect_register_by_name for
1550 threadptr register.
1551 (xtensa_store_gregset): Call supply_register_by_name for
1552 threadptr register.
1553
1554 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1555
1556 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1557 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1558 (xtensa_store_gregset): Call supply_register for all registers in
1559 a0_regnum..a0_regnum + C0_NREGS range.
1560
1561 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1562
1563 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1564 (ax-ipa.o: ax.c): Remove.
1565 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1566 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1567 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1568 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1569 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1570
1571 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1574 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1575 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1576 (errors-ipa.o: ../common/errors.c): Remove.
1577 (format-ipa.o: ../common/format.c): Remove.
1578 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1579
1580 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1581
1582 * Makefile.in (%-ipa.o: %.c): New rule.
1583 (tracepoint-ipa.o: tracepoint.c): Remove.
1584 (utils-ipa.o: utils.c): Remove.
1585 (remote-utils-ipa.o: remote-utils.c): Remove.
1586 (regcache-ipa.o: regcache.c): Remove.
1587 (i386-linux-ipa.o: i386-linux.c): Remove.
1588 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1589 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1590 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1591 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1592 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1593 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1594 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1595 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1596 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1597 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1598 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1599 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1600 (aarch64-ipa.o: aarch64.c): Remove.
1601 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1602 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1603 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1604 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1605 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1606 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1607 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1608 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1609 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1610 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1611 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1612 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1613 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1614 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1615 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1616 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1617 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1618 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1619 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1620 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1621 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1622 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1623 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1624 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1625 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1626 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1627 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1628 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1629 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1630 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1631 (tdesc-ipa.o: tdesc.c): Remove.
1632 (x32-linux-ipa.o: x32-linux.c): Remove.
1633 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1634 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1635
1636 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1637
1638 * Makefile.in (%.o: ../arch/%.c): New rule.
1639 (arm.o: ../arch/arm.c): Remove.
1640 (arm-linux.o: ../arch/arm-linux.c): Remove.
1641 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1642 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1643
1644 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1645
1646 * Makefile.in (%.o: ../nat/%.c): New rule.
1647 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1648 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1649 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1650 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1651 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1652 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1653 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1654 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1655 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1656 (linux-personality.o: ../nat/linux-personality.c): Remove.
1657 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1658 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1659 (x86-linux.o: ../nat/x86-linux.c): Remove.
1660 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1661 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1662
1663 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1664
1665 * Makefile.in (%.o: ../common/%.c): New rule.
1666 (signals.o: ../common/signals.c): Remove.
1667 (print-utils.o: ../common/print-utils.c): Remove.
1668 (rsp-low.o: ../common/rsp-low.c): Remove.
1669 (common-utils.o: ../common/common-utils.c): Remove.
1670 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1671 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1672 (vec.o: ../common/vec.c): Remove.
1673 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1674 (xml-utils.o: ../common/xml-utils.c): Remove.
1675 (ptid.o: ../common/ptid.c): Remove.
1676 (buffer.o: ../common/buffer.c): Remove.
1677 (format.o: ../common/format.c): Remove.
1678 (filestuff.o: ../common/filestuff.c): Remove.
1679 (agent.o: ../common/agent.c): Remove.
1680 (errors.o: ../common/errors.c): Remove.
1681 (environ.o: ../common/environ.c): Remove.
1682 (common-debug.o: ../common/common-debug.c): Remove.
1683 (cleanups.o: ../common/cleanups.c): Remove.
1684 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1685 (fileio.o: ../common/fileio.c): Remove.
1686 (common-regcache.o: ../common/common-regcache.c): Remove.
1687 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1688 (new-op.o: ../common/new-op.c): Remove.
1689 (btrace-common.o: ../common/btrace-common.c): Remove.
1690
1691 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * Makefile.in (%.o: ../target/%.c): New rule.
1694 (waitstatus.o: ../target/waitstatus.c): Remove.
1695
1696 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1697
1698 * Makefile.in
1699 (%.c: ../regformats/%.dat,
1700 (%.c: ../regformats/arm/%.dat,
1701 (%.c: ../regformats/i386/%.dat,
1702 (%.c: ../regformats/rs6000/%.dat): New rules.
1703 (aarch64.c): Remove.
1704 (reg-arm.c): Remove.
1705 (arm-with-iwmmxt.c): Remove.
1706 (arm-with-vfpv2.c): Remove.
1707 (arm-with-vfpv3.c): Remove.
1708 (arm-with-neon.c): Remove.
1709 (reg-bfin.c): Remove.
1710 (reg-cris.c): Remove.
1711 (reg-crisv32.c): Remove.
1712 (i386.c): Remove.
1713 (i386-linux.c): Remove.
1714 (i386-avx.c): Remove.
1715 (i386-avx-linux.c): Remove.
1716 (i386-avx-avx512.c): Remove.
1717 (i386-avx-avx512-linux.c): Remove.
1718 (i386-mpx.c): Remove.
1719 (i386-mpx-linux.c): Remove.
1720 (i386-avx-mpx-avx512-pku.c): Remove.
1721 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1722 (i386-avx-mpx.c): Remove.
1723 (i386-avx-mpx-linux.c): Remove.
1724 (i386-mmx.c): Remove.
1725 (i386-mmx-linux.c): Remove.
1726 (reg-ia64.c): Remove.
1727 (reg-m32r.c): Remove.
1728 (reg-m68k.c): Remove.
1729 (reg-cf.c): Remove.
1730 (mips-linux.c): Remove.
1731 (mips-dsp-linux.c): Remove.
1732 (mips64-linux.c): Remove.
1733 (mips64-dsp-linux.c): Remove.
1734 (nios2-linux.c): Remove.
1735 (powerpc-32.c): Remove.
1736 (powerpc-32l.c): Remove.
1737 (powerpc-altivec32l.c): Remove.
1738 (powerpc-cell32l.c): Remove.
1739 (powerpc-vsx32l.c): Remove.
1740 (powerpc-isa205-32l.c): Remove.
1741 (powerpc-isa205-altivec32l.c): Remove.
1742 (powerpc-isa205-vsx32l.c): Remove.
1743 (powerpc-e500l.c): Remove.
1744 (powerpc-64l.c): Remove.
1745 (powerpc-altivec64l.c): Remove.
1746 (powerpc-cell64l.c): Remove.
1747 (powerpc-vsx64l.c): Remove.
1748 (powerpc-isa205-64l.c): Remove.
1749 (powerpc-isa205-altivec64l.c): Remove.
1750 (powerpc-isa205-vsx64l.c): Remove.
1751 (s390-linux32.c): Remove.
1752 (s390-linux32v1.c): Remove.
1753 (s390-linux32v2.c): Remove.
1754 (s390-linux64.c): Remove.
1755 (s390-linux64v1.c): Remove.
1756 (s390-linux64v2.c): Remove.
1757 (s390-te-linux64.c): Remove.
1758 (s390-vx-linux64.c): Remove.
1759 (s390-tevx-linux64.c): Remove.
1760 (s390x-linux64.c): Remove.
1761 (s390x-linux64v1.c): Remove.
1762 (s390x-linux64v2.c): Remove.
1763 (s390x-te-linux64.c): Remove.
1764 (s390x-vx-linux64.c): Remove.
1765 (s390x-tevx-linux64.c): Remove.
1766 (tic6x-c64xp-linux.c): Remove.
1767 (tic6x-c64x-linux.c): Remove.
1768 (tic6x-c62x-linux.c): Remove.
1769 (reg-sh.c): Remove.
1770 (reg-sparc64.c): Remove.
1771 (reg-spu.c): Remove.
1772 (amd64.c): Remove.
1773 (amd64-linux.c): Remove.
1774 (amd64-avx.c): Remove.
1775 (amd64-avx-linux.c): Remove.
1776 (amd64-avx-avx512.c): Remove.
1777 (amd64-avx-avx512-linux.c): Remove.
1778 (amd64-mpx.c): Remove.
1779 (amd64-mpx-linux.c): Remove.
1780 (amd64-avx-mpx-avx512-pku.c): Remove.
1781 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1782 (amd64-avx-mpx.c): Remove.
1783 (amd64-avx-mpx-linux.c): Remove.
1784 (x32.c): Remove.
1785 (x32-linux.c): Remove.
1786 (x32-avx.c): Remove.
1787 (x32-avx-linux.c): Remove.
1788 (x32-avx-avx512.c): Remove.
1789 (x32-avx-avx512-linux.c): Remove.
1790 (reg-xtensa.c): Remove.
1791 (reg-tilegx.c): Remove.
1792 (reg-tilegx32.c): Remove.
1793
1794 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1795
1796 * Makefile.in (SFILES): Add "common/environ.c".
1797 (OBJS): Add "common/environ.h".
1798
1799 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1800
1801 * configure.ac: Check if the fs_base and gs_base members of
1802 `struct user_regs_struct' exist.
1803 * config.in: Regenerated.
1804 * configure: Likewise.
1805
1806 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1807
1808 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1809 target_read_memory.
1810 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1811 (get_next_pcs_syscall_next_pc): Likewise.
1812
1813 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1814
1815 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1816 * nto-x86-low.c: Likewise.
1817
1818 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1819
1820 * Makefile.in: Include disable-implicit-rules.mk.
1821
1822 2016-11-23 Pedro Alves <palves@redhat.com>
1823
1824 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1825 (debug_vprintf): Use std::chrono::steady_clock instead of
1826 gettimeofday. Use '.' instead of ':'.
1827 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1828 (get_timestamp): Use std::chrono::steady_clock instead of
1829 gettimeofday.
1830
1831 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1832
1833 * Makefile.in: Fix whitespace formatting.
1834
1835 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1836
1837 * Makefile.in (SFILES, OBS): Flatten list and order
1838 alphabetically.
1839
1840 2016-11-23 Pedro Alves <palves@redhat.com>
1841
1842 * event-loop.c (handle_file_event): Use warning.
1843 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1844 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1845 Use warning.
1846
1847 2016-11-23 Pedro Alves <palves@redhat.com>
1848
1849 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1850 output.
1851 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1852 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1853 debug_printf and debug_flush for debug output.
1854 * server.c (handle_general_set): Likewise.
1855 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1856 output.
1857
1858 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1859
1860 * Makefile.in (.c.o): Replace rule with ...
1861 (%.o: %.c): ... this one.
1862
1863 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1864
1865 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1866 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1867 make.
1868 * configure.ac: Remove checks for the make program.
1869 * configure: Re-generate.
1870
1871 2016-10-28 Pedro Alves <palves@redhat.com>
1872
1873 * Makefile.in (CXX_DIALECT): Get from configure.
1874 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1875 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1876 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1877 * config.in: Regenerate.
1878 * configure: Regenerate.
1879
1880 2016-10-27 Yao Qi <yao.qi@linaro.org>
1881
1882 * linux-low.c (linux_supports_range_stepping): Return true if
1883 can_software_single_step return true.
1884
1885 2016-10-27 Yao Qi <yao.qi@linaro.org>
1886
1887 * inferiors.c (find_inferior_in_random): New function.
1888 * inferiors.h (find_inferior_in_random): Declare.
1889 * linux-low.c (linux_wait_for_event_filtered): Call
1890 find_inferior_in_random instead of find_inferior.
1891
1892 2016-10-27 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-low.c (linux_wait_1): If single-step breakpoints are
1895 inserted, remove them.
1896
1897 2016-10-26 Pedro Alves <palves@redhat.com>
1898
1899 * linux-low.c (handle_extended_wait): Link parent/child fork
1900 threads.
1901 (linux_wait_1): Unlink them.
1902 (linux_set_resume_request): Ignore resume requests for
1903 already-resumed and unhandled fork child threads.
1904 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1905 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1906 New functions.
1907 (handle_v_requests) <vCont>: Don't call require_running.
1908 * server.h (in_queued_stop_replies): New declaration.
1909
1910 2016-10-24 Yao Qi <yao.qi@linaro.org>
1911
1912 PR server/20733
1913 * linux-aarch64-low.c (append_insns): Cast the return value to
1914 'uint32_t *'.
1915
1916 2016-10-10 Yao Qi <yao.qi@linaro.org>
1917
1918 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1919
1920 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1921
1922 * target.c (target_supports_multi_process): New function, moved
1923 from...
1924 * target.h (target_supports_multi_process): ... here. Remove
1925 macro.
1926
1927 2016-10-05 Tom Tromey <tom@tromey.com>
1928
1929 PR remote/20655:
1930 * tracepoint.c (handle_tracepoint_bkpts): Check
1931 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1932
1933 2016-10-05 Yao Qi <yao.qi@linaro.org>
1934
1935 * configure.srv: Update the path of arm-*.xml files.
1936
1937 2016-10-05 Terry Guo <terry.guo@arm.com>
1938 Yao Qi <yao.qi@linaro.org>
1939
1940 * Makefile.in: Adjust the path of rules.
1941 * configure.srv: Update the path of xml files.
1942 * regformats/arm-with-iwmmxt.dat: Regenerated.
1943 * regformats/arm-with-neon.dat: Likewise.
1944 * regformats/arm-with-vfpv2.dat: Likewise.
1945 * regformats/arm-with-vfpv3.dat Likewise.
1946
1947 2016-09-30 Yao Qi <yao.qi@linaro.org>
1948
1949 PR gdbserver/20627
1950 * target.c (target_stop_and_wait): Don't call
1951 target_continue_no_signal, use resume_stop instead.
1952
1953 2016-09-26 Yao Qi <yao.qi@linaro.org>
1954
1955 * linux-low.c (linux_wait_1): Call debug_exit.
1956
1957 2016-09-23 Pedro Alves <palves@redhat.com>
1958
1959 * Makefile.in (SFILES): Add common/new-op.c.
1960 (OBS): Add common/new-op.o.
1961 (new-op.o): New rule.
1962
1963 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1964
1965 * .gitinore: Ignore more files.
1966
1967 2016-09-21 Yao Qi <yao.qi@linaro.org>
1968
1969 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1970 23.
1971
1972 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1973
1974 * server.c (start_inferior): Call target_mourn_inferior instead of
1975 mourn_inferior; pass ptid_t argument to it.
1976 (resume): Likewise.
1977 (handle_target_event): Likewise.
1978 * target.c (target_mourn_inferior): New function.
1979 * target.h (mourn_inferior): Delete macro.
1980
1981 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1982
1983 * linux-low.c (lwp_is_stepping): New function.
1984
1985 2016-09-06 Carl Love <cel@us.ibm.com>
1986
1987 * server.c (start_inferior): Fixed comment, requested comment change
1988 didn't get updated correctly. Removed reference to ptrace () call as
1989 it is only true on Linux systems.
1990
1991 2016-09-06 Carl Love <cel@us.ibm.com>
1992
1993 * server.c (start_inferior): Do not call
1994 function target_post_create_inferior () if the
1995 inferior process has already exited.
1996
1997 2016-09-05 Pedro Alves <palves@redhat.com>
1998
1999 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2000 (COMPILE.pre, CC_LD): Use CXX directly.
2001 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2002 * acinclude.m4: Don't include build-with-cxx.m4.
2003 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2004 * configure: Regenerate.
2005
2006 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2007
2008 PR gdb/19495
2009 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2010 call writing data to own_buf.
2011
2012 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2013
2014 * target.c (mywait): Call target_wait instead of
2015 the_target->wait.
2016 (target_wait): New function.
2017
2018 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2019
2020 * server.c (start_inferior): New variable 'ptid'. Replace calls
2021 to the_target->resume by target_continue{,_no_signal}, depending
2022 on the case.
2023 * target.c (target_stop_and_wait): Call target_continue_no_signal
2024 instead of the_target->resume.
2025 (target_continue): New function.
2026
2027 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2028
2029 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2030
2031 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2032
2033 PR server/20491
2034 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2035 ps_prochandle.
2036 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2037 * linux-arm-low.c (ps_get_thread_area): Likewise.
2038 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2039 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2040 * linux-mips-low.c (ps_get_thread_area): Likewise.
2041 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2042 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2043 * linux-x86-low.c (ps_get_thread_area): Likewise.
2044 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2045
2046 2016-08-19 Pedro Alves <palves@redhat.com>
2047
2048 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2049
2050 2016-08-19 Pedro Alves <palves@redhat.com>
2051
2052 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2053 comment. Use memcpy instead of casting through unsigned long.
2054
2055 2016-08-19 Pedro Alves <palves@redhat.com>
2056
2057 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2058 allocating around 0x80000000.
2059
2060 2016-08-19 Pedro Alves <palves@redhat.com>
2061
2062 PR gdb/20415
2063 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2064 (x32-avx512-linux-ipa.o): New rules.
2065 * configure.ac (x86_64-*-linux*): New x32 check.
2066 * configure.srv (ipa_x32_linux_regobj): New.
2067 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2068 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2069 descriptions.
2070 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2071 descriptions.
2072 * configure: Regenerate.
2073
2074 2016-08-09 Pedro Alves <palves@redhat.com>
2075
2076 PR gdb/18653
2077 * Makefile.in (OBS): Add signals-state-save-restore.o.
2078 (signals-state-save-restore.o): New rule.
2079 * config.in: Regenerate.
2080 * configure: Regenerate.
2081 * linux-low.c: Include "signals-state-save-restore.h".
2082 (linux_create_inferior): Call
2083 restore_original_signals_state.
2084 * server.c: Include "dispositions-save-restore.h".
2085 (captured_main): Call save_original_signals_state.
2086
2087 2016-08-05 Pedro Alves <palves@redhat.com>
2088
2089 * configure: Regenerate.
2090
2091 2016-08-04 Yao Qi <yao.qi@linaro.org>
2092
2093 * linux-low.c (regsets_fetch_inferior_registers): Check
2094 errno is ESRCH or not.
2095
2096 2016-08-02 Yao Qi <yao.qi@linaro.org>
2097
2098 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2099 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2100 (thread_db_load_search): Update.
2101 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2102 td_ta_set_event and td_ta_event_getmsg.
2103
2104 2016-07-26 Pedro Alves <palves@redhat.com>
2105
2106 PR server/20414
2107 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2108 of unsigned long for 64-bit registers and use uint32_t instead of
2109 unsigned int for 32-bit registers.
2110
2111 2016-07-26 Pedro Alves <palves@redhat.com>
2112
2113 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2114 to 'ptrace'.
2115
2116 2016-07-21 Tom Tromey <tom@tromey.com>
2117
2118 * configure: Rebuild.
2119
2120 2016-07-21 Yao Qi <yao.qi@linaro.org>
2121
2122 * mem-break.c (find_gdb_breakpoint): Cast bp to
2123 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2124
2125 2016-07-21 Yao Qi <yao.qi@linaro.org>
2126
2127 * server.c (handle_v_requests): Support s and S actions
2128 if target_supports_software_single_step return true.
2129
2130 2016-07-21 Yao Qi <yao.qi@linaro.org>
2131
2132 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2133 is resume_step, call maybe_hw_step.
2134 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2135 and unstop them.
2136 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2137 breakpoints or not.
2138 (proceed_one_lwp): If resume request is resume_step, install
2139 reinsert breakpoints and call maybe_hw_step.
2140
2141 2016-07-21 Yao Qi <yao.qi@linaro.org>
2142
2143 * linux-low.c (proceed_one_lwp): Declare.
2144 (linux_resume_one_thread): Remove local variable 'step'.
2145 Lift code enqueue signal. Call proceed_one_lwp instead of
2146 linux_resume_one_lwp.
2147
2148 2016-07-21 Yao Qi <yao.qi@linaro.org>
2149
2150 * linux-low.c (linux_resume_one_thread): Call
2151 enqueue_pending_signal.
2152
2153 2016-07-21 Yao Qi <yao.qi@linaro.org>
2154
2155 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2156 * inferiors.c (do_restore_current_thread_cleanup): New function.
2157 (make_cleanup_restore_current_thread): Likewise.
2158 * linux-low.c (install_software_single_step_breakpoints): Call
2159 make_cleanup_restore_current_thread. Switch current_thread to
2160 thread.
2161
2162 2016-07-21 Yao Qi <yao.qi@linaro.org>
2163
2164 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2165 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2166 (clone_one_breakpoint): Likewise.
2167 (delete_reinsert_breakpoints): Change parameter to thread.
2168 Callers updated.
2169 (has_reinsert_breakpoints): Likewise.
2170 (uninsert_reinsert_breakpoints): Likewise.
2171 (reinsert_reinsert_breakpoints): Likewise.
2172 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2173 (delete_reinsert_breakpoints): Likewise.
2174 (reinsert_reinsert_breakpoints): Likewise.
2175 (uninsert_reinsert_breakpoints): Likewise.
2176 (has_reinsert_breakpoints): Likewise.
2177
2178 2016-07-21 Yao Qi <yao.qi@linaro.org>
2179
2180 * inferiors.c (get_thread_process): Make parameter const.
2181 * inferiors.h (get_thread_process): Update declaration.
2182 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2183 Add new parameters child_thread and parent_thread. Callers
2184 updated.
2185 * mem-break.h (clone_all_breakpoints): Update declaration.
2186
2187 2016-07-21 Yao Qi <yao.qi@linaro.org>
2188
2189 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2190 <command_list, handler>: Remove.
2191 (struct gdb_breakpoint): New.
2192 (struct other_breakpoint): New.
2193 (struct reinsert_breakpoint): New.
2194 (is_gdb_breakpoint): New function.
2195 (any_persistent_commands): Update command_list if
2196 is_gdb_breakpoint returns true.
2197 (set_breakpoint): Create breakpoints according to their types.
2198 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2199 (set_gdb_breakpoint_1): Likewise.
2200 (set_gdb_breakpoint): Likewise.
2201 (clear_breakpoint_conditions): Change parameter type to
2202 'struct gdb_breakpoint *'.
2203 (clear_breakpoint_commands): Likewise.
2204 (clear_breakpoint_conditions_and_commands): Likewise.
2205 (add_condition_to_breakpoint): Likewise.
2206 (add_breakpoint_condition): Likewise.
2207 (add_commands_to_breakpoint): Likewise.
2208 (check_breakpoints): Check other_breakpoint.
2209 (clone_one_breakpoint): Clone breakpopint according to its type.
2210 * mem-break.h (struct gdb_breakpoint): Declare.
2211 (set_gdb_breakpoint): Update declaration.
2212 (clear_breakpoint_conditions_and_commands): Likewise.
2213 (add_breakpoint_condition): Likewise.
2214 (add_breakpoint_commands): Likewise.
2215 * server.c (process_point_options): Change parameter type to
2216 'struct gdb_breakpoint *'.
2217
2218 2016-07-21 Yao Qi <yao.qi@linaro.org>
2219
2220 * mem-break.c (set_breakpoint_at): Rename it to ...
2221 (set_breakpoint_type_at): ... it.
2222 (set_breakpoint_at): Call set_breakpoint_type_at.
2223 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2224 * mem-break.h (set_breakpoint_at): Update comments.
2225
2226 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2227
2228 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2229 to buf parameter.
2230 (nios2_store_gregset): Likewise.
2231
2232 2016-07-01 Pedro Alves <palves@redhat.com>
2233 Antoine Tremblay <antoine.tremblay@ericsson.com>
2234
2235 * linux-low.c: Change interface to take the target lwp_info
2236 pointer directly and return void. Handle detaching from a zombie
2237 thread.
2238 (linux_detach_lwp_callback): New function.
2239 (linux_detach): Detach from the leader thread after detaching from
2240 the clone threads.
2241
2242 2016-06-28 Yao Qi <yao.qi@linaro.org>
2243
2244 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2245 for variable new_offset.
2246 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2247 (aarch64_ftrace_insn_reloc_cb): Likewise.
2248 (aarch64_ftrace_insn_reloc_tb): Likewise.
2249 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2250 PRIx64 instead of PRIx32.
2251
2252 2016-06-28 Yao Qi <yao.qi@linaro.org>
2253
2254 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2255 (the_low_target): Install arm_get_syscall_trapinfo.
2256
2257 2016-06-28 Yao Qi <yao.qi@linaro.org>
2258
2259 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2260 function.
2261 (the_low_target): Install aarch64_get_syscall_trapinfo.
2262
2263 2016-06-28 Yao Qi <yao.qi@linaro.org>
2264
2265 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2266 Callers updated.
2267 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2268 Remove parameter sysno.
2269 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2270 sysret.
2271
2272 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2273
2274 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2275 (s390_emit_ne_goto): Likewise.
2276 (s390_emit_lt_goto): Likewise.
2277 (s390_emit_le_goto): Likewise.
2278 (s390_emit_gt_goto): Likewise.
2279 (s390_emit_ge_goto): Likewise.
2280 (s390x_emit_eq_goto): Likewise.
2281 (s390x_emit_ne_goto): Likewise.
2282 (s390x_emit_lt_goto): Likewise.
2283 (s390x_emit_le_goto): Likewise.
2284 (s390x_emit_gt_goto): Likewise.
2285 (s390x_emit_ge_goto): Likewise.
2286 (s390_emit_ops_impl): Mark variable static.
2287 (s390x_emit_ops): Likewise.
2288
2289 2016-06-17 Yao Qi <yao.qi@linaro.org>
2290
2291 * linux-low.c (handle_extended_wait): Call
2292 uninsert_reinsert_breakpoints for the parent process. Remove
2293 reinsert breakpoints from the child process. Reinsert them to
2294 the parent process when vfork is done.
2295 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2296 (reinsert_reinsert_breakpoints): New function.
2297 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2298 (reinsert_reinsert_breakpoints): Declare.
2299
2300 2016-06-17 Yao Qi <yao.qi@linaro.org>
2301
2302 * linux-low.c (handle_extended_wait): If the parent is doing
2303 step-over, remove the reinsert breakpoints from the forked child.
2304
2305 2016-06-17 Yao Qi <yao.qi@linaro.org>
2306
2307 * linux-low.c (unsuspend_all_lwps): Declare.
2308 (linux_low_filter_event): If thread exited, call finish_step_over.
2309 If step-over is finished, unsuspend other threads.
2310
2311 2016-06-17 Yao Qi <yao.qi@linaro.org>
2312
2313 * linux-low.c (linux_resume_one_lwp_throw): Assert
2314 has_reinsert_breakpoints returns false.
2315 * mem-break.c (delete_disabled_breakpoints): Assert
2316 bp type isn't reinsert_breakpoint.
2317
2318 2016-06-17 Yao Qi <yao.qi@linaro.org>
2319
2320 * linux-low.c (maybe_hw_step): New function.
2321 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2322 (finish_step_over): Switch current_thread to lwp temporarily,
2323 and assert has_reinsert_breakpoints returns true.
2324 (proceed_one_lwp): Call maybe_hw_step.
2325 * mem-break.c (has_reinsert_breakpoints): New function.
2326 * mem-break.h (has_reinsert_breakpoints): Declare.
2327
2328 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2329
2330 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2331
2332 2016-05-17 Yao Qi <yao.qi@linaro.org>
2333
2334 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2335 instead of find_inferior.
2336
2337 2016-05-05 Yao Qi <yao.qi@linaro.org>
2338
2339 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2340 Initialize res to zero.
2341
2342 2016-05-05 Yao Qi <yao.qi@linaro.org>
2343
2344 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2345 to uint32_t.
2346
2347 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2348
2349 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2350 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2351 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2352
2353 2016-04-28 Par Olsson <par.olsson@windriver.com>
2354 Simon Marchi <simon.marchi@ericsson.com>
2355
2356 * tracepoint.c (write_inferior_int8): New function.
2357 (cmd_qtenable_disable): Write enable flag using
2358 write_inferior_int8.
2359
2360 2016-04-25 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2363 (need_step_over_p): Return zero if the LWP has pending signals
2364 can be delivered on software single step target.
2365
2366 2016-04-25 Yao Qi <yao.qi@linaro.org>
2367
2368 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2369 return instead of error.
2370
2371 2016-04-22 Yao Qi <yao.qi@linaro.org>
2372
2373 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2374 to 23.
2375
2376 2016-04-22 Yao Qi <yao.qi@linaro.org>
2377
2378 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2379 signal when stepping over breakpoint with software single
2380 step.
2381
2382 2016-04-21 Pedro Alves <palves@redhat.com>
2383
2384 * linux-s390-low.c (s390_collect_ptrace_register)
2385 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2386 add casts.
2387 (s390_check_regset): Use void * instead of gdb_byte *.
2388
2389 2016-04-20 Pedro Alves <palves@redhat.com>
2390
2391 * configure: Renegerate.
2392
2393 2016-04-20 Yao Qi <yao.qi@linaro.org>
2394
2395 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2396 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2397 number 16.
2398 (arm_store_gregset): Likewise.
2399
2400 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2401
2402 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2403 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2404 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2405 (amd64-avx-mpx-linux.c): New rules.
2406 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2407 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2408 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2409 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2410 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2411 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2412 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2413 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2414 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2415 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2416 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2417 * linux-x86-low.c (x86_linux_read_description): Add case for
2418 X86_XSTATE_AVX_MPX_MASK.
2419 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2420 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2421 init_registers_i386_avx_mpx_linux.
2422 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2423 (initialize_low_tracepoint): Call
2424 init_registers_i386_avx_mpx_linux.
2425 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2426 (initialize_low_tracepoint): Call
2427 init_registers_amd64_avx_mpx_linux.
2428 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2429 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2430 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2431 declarations.
2432
2433 2016-04-18 Pedro Alves <palves@redhat.com>
2434
2435 * configure: Regenerate.
2436
2437 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2438
2439 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2440 (aarch64_emit_sub): Likewise.
2441
2442 2016-04-12 Pedro Alves <palves@redhat.com>
2443
2444 * utils.c (prepare_to_throw_exception): Delete.
2445
2446 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2447
2448 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2449
2450 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2451
2452 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2453
2454 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2455
2456 * linux-aarch64-ipa.c: Add <elf.h> include.
2457 * linux-ppc-ipa.c: Add <elf.h> include.
2458 * linux-s390-ipa.c: Add <elf.h> include.
2459
2460 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2461
2462 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2463 (get_raw_reg_ptr): Likewise.
2464 (get_trace_state_variable_value_ptr): Likewise.
2465 (set_trace_state_variable_value_ptr): Likewise.
2466 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2467 char *.
2468
2469 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2470 Marcin Kościelnicki <koriakin@0x04.net>
2471
2472 PR/17221
2473 * linux-ppc-low.c (emit_insns): New function.
2474 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2475 (ppc_emit_prologue): New function.
2476 (ppc_emit_epilogue): New function.
2477 (ppc_emit_add): New function.
2478 (ppc_emit_sub): New function.
2479 (ppc_emit_mul): New function.
2480 (ppc_emit_lsh): New function.
2481 (ppc_emit_rsh_signed): New function.
2482 (ppc_emit_rsh_unsigned): New function.
2483 (ppc_emit_ext): New function.
2484 (ppc_emit_zero_ext): New function.
2485 (ppc_emit_log_not): New function.
2486 (ppc_emit_bit_and): New function.
2487 (ppc_emit_bit_or): New function.
2488 (ppc_emit_bit_xor): New function.
2489 (ppc_emit_bit_not): New function.
2490 (ppc_emit_equal): New function.
2491 (ppc_emit_less_signed): New function.
2492 (ppc_emit_less_unsigned): New function.
2493 (ppc_emit_ref): New function.
2494 (ppc_emit_const): New function.
2495 (ppc_emit_reg): New function.
2496 (ppc_emit_pop): New function.
2497 (ppc_emit_stack_flush): New function.
2498 (ppc_emit_swap): New function.
2499 (ppc_emit_stack_adjust): New function.
2500 (ppc_emit_call): New function.
2501 (ppc_emit_int_call_1): New function.
2502 (ppc_emit_void_call_2): New function.
2503 (ppc_emit_if_goto): New function.
2504 (ppc_emit_goto): New function.
2505 (ppc_emit_eq_goto): New function.
2506 (ppc_emit_ne_goto): New function.
2507 (ppc_emit_lt_goto): New function.
2508 (ppc_emit_le_goto): New function.
2509 (ppc_emit_gt_goto): New function.
2510 (ppc_emit_ge_goto): New function.
2511 (ppc_write_goto_address): New function.
2512 (ppc_emit_ops_impl): New static variable.
2513 (ppc64v1_emit_prologue): New function.
2514 (ppc64v2_emit_prologue): New function.
2515 (ppc64_emit_epilogue): New function.
2516 (ppc64_emit_add): New function.
2517 (ppc64_emit_sub): New function.
2518 (ppc64_emit_mul): New function.
2519 (ppc64_emit_lsh): New function.
2520 (ppc64_emit_rsh_signed): New function.
2521 (ppc64_emit_rsh_unsigned): New function.
2522 (ppc64_emit_ext): New function.
2523 (ppc64_emit_zero_ext): New function.
2524 (ppc64_emit_log_not): New function.
2525 (ppc64_emit_bit_and): New function.
2526 (ppc64_emit_bit_or): New function.
2527 (ppc64_emit_bit_xor): New function.
2528 (ppc64_emit_bit_not): New function.
2529 (ppc64_emit_equal): New function.
2530 (ppc64_emit_less_signed): New function.
2531 (ppc64_emit_less_unsigned): New function.
2532 (ppc64_emit_ref): New function.
2533 (ppc64_emit_const): New function.
2534 (ppc64v1_emit_reg): New function.
2535 (ppc64v2_emit_reg): New function.
2536 (ppc64_emit_pop): New function.
2537 (ppc64_emit_stack_flush): New function.
2538 (ppc64_emit_swap): New function.
2539 (ppc64v1_emit_call): New function.
2540 (ppc64v2_emit_call): New function.
2541 (ppc64v1_emit_int_call_1): New function.
2542 (ppc64v2_emit_int_call_1): New function.
2543 (ppc64v1_emit_void_call_2): New function.
2544 (ppc64v2_emit_void_call_2): New function.
2545 (ppc64_emit_if_goto): New function.
2546 (ppc64_emit_eq_goto): New function.
2547 (ppc64_emit_ne_goto): New function.
2548 (ppc64_emit_lt_goto): New function.
2549 (ppc64_emit_le_goto): New function.
2550 (ppc64_emit_gt_goto): New function.
2551 (ppc64_emit_ge_goto): New function.
2552 (ppc64v1_emit_ops_impl): New static variable.
2553 (ppc64v2_emit_ops_impl): New static variable.
2554 (ppc_emit_ops): New function.
2555 (linux_low_target): Wire in ppc_emit_ops.
2556
2557 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2558 Marcin Kościelnicki <koriakin@0x04.net>
2559
2560 PR/17221
2561 * Makefile.in: Add powerpc-*-ipa.o
2562 * configure.srv: Add ipa_obj for powerpc*-linux.
2563 * linux-ppc-ipa.c: New file.
2564 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2565 includes.
2566 (PPC_FIELD): New macro.
2567 (PPC_SEXT): New macro.
2568 (PPC_OP6): New macro.
2569 (PPC_BO): New macro.
2570 (PPC_LI): New macro.
2571 (PPC_BD): New macro.
2572 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2573 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2574 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2575 (ppc_get_thread_area): New function.
2576 (is_elfv2_inferior): New function.
2577 (gen_ds_form): New function.
2578 (GEN_STD): New macro.
2579 (GEN_STDU): New macro.
2580 (GEN_LD): New macro.
2581 (GEN_LDU): New macro.
2582 (gen_d_form): New function.
2583 (GEN_ADDI): New macro.
2584 (GEN_ADDIS): New macro.
2585 (GEN_LI): New macro.
2586 (GEN_LIS): New macro.
2587 (GEN_ORI): New macro.
2588 (GEN_ORIS): New macro.
2589 (GEN_LWZ): New macro.
2590 (GEN_STW): New macro.
2591 (GEN_STWU): New macro.
2592 (gen_xfx_form): New function.
2593 (GEN_MFSPR): New macro.
2594 (GEN_MTSPR): New macro.
2595 (GEN_MFCR): New macro.
2596 (GEN_MTCR): New macro.
2597 (GEN_SYNC): New macro.
2598 (GEN_LWSYNC): New macro.
2599 (gen_x_form): New function.
2600 (GEN_OR): New macro.
2601 (GEN_MR): New macro.
2602 (GEN_LWARX): New macro.
2603 (GEN_STWCX): New macro.
2604 (GEN_CMPW): New macro.
2605 (gen_md_form): New function.
2606 (GEN_RLDICL): New macro.
2607 (GEN_RLDICR): New macro.
2608 (gen_i_form): New function.
2609 (GEN_B): New macro.
2610 (GEN_BL): New macro.
2611 (gen_b_form): New function.
2612 (GEN_BNE): New macro.
2613 (GEN_LOAD): New macro.
2614 (GEN_STORE): New macro.
2615 (gen_limm): New function.
2616 (gen_atomic_xchg): New function.
2617 (gen_call): New function.
2618 (ppc_relocate_instruction): New function.
2619 (ppc_install_fast_tracepoint_jump_pad): New function.
2620 (ppc_get_min_fast_tracepoint_insn_len): New function.
2621 (ppc_get_ipa_tdesc_idx): New function.
2622 (the_low_target): Wire in the new functions.
2623 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2624 tdescs.
2625 * linux-ppc-tdesc.h: New file.
2626
2627 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2628
2629 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2630 (alloc_jump_pad_buffer): New function.
2631 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2632 (alloc_jump_pad_buffer): New function.
2633 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2634 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2635 (alloc_jump_pad_buffer): New function.
2636 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2637 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2638 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2639 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2640
2641 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2642
2643 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2644 * linux-amd64-ipa.c: Likewise.
2645 * linux-i386-ipa.c: Likewise.
2646 * linux-s390-ipa.c: Likewise.
2647 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2648 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2649 set_trace_state_variable_value_ptr.
2650 (struct ipa_sym_addresses): Likewise.
2651 (symbol_list): Likewise.
2652 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2653 accessing gdb_collect directly.
2654 (gdb_collect_ptr_type): New typedef.
2655 (get_raw_reg_ptr_type): New typedef.
2656 (get_trace_state_variable_value_ptr_type): New typedef.
2657 (set_trace_state_variable_value_ptr_type): New typedef.
2658 (gdb_collect_ptr): New global.
2659 (get_raw_reg_ptr): New global.
2660 (get_trace_state_variable_value_ptr): New global.
2661 (set_trace_state_variable_value_ptr): New global.
2662 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2663 accessing get_raw_reg directly.
2664 (get_get_tsv_func_addr): Likewise for
2665 get_trace_state_variable_value_ptr.
2666 (get_set_tsv_func_addr): Likewise for
2667 set_trace_state_variable_value_ptr.
2668 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2669
2670 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2671
2672 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2673
2674 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2675
2676 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2677 packets.
2678 (relocate_instruction): Remove own_buf.
2679 * server.c (own_buf): Make global.
2680 (handle_v_requests): Make global.
2681 * server.h (own_buf): New declaration.
2682 (handle_v_requests): New prototype.
2683
2684 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2685
2686 PR 18377
2687 * linux-s390-low.c (add_insns): New function.
2688 (s390_emit_prologue): New function.
2689 (s390_emit_epilogue): New function.
2690 (s390_emit_add): New function.
2691 (s390_emit_sub): New function.
2692 (s390_emit_mul): New function.
2693 (s390_emit_lsh): New function.
2694 (s390_emit_rsh_signed): New function.
2695 (s390_emit_rsh_unsigned): New function.
2696 (s390_emit_ext): New function.
2697 (s390_emit_log_not): New function.
2698 (s390_emit_bit_and): New function.
2699 (s390_emit_bit_or): New function.
2700 (s390_emit_bit_xor): New function.
2701 (s390_emit_bit_not): New function.
2702 (s390_emit_equal): New function.
2703 (s390_emit_less_signed): New function.
2704 (s390_emit_less_unsigned): New function.
2705 (s390_emit_ref): New function.
2706 (s390_emit_if_goto): New function.
2707 (s390_emit_goto): New function.
2708 (s390_write_goto_address): New function.
2709 (s390_emit_litpool): New function.
2710 (s390_emit_const): New function.
2711 (s390_emit_call): New function.
2712 (s390_emit_reg): New function.
2713 (s390_emit_pop): New function.
2714 (s390_emit_stack_flush): New function.
2715 (s390_emit_zero_ext): New function.
2716 (s390_emit_swap): New function.
2717 (s390_emit_stack_adjust): New function.
2718 (s390_emit_set_r2): New function.
2719 (s390_emit_int_call_1): New function.
2720 (s390_emit_void_call_2): New function.
2721 (s390_emit_eq_goto): New function.
2722 (s390_emit_ne_goto): New function.
2723 (s390_emit_lt_goto): New function.
2724 (s390_emit_le_goto): New function.
2725 (s390_emit_gt_goto): New function.
2726 (s390_emit_ge_goto): New function.
2727 (s390x_emit_prologue): New function.
2728 (s390x_emit_epilogue): New function.
2729 (s390x_emit_add): New function.
2730 (s390x_emit_sub): New function.
2731 (s390x_emit_mul): New function.
2732 (s390x_emit_lsh): New function.
2733 (s390x_emit_rsh_signed): New function.
2734 (s390x_emit_rsh_unsigned): New function.
2735 (s390x_emit_ext): New function.
2736 (s390x_emit_log_not): New function.
2737 (s390x_emit_bit_and): New function.
2738 (s390x_emit_bit_or): New function.
2739 (s390x_emit_bit_xor): New function.
2740 (s390x_emit_bit_not): New function.
2741 (s390x_emit_equal): New function.
2742 (s390x_emit_less_signed): New function.
2743 (s390x_emit_less_unsigned): New function.
2744 (s390x_emit_ref): New function.
2745 (s390x_emit_if_goto): New function.
2746 (s390x_emit_const): New function.
2747 (s390x_emit_call): New function.
2748 (s390x_emit_reg): New function.
2749 (s390x_emit_pop): New function.
2750 (s390x_emit_stack_flush): New function.
2751 (s390x_emit_zero_ext): New function.
2752 (s390x_emit_swap): New function.
2753 (s390x_emit_stack_adjust): New function.
2754 (s390x_emit_int_call_1): New function.
2755 (s390x_emit_void_call_2): New function.
2756 (s390x_emit_eq_goto): New function.
2757 (s390x_emit_ne_goto): New function.
2758 (s390x_emit_lt_goto): New function.
2759 (s390x_emit_le_goto): New function.
2760 (s390x_emit_gt_goto): New function.
2761 (s390x_emit_ge_goto): New function.
2762 (s390_emit_ops): New function.
2763 (struct linux_target_ops): Fill in emit_ops hook.
2764
2765 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2766
2767 PR 18377
2768 * Makefile.in: Add s390 IPA files.
2769 * configure.srv: Build IPA for s390.
2770 * linux-s390-ipa.c: New file.
2771 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2772 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2773 (tdesc_s390_linux32): Likewise.
2774 (init_registers_s390_linux32v1): Likewise.
2775 (tdesc_s390_linux32v1): Likewise.
2776 (init_registers_s390_linux32v2): Likewise.
2777 (tdesc_s390_linux32v2): Likewise.
2778 (init_registers_s390_linux64): Likewise.
2779 (tdesc_s390_linux64): Likewise.
2780 (init_registers_s390_linux64v1): Likewise.
2781 (tdesc_s390_linux64v1): Likewise.
2782 (init_registers_s390_linux64v2): Likewise.
2783 (tdesc_s390_linux64v2): Likewise.
2784 (init_registers_s390_te_linux64): Likewise.
2785 (tdesc_s390_te_linux64): Likewise.
2786 (init_registers_s390_vx_linux64): Likewise.
2787 (tdesc_s390_vx_linux64): Likewise.
2788 (init_registers_s390_tevx_linux64): Likewise.
2789 (tdesc_s390_tevx_linux64): Likewise.
2790 (init_registers_s390x_linux64): Likewise.
2791 (tdesc_s390x_linux64): Likewise.
2792 (init_registers_s390x_linux64v1): Likewise.
2793 (tdesc_s390x_linux64v1): Likewise.
2794 (init_registers_s390x_linux64v2): Likewise.
2795 (tdesc_s390x_linux64v2): Likewise.
2796 (init_registers_s390x_te_linux64): Likewise.
2797 (tdesc_s390x_te_linux64): Likewise.
2798 (init_registers_s390x_vx_linux64): Likewise.
2799 (tdesc_s390x_vx_linux64): Likewise.
2800 (init_registers_s390x_tevx_linux64): Likewise.
2801 (tdesc_s390x_tevx_linux64): Likewise.
2802 (have_hwcap_s390_vx): New static variable.
2803 (s390_arch_setup): Fill have_hwcap_s390_vx.
2804 (s390_get_thread_area): New function.
2805 (s390_ft_entry_gpr_esa): New const.
2806 (s390_ft_entry_gpr_zarch): New const.
2807 (s390_ft_entry_misc): New const.
2808 (s390_ft_entry_fr): New const.
2809 (s390_ft_entry_vr): New const.
2810 (s390_ft_main_31): New const.
2811 (s390_ft_main_64): New const.
2812 (s390_ft_exit_fr): New const.
2813 (s390_ft_exit_vr): New const.
2814 (s390_ft_exit_misc): New const.
2815 (s390_ft_exit_gpr_esa): New const.
2816 (s390_ft_exit_gpr_zarch): New const.
2817 (append_insns): New function.
2818 (s390_relocate_instruction): New function.
2819 (s390_install_fast_tracepoint_jump_pad): New function.
2820 (s390_get_min_fast_tracepoint_insn_len): New function.
2821 (s390_get_ipa_tdesc_idx): New function.
2822 (struct linux_target_ops): Wire in the above functions.
2823 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2824 * linux-s390-tdesc.h: New file.
2825
2826 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2827
2828 * linux-s390-low.c (s390_supports_tracepoints): New function.
2829 (struct linux_target_ops): Fill supports_tracepoints hook.
2830
2831 2016-03-18 Yao Qi <yao.qi@linaro.org>
2832
2833 * linux-low.c (lwp_signal_can_be_delivered): New function.
2834 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2835
2836 2016-03-18 Yao Qi <yao.qi@linaro.org>
2837
2838 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2839 0 if signal is enqueued. Remove 'signal' from one debugging
2840 message. Move one debugging message to some lines below.
2841 Remove code setting 'signal' to 0.
2842
2843 2016-03-18 Yao Qi <yao.qi@linaro.org>
2844
2845 * linux-low.c (linux_low_filter_event): Remove redundant
2846 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2847
2848 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2849
2850 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2851 (struct linux_target_ops): Wire in the above.
2852
2853 2016-03-03 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-low.c: Update comments to start_step_over.
2856
2857 2016-03-03 Yao Qi <yao.qi@linaro.org>
2858
2859 PR server/19736
2860 * linux-low.c (handle_extended_wait): Set child suspended
2861 if event_lwp->bp_reinsert isn't zero.
2862
2863 2016-03-02 Yao Qi <yao.qi@linaro.org>
2864
2865 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2866 enqueue_pending_signal.
2867
2868 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2869
2870 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2871 is actually loaded.
2872
2873 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2874
2875 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2876 (s390_regmap_3264) [!__s390x__]: New global.
2877 (s390_collect_ptrace_register): Skip map entries containing -1.
2878 (s390_supply_ptrace_register): Ditto.
2879 (s390_fill_gprs_high): New function.
2880 (s390_store_gprs_high): New function.
2881 (s390_regsets): Add NT_S390_HIGH_GPRS.
2882 (s390_get_hwcap): Enable on 31-bit.
2883 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2884 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2885 Detect NT_S390_HIGH_GPRS.
2886 (s390_usrregs_info_3264): Enable on 31-bit.
2887 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2888 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2889
2890 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2891
2892 PR gdb/13808
2893 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2894 * configure.srv: Ditto.
2895 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2896 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2897 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2898 (init_registers_amd64_linux): Remove prototype.
2899 (tdesc_amd64_linux): Remove declaration.
2900 (get_ipa_tdesc): New function.
2901 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2902 initialize remaining tdescs.
2903 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2904 (init_registers_i386_linux): Remove prototype.
2905 (tdesc_i386_linux): Remove declaration.
2906 (get_ipa_tdesc): New function.
2907 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2908 initialize remaining tdescs.
2909 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2910 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2911 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2912 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2913 (x86_get_ipa_tdesc_idx): New function.
2914 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2915 * linux-x86-tdesc.h: New file.
2916 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2917 (target_get_ipa_tdesc_idx): New macro.
2918 * tracepoint.c (ipa_tdesc_idx): New macro.
2919 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2920 (symbol_list): Add ipa_tdesc_idx.
2921 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2922 (ipa_tdesc): Remove.
2923 (ipa_tdesc_idx): New variable.
2924 (get_context_regcache): Use get_ipa_tdesc.
2925 (gdb_collect): Ditto.
2926 (gdb_probe): Ditto.
2927 * tracepoint.h (get_ipa_tdesc): New prototype.
2928 (ipa_tdesc): Remove.
2929
2930 2016-02-24 Pedro Alves <palves@redhat.com>
2931
2932 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2933 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2934 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2935 Factor out common code between the USE_SIGTRAP_SIGINFO and
2936 !USE_SIGTRAP_SIGINFO blocks.
2937 (linux_low_filter_event): Call save_stop_reason instead of
2938 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2939 Update comments.
2940 (linux_wait_1): Update comments.
2941
2942 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2943
2944 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2945 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2946 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2947 ppc_insert_point, ppc_remove_point.
2948
2949 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2950
2951 * linux-s390-low.c (s390_supports_z_point_type): New function.
2952 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2953
2954 2016-02-16 Yao Qi <yao.qi@linaro.org>
2955
2956 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2957 PC. Get pc from regcache_read_pc.
2958
2959 2016-02-12 Yao Qi <yao.qi@linaro.org>
2960
2961 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2962 or linux_get_pc_32bit.
2963 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2964
2965 2016-02-12 Yao Qi <yao.qi@linaro.org>
2966
2967 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2968 arm_linux_get_next_pcs_fixup.
2969
2970 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2971
2972 * tracepoint.c (x_tracepoint_action_download): Change
2973 write_inferior_data_ptr to write_inferior_data_pointer.
2974 (cmd_qtstart): Likewise.
2975 (write_inferior_data_ptr): Remove.
2976 (download_agent_expr): Change write_inferior_data_ptr to
2977 write_inferior_data_pointer.
2978 (download_tracepoint_1): Likewise.
2979 (download_tracepoint): Likewise.
2980 (download_trace_state_variables): Likewise.
2981
2982 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2983 Marcin Kościelnicki <koriakin@0x04.net>
2984
2985 * tracepoint.c (struct tracepoint_action_ops): Remove.
2986 (struct tracepoint_action): Remove ops.
2987 (m_tracepoint_action_download, r_tracepoint_action_download)
2988 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2989 size and offset accordingly.
2990 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2991 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2992 (tracepoint_action_send, tracepoint_action_download): New functions.
2993 Helpers for trace action handlers.
2994 (add_tracepoint_action): Remove setup actions ops.
2995 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2996
2997 2016-02-10 Yao Qi <yao.qi@linaro.org>
2998
2999 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3000
3001 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3002
3003 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3004 to AC_OUTPUT.
3005 * configure: Regenerate.
3006
3007 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3008
3009 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3010 void * to gdb_byte *.
3011 * linux-low.c (siginfo_fixup): Likewise.
3012 (linux_xfer_siginfo): Likewise.
3013 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3014 Likewise.
3015 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3016
3017 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3018
3019 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3020 to srv_tgtobj.
3021 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3022 to srv_tgtobj.
3023 * linux-x86-low.c [__x86_64__]: Include
3024 "nat/amd64-linux-siginfo.h".
3025 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3026 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3027 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3028 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3029 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3030 (cpt_si_fd, si_timerid, si_overrun): Move from
3031 nat/amd64-linux-siginfo.c.
3032 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3033
3034 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3035
3036 * server.c (skip_to_semicolon): Remove.
3037 (process_point_options): Use strchrnul instead of
3038 skip_to_semicolon.
3039
3040 2016-01-26 Yao Qi <yao.qi@linaro.org>
3041
3042 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3043 * linux-low.c (install_software_single_step_breakpoints): Don't
3044 call regcache_read_pc.
3045 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3046 argument pc.
3047
3048 2016-01-26 Yao Qi <yao.qi@linaro.org>
3049
3050 * linux-low.c (install_software_single_step_breakpoints): Call
3051 regcache_read_pc instead of get_pc.
3052
3053 2016-01-26 Yao Qi <yao.qi@linaro.org>
3054
3055 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3056 (unblock_async_io): Rename to ...
3057 (block_unblock_async_io): ... it. New function.
3058 (enable_async_io): Don't install SIGIO handler. Unblock it
3059 instead.
3060 (disable_async_io): Don't ignore SIGIO. Block it instead.
3061 (initialize_async_io): Install SIGIO handler. Don't call
3062 unblock_async_io.
3063
3064 2016-01-26 Yao Qi <yao.qi@linaro.org>
3065
3066 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3067 first character is '\003', call *the_target->request_interrupt.
3068
3069 2016-01-25 Yao Qi <yao.qi@linaro.org>
3070
3071 * remote-utils.c (new_thread_notify): Remove.
3072 (dead_thread_notify): Likewise.
3073 * remote-utils.h (new_thread_notify): Remove declaration.
3074 (dead_thread_notify): Likewise.
3075
3076 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3077
3078 * gdb.trace/pending.exp: Fix expected message on continue.
3079
3080 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3081
3082 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3083 it works properly on big-endian machines where sizeof (CORE_ADDR)
3084 != sizeof (void *).
3085
3086 2016-01-21 Pedro Alves <palves@redhat.com>
3087
3088 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3089 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3090 * configure: Regenerate.
3091
3092 2016-01-21 Yao Qi <yao.qi@linaro.org>
3093
3094 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3095 is_thumb and set it according to CPSR saved on the stack.
3096 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3097 arm_sigreturn_next_pc.
3098
3099 2016-01-18 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-low.c (linux_set_pc_64bit): New function.
3102 (linux_get_pc_64bit): New function.
3103 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3104 Declare.
3105 * linux-sparc-low.c (debug_threads): Remove declaration.
3106 (sparc_get_pc): Remove.
3107 (the_low_target): Use linux_get_pc_64bit instead of
3108 sparc_get_pc.
3109 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3110 (the_low_target): Use linux_get_pc_64bit and
3111 linux_set_pc_64bit.
3112
3113 2016-01-18 Yao Qi <yao.qi@linaro.org>
3114
3115 * linux-arm-low.c (debug_threads): Remove declaration.
3116 (arm_get_pc, arm_set_pc): Remove.
3117 (the_low_target): Use linux_get_pc_32bit and
3118 linux_set_pc_32bit.
3119 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3120 (the_low_target): Use linux_get_pc_32bit and
3121 linux_set_pc_32bit.
3122 * linux-cris-low.c (debug_threads): Remove declaration.
3123 (cris_get_pc, cris_set_pc,): Remove.
3124 (the_low_target): Use linux_get_pc_32bit and
3125 linux_set_pc_32bit.
3126 * linux-crisv32-low.c (debug_threads): Remove declaration.
3127 (cris_get_pc, cris_set_pc): Remove.
3128 (the_low_target): Use linux_get_pc_32bit and
3129 linux_set_pc_32bit.
3130 * linux-low.c: Include inttypes.h.
3131 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3132 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3133 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3134 (the_low_target): Use linux_get_pc_32bit and
3135 linux_set_pc_32bit.
3136 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3137 (the_low_target): Use linux_get_pc_32bit and
3138 linux_set_pc_32bit.
3139 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3140 (the_low_target): Use linux_get_pc_32bit and
3141 linux_set_pc_32bit.
3142 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3143 (the_low_target): Use linux_get_pc_32bit and
3144 linux_set_pc_32bit.
3145 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3146 (the_low_target): Use linux_get_pc_32bit and
3147 linux_set_pc_32bit.
3148
3149 2016-01-18 Gary Benson <gbenson@redhat.com>
3150
3151 * configure.ac (AC_FUNC_FORK): New check.
3152 * config.in: Regenerate.
3153 * configure: Likewise.
3154
3155 2016-01-14 Yao Qi <yao.qi@linaro.org>
3156
3157 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3158 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3159 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3160 arm_get_next_pcs_ctor.
3161
3162 2016-01-12 Josh Stone <jistone@redhat.com>
3163 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3164
3165 * inferiors.h: Include "gdb_vecs.h".
3166 (struct process_info): Add syscalls_to_catch.
3167 * inferiors.c (remove_process): Free syscalls_to_catch.
3168 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3169 syscall_return stops.
3170 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3171 * server.c (handle_general_set): Handle QCatchSyscalls.
3172 (handle_query): Report support for QCatchSyscalls.
3173 * target.h (struct target_ops): Add supports_catch_syscall.
3174 (target_supports_catch_syscall): New macro.
3175 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3176 (struct lwp_info): Add syscall_state.
3177 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3178 Maintain syscall_state and syscalls_to_catch across exec.
3179 (get_syscall_trapinfo): New function, proxy to the_low_target.
3180 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3181 (linux_low_filter_event): Toggle syscall_state entry/return for
3182 syscall traps, and set it ignored for all others.
3183 (gdb_catching_syscalls_p): New function.
3184 (gdb_catch_this_syscall_p): New function.
3185 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3186 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3187 (linux_supports_catch_syscall): New function.
3188 (linux_target_ops): Install it.
3189 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3190 (the_low_target): Install it.
3191
3192 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3193
3194 * acinclude.m4: Include new ../warning.m4 file.
3195 * configure: Regenerated.
3196 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3197
3198 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3199
3200 * ax.c (is_goto_target): Mark static.
3201 * linux-low.c (register_addr): Likewise.
3202 (linux_fetch_registers, linux_store_registers): Likewise.
3203 * mem-break.c (any_persistent_commands): Fix old prototype.
3204 (add_commands_to_breakpoint): Mark static.
3205 * regcache.c (find_register_by_name): Delete unused func.
3206 * remote-utils.c (hex_or_minus_one): Mark static.
3207 * server.c (monitor_show_help): Mark static.
3208 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3209 handle_v_requests): Likewise.
3210
3211 2016-01-12 Pedro Alves <palves@redhat.com>
3212
3213 Remove use of the registered trademark symbol throughout.
3214
3215 2016-01-08 Yao Qi <yao.qi@linaro.org>
3216
3217 * remote-utils.c (getpkt): If c is '\003', call target hook
3218 request_interrupt.
3219
3220 2016-01-06 Yao Qi <yao.qi@linaro.org>
3221
3222 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3223 linux-aarch32-low.c.
3224 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3225 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3226 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3227 (thumb2_breakpoint): Declare.
3228 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3229 linux-aarch32-low.h.
3230 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3231 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3232 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3233
3234 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3235
3236 * gdbreplay.c (gdbreplay_version): Change copyright year in
3237 version message.
3238 * server.c (gdbserver_version): Likewise.
3239
3240 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3241
3242 * server.c (crc32_table): Delete.
3243 (crc32): Use libiberty's xcrc32 function.
3244
3245 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3246
3247 * lynx-low.c (lynx_delete_thread_callback): New function.
3248 (lynx_mourn): Properly delete our process and all of its
3249 threads. Remove call to clear_inferiors.
3250
3251 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3252
3253 * target.c (thread_search_callback): Add check that
3254 the thread_stopped target callback is not NULL before
3255 calling it.
3256
3257 2015-12-21 Yao Qi <yao.qi@linaro.org>
3258
3259 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3260 arm breakpoint.
3261
3262 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3263
3264 * server.c (handle_query): Call target_supports_software_single_step.
3265
3266 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3267
3268 * linux-low.c (single_step): New function.
3269 (linux_resume_one_lwp_throw): Call single_step.
3270 (start_step_over): Likewise.
3271
3272 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3273
3274 * Makefile.in (SFILES): Append arch/arm-linux.c,
3275 arch/arm-get-next-pcs.c.
3276 (arm-linux.o): New rule.
3277 (arm-get-next-pcs.o): New rule.
3278 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3279 arm-linux.o.
3280 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3281 to linux-aarch32-low.c.
3282 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3283 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3284 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3285 (thumb2_breakpoint_len): Likewise.
3286 (arm_is_thumb_mode): Make non-static.
3287 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3288 from linux-aarch32-low.c.
3289 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3290 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3291 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3292 (thumb2_breakpoint_len): Likewise.
3293 (arm_is_thumb_mode): New declaration.
3294 * linux-arm-low.c: Include arch/arm-linux.h
3295 aarch/arm-get-next-pcs.h, sys/syscall.h.
3296 (get_next_pcs_ops): New struct.
3297 (get_next_pcs_addr_bits_remove): New function.
3298 (get_next_pcs_is_thumb): New function.
3299 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3300 (arm_sigreturn_next_pc): Likewise.
3301 (get_next_pcs_syscall_next_pc): Likewise.
3302 (arm_gdbserver_get_next_pcs): Likewise.
3303 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3304 Initialize.
3305 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3306 * server.h: Include gdb_vecs.h.
3307
3308 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3309
3310 * Makefile.in (SFILES): Append common/common-regcache.c.
3311 (OBS): Append common-regcache.o.
3312 (common-regcache.o): New rule.
3313 * regcache.c (init_register_cache): Initialize cache to
3314 REG_UNAVAILABLE.
3315 (regcache_raw_read_unsigned): New function.
3316 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3317 register_status enum.
3318
3319 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3320
3321 * linux-aarch64-low.c (the_low_targets): Rename
3322 breakpoint_reinsert_addr to get_next_pcs.
3323 * linux-arm-low.c (the_low_targets): Likewise.
3324 * linux-bfin-low.c (the_low_targets): Likewise.
3325 * linux-cris-low.c (the_low_targets): Likewise.
3326 * linux-crisv32-low.c (the_low_targets): Likewise.
3327 * linux-low.c (can_software_single_step): Likewise.
3328 (install_software_single_step_breakpoints): New function.
3329 (start_step_over): Use install_software_single_step_breakpoints.
3330 * linux-low.h: New CORE_ADDR vector.
3331 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3332 get_next_pcs.
3333 * linux-mips-low.c (the_low_targets): Likewise.
3334 * linux-nios2-low.c (the_low_targets): Likewise.
3335 * linux-sparc-low.c (the_low_targets): Likewise.
3336
3337 2015-12-17 Pedro Alves <palves@redhat.com>
3338
3339 * linux-low.c (linux_kill_one_lwp): Remove references to
3340 LinuxThreads.
3341 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3342 to 'kill'.
3343 (linux_init_signals): Delete.
3344 (initialize_low): Adjust.
3345 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3346
3347 2015-12-16 Pedro Alves <palves@redhat.com>
3348
3349 * configure.ac (compiler warning flags): When testing a
3350 -Wno-foo option, check whether -Wfoo works instead.
3351 * configure: Regenerate.
3352
3353 2015-12-11 Don Breazeal <donb@codesourcery.com>
3354
3355 * server.c (process_serial_event): Don't exit from gdbserver
3356 in remote mode if there are still active inferiors.
3357
3358 2015-12-11 Yao Qi <yao.qi@linaro.org>
3359
3360 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3361 arm_breakpoint_at if the process is 32-bit.
3362
3363 2015-12-11 Yao Qi <yao.qi@linaro.org>
3364
3365 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3366 arm breakpoint.
3367
3368 2015-12-07 Yao Qi <yao.qi@linaro.org>
3369
3370 * configure.srv: Append arm.o to srv_tgtobj for
3371 aarch64*-*-linux* target.
3372 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3373 from linux-arm-low.c.
3374 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3375 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3376 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3377 (thumb2_breakpoint_len): Likewise.
3378 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3379 (arm_breakpoint_kinds): Likewise.
3380 (arm_breakpoint_kind_from_pc): Likewise.
3381 (arm_sw_breakpoint_from_kind): Likewise.
3382 (arm_breakpoint_kind_from_current_state): Likewise.
3383 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3384 (arm_sw_breakpoint_from_kind): Declare.
3385 (arm_breakpoint_kind_from_current_state): Declare.
3386 (arm_breakpoint_at): Declare.
3387 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3388 arm_sw_breakpoint_from_kind if process is 32-bit.
3389 (aarch64_breakpoint_kind_from_pc): New function.
3390 (aarch64_breakpoint_kind_from_current_state): New function.
3391 (the_low_target): Initialize fields breakpoint_kind_from_pc
3392 and breakpoint_kind_from_current_state.
3393 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3394 linux-aarch32-low.c.
3395 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3396 (arm_breakpoint, arm_breakpoint_len): Likewise.
3397 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3398 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3399 (arm_is_thumb_mode): Likewise.
3400 (arm_breakpoint_at): Likewise.
3401 (arm_breakpoint_kind_from_pc): Likewise.
3402 (arm_sw_breakpoint_from_kind): Likewise.
3403 (arm_breakpoint_kind_from_current_state): Likewise.
3404
3405 Revert:
3406 2015-08-04 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3409 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3410 * server.c (extended_protocol): Remove "static".
3411 * server.h (extended_protocol): Declare it.
3412
3413 2015-12-04 Josh Stone <jistone@redhat.com>
3414
3415 * target.h (struct target_ops) <arch_setup>: Rename to ...
3416 (struct target_ops) <post_create_inferior>: ... this.
3417 (target_arch_setup): Rename to ...
3418 (target_post_create_inferior): ... this, calling post_create_inferior.
3419 * server.c (start_inferior): Update target_arch_setup calls to
3420 target_post_create_inferior.
3421 * linux-low.c (linux_low_ptrace_options): Forward declare.
3422 (linux_arch_setup): Update its comment for general use.
3423 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3424 (struct linux_target_ops): Use linux_post_create_inferior.
3425 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3426 to post_create_inferior.
3427 * nto-low.c (struct nto_target_ops): Likewise.
3428 * spu-low.c (struct spu_target_ops): Likewise.
3429 * win32-low.c (struct win32_target_ops): Likewise.
3430
3431 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3432
3433 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3434
3435 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3436
3437 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3438 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3439 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3440 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3441 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3442 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3443 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3444 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3445 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3446 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3447 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3448 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3449
3450 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * linux-low.c (linux_look_up_symbols): Don't call
3453 linux_supports_traceclone.
3454 * linux-low.h (thread_db_init): Remove use_events argument.
3455 * thread-db.c (thread_db_use_event): Remove global variable.
3456 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3457 (struct thread_db) <td_create_bp>: Remove field.
3458 (thread_db_create_event): Remove function.
3459 (thread_db_enable_reporting): Likewise.
3460 (find_one_thread): Don't check for thread_db_use_events.
3461 (attach_thread): Likewise.
3462 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3463 (try_thread_db_load_1): Don't check for thread_db_use_events.
3464 (thread_db_init): Remove use_events argument and thread events
3465 handling.
3466 (remove_thread_event_breakpoints): Remove function.
3467 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3468
3469 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3470
3471 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3472 New function.
3473 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3474 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3475 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3476 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3477 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3478 Initialize.
3479 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3480 New function.
3481 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3482 * linux-low.c (can_hardware_single_step): Use
3483 supports_hardware_single_step.
3484 (can_software_single_step): New function.
3485 (start_step_over): Call can_software_single_step.
3486 (linux_supports_hardware_single_step): New function.
3487 (struct target_ops) <supports_software_single_step>: Initialize.
3488 * linux-low.h (struct linux_target_ops)
3489 <supports_hardware_single_step>: Initialize.
3490 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3491 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3492 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3493 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3494 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3496 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3497 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3498 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3499 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3500 Initialize.
3501 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3502 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3503 Initialize.
3504 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3505 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3506 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3507 New function.
3508 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3509 * target.h (struct target_ops): <supports_software_single_step>:
3510 New field.
3511 (target_supports_software_single_step): New macro.
3512
3513 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3514
3515 * linux-low.c (linux_wait_1): Fix pc advance condition.
3516 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3517 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3518
3519 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3520
3521 * linux-arm-low.c (arm_is_thumb_mode): New function.
3522 (arm_breakpoint_at): Use arm_is_thumb_mode.
3523 (arm_breakpoint_kind_from_current_state): New function.
3524 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3525 Initialize.
3526 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3527 (linux_breakpoint_kind_from_current_state): New function.
3528 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3529 * linux-low.h (struct linux_target_ops)
3530 <breakpoint_kind_from_current_state>: New field.
3531 * target.h (struct target_ops): Likewise.
3532 (target_breakpoint_kind_from_current_state): New macro.
3533
3534 2015-11-30 Pedro Alves <palves@redhat.com>
3535
3536 * linux-low.c (linux_resume): Wake up the event loop before
3537 returning.
3538
3539 2015-11-30 Pedro Alves <palves@redhat.com>
3540
3541 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3542 check.
3543 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3544 to -1.
3545 * target.c (struct thread_search): New structure.
3546 (thread_search_callback): New function.
3547 (prev_general_thread): New global.
3548 (prepare_to_access_memory, done_accessing_memory): New functions.
3549 * target.h (prepare_to_access_memory, done_accessing_memory):
3550 Replace macros with function declarations.
3551
3552 2015-11-30 Pedro Alves <palves@redhat.com>
3553
3554 PR 14618
3555 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3556 report TARGET_WAITKIND_NO_RESUMED.
3557 * remote-utils.c (prepare_resume_reply): Handle
3558 TARGET_WAITKIND_NO_RESUMED.
3559 * server.c (report_no_resumed): New global.
3560 (handle_query) <qSupported>: Handle "no-resumed+". Report
3561 "no-resumed+" support.
3562 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3563 return error if the client doesn't support no-resumed events.
3564 (push_stop_notification): New function.
3565 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3566 events if the client supports them.
3567
3568 2015-11-30 Pedro Alves <palves@redhat.com>
3569
3570 * linux-low.c (thread_still_has_status_pending_p): Don't check
3571 vCont;t here.
3572 (lwp_resumed): New function.
3573 (status_pending_p_callback): Return early if the LWP is not
3574 supposed to be resumed.
3575
3576 2015-11-30 Pedro Alves <palves@redhat.com>
3577
3578 * linux-low.c (handle_extended_wait): Assert that the LWP's
3579 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3580 thread create events, leave the new child's status pending.
3581 (linux_low_filter_event): If GDB wants to hear about thread exit
3582 events, leave the LWP marked dead and don't delete it.
3583 (linux_wait_for_event_filtered): Don't check for thread exit.
3584 (filter_exit_event): New function.
3585 (linux_wait_1): Use it, when returning an exit event.
3586 (linux_resume_one_lwp_throw): Assert that the LWP's
3587 waitstatus is TARGET_WAITKIND_IGNORE.
3588 * remote-utils.c (prepare_resume_reply): Handle
3589 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3590 * server.c (report_thread_events): New global.
3591 (handle_general_set): Handle QThreadEvents.
3592 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3593 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3594 TARGET_WAITKIND_THREAD_EXITED.
3595 * server.h (report_thread_events): Declare.
3596
3597 2015-11-30 Pedro Alves <palves@redhat.com>
3598
3599 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3600 the thread's last_resume_kind was resume_stop.
3601
3602 2015-11-30 Pedro Alves <palves@redhat.com>
3603
3604 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3605 before returning.
3606
3607 2015-11-30 Pedro Alves <palves@redhat.com>
3608
3609 * server.c (handle_v_requests): Handle vCtrlC.
3610
3611 2015-11-30 Pedro Alves <palves@redhat.com>
3612
3613 * gdbthread.h (find_any_thread_of_pid): Declare.
3614 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3615 functions.
3616 * server.c (handle_query): If current_thread is NULL, look for
3617 another thread of the selected process.
3618
3619 2015-11-26 Daniel Colascione <dancol@dancol.org>
3620 Simon Marchi <simon.marchi@ericsson.com>
3621
3622 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3623 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3624 name in reply.
3625 * target.h (struct target_ops) <thread_name>: New field.
3626 (target_thread_name): New macro.
3627
3628 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3629
3630 * regcache.h (regcache_invalidate_pid): Add declaration.
3631 * regcache.c (regcache_invalidate_pid): New function, extracted
3632 from regcache_invalidate.
3633 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3634 Add trivial documentation comment.
3635 * lynx-low.c: Use regcache_invalidate_pid instead of
3636 regcache_invalidate.
3637
3638 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3639
3640 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3641 and Elf64_auxv_t if the target is Android.
3642
3643 2015-11-22 Doug Evans <xdje42@gmail.com>
3644
3645 * target.h: #include <sys/types.h>.
3646
3647 2015-11-19 Pedro Alves <palves@redhat.com>
3648
3649 * linux-low.c (linux_process_qsupported): Change prototype.
3650 Adjust.
3651 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3652 Change prototype.
3653 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3654 and adjust to loop over all features.
3655 * server.c (handle_query) <qSupported>: Adjust to call
3656 target_process_qsupported once, passing it a vector of unprocessed
3657 features.
3658 * target.h (struct target_ops) <process_qsupported>: Change
3659 prototype.
3660 (target_process_qsupported): Adjust.
3661
3662 2015-11-19 Pedro Alves <palves@redhat.com>
3663
3664 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3665 mode.
3666 * configure: Regenerate.
3667
3668 2015-11-19 Pedro Alves <palves@redhat.com>
3669
3670 * configure: Regenerate.
3671
3672 2015-11-19 Yao Qi <yao.qi@linaro.org>
3673
3674 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3675 type to uint32_t.
3676
3677 2015-11-19 Yao Qi <yao.qi@linaro.org>
3678
3679 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3680 (struct aarch64_operand): Move enum out.
3681
3682 2015-11-19 Yao Qi <yao.qi@linaro.org>
3683
3684 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3685 struct user_fpsimd_state *.
3686 (aarch64_store_fpregset): Likewise.
3687
3688 2015-11-19 Yao Qi <yao.qi@linaro.org>
3689
3690 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3691 struct user_pt_regs *.
3692 (aarch64_store_gregset): Likewise.
3693
3694 2015-11-18 Pedro Alves <palves@redhat.com>
3695
3696 * Makefile.in (all_object_files): Add $IPA_OBJS.
3697
3698 2015-11-17 Pedro Alves <palves@redhat.com>
3699
3700 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3701 GDB_SIGNAL_0 and gdb_signal_to_string.
3702
3703 2015-11-17 Pedro Alves <palves@redhat.com>
3704
3705 * win32-low.c (handle_output_debug_string): Remove parameter.
3706 (win32_kill): Remove our_status local and adjust call to
3707 handle_output_debug_string.
3708 (get_child_debug_event): Adjust call to
3709 handle_output_debug_string.
3710
3711 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3712
3713 * linux-mips-low.c (mips_fill_gregset): Add cast.
3714 (mips_store_gregset): Likewise.
3715 (mips_fill_fpregset): Likewise.
3716 (mips_store_fpregset): Likewise.
3717
3718 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3719
3720 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3721 priv.
3722
3723 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3724
3725 * linux-mips-low.c (mips_linux_new_thread): Change type of
3726 watch_type to enum target_hw_bp_type.
3727
3728 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3729
3730 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3731 Change return type to arm_hwbp_type.
3732
3733 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3734
3735 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3736 (arm_store_gregset): Likewise.
3737 * linux-arm-low.c (arm_get_hwcap): Likewise.
3738 (arm_read_description): Likewise.
3739
3740 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3741
3742 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3743
3744 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3745
3746 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3747 (ppc_fill_vsxregset): Likewise.
3748 (ppc_store_vsxregset): Likewise.
3749 (ppc_fill_vrregset): Likewise.
3750 (ppc_store_vrregset): Likewise.
3751 (ppc_fill_evrregset): Likewise.
3752 (ppc_store_evrregset): Likewise.
3753
3754 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3755
3756 * linux-ppc-low.c (ppc_usrregs_info): Remove
3757 forward-declaration.
3758 (ppc_arch_setup): Move lower in file.
3759
3760 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3761
3762 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3763 (ps_pdwrite): Likewise.
3764
3765 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3766
3767 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3768 to after assert checks.
3769
3770 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3771
3772 * proc-service.c (ps_pdread): Add/adjust casts.
3773 (ps_pdwrite): Add/adjust casts.
3774
3775 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3776
3777 * server.c (handle_search_memory_1): Cast return value of
3778 memmem.
3779
3780 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3781
3782 * server.c (write_qxfer_response): Change type of data to
3783 gdb_byte *.
3784
3785 2015-10-29 Pedro Alves <palves@redhat.com>
3786
3787 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3788
3789 2015-10-29 Pedro Alves <palves@redhat.com>
3790
3791 * tracepoint.c (clear_installed_tracepoints): Add casts.
3792
3793 2015-10-29 Pedro Alves <palves@redhat.com>
3794
3795 * server.c (handle_v_cont, process_serial_event): Add enum
3796 gdb_signal casts to signal parsing code.
3797
3798 2015-10-29 Pedro Alves <palves@redhat.com>
3799
3800 * linux-low.h (NULL_REGSET): Define.
3801 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3802 * linux-arm-low.c (arm_regsets): Likewise.
3803 * linux-crisv32-low.c (cris_regsets): Likewise.
3804 * linux-m68k-low.c (m68k_regsets): Likewise.
3805 * linux-mips-low.c (mips_regsets): Likewise.
3806 * linux-nios2-low.c (nios2_regsets): Likewise.
3807 * linux-ppc-low.c (ppc_regsets): Likewise.
3808 * linux-s390-low.c (s390_regsets): Likewise.
3809 * linux-sh-low.c (sh_regsets): Likewise.
3810 * linux-sparc-low.c (sparc_regsets): Likewise.
3811 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3812 * linux-tile-low.c (tile_regsets): Likewise.
3813 * linux-x86-low.c (x86_regsets): Likewise.
3814 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3815
3816 2015-10-29 Pedro Alves <palves@redhat.com>
3817
3818 * linux-low.h (NULL_REGSET): Define.
3819 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3820 * linux-arm-low.c (arm_regsets): Likewise.
3821 * linux-crisv32-low.c (cris_regsets): Likewise.
3822 * linux-m68k-low.c (m68k_regsets): Likewise.
3823 * linux-mips-low.c (mips_regsets): Likewise.
3824 * linux-nios2-low.c (nios2_regsets): Likewise.
3825 * linux-ppc-low.c (ppc_regsets): Likewise.
3826 * linux-s390-low.c (s390_regsets): Likewise.
3827 * linux-sh-low.c (sh_regsets): Likewise.
3828 * linux-sparc-low.c (sparc_regsets): Likewise.
3829 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3830 * linux-tile-low.c (tile_regsets): Likewise.
3831 * linux-x86-low.c (x86_regsets): Likewise.
3832 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3833
3834 2015-10-26 Doug Evans <dje@google.com>
3835
3836 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3837
3838 2015-10-26 Doug Evans <dje@google.com>
3839
3840 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3841
3842 2015-10-26 Doug Evans <dje@google.com>
3843
3844 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3845 for debug_printf.
3846 (attach_thread, find_new_threads_callback): Ditto.
3847
3848 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3849
3850 * mem-break.h (set_breakpoint_data): Remove.
3851
3852 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3853
3854 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3855 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3856 (initialize_low): Remove set_breakpoint_data call.
3857 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3858 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3859 (initialize_low): Remove set_breakpoint_data call.
3860 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3861 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3862 (initialize_low): Remove set_breakpoint_data call.
3863
3864 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3865
3866 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3867 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3868 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3869 * target.h (target_breakpoint_kind_from_pc): New macro.
3870
3871 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3872
3873 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3874 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3875 the default breakpoint kind.
3876
3877 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3878
3879 * linux-arm-low.c (arm_supports_z_point_type): Add software
3880 breakpoint support.
3881
3882 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3883
3884 * linux-arm-low.c: Refactor breakpoint definitions.
3885 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3886 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3887
3888 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3889
3890 * Makefile.in: Add arm.c/o.
3891 * configure.srv: Likewise.
3892 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3893 (arm_breakpoint_kind_from_pc): New function.
3894 (arm_sw_breakpoint_from_kind): Return proper kind.
3895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3896
3897 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3898
3899 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3900 removal.
3901 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3902 (struct raw_breakpoint) <size>: Remove.
3903 (struct raw_breakpoint) <kind>: Add.
3904 (bp_size): New function.
3905 (bp_opcode): Likewise.
3906 (find_raw_breakpoint_at): Adjust for kind.
3907 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3908 (remove_memory_breakpoint): Adjust for kind call bp_size.
3909 (set_raw_breakpoint_at): Adjust for kind.
3910 (set_breakpoint): Likewise.
3911 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3912 (delete_raw_breakpoint): Adjust for kind.
3913 (delete_breakpoint): Likewise.
3914 (find_gdb_breakpoint): Likewise.
3915 (set_gdb_breakpoint_1): Likewise.
3916 (set_gdb_breakpoint): Likewise.
3917 (delete_gdb_breakpoint_1): Likewise.
3918 (delete_gdb_breakpoint): Likewise.
3919 (uninsert_raw_breakpoint): Likewise.
3920 (reinsert_raw_breakpoint): Likewise.
3921 (set_breakpoint_data): Remove.
3922 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3923 (check_mem_read): Adjust for kind call bp_size.
3924 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3925 (clone_one_breakpoint): Adjust for kind.
3926 * mem-break.h (set_gdb_breakpoint): Likewise.
3927 (delete_gdb_breakpoint): Likewise.
3928 * server.c (process_serial_event): Likewise.
3929
3930 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3931
3932 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3933 (struct linux_target_ops) <breakpoint>: Remove.
3934 (struct linux_target_ops) <breakpoint_len>: Remove.
3935 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3936 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3937 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3938 (arm_sw_breakpoint_from_kind): New function.
3939 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3940 (struct linux_target_ops) <breakpoint>: Remove.
3941 (struct linux_target_ops) <breakpoint_len>: Remove.
3942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3944 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3945 (struct linux_target_ops) <breakpoint>: Remove.
3946 (struct linux_target_ops) <breakpoint_len>: Remove.
3947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3948 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3949 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3950 (struct linux_target_ops) <breakpoint>: Remove.
3951 (struct linux_target_ops) <breakpoint_len>: Remove.
3952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3954 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3955 and sw_breakpoint_from_kind to increment the pc.
3956 (linux_breakpoint_kind_from_pc): New function.
3957 (linux_sw_breakpoint_from_kind): New function.
3958 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3959 (initialize_low): Call breakpoint_kind_from_pc and
3960 sw_breakpoint_from_kind to replace breakpoint_data/len.
3961 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3962 New field.
3963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3964 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3965 (struct linux_target_ops) <breakpoint>: Remove.
3966 (struct linux_target_ops) <breakpoint_len>: Remove.
3967 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3968 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3969 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3970 (struct linux_target_ops) <breakpoint>: Remove.
3971 (struct linux_target_ops) <breakpoint_len>: Remove.
3972 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3973 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3974 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3975 (struct linux_target_ops) <breakpoint>: Remove.
3976 (struct linux_target_ops) <breakpoint_len>: Remove.
3977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3979 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3980 (struct linux_target_ops) <breakpoint>: Remove.
3981 (struct linux_target_ops) <breakpoint_len>: Remove.
3982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3984 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3985 (struct linux_target_ops) <breakpoint>: Remove.
3986 (struct linux_target_ops) <breakpoint_len>: Remove.
3987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3989 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3990 (struct linux_target_ops) <breakpoint>: Remove.
3991 (struct linux_target_ops) <breakpoint_len>: Remove.
3992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3994 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3995 (struct linux_target_ops) <breakpoint>: Remove.
3996 (struct linux_target_ops) <breakpoint_len>: Remove.
3997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3999 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4000 (struct linux_target_ops) <breakpoint>: Remove.
4001 (struct linux_target_ops) <breakpoint_len>: Remove.
4002 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4003 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4004 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4005 (struct linux_target_ops) <breakpoint>: Remove.
4006 (struct linux_target_ops) <breakpoint_len>: Remove.
4007 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4008 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4009 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4010 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4011 (struct linux_target_ops) <breakpoint>: Remove.
4012 (struct linux_target_ops) <breakpoint_len>: Remove.
4013 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4014 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4015 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4016 (struct linux_target_ops) <breakpoint>: Remove.
4017 (struct linux_target_ops) <breakpoint_len>: Remove.
4018 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4019 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4020
4021 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4022
4023 * linux-cris-low.c (cris_get_pc): Remove void arg.
4024
4025 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4026
4027 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4028 variable name.
4029
4030 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4031
4032 * inferiors.c (thread_pid_matches_callback): New function.
4033 (find_thread_process): New function.
4034 (remove_thread): Reset current_thread.
4035 (remove_process): Assert threads have been removed first.
4036
4037 2015-10-15 Yao Qi <yao.qi@linaro.org>
4038
4039 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4040 if it is 3.
4041 (aarch64_remove_point): Likewise.
4042 * regcache.c (regcache_register_size): New function.
4043
4044 2015-10-12 Yao Qi <yao.qi@linaro.org>
4045
4046 * linux-aarch64-low.c: Update all callers as emit_load_store
4047 is renamed to aarch64_emit_load_store.
4048
4049 2015-10-12 Yao Qi <yao.qi@linaro.org>
4050
4051 * linux-aarch64-low.c: Update all callers of function renaming
4052 from emit_insn to aarch64_emit_insn.
4053
4054 2015-10-12 Yao Qi <yao.qi@linaro.org>
4055
4056 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4057 arch/aarch64-insn.h.
4058 (struct aarch64_memory_operand): Likewise.
4059 (ENCODE): Likewise.
4060 (emit_insn): Move to arch/aarch64-insn.c.
4061 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4062 (emit_load_store): Move to arch/aarch64-insn.c.
4063 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4064 (can_encode_int32): Remove.
4065
4066 2015-10-12 Yao Qi <yao.qi@linaro.org>
4067
4068 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4069 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4070 (aarch64_relocate_instruction): Likewise.
4071 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4072 (struct aarch64_insn_visitor): Likewise.
4073
4074 2015-10-12 Yao Qi <yao.qi@linaro.org>
4075
4076 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4077 (struct aarch64_insn_visitor): New.
4078 (struct aarch64_insn_relocation_data): New.
4079 (aarch64_ftrace_insn_reloc_b): New function.
4080 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4081 (aarch64_ftrace_insn_reloc_cb): Likewise.
4082 (aarch64_ftrace_insn_reloc_tb): Likewise.
4083 (aarch64_ftrace_insn_reloc_adr): Likewise.
4084 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4085 (aarch64_ftrace_insn_reloc_others): Likewise.
4086 (visitor): New.
4087 (aarch64_relocate_instruction): Use visitor.
4088
4089 2015-10-12 Yao Qi <yao.qi@linaro.org>
4090
4091 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4092 int. Add argument buf.
4093 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4094 aarch64_relocate_instruction.
4095
4096 2015-10-12 Yao Qi <yao.qi@linaro.org>
4097
4098 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4099 argument insn. Remove local variable insn. Don't call
4100 target_read_uint32.
4101 (aarch64_install_fast_tracepoint_jump_pad): Call
4102 target_read_uint32.
4103
4104 2015-09-30 Yao Qi <yao.qi@linaro.org>
4105
4106 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4107 (emit_load_store_pair): Likewise.
4108
4109 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4110
4111 * dll.c (match_dll): Add cast(s).
4112 (unloaded_dll): Likewise.
4113 * linux-low.c (second_thread_of_pid_p): Likewise.
4114 (delete_lwp_callback): Likewise.
4115 (count_events_callback): Likewise.
4116 (select_event_lwp_callback): Likewise.
4117 (linux_set_resume_request): Likewise.
4118 * server.c (accumulate_file_name_length): Likewise.
4119 (emit_dll_description): Likewise.
4120 (handle_qxfer_threads_worker): Likewise.
4121 (visit_actioned_threads): Likewise.
4122 * thread-db.c (any_thread_of): Likewise.
4123 * tracepoint.c (same_process_p): Likewise.
4124 (match_blocktype): Likewise.
4125 (build_traceframe_info_xml): Likewise.
4126
4127 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4128
4129 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4130 assignment.
4131 (gdb_unparse_agent_expr): Likewise.
4132 * hostio.c (require_data): Likewise.
4133 (handle_pread): Likewise.
4134 * linux-low.c (disable_regset): Likewise.
4135 (fetch_register): Likewise.
4136 (store_register): Likewise.
4137 (get_dynamic): Likewise.
4138 (linux_qxfer_libraries_svr4): Likewise.
4139 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4140 (set_fast_tracepoint_jump): Likewise.
4141 (uninsert_fast_tracepoint_jumps_at): Likewise.
4142 (reinsert_fast_tracepoint_jumps_at): Likewise.
4143 (validate_inserted_breakpoint): Likewise.
4144 (clone_agent_expr): Likewise.
4145 * regcache.c (init_register_cache): Likewise.
4146 * remote-utils.c (putpkt_binary_1): Likewise.
4147 (decode_M_packet): Likewise.
4148 (decode_X_packet): Likewise.
4149 (look_up_one_symbol): Likewise.
4150 (relocate_instruction): Likewise.
4151 (monitor_output): Likewise.
4152 * server.c (handle_search_memory): Likewise.
4153 (handle_qxfer_exec_file): Likewise.
4154 (handle_qxfer_libraries): Likewise.
4155 (handle_qxfer): Likewise.
4156 (handle_query): Likewise.
4157 (handle_v_cont): Likewise.
4158 (handle_v_run): Likewise.
4159 (captured_main): Likewise.
4160 * target.c (write_inferior_memory): Likewise.
4161 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4162 * tracepoint.c (init_trace_buffer): Likewise.
4163 (add_tracepoint_action): Likewise.
4164 (add_traceframe): Likewise.
4165 (add_traceframe_block): Likewise.
4166 (cmd_qtdpsrc): Likewise.
4167 (cmd_qtdv): Likewise.
4168 (cmd_qtstatus): Likewise.
4169 (response_source): Likewise.
4170 (response_tsv): Likewise.
4171 (cmd_qtnotes): Likewise.
4172 (gdb_collect): Likewise.
4173 (initialize_tracepoint): Likewise.
4174
4175 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4176
4177 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4178 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4179 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4180 <NOP>: New.
4181 (enum aarch64_condition_codes): New enum.
4182 (w0): New static global.
4183 (fp): Likewise.
4184 (lr): Likewise.
4185 (struct aarch64_memory_operand) <type>: New
4186 MEMORY_OPERAND_POSTINDEX type.
4187 (postindex_memory_operand): New helper function.
4188 (emit_ret): New function.
4189 (emit_load_store_pair): New function, factored out of emit_stp
4190 with support for MEMORY_OPERAND_POSTINDEX.
4191 (emit_stp): Rewrite using emit_load_store_pair.
4192 (emit_ldp): New function.
4193 (emit_load_store): Likewise.
4194 (emit_ldr): Mention post-index instruction in comment.
4195 (emit_ldrh): New function.
4196 (emit_ldrb): New function.
4197 (emit_ldrsw): Mention post-index instruction in comment.
4198 (emit_str): Likewise.
4199 (emit_subs): New function.
4200 (emit_cmp): Likewise.
4201 (emit_and): Likewise.
4202 (emit_orr): Likewise.
4203 (emit_orn): Likewise.
4204 (emit_eor): Likewise.
4205 (emit_mvn): Likewise.
4206 (emit_lslv): Likewise.
4207 (emit_lsrv): Likewise.
4208 (emit_asrv): Likewise.
4209 (emit_mul): Likewise.
4210 (emit_sbfm): Likewise.
4211 (emit_sbfx): Likewise.
4212 (emit_ubfm): Likewise.
4213 (emit_ubfx): Likewise.
4214 (emit_csinc): Likewise.
4215 (emit_cset): Likewise.
4216 (emit_nop): Likewise.
4217 (emit_ops_insns): New helper function.
4218 (emit_pop): Likewise.
4219 (emit_push): Likewise.
4220 (aarch64_emit_prologue): New function.
4221 (aarch64_emit_epilogue): Likewise.
4222 (aarch64_emit_add): Likewise.
4223 (aarch64_emit_sub): Likewise.
4224 (aarch64_emit_mul): Likewise.
4225 (aarch64_emit_lsh): Likewise.
4226 (aarch64_emit_rsh_signed): Likewise.
4227 (aarch64_emit_rsh_unsigned): Likewise.
4228 (aarch64_emit_ext): Likewise.
4229 (aarch64_emit_log_not): Likewise.
4230 (aarch64_emit_bit_and): Likewise.
4231 (aarch64_emit_bit_or): Likewise.
4232 (aarch64_emit_bit_xor): Likewise.
4233 (aarch64_emit_bit_not): Likewise.
4234 (aarch64_emit_equal): Likewise.
4235 (aarch64_emit_less_signed): Likewise.
4236 (aarch64_emit_less_unsigned): Likewise.
4237 (aarch64_emit_ref): Likewise.
4238 (aarch64_emit_if_goto): Likewise.
4239 (aarch64_emit_goto): Likewise.
4240 (aarch64_write_goto_address): Likewise.
4241 (aarch64_emit_const): Likewise.
4242 (aarch64_emit_call): Likewise.
4243 (aarch64_emit_reg): Likewise.
4244 (aarch64_emit_pop): Likewise.
4245 (aarch64_emit_stack_flush): Likewise.
4246 (aarch64_emit_zero_ext): Likewise.
4247 (aarch64_emit_swap): Likewise.
4248 (aarch64_emit_stack_adjust): Likewise.
4249 (aarch64_emit_int_call_1): Likewise.
4250 (aarch64_emit_void_call_2): Likewise.
4251 (aarch64_emit_eq_goto): Likewise.
4252 (aarch64_emit_ne_goto): Likewise.
4253 (aarch64_emit_lt_goto): Likewise.
4254 (aarch64_emit_le_goto): Likewise.
4255 (aarch64_emit_gt_goto): Likewise.
4256 (aarch64_emit_ge_got): Likewise.
4257 (aarch64_emit_ops_impl): New static global variable.
4258 (aarch64_emit_ops): New target function, return
4259 &aarch64_emit_ops_impl.
4260 (struct linux_target_ops): Install it.
4261
4262 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4263
4264 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4265 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4266 aarch64-ipa.o.
4267 * linux-aarch64-ipa.c: New file.
4268 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4269 and endian.h.
4270 (aarch64_get_thread_area): New target method.
4271 (extract_signed_bitfield): New helper function.
4272 (aarch64_decode_ldr_literal): New function.
4273 (enum aarch64_opcodes): New enum.
4274 (struct aarch64_register): New struct.
4275 (struct aarch64_operand): New struct.
4276 (x0): New static global.
4277 (x1): Likewise.
4278 (x2): Likewise.
4279 (x3): Likewise.
4280 (x4): Likewise.
4281 (w2): Likewise.
4282 (ip0): Likewise.
4283 (sp): Likewise.
4284 (xzr): Likewise.
4285 (aarch64_register): New helper function.
4286 (register_operand): Likewise.
4287 (immediate_operand): Likewise.
4288 (struct aarch64_memory_operand): New struct.
4289 (offset_memory_operand): New helper function.
4290 (preindex_memory_operand): Likewise.
4291 (enum aarch64_system_control_registers): New enum.
4292 (ENCODE): New macro.
4293 (emit_insn): New helper function.
4294 (emit_b): New function.
4295 (emit_bcond): Likewise.
4296 (emit_cb): Likewise.
4297 (emit_tb): Likewise.
4298 (emit_blr): Likewise.
4299 (emit_stp): Likewise.
4300 (emit_ldp_q_offset): Likewise.
4301 (emit_stp_q_offset): Likewise.
4302 (emit_load_store): Likewise.
4303 (emit_ldr): Likewise.
4304 (emit_ldrsw): Likewise.
4305 (emit_str): Likewise.
4306 (emit_ldaxr): Likewise.
4307 (emit_stxr): Likewise.
4308 (emit_stlr): Likewise.
4309 (emit_data_processing_reg): Likewise.
4310 (emit_data_processing): Likewise.
4311 (emit_add): Likewise.
4312 (emit_sub): Likewise.
4313 (emit_mov): Likewise.
4314 (emit_movk): Likewise.
4315 (emit_mov_addr): Likewise.
4316 (emit_mrs): Likewise.
4317 (emit_msr): Likewise.
4318 (emit_sevl): Likewise.
4319 (emit_wfe): Likewise.
4320 (append_insns): Likewise.
4321 (can_encode_int32_in): New helper function.
4322 (aarch64_relocate_instruction): New function.
4323 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4324 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4325 (struct linux_target_ops): Install aarch64_get_thread_area,
4326 aarch64_install_fast_tracepoint_jump_pad and
4327 aarch64_get_min_fast_tracepoint_insn_len.
4328
4329 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4330
4331 * Makefile.in (aarch64-insn.o): New rule.
4332 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4333
4334 2015-09-21 Yao Qi <yao.qi@linaro.org>
4335
4336 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4337
4338 2015-09-21 Yao Qi <yao.qi@linaro.org>
4339
4340 * tracepoint.c (max_jump_pad_size): Remove.
4341
4342 2015-09-18 Yao Qi <yao.qi@linaro.org>
4343
4344 * linux-aarch64-low.c: Don't include sys/uio.h.
4345 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4346
4347 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4348
4349 * tracepoint.c (eval_result_type): Change prototype.
4350 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4351
4352 2015-09-15 Pedro Alves <palves@redhat.com>
4353
4354 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4355 Check whether to report exec events instead of checking whether
4356 multiprocess is enabled.
4357
4358 2015-09-15 Pedro Alves <palves@redhat.com>
4359
4360 PR remote/18965
4361 * remote-utils.c (prepare_resume_reply): Merge
4362 TARGET_WAITKIND_VFORK_DONE switch case with the
4363 TARGET_WAITKIND_FORKED case.
4364
4365 2015-09-15 Yao Qi <yao.qi@linaro.org>
4366
4367 * server.c (handle_query): Check string comparison using
4368 "else if" instead of "if".
4369
4370 2015-09-15 Yao Qi <yao.qi@linaro.org>
4371
4372 * server.c (vCont_supported): New global variable.
4373 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4374 matches. Append ";vContSupported+" to own_buf.
4375 (handle_v_requests): Append ";s;S" to own_buf if target supports
4376 hardware single step or vCont_supported is false.
4377 (capture_main): Set vCont_supported to zero.
4378
4379 2015-09-15 Yao Qi <yao.qi@linaro.org>
4380
4381 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4382 it to ...
4383 (linux_supports_hardware_single_step): ... New function.
4384 (linux_target_ops): Update.
4385 * lynx-low.c (lynx_target_ops): Set field
4386 supports_hardware_single_step to target_can_do_hardware_single_step.
4387 * nto-low.c (nto_target_ops): Likewise.
4388 * spu-low.c (spu_target_ops): Likewise.
4389 * win32-low.c (win32_target_ops): Likewise.
4390 * target.c (target_can_do_hardware_single_step): New function.
4391 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4392 Remove. <supports_hardware_single_step>: New field.
4393 (target_supports_conditional_breakpoints): Remove.
4394 (target_supports_hardware_single_step): New macro.
4395 (target_can_do_hardware_single_step): Declare.
4396 * server.c (handle_query): Use target_supports_hardware_single_step
4397 instead of target_supports_conditional_breakpoints.
4398
4399 2015-09-15 Yao Qi <yao.qi@linaro.org>
4400
4401 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4402 function.
4403 (struct linux_target_ops the_low_target): Install
4404 aarch64_linux_siginfo_fixup.
4405
4406 2015-09-11 Don Breazeal <donb@codesourcery.com>
4407 Luis Machado <lgustavo@codesourcery.com>
4408
4409 * linux-low.c (linux_mourn): Static declaration.
4410 (linux_arch_setup): Move in front of
4411 handle_extended_wait.
4412 (linux_arch_setup_thread): New function.
4413 (handle_extended_wait): Handle exec events. Call
4414 linux_arch_setup_thread. Make event_lwp argument a
4415 pointer-to-a-pointer.
4416 (check_zombie_leaders): Do not check stopped threads.
4417 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4418 (linux_low_filter_event): Add lwp and thread for exec'ing
4419 non-leader thread if leader thread has been deleted.
4420 Refactor code into linux_arch_setup_thread and call it.
4421 Pass child lwp pointer by reference to handle_extended_wait.
4422 (linux_wait_for_event_filtered): Update comment.
4423 (linux_wait_1): Prevent clobbering exec event status.
4424 (linux_supports_exec_events): New function.
4425 (linux_target_ops) <supports_exec_events>: Initialize new member.
4426 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4427 new member.
4428 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4429 * server.c (report_exec_events): New global variable.
4430 (handle_query): Handle qSupported query for exec-events feature.
4431 (captured_main): Initialize report_exec_events.
4432 * server.h (report_exec_events): Declare new global variable.
4433 * target.h (struct target_ops) <supports_exec_events>: New
4434 member.
4435 (target_supports_exec_events): New macro.
4436 * win32-low.c (win32_target_ops) <supports_exec_events>:
4437 Initialize new member.
4438
4439 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4440
4441 * linux-low.c (linux_low_enable_btrace): Remove.
4442 (linux_target_ops): Replace linux_low_enable_btrace with
4443 linux_enable_btrace.
4444
4445 2015-09-03 Yao Qi <yao.qi@linaro.org>
4446
4447 * linux-aarch64-low.c (aarch64_insert_point): Call
4448 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4449 returns true.
4450
4451 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4452
4453 * linux-low.c (check_stopped_by_breakpoint): Use
4454 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4455
4456 2015-08-27 Pedro Alves <palves@redhat.com>
4457
4458 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4459
4460 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4461
4462 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4463 the XNEW-family equivalent.
4464 (compile_bytecodes): Likewise.
4465 * dll.c (loaded_dll): Likewise.
4466 * event-loop.c (append_callback_event): Likewise.
4467 (create_file_handler): Likewise.
4468 (create_file_event): Likewise.
4469 * hostio.c (handle_open): Likewise.
4470 * inferiors.c (add_thread): Likewise.
4471 (add_process): Likewise.
4472 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4473 * linux-arm-low.c (arm_new_process): Likewise.
4474 (arm_new_thread): Likewise.
4475 * linux-low.c (add_to_pid_list): Likewise.
4476 (linux_add_process): Likewise.
4477 (handle_extended_wait): Likewise.
4478 (add_lwp): Likewise.
4479 (enqueue_one_deferred_signal): Likewise.
4480 (enqueue_pending_signal): Likewise.
4481 (linux_resume_one_lwp_throw): Likewise.
4482 (linux_resume_one_thread): Likewise.
4483 (linux_read_memory): Likewise.
4484 (linux_write_memory): Likewise.
4485 * linux-mips-low.c (mips_linux_new_process): Likewise.
4486 (mips_linux_new_thread): Likewise.
4487 (mips_add_watchpoint): Likewise.
4488 * linux-x86-low.c (initialize_low_arch): Likewise.
4489 * lynx-low.c (lynx_add_process): Likewise.
4490 * mem-break.c (set_raw_breakpoint_at): Likewise.
4491 (set_breakpoint): Likewise.
4492 (add_condition_to_breakpoint): Likewise.
4493 (add_commands_to_breakpoint): Likewise.
4494 (clone_agent_expr): Likewise.
4495 (clone_one_breakpoint): Likewise.
4496 * regcache.c (new_register_cache): Likewise.
4497 * remote-utils.c (look_up_one_symbol): Likewise.
4498 * server.c (queue_stop_reply): Likewise.
4499 (start_inferior): Likewise.
4500 (queue_stop_reply_callback): Likewise.
4501 (handle_target_event): Likewise.
4502 * spu-low.c (fetch_ppc_memory): Likewise.
4503 (store_ppc_memory): Likewise.
4504 * target.c (set_target_ops): Likewise.
4505 * thread-db.c (thread_db_load_search): Likewise.
4506 (try_thread_db_load_1): Likewise.
4507 * tracepoint.c (add_tracepoint): Likewise.
4508 (add_tracepoint_action): Likewise.
4509 (create_trace_state_variable): Likewise.
4510 (cmd_qtdpsrc): Likewise.
4511 (cmd_qtro): Likewise.
4512 (add_while_stepping_state): Likewise.
4513 * win32-low.c (child_add_thread): Likewise.
4514 (get_image_name): Likewise.
4515
4516 2015-08-25 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4519
4520 2015-08-25 Yao Qi <yao.qi@linaro.org>
4521
4522 * Makefile.in (aarch64-linux.o): New rule.
4523 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4524 srv_tgtobj.
4525 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4526 (aarch64_init_debug_reg_state): Make it extern.
4527 (aarch64_linux_prepare_to_resume): Remove.
4528
4529 2015-08-25 Yao Qi <yao.qi@linaro.org>
4530
4531 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4532 lwp_arch_private_info and ptid_of_lwp.
4533
4534 2015-08-25 Yao Qi <yao.qi@linaro.org>
4535
4536 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4537 Find proc_info by find_process_pid. All callers updated.
4538
4539 2015-08-25 Yao Qi <yao.qi@linaro.org>
4540
4541 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4542 Remove.
4543 (debug_reg_change_callback): Remove.
4544 (aarch64_notify_debug_reg_change): Remove.
4545
4546 2015-08-25 Yao Qi <yao.qi@linaro.org>
4547
4548 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4549 Call current_lwp_ptid.
4550
4551 2015-08-25 Yao Qi <yao.qi@linaro.org>
4552
4553 * linux-aarch64-low.c (debug_reg_change_callback): Use
4554 debug_printf.
4555
4556 2015-08-25 Yao Qi <yao.qi@linaro.org>
4557
4558 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4559
4560 2015-08-25 Yao Qi <yao.qi@linaro.org>
4561
4562 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4563
4564 2015-08-25 Yao Qi <yao.qi@linaro.org>
4565
4566 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4567 the code.
4568
4569 2015-08-25 Yao Qi <yao.qi@linaro.org>
4570
4571 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4572 Remove.
4573 (debug_reg_change_callback): Remove argument entry and add argument
4574 lwp. Remove local variable thread. Don't print thread id in the
4575 debugging output. Don't check whether pid of thread equals to pid.
4576 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4577 iterate_over_lwps instead find_inferior.
4578
4579 2015-08-24 Pedro Alves <palves@redhat.com>
4580
4581 * inferiors.c (get_first_process): New function.
4582 * inferiors.h (get_first_process): New declaration.
4583 * remote-utils.c (read_ptid): Default to the first process in the
4584 list, instead of to the current thread's process.
4585
4586 2015-08-24 Pedro Alves <palves@redhat.com>
4587
4588 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4589 * event-loop.c: Likewise.
4590 * remote-utils.c: Likewise.
4591 * tracepoint.c: Likewise.
4592
4593 2015-08-24 Pedro Alves <palves@redhat.com>
4594
4595 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4596 ptid_get_lwp.
4597
4598 2015-08-21 Pedro Alves <palves@redhat.com>
4599
4600 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4601 instead of literal 1.
4602
4603 2015-08-21 Pedro Alves <palves@redhat.com>
4604
4605 * tdesc.c (default_description): Explicitly zero-initialize.
4606
4607 2015-08-21 Pedro Alves <palves@redhat.com>
4608
4609 PR gdb/18749
4610 * inferiors.c (remove_thread): Discard any pending stop reply for
4611 this thread.
4612 * server.c (remove_all_on_match_pid): Rename to ...
4613 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4614 instead of a pid.
4615 (discard_queued_stop_replies): Change parameter to a ptid. Now
4616 extern.
4617 (handle_v_kill, kill_inferior_callback, captured_main)
4618 (process_serial_event): Adjust.
4619 * server.h (discard_queued_stop_replies): Declare.
4620
4621 2015-08-21 Pedro Alves <palves@redhat.com>
4622
4623 * linux-low.c (wait_for_sigstop): Always switch to no thread
4624 selected if the previously current thread dies.
4625 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4626 process instead of the current thread's.
4627 * remote-utils.c (input_interrupt): Don't check if there's no
4628 current thread.
4629 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4630 current thread to the general thread fails, error out.
4631 (handle_qxfer_auxv, handle_qxfer_libraries)
4632 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4633 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4634 (handle_query): Check if there's a thread selected instead of
4635 checking whether there's any thread in the thread list.
4636 (handle_qxfer_threads, handle_qxfer_btrace)
4637 (handle_qxfer_btrace_conf): Don't error out early if there's no
4638 thread in the thread list.
4639 (handle_v_cont, myresume): Don't set the current thread to the
4640 continue thread.
4641 (process_serial_event) <Hg handling>: Also set thread_id if the
4642 previous general thread is still alive.
4643 (process_serial_event) <g/G handling>: If setting the current
4644 thread to the general thread fails, error out.
4645 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4646 thread's lwp instead of the current thread's.
4647 * target.c (set_desired_thread): If the desired thread was not
4648 found, leave the current thread pointing to NULL. Return an int
4649 (boolean) indicating success.
4650 * target.h (set_desired_thread): Change return type to int.
4651
4652 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4653
4654 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4655 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4656 #includes.
4657 (ps_get_thread_area): New function.
4658
4659 2015-08-19 Gary Benson <gbenson@redhat.com>
4660
4661 * hostio.c (handle_pread): Do not attempt to read more data
4662 than hostio_reply_with_data can fit in a packet.
4663
4664 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4665
4666 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4667
4668 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4669
4670 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4671
4672 2015-08-06 Pedro Alves <palves@redhat.com>
4673
4674 * tracepoint.c (expr_eval_result): Now an int.
4675
4676 2015-08-06 Pedro Alves <palves@redhat.com>
4677
4678 * gdbthread.h (struct regcache): Forward declare.
4679 (struct thread_info) <regcache_data>: Now a struct regcache
4680 pointer.
4681 * inferiors.c (inferior_regcache_data)
4682 (set_inferior_regcache_data): Now work with struct regcache
4683 pointers.
4684 * inferiors.h (struct regcache): Forward declare.
4685 (inferior_regcache_data, set_inferior_regcache_data): Now work
4686 with struct regcache pointers.
4687 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4688 (free_register_cache_thread): Remove struct regcache pointer
4689 casts.
4690
4691 2015-08-06 Pedro Alves <palves@redhat.com>
4692
4693 * server.c (captured_main): On error, print the exception message
4694 to stderr, and if run_once is set, throw a quit.
4695
4696 2015-08-06 Pedro Alves <palves@redhat.com>
4697
4698 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4699 the current thread.
4700
4701 2015-08-06 Pedro Alves <palves@redhat.com>
4702
4703 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4704 reading beyond the passed in buffer length.
4705
4706 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4707
4708 * tracepoint.c (symbol_list) <required>: Remove.
4709
4710 2015-08-06 Pedro Alves <palves@redhat.com>
4711
4712 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4713 count if stopping and suspending threads.
4714 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4715 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4716 (linux_detach): Complete an ongoing step-over.
4717 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4718 throughout.
4719 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4720 (linux_wait_1): If passing a signal to the inferior after
4721 finishing a step-over, unsuspend and re-resume all lwps. If we
4722 see a single-step event but the thread should be continuing, don't
4723 pass the trap to gdb.
4724 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4725 internal_error instead of gdb_assert.
4726 (enqueue_pending_signal): New function.
4727 (check_ptrace_stopped_lwp_gone): Add debug output.
4728 (start_step_over): Use internal_error instead of gdb_assert.
4729 (complete_ongoing_step_over): New function.
4730 (linux_resume_one_thread): Don't resume a suspended thread.
4731 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4732 it stepping.
4733
4734 2015-08-06 Pedro Alves <palves@redhat.com>
4735
4736 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4737 (linux_thread_alive): Use lwp_is_marked_dead.
4738 (extended_event_reported): Delete.
4739 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4740 instead of extended_event_reported.
4741 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4742 as well.
4743 (lwp_is_marked_dead): New function.
4744 (lwp_running): Use lwp_is_marked_dead.
4745 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4746 comment.
4747
4748 2015-08-06 Pedro Alves <palves@redhat.com>
4749
4750 * linux-low.c (linux_wait_1): Move fork event output out of the
4751 !report_to_gdb check. Pass event_child->waitstatus to
4752 target_waitstatus_to_string instead of ourstatus.
4753
4754 2015-08-04 Yao Qi <yao.qi@linaro.org>
4755
4756 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4757 if current_thread is 32 bit.
4758
4759 2015-08-04 Yao Qi <yao.qi@linaro.org>
4760
4761 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4762 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4763 * server.c (extended_protocol): Remove "static".
4764 * server.h (extended_protocol): Declare it.
4765
4766 2015-08-04 Yao Qi <yao.qi@linaro.org>
4767
4768 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4769 both aarch64 and aarch32.
4770 (aarch64_set_pc): Likewise.
4771
4772 2015-08-04 Yao Qi <yao.qi@linaro.org>
4773
4774 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4775 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4776 arm-with-neon.xml to srv_xmlfiles.
4777 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4778 (is_64bit_tdesc): New function.
4779 (aarch64_linux_read_description): New function.
4780 (aarch64_arch_setup): Call aarch64_linux_read_description.
4781 (regs_info): Rename to regs_info_aarch64.
4782 (aarch64_regs_info): Return right regs_info.
4783 (initialize_low_arch): Call initialize_low_arch_aarch32.
4784
4785 2015-08-04 Yao Qi <yao.qi@linaro.org>
4786
4787 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4788 * linux-aarch32-low.c: New file.
4789 * linux-aarch32-low.h: New file.
4790 * linux-arm-low.c (arm_fill_gregset): Move it to
4791 linux-aarch32-low.c.
4792 (arm_store_gregset): Likewise.
4793 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4794 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4795 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4796 (regs_info): Rename to regs_info_arm.
4797 (arm_regs_info): Return regs_info_aarch32 if
4798 have_ptrace_getregset is 1 and target description is
4799 arm_with_neon or arm_with_vfpv3.
4800 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4801 Call initialize_low_arch_aarch32 instead.
4802
4803 2015-08-04 Yao Qi <yao.qi@linaro.org>
4804
4805 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4806 * linux-low.c: ... here.
4807 * linux-low.h (have_ptrace_getregset): Declare it.
4808
4809 2015-08-04 Pedro Alves <palves@redhat.com>
4810
4811 * thread-db.c (struct thread_db): Use new typedefs.
4812 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4813 CHK calls.
4814 (disable_thread_event_reporting): Cast result of dlsym to
4815 destination function pointer type.
4816 (thread_db_mourn): Use td_ta_delete_ftype.
4817
4818 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4819
4820 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4821 arch variant.
4822 (CDX_BREAKPOINT): Define for R2.
4823 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4824 (the_low_target): Add comments.
4825
4826 2015-07-30 Yao Qi <yao.qi@linaro.org>
4827
4828 * linux-arm-low.c (arm_hwcap): Remove it.
4829 (arm_read_description): New local variable arm_hwcap. Don't
4830 set arm_hwcap to zero.
4831
4832 2015-07-30 Yao Qi <yao.qi@linaro.org>
4833
4834 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4835 Use regcache->tdesc instead.
4836 (arm_store_wmmxregset): Likewise.
4837 (arm_fill_vfpregset): Likewise.
4838 (arm_store_vfpregset): Likewise.
4839
4840 2015-07-30 Yao Qi <yao.qi@linaro.org>
4841
4842 * linux-arm-low.c: Include arch/arm.h.
4843 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4844 (arm_store_gregset): Likewise.
4845
4846 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4847
4848 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4849 ptrace's 4th parameter.
4850
4851 2015-07-27 Yao Qi <yao.qi@linaro.org>
4852
4853 * configure.srv (case aarch64*-*-linux*): Don't set
4854 srv_linux_usrregs.
4855
4856 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4857
4858 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4859 sys/ptrace.h.
4860 * linux-arm-low.c: Likewise.
4861 * linux-cris-low.c: Likewise.
4862 * linux-crisv32-low.c: Likewise.
4863 * linux-low.c: Likewise.
4864 * linux-m68k-low.c: Likewise.
4865 * linux-mips-low.c: Likewise.
4866 * linux-nios2-low.c: Likewise.
4867 * linux-s390-low.c: Likewise.
4868 * linux-sparc-low.c: Likewise.
4869 * linux-tic6x-low.c: Likewise.
4870 * linux-tile-low.c: Likewise.
4871 * linux-x86-low.c: Likewise.
4872
4873 2015-07-24 Pedro Alves <palves@redhat.com>
4874
4875 * config.in: Regenerate.
4876 * configure: Regenerate.
4877
4878 2015-07-24 Pedro Alves <palves@redhat.com>
4879
4880 * acinclude.m4: Include ../ptrace.m4.
4881 * configure.ac: Call GDB_AC_PTRACE.
4882 * config.in, configure: Regenerate.
4883
4884 2015-07-24 Yao Qi <yao.qi@linaro.org>
4885
4886 * linux-low.c (linux_create_inferior): Remove setting to
4887 proc->priv->new_inferior.
4888 (linux_attach): Likewise.
4889 (linux_low_filter_event): Likewise.
4890 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4891
4892 2015-07-24 Yao Qi <yao.qi@linaro.org>
4893
4894 * linux-low.c (linux_arch_setup): New function.
4895 (linux_low_filter_event): If proc->tdesc is NULL and
4896 proc->attached is true, call the_low_target.arch_setup.
4897 Otherwise, keep status pending, and return.
4898 (linux_resume_one_lwp_throw): Don't call get_pc if
4899 thread->while_stepping isn't NULL. Don't call
4900 get_thread_regcache if proc->tdesc is NULL.
4901 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4902 (linux_target_ops): Install arch_setup.
4903 * server.c (start_inferior): Call the_target->arch_setup.
4904 * target.h (struct target_ops) <arch_setup>: New field.
4905 (target_arch_setup): New marco.
4906 * lynx-low.c (lynx_target_ops): Update.
4907 * nto-low.c (nto_target_ops): Update.
4908 * spu-low.c (spu_target_ops): Update.
4909 * win32-low.c (win32_target_ops): Update.
4910
4911 2015-07-24 Yao Qi <yao.qi@linaro.org>
4912
4913 * linux-low.c (linux_add_process): Don't set
4914 proc->priv->new_inferior.
4915 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4916 (linux_attach): Likewise.
4917
4918 2015-07-24 Yao Qi <yao.qi@linaro.org>
4919
4920 * server.c (start_inferior): Code refactor.
4921
4922 2015-07-24 Yao Qi <yao.qi@linaro.org>
4923
4924 * server.c (process_serial_event): Set general_thread.
4925
4926 2015-07-21 Yao Qi <yao.qi@linaro.org>
4927
4928 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4929 aarch64_linux_get_debug_reg_capacity.
4930
4931 2015-07-17 Yao Qi <yao.qi@linaro.org>
4932
4933 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4934 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4935 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4936 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4937 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4938 (AARCH64_HWP_ALIGNMENT): Likewise.
4939 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4940 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4941 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4942 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4943 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4944 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4945 (struct aarch64_debug_reg_state): Likewise.
4946 (struct arch_lwp_info): Likewise.
4947 (aarch64_align_watchpoint): Likewise.
4948 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4949 (aarch64_watchpoint_length): Likewise.
4950 (aarch64_point_encode_ctrl_reg): Likewise
4951 (aarch64_point_is_aligned): Likewise.
4952 (aarch64_align_watchpoint): Likewise.
4953 (aarch64_linux_set_debug_regs):
4954 (aarch64_dr_state_insert_one_point): Likewise.
4955 (aarch64_dr_state_remove_one_point): Likewise.
4956 (aarch64_handle_breakpoint): Likewise.
4957 (aarch64_handle_aligned_watchpoint): Likewise.
4958 (aarch64_handle_unaligned_watchpoint): Likewise.
4959 (aarch64_handle_watchpoint): Likewise.
4960
4961 2015-07-17 Yao Qi <yao.qi@linaro.org>
4962
4963 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4964 and don't aarch64_get_debug_reg_state. All callers update.
4965 (aarch64_handle_aligned_watchpoint): Likewise.
4966 (aarch64_handle_unaligned_watchpoint): Likewise.
4967 (aarch64_handle_watchpoint): Likewise.
4968 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4969 (aarch64_remove_point): Likewise.
4970
4971 2015-07-17 Yao Qi <yao.qi@linaro.org>
4972
4973 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4974 debug_printf.
4975 (aarch64_handle_unaligned_watchpoint): Likewise.
4976
4977 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4978
4979 Revert the previous 3 commits:
4980 Move gdb_regex* to common/
4981 Move linux_find_memory_regions_full & co.
4982 gdbserver build-id attribute generator
4983
4984 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4985 Jan Kratochvil <jan.kratochvil@redhat.com>
4986
4987 gdbserver build-id attribute generator.
4988 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4989 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4990 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4991 (find_phdr): New.
4992 (get_dynamic): Use find_pdhr to traverse program headers.
4993 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4994 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4995 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4996 (get_hex_build_id): New.
4997 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4998 to reply XML document.
4999
5000 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5001 Jan Kratochvil <jan.kratochvil@redhat.com>
5002
5003 * target.c: Include target/target-utils.h and fcntl.h.
5004 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5005 (target_fileio_read_stralloc): New functions.
5006
5007 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5008
5009 * Makefile.in (OBS): Add gdb_regex.o.
5010 (gdb_regex.o): New.
5011 * config.in: Rebuilt.
5012 * configure: Rebuilt.
5013
5014 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5015 Jan Kratochvil <jan.kratochvil@redhat.com>
5016
5017 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5018 * Makefile.in (OBS): Add target-utils.o.
5019 (linux-maps.o, target-utils.o): New.
5020 * configure.srv (srv_linux_obj): Add linux-maps.o.
5021
5022 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5023
5024 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5025 function, return 1.
5026 (the_low_target): Install it.
5027
5028 2015-07-14 Pedro Alves <palves@redhat.com>
5029
5030 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5031 Instead, ignore ECHILD, and throw an error for other errnos.
5032
5033 2015-07-10 Pedro Alves <palves@redhat.com>
5034
5035 * event-loop.c (struct callback_event) <data>: Change type to
5036 gdb_client_data instance instead of gdb_client_data pointer.
5037 (append_callback_event): Adjust.
5038
5039 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5040
5041 * linux-aarch64-low.c: Add comments for each linux_target_ops
5042 method. Remove comments already covered in target_ops and
5043 linux_target_ops definitions.
5044 (the_low_target): Add comments for each unimplemented method.
5045
5046 2015-07-09 Yao Qi <yao.qi@linaro.org>
5047
5048 * linux-aarch64-low.c (aarch64_regmap): Remove.
5049 (aarch64_usrregs_info): Remove.
5050 (regs_info): Set field usrregs to NULL.
5051
5052 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5053
5054 * linux-low.c: Include "rsp-low.h"
5055 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5056 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5057 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5058 (handle_btrace_enable_pt): New.
5059 (handle_btrace_general_set): Support "pt".
5060 (handle_btrace_conf_general_set): Support "pt:size".
5061
5062 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5063
5064 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5065 Z_PACKET_SW_BP.
5066
5067 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5068
5069 * linux-aarch64-low.c: Remove comment about endianness.
5070 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5071 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5072 memcmp.
5073
5074 2015-06-24 Gary Benson <gbenson@redhat.com>
5075
5076 * linux-i386-ipa.c (stdint.h): Do not include.
5077 * lynx-i386-low.c (stdint.h): Likewise.
5078 * lynx-ppc-low.c (stdint.h): Likewise.
5079 * mem-break.c (stdint.h): Likewise.
5080 * thread-db.c (stdint.h): Likewise.
5081 * tracepoint.c (stdint.h): Likewise.
5082 * win32-low.c (stdint.h): Likewise.
5083
5084 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5085
5086 * server.c (write_qxfer_response): Update call to
5087 remote_escape_output.
5088
5089 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5090 Jan Kratochvil <jan.kratochvil@redhat.com>
5091
5092 Merge multiple hex conversions.
5093 * gdbreplay.c (tohex): Rename to 'fromhex'.
5094 (logchar): Use fromhex.
5095
5096 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5097
5098 * server.c (handle_qxfer_libraries): Set `version' attribute for
5099 <library-list>.
5100
5101 2015-06-10 Gary Benson <gbenson@redhat.com>
5102
5103 * target.h (struct target_ops) <multifs_open>: New field.
5104 <multifs_unlink>: Likewise.
5105 <multifs_readlink>: Likewise.
5106 * linux-low.c (nat/linux-namespaces.h): New include.
5107 (linux_target_ops): Initialize the_target->multifs_open,
5108 the_target->multifs_unlink and the_target->multifs_readlink.
5109 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5110 * hostio.c (hostio_fs_pid): New static variable.
5111 (hostio_handle_new_gdb_connection): New function.
5112 (handle_setfs): Likewise.
5113 (handle_open): Use the_target->multifs_open as appropriate.
5114 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5115 (handle_readlink): Use the_target->multifs_readlink as
5116 appropriate.
5117 (handle_vFile): Handle vFile:setfs packets.
5118 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5119 after target_handle_new_gdb_connection.
5120
5121 2015-06-10 Gary Benson <gbenson@redhat.com>
5122
5123 * configure.ac (AC_CHECK_FUNCS): Add setns.
5124 * config.in: Regenerate.
5125 * configure: Likewise.
5126 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5127 (linux-namespaces.o): New rule.
5128 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5129
5130 2015-06-09 Gary Benson <gbenson@redhat.com>
5131
5132 * hostio.c (handle_open): Process mode argument with
5133 fileio_to_host_mode.
5134
5135 2015-06-01 Yao Qi <yao.qi@linaro.org>
5136
5137 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5138 * linux-x86-low.c: Likewise.
5139
5140 2015-05-28 Don Breazeal <donb@codesourcery.com>
5141
5142 * linux-low.c (handle_extended_wait): Initialize
5143 thread_info.last_resume_kind for new fork children.
5144
5145 2015-05-15 Pedro Alves <palves@redhat.com>
5146
5147 * target.h (target_handle_new_gdb_connection): Rewrite using if
5148 wrapped in do/while.
5149
5150 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5151
5152 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5153 * configure, config.in: Regenerate.
5154 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5155 Declare typedef.
5156
5157 2015-05-12 Don Breazeal <donb@codesourcery.com>
5158
5159 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5160 PTRACE_EVENT_VFORK_DONE.
5161 (linux_low_ptrace_options, extended_event_reported): Add vfork
5162 events.
5163 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5164 and "vforkdone" for RSP 'T' Stop Reply Packet.
5165 * server.h (report_vfork_events): Declare
5166 global variable.
5167
5168 2015-05-12 Don Breazeal <donb@codesourcery.com>
5169
5170 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5171 (the_low_target) <new_fork>: Initialize new member.
5172 * linux-arm-low.c (arm_new_fork): New function.
5173 (the_low_target) <new_fork>: Initialize new member.
5174 * linux-low.c (handle_extended_wait): Call new target function
5175 new_fork.
5176 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5177 * linux-mips-low.c (mips_add_watchpoint): New function
5178 extracted from mips_insert_point.
5179 (the_low_target) <new_fork>: Initialize new member.
5180 (mips_linux_new_fork): New function.
5181 (mips_insert_point): Call mips_add_watchpoint.
5182 * linux-x86-low.c (x86_linux_new_fork): New function.
5183 (the_low_target) <new_fork>: Initialize new member.
5184
5185 2015-05-12 Don Breazeal <donb@codesourcery.com>
5186
5187 * linux-low.c (handle_extended_wait): Implement return value,
5188 rename argument 'event_child' to 'event_lwp', handle
5189 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5190 (linux_low_ptrace_options): New function.
5191 (linux_low_filter_event): Call linux_low_ptrace_options,
5192 use different argument fo linux_enable_event_reporting,
5193 use return value from handle_extended_wait.
5194 (extended_event_reported): New function.
5195 (linux_wait_1): Call extended_event_reported and set
5196 status to report fork events.
5197 (linux_write_memory): Add pid to debug message.
5198 (reset_lwp_ptrace_options_callback): New function.
5199 (linux_handle_new_gdb_connection): New function.
5200 (linux_target_ops): Initialize new structure member.
5201 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5202 * lynx-low.c: Initialize new structure member.
5203 * remote-utils.c (prepare_resume_reply): Implement stop reason
5204 "fork" for "T" stop message.
5205 * server.c (handle_query): Call handle_new_gdb_connection.
5206 * server.h (report_fork_events): Declare global flag.
5207 * target.h (struct target_ops) <handle_new_gdb_connection>:
5208 New member.
5209 (target_handle_new_gdb_connection): New macro.
5210 * win32-low.c: Initialize new structure member.
5211
5212 2015-05-12 Don Breazeal <donb@codesourcery.com>
5213
5214 * mem-break.c (APPEND_TO_LIST): Define macro.
5215 (clone_agent_expr): New function.
5216 (clone_one_breakpoint): New function.
5217 (clone_all_breakpoints): New function.
5218 * mem-break.h: Declare new functions.
5219
5220 2015-05-12 Don Breazeal <donb@codesourcery.com>
5221
5222 * linux-low.c (linux_supports_fork_events): New function.
5223 (linux_supports_vfork_events): New function.
5224 (linux_target_ops): Initialize new structure members.
5225 (initialize_low): Call linux_check_ptrace_features.
5226 * lynx-low.c (lynx_target_ops): Initialize new structure
5227 members.
5228 * server.c (report_fork_events, report_vfork_events):
5229 New global flags.
5230 (handle_query): Add new features to qSupported packet and
5231 response.
5232 (captured_main): Initialize new global variables.
5233 * target.h (struct target_ops) <supports_fork_events>:
5234 New member.
5235 <supports_vfork_events>: New member.
5236 (target_supports_fork_events): New macro.
5237 (target_supports_vfork_events): New macro.
5238 * win32-low.c (win32_target_ops): Initialize new structure
5239 members.
5240
5241 2015-05-12 Gary Benson <gbenson@redhat.com>
5242
5243 * server.c (handle_qxfer_exec_file): Use current process
5244 if annex is empty.
5245
5246 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5247
5248 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5249 Remove HAVE_PTRACE_GETREGS conditionals.
5250 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5251 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5252
5253 2015-05-08 Yao Qi <yao.qi@linaro.org>
5254
5255 * linux-low.c (linux_supports_conditional_breakpoints): New
5256 function.
5257 (linux_target_ops): Install new target method.
5258 * lynx-low.c (lynx_target_ops): Install NULL hook for
5259 supports_conditional_breakpoints.
5260 * nto-low.c (nto_target_ops): Likewise.
5261 * spu-low.c (spu_target_ops): Likewise.
5262 * win32-low.c (win32_target_ops): Likewise.
5263 * server.c (handle_query): Check
5264 target_supports_conditional_breakpoints.
5265 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5266 New field.
5267 (target_supports_conditional_breakpoints): New macro.
5268
5269 2015-05-06 Pedro Alves <palves@redhat.com>
5270
5271 PR server/18081
5272 * server.c (start_inferior): If the process exits, mourn it.
5273
5274 2015-04-21 Gary Benson <gbenson@redhat.com>
5275
5276 * hostio.c (fileio_open_flags_to_host): Factored out to
5277 fileio_to_host_openflags in common/fileio.c. Single use
5278 updated.
5279
5280 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5281
5282 * linux-xtensa-low.c (xtensa_fill_gregset)
5283 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5284 XCHAL_HAVE_LOOP.
5285
5286 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5287
5288 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5289 (regs_info): Replace usrregs pointer with NULL.
5290
5291 2015-04-17 Gary Benson <gbenson@redhat.com>
5292
5293 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5294 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5295 * server.c (handle_qxfer_exec_file): New function.
5296 (qxfer_packets): Add exec-file entry.
5297 (handle_query): Report qXfer:exec-file:read as supported packet.
5298
5299 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5300
5301 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5302
5303 2015-04-09 Gary Benson <gbenson@redhat.com>
5304
5305 * hostio-errno.c (errno_to_fileio_error): Remove function.
5306 Update caller to use remote_fileio_to_fio_error.
5307
5308 2015-04-09 Yao Qi <yao.qi@linaro.org>
5309
5310 * linux-low.c (linux_insert_point): Call
5311 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5312 (linux_remove_point): Call remove_memory_breakpoint if type is
5313 raw_bkpt_type_sw.
5314 * linux-x86-low.c (x86_insert_point): Don't call
5315 insert_memory_breakpoint.
5316 (x86_remove_point): Don't call remove_memory_breakpoint.
5317
5318 2015-04-01 Pedro Alves <palves@redhat.com>
5319 Cleber Rosa <crosa@redhat.com>
5320
5321 * server.c (gdbserver_usage): Reorganize and extend the usage
5322 message.
5323
5324 2015-03-24 Pedro Alves <palves@redhat.com>
5325
5326 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5327 output. Also dump TRAP_TRACE.
5328 (linux_low_filter_event): In debug output, distinguish a
5329 resume_stop SIGSTOP from a delayed SIGSTOP.
5330
5331 2015-03-24 Gary Benson <gbenson@redhat.com>
5332
5333 * linux-x86-low.c (x86_linux_new_thread): Moved to
5334 nat/x86-linux.c.
5335 (x86_linux_prepare_to_resume): Likewise.
5336
5337 2015-03-24 Gary Benson <gbenson@redhat.com>
5338
5339 * Makefile.in (x86-linux-dregs.o): New rule.
5340 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5341 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5342 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5343 (x86_linux_dr_get): Likewise.
5344 (x86_linux_dr_set): Likewise.
5345 (update_debug_registers_callback): Likewise.
5346 (x86_linux_dr_set_addr): Likewise.
5347 (x86_linux_dr_get_addr): Likewise.
5348 (x86_linux_dr_set_control): Likewise.
5349 (x86_linux_dr_get_control): Likewise.
5350 (x86_linux_dr_get_status): Likewise.
5351 (x86_linux_update_debug_registers): Likewise.
5352
5353 2015-03-24 Gary Benson <gbenson@redhat.com>
5354
5355 * linux-x86-low.c (x86_linux_update_debug_registers):
5356 New function, factored out from...
5357 (x86_linux_prepare_to_resume): ...this.
5358
5359 2015-03-24 Gary Benson <gbenson@redhat.com>
5360
5361 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5362 (x86_linux_dr_set): Likewise.
5363 (update_debug_registers_callback): Likewise.
5364 (x86_linux_dr_set_addr): Likewise.
5365 (x86_linux_dr_get_addr): Likewise.
5366 (x86_linux_dr_set_control): Likewise.
5367 (x86_linux_dr_get_control): Likewise.
5368 (x86_linux_dr_get_status): Likewise.
5369 (x86_linux_prepare_to_resume): Likewise.
5370
5371 2015-03-24 Gary Benson <gbenson@redhat.com>
5372
5373 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5374 Use perror_with_name. Pass string through gettext.
5375 (x86_linux_dr_set): Likewise.
5376
5377 2015-03-24 Gary Benson <gbenson@redhat.com>
5378
5379 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5380 (x86_linux_dr_set_addr): ...this.
5381 (x86_dr_low_get_addr): Rename to...
5382 (x86_linux_dr_get_addr): ...this.
5383 (x86_dr_low_set_control): Rename to...
5384 (x86_linux_dr_set_control): ...this.
5385 (x86_dr_low_get_control): Rename to...
5386 (x86_linux_dr_get_control): ...this.
5387 (x86_dr_low_get_status): Rename to...
5388 (x86_linux_dr_get_status): ...this.
5389 (x86_dr_low): Update with new function names.
5390
5391 2015-03-24 Gary Benson <gbenson@redhat.com>
5392
5393 * Makefile.in (x86-linux.o): New rule.
5394 * configure.srv: Add x86-linux.o to relevant targets.
5395 * linux-low.c (lwp_set_arch_private_info): New function.
5396 (lwp_arch_private_info): Likewise.
5397 * linux-x86-low.c: Include nat/x86-linux.h.
5398 (arch_lwp_info): Removed structure.
5399 (update_debug_registers_callback):
5400 Use lwp_set_debug_registers_changed.
5401 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5402 and lwp_set_debug_registers_changed.
5403 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5404
5405 2015-03-24 Gary Benson <gbenson@redhat.com>
5406
5407 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5408 * linux-arm-low.c (arm_new_thread): Likewise.
5409 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5410 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5411 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5412 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5413
5414 2015-03-24 Gary Benson <gbenson@redhat.com>
5415
5416 * linux-low.c (ptid_of_lwp): New function.
5417 (lwp_is_stopped): Likewise.
5418 (lwp_stop_reason): Likewise.
5419 * linux-x86-low.c (update_debug_registers_callback):
5420 Use lwp_is_stopped.
5421 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5422 lwp_stop_reason.
5423
5424 2015-03-24 Gary Benson <gbenson@redhat.com>
5425
5426 * linux-low.h (linux_stop_lwp): Remove declaration.
5427
5428 2015-03-24 Gary Benson <gbenson@redhat.com>
5429
5430 * linux-low.h: Include nat/linux-nat.h.
5431 * linux-low.c (iterate_over_lwps_args): New structure.
5432 (iterate_over_lwps_filter): New function.
5433 (iterate_over_lwps): Likewise.
5434 * linux-x86-low.c (update_debug_registers_callback):
5435 Update signature to what iterate_over_lwps expects.
5436 Remove PID check that iterate_over_lwps now performs.
5437 (x86_dr_low_set_addr): Use iterate_over_lwps.
5438 (x86_dr_low_set_control): Likewise.
5439
5440 2015-03-24 Gary Benson <gbenson@redhat.com>
5441
5442 * linux-x86-low.c (x86_debug_reg_state): New function.
5443 (x86_linux_prepare_to_resume): Use the above.
5444
5445 2015-03-24 Gary Benson <gbenson@redhat.com>
5446
5447 * linux-low.c (current_lwp_ptid): New function.
5448 * linux-x86-low.c: Include nat/linux-nat.h.
5449 (x86_dr_low_get_addr): Use current_lwp_ptid.
5450 (x86_dr_low_get_control): Likewise.
5451 (x86_dr_low_get_status): Likewise.
5452
5453 2015-03-20 Pedro Alves <palves@redhat.com>
5454
5455 * tracepoint.c (cmd_qtstatus): Make "str" const.
5456
5457 2015-03-20 Pedro Alves <palves@redhat.com>
5458
5459 * server.c (handle_general_set): Make "req_str" const.
5460
5461 2015-03-19 Pedro Alves <palves@redhat.com>
5462
5463 * linux-low.c (linux_resume_one_lwp): Rename to ...
5464 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5465 instead call perror_with_name.
5466 (check_ptrace_stopped_lwp_gone): New function.
5467 (linux_resume_one_lwp): Reimplement as wrapper around
5468 linux_resume_one_lwp_throw that swallows errors if the LWP is
5469 gone.
5470
5471 2015-03-19 Pedro Alves <palves@redhat.com>
5472
5473 * linux-low.c (count_events_callback, select_event_lwp_callback):
5474 No longer check whether the thread has resume_stop as last resume
5475 kind.
5476
5477 2015-03-19 Pedro Alves <palves@redhat.com>
5478
5479 * linux-low.c (count_events_callback, select_event_lwp_callback):
5480 Use the lwp's status_pending_p field, not the thread's.
5481
5482 2015-03-19 Pedro Alves <palves@redhat.com>
5483
5484 * linux-low.c (select_event_lwp_callback): Update comments to
5485 no longer mention SIGTRAP.
5486
5487 2015-03-18 Gary Benson <gbenson@redhat.com>
5488
5489 * server.c (handle_query): Do not report vFile:fstat as supported.
5490
5491 2015-03-11 Gary Benson <gbenson@redhat.com>
5492
5493 * hostio.c (sys/types.h): New include.
5494 (sys/stat.h): Likewise.
5495 (common-remote-fileio.h): Likewise.
5496 (handle_fstat): New function.
5497 (handle_vFile): Handle vFile:fstat packets.
5498
5499 2015-03-11 Gary Benson <gbenson@redhat.com>
5500
5501 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5502 struct stat.st_blocks and struct stat.st_blksize.
5503 * configure: Regenerate.
5504 * config.in: Likewise.
5505 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5506 (OBS): Add common-remote-fileio.o.
5507 (common-remote-fileio.o): New rule.
5508
5509 2015-03-09 Pedro Alves <palves@redhat.com>
5510
5511 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5512 'struct sockaddr' pointer in 'accept' call.
5513
5514 2015-03-09 Pedro Alves <palves@redhat.com>
5515
5516 Revert:
5517 2015-03-07 Pedro Alves <palves@redhat.com>
5518 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5519 or <winsock2.h> here. Instead include "gdb_socket.h".
5520 (remote_open): Use union gdb_sockaddr_u.
5521 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5522 or <winsock2.h> here. Instead include "gdb_socket.h".
5523 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5524 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5525 or <sys/un.h>.
5526 (init_named_socket, gdb_agent_helper_thread): Use union
5527 gdb_sockaddr_u.
5528
5529 2015-03-07 Pedro Alves <palves@redhat.com>
5530
5531 * configure.ac (build_warnings): Move
5532 -Wdeclaration-after-statement to the C-specific set.
5533 * configure: Regenerate.
5534
5535 2015-03-07 Pedro Alves <palves@redhat.com>
5536
5537 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5538 or <winsock2.h> here. Instead include "gdb_socket.h".
5539 (remote_open): Use union gdb_sockaddr_u.
5540 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5541 or <winsock2.h> here. Instead include "gdb_socket.h".
5542 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5543 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5544 or <sys/un.h>.
5545 (init_named_socket, gdb_agent_helper_thread): Use union
5546 gdb_sockaddr_u.
5547
5548 2015-03-07 Pedro Alves <palves@redhat.com>
5549
5550 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5551 instead.
5552
5553 2015-03-06 Yao Qi <yao.qi@linaro.org>
5554
5555 * linux-aarch64-low.c (aarch64_insert_point): Use
5556 show_debug_regs as a boolean.
5557 (aarch64_remove_point): Likewise.
5558
5559 2015-03-05 Pedro Alves <palves@redhat.com>
5560
5561 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5562 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5563 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5564 * nto-low.c (nto_target_ops): Likewise.
5565 * spu-low.c (spu_target_ops): Likewise.
5566 * win32-low.c (win32_target_ops): Likewise.
5567
5568 2015-03-04 Pedro Alves <palves@redhat.com>
5569
5570 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5571 Decide whether a breakpoint triggered based on the SIGTRAP's
5572 siginfo.si_code.
5573 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5574 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5575 (linux_low_filter_event): Check for breakpoints before checking
5576 watchpoints.
5577 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5578 siginfo.si_code.
5579 (linux_stopped_by_sw_breakpoint)
5580 (linux_supports_stopped_by_sw_breakpoint)
5581 (linux_stopped_by_hw_breakpoint)
5582 (linux_supports_stopped_by_hw_breakpoint): New functions.
5583 (linux_target_ops): Install new target methods.
5584
5585 2015-03-04 Pedro Alves <palves@redhat.com>
5586
5587 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5588 * server.c (swbreak_feature, hwbreak_feature): New globals.
5589 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5590 (captured_main): Clear swbreak_feature and hwbreak_feature.
5591 * server.h (swbreak_feature, hwbreak_feature): Declare.
5592 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5593 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5594 supports_stopped_by_hw_breakpoint>: New fields.
5595 (target_supports_stopped_by_sw_breakpoint)
5596 (target_stopped_by_sw_breakpoint)
5597 (target_supports_stopped_by_hw_breakpoint)
5598 (target_stopped_by_hw_breakpoint): Declare.
5599
5600 2015-03-04 Pedro Alves <palves@redhat.com>
5601
5602 enum lwp_stop_reason -> enum target_stop_reason
5603 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5604 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5605 (linux_wait_1, stuck_in_jump_pad_callback)
5606 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5607 (linux_stopped_by_watchpoint):
5608 * linux-low.h (enum lwp_stop_reason): Delete.
5609 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5610 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5611
5612 2015-03-04 Yao Qi <yao.qi@linaro.org>
5613
5614 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5615
5616 2015-03-03 Gary Benson <gbenson@redhat.com>
5617
5618 * hostio.c (handle_vFile): Fix prefix lengths.
5619
5620 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5621
5622 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5623 ptr_bits.
5624
5625 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5626
5627 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5628 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5629 (clean): Add "rm -f" for above C files.
5630 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5631 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5632 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5633 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5634 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5635 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5636 (init_registers_s390x_vx_linux64)
5637 (init_registers_s390x_tevx_linux64)
5638 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5639 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5640 declarations.
5641 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5642 (s390_store_vxrs_high): New functions.
5643 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5644 NT_S390_VXRS_HIGH.
5645 (s390_arch_setup): Add logic for selecting one of the new target
5646 descriptions. Activate the new vector regsets if applicable.
5647 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5648 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5649 and init_registers_s390x_tevx_linux64.
5650
5651 2015-03-01 Pedro Alves <palves@redhat.com>
5652
5653 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5654 parameter.
5655
5656 2015-02-27 Pedro Alves <palves@redhat.com>
5657
5658 * linux-x86-low.c (u_debugreg_offset): New function.
5659 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5660
5661 2015-02-27 Pedro Alves <palves@redhat.com>
5662
5663 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5664 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5665 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5666 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5667 (ps_lsetfpregs, ps_getpid)
5668 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5669 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5670 (ps_lsetxregs, ps_plog): Declare.
5671
5672 2015-02-27 Pedro Alves <palves@redhat.com>
5673
5674 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5675 IP_AGENT_EXPORT_FUNC.
5676 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5677 IP_AGENT_EXPORT_FUNC.
5678 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5679 (IP_AGENT_EXPORT): Delete.
5680 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5681 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5682 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5683 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5684 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5685 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5686 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5687 (traceframe_read_count, traceframe_write_count)
5688 (traceframes_created, trace_state_variables, get_raw_reg)
5689 (get_trace_state_variable_value, set_trace_state_variable_value)
5690 (ust_loaded, helper_thread_id, cmd_buf): Use
5691 IPA_SYM_EXPORTED_NAME.
5692 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5693 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5694 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5695 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5696 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5697 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5698 EXTERN_C_PUSH/EXTERN_C_POP.
5699 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5700 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5701 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5702 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5703 (traceframe_write_count, traceframe_read_count)
5704 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5705 (about_to_request_buffer_space, get_trace_state_variable_value)
5706 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5707 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5708 EXTERN_C_PUSH/EXTERN_C_POP.
5709 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5710 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5711 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5712 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5713 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5714 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5715 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5716 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5717 Define.
5718 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5719 (IP_AGENT_EXPORT_VAR_DECL): Define.
5720 (tracing): Declare.
5721 (gdb_agent_get_raw_reg): Declare.
5722
5723 2015-02-27 Tom Tromey <tromey@redhat.com>
5724 Pedro Alves <palves@redhat.com>
5725
5726 Rename symbols whose names are reserved C++ keywords throughout.
5727
5728 2015-02-27 Pedro Alves <palves@redhat.com>
5729
5730 * Makefile.in (COMPILER): New, get it from autoconf.
5731 (CXX): Get from autoconf instead.
5732 (COMPILE.pre): Use COMPILER.
5733 (CC-LD): Rename to ...
5734 (CC_LD): ... this. Use COMPILER.
5735 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5736 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5737 * acinclude.m4: Include build-with-cxx.m4.
5738 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5739 Disable -Werror by default if building in C++ mode.
5740 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5741 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5742 the C++ compiler. Save/restore CXXFLAGS too.
5743 * configure: Regenerate.
5744
5745 2015-02-27 Pedro Alves <palves@redhat.com>
5746
5747 * acinclude.m4: Include libiberty.m4.
5748 * configure.ac: Call libiberty_INIT.
5749 * config.in, configure: Regenerate.
5750
5751 2015-02-26 Pedro Alves <palves@redhat.com>
5752
5753 * linux-low.c (linux_wait_1): When incrementing the PC past a
5754 program breakpoint always use the_low_target.breakpoint_len as
5755 increment, rather than the maximum between that and
5756 the_low_target.decr_pc_after_break.
5757
5758 2015-02-23 Pedro Alves <palves@redhat.com>
5759
5760 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5761 thread was doing a step-over; always adjust the PC if
5762 we stepped over a permanent breakpoint.
5763 (linux_wait_1): If we stepped over breakpoint that was on top of a
5764 permanent breakpoint, manually advance the PC past it.
5765
5766 2015-02-23 Pedro Alves <palves@redhat.com>
5767
5768 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5769 modes.
5770 (x86_fill_gregset, x86_store_gregset): Use it when handling
5771 $orig_eax.
5772
5773 2015-02-20 Pedro Alves <palves@redhat.com>
5774
5775 * thread-db.c: Include "nat/linux-procfs.h".
5776 (thread_db_init): Skip listing new threads if the kernel supports
5777 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5778
5779 2015-02-20 Pedro Alves <palves@redhat.com>
5780
5781 * linux-low.c (status_pending_p_callback): Use ptid_match.
5782
5783 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5784
5785 PR breakpoints/16812
5786 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5787 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5788 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5789
5790 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5791
5792 PR breakpoints/15956
5793 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5794
5795 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5796
5797 * linux-low.c (linux_low_btrace_conf): Print size.
5798 * server.c (handle_btrace_conf_general_set): New.
5799 (hanle_general_set): Call handle_btrace_conf_general_set.
5800 (handle_query): Report Qbtrace-conf:bts:size as supported.
5801
5802 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5803
5804 * linux-low.c (linux_low_enable_btrace): Update parameters.
5805 (linux_low_btrace_conf): New.
5806 (linux_target_ops)<to_btrace_conf>: Initialize.
5807 * server.c (current_btrace_conf): New.
5808 (handle_btrace_enable): Rename to ...
5809 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5810 to target_enable_btrace. Update comment. Update users.
5811 (handle_qxfer_btrace_conf): New.
5812 (qxfer_packets): Add btrace-conf entry.
5813 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5814 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5815 (target_ops)<read_btrace_conf>: New.
5816 (target_enable_btrace): Update parameters.
5817 (target_read_btrace_conf): New.
5818
5819 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5820
5821 * server.c (handle_btrace_general_set): Remove call to
5822 target_supports_btrace.
5823 (supported_btrace_packets): New.
5824 (handle_query): Call supported_btrace_packets.
5825 * target.h: include btrace-common.h.
5826 (btrace_target_info): Removed.
5827 (supports_btrace, target_supports_btrace): Update parameters.
5828
5829 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5830
5831 * Makefile.in (SFILES): Add common/btrace-common.c.
5832 (OBS): Add common/btrace-common.o.
5833 (btrace-common.o): Add build rules.
5834 * linux-low: Include btrace-common.h.
5835 (linux_low_read_btrace): Use struct btrace_data. Call
5836 btrace_data_init and btrace_data_fini.
5837
5838 2015-02-06 Pedro Alves <palves@redhat.com>
5839
5840 * thread-db.c (find_new_threads_callback): Add debug output.
5841
5842 2015-02-04 Pedro Alves <palves@redhat.com>
5843
5844 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5845 (resume_stopped_resumed_lwps): New function.
5846 (linux_wait_for_event_filtered): Use it.
5847
5848 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5849
5850 * Makefile.in (SFILES): Add linux-personality.c.
5851 (linux-personality.o): New rule.
5852 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5853 list of objects to be built.
5854 * linux-low.c: Include nat/linux-personality.h.
5855 (linux_create_inferior): Remove code to disable address space
5856 randomization (moved to ../nat/linux-personality.c). Create
5857 cleanup to disable address space randomization.
5858
5859 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5860
5861 * Makefile.in (posix-strerror.o): New rule.
5862 (mingw-strerror.o): Likewise.
5863 * configure: Regenerated.
5864 * configure.ac: Source file ../common/common.host. Initialize new
5865 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5866
5867 2015-01-14 Yao Qi <yao@codesourcery.com>
5868
5869 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5870 (ppc-linux.o): New rule.
5871 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5872 * configure.ac: AC_CHECK_FUNCS(getauxval).
5873 * config.in: Re-generated.
5874 * configure: Re-generated.
5875 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5876 ppc64_64bit_inferior_p
5877
5878 2015-01-14 Yao Qi <yao@codesourcery.com>
5879
5880 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5881 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5882 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5883 (PT_ORIG_R3, PT_TRAP): Likewise.
5884 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5885 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5886 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5887
5888 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5889
5890 * i387-fp.c (i387_cache_to_xsave): In look over
5891 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5892 zmmh_low_space field by use of zmmh_high_space.
5893
5894 2015-01-09 Pedro Alves <palves@redhat.com>
5895
5896 * linux-low.c (step_over_bkpt): Move higher up in the file.
5897 (handle_extended_wait): Don't store the stop_pc here.
5898 (get_stop_pc): Adjust comments and rename to ...
5899 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5900 stopped for a software breakpoint or hardware breakpoint.
5901 (thread_still_has_status_pending_p): New function.
5902 (status_pending_p_callback): Use
5903 thread_still_has_status_pending_p. If the event is no longer
5904 interesting, resume the LWP.
5905 (handle_tracepoints): Add assert.
5906 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5907 (wstatus_maybe_breakpoint): New function.
5908 (cancel_breakpoint): Delete function.
5909 (check_stopped_by_watchpoint): New function, factored out from
5910 linux_low_filter_event.
5911 (lp_status_maybe_breakpoint): Delete function.
5912 (linux_low_filter_event): Remove filter_ptid argument.
5913 Leave thread group exits pending here. Store the LWP's stop PC.
5914 Always leave events pending.
5915 (linux_wait_for_event_filtered): Pull all events out of the
5916 kernel, and leave them all pending.
5917 (count_events_callback, select_event_lwp_callback): Consider all
5918 events.
5919 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5920 (select_event_lwp): Only give preference to the stepping LWP in
5921 all-stop mode. Adjust comments.
5922 (ignore_event): New function.
5923 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5924 references to cancel_breakpoints. Adjust to renames. Also give
5925 equal priority to all LWPs that have had events in non-stop mode.
5926 If reporting a software breakpoint event, unadjust the LWP's PC.
5927 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5928 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5929 Adjust.
5930 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5931 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5932 (linux_stopped_by_watchpoint): Adjust.
5933 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5934 * linux-low.h (enum lwp_stop_reason): New.
5935 (struct lwp_info) <stop_pc>: Adjust comment.
5936 <stopped_by_watchpoint>: Delete field.
5937 <stop_reason>: New field.
5938 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5939 * mem-break.c (software_breakpoint_inserted_here)
5940 (hardware_breakpoint_inserted_here): New function.
5941 * mem-break.h (software_breakpoint_inserted_here)
5942 (hardware_breakpoint_inserted_here): Declare.
5943 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5944 (cancel_breakpoints): Delete.
5945 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5946 (upload_fast_traceframes): Remove references to
5947 cancel_breakpoints.
5948
5949 2015-01-09 Pedro Alves <palves@redhat.com>
5950
5951 * thread-db.c (find_new_threads_callback): Ignore thread if the
5952 kernel thread ID is -1.
5953
5954 2015-01-09 Pedro Alves <palves@redhat.com>
5955
5956 * linux-low.c (linux_attach_fail_reason_string): Move to
5957 nat/linux-ptrace.c, and rename.
5958 (linux_attach_lwp): Update comment.
5959 (attach_proc_task_lwp_callback): New function.
5960 (linux_attach): Adjust to rename and use
5961 linux_proc_attach_tgid_threads.
5962 (linux_attach_fail_reason_string): Delete declaration.
5963
5964 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5965
5966 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5967 * server.c (gdbserver_version): Likewise.
5968
5969 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5970
5971 * remote-utils.c: Include ctype.h.
5972 (input_interrupt): Explicitly handle the case when the char
5973 received is the NUL byte. Improve the printing of non-ASCII
5974 characters.
5975
5976 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5977
5978 * linux-low.c (linux_low_filter_event): Update call to
5979 linux_enable_event_reporting following the addition of
5980 a new parameter to that function.
5981
5982 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5983
5984 PR server/17457
5985 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5986 (AARCH64_FPCR_REGNO): Likewise.
5987 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5988 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5989 (aarch64_store_fpregset): Likewise.
5990
5991 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5992
5993 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5994 Remove FIXME comment about assumption about N.
5995
5996 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5997
5998 * configure.ac: If large-file support is disabled in GDBserver,
5999 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6000 * configure: Regenerate.
6001
6002 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6003
6004 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6005 warning upon ENODATA from ptrace.
6006 * linux-s390-low.c (s390_store_tdb): New.
6007 (s390_regsets): Add regset for NT_S390_TDB.
6008
6009 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6010
6011 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6012 without a fill_function.
6013 * linux-s390-low.c (s390_fill_last_break): Remove.
6014 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6015 (s390_arch_setup): Use regset's size instead of fill_function for
6016 loop end condition.
6017
6018 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6019
6020 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6021 the regset's store function when ptrace returned an error.
6022 * regcache.c (get_thread_regcache): Invalidate register cache
6023 before fetching inferior's registers.
6024
6025 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6026
6027 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6028 while-loop as for-loop.
6029 (regsets_store_inferior_registers): Likewise.
6030
6031 2014-11-28 Yao Qi <yao@codesourcery.com>
6032
6033 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6034 * config.in, configure: Re-generate.
6035 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6036 is defined.
6037
6038 2014-11-21 Yao Qi <yao@codesourcery.com>
6039
6040 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6041 (AC_CHECK_HEADERS): Remove malloc.h.
6042 * configure: Re-generated.
6043 * config.in: Re-generated.
6044 * server.h: Don't include alloca.h and malloc.h.
6045 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6046 Don't include malloc.h.
6047
6048 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6049
6050 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6051 corresponding ERRNO check in same block.
6052
6053 2014-11-12 Pedro Alves <palves@redhat.com>
6054
6055 * server.c (cont_thread): Update comment.
6056 (start_inferior, attach_inferior): No longer clear cont_thread.
6057 (handle_v_cont): No longer set cont_thread.
6058 (captured_main): Clear cont_thread each time a GDB connects.
6059
6060 2014-11-12 Pedro Alves <palves@redhat.com>
6061
6062 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6063 thread, and don't resume all threads if the Hc thread has exited.
6064
6065 2014-11-12 Pedro Alves <palves@redhat.com>
6066
6067 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6068 the process group instead of to a specific LWP.
6069
6070 2014-10-15 Pedro Alves <palves@redhat.com>
6071
6072 PR server/17487
6073 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6074 parameter.
6075 (arm_set_thread_context): Delete.
6076 (the_low_target): Adjust.
6077 * win32-i386-low.c (debug_registers_changed)
6078 (debug_registers_used): Delete.
6079 (update_debug_registers_callback): New function.
6080 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6081 needing to update their debug registers.
6082 (win32_get_current_dr): New function.
6083 (x86_dr_low_get_addr, x86_dr_low_get_control)
6084 (x86_dr_low_get_status): Fetch the debug register from the thread
6085 record's context.
6086 (i386_initial_stuff): Adjust.
6087 (i386_get_thread_context): Remove current_event parameter. Don't
6088 clear debug_registers_changed nor copy DR values to
6089 debug_reg_state.
6090 (i386_set_thread_context): Delete.
6091 (i386_prepare_to_resume): New function.
6092 (i386_thread_added): Mark the thread as needing to update irs
6093 debug registers.
6094 (the_low_target): Remove i386_set_thread_context and install
6095 i386_prepare_to_resume.
6096 * win32-low.c (win32_get_thread_context): Adjust.
6097 (win32_set_thread_context): Use SetThreadContext
6098 directly.
6099 (win32_prepare_to_resume): New function.
6100 (win32_require_context): New function, factored out from ...
6101 (thread_rec): ... this.
6102 (continue_one_thread): Call win32_prepare_to_resume on each thread
6103 we're about to continue.
6104 (win32_resume): Call win32_prepare_to_resume on the event thread.
6105 * win32-low.h (struct win32_thread_info)
6106 <debug_registers_changed>: New field.
6107 (struct win32_target_ops): Change prototype of set_thread_context,
6108 delete set_thread_context and add prepare_to_resume.
6109 (win32_require_context): New declaration.
6110
6111 2014-10-08 Gary Benson <gbenson@redhat.com>
6112
6113 * server.h: Do not include common-exceptions.h.
6114
6115 2014-10-08 Gary Benson <gbenson@redhat.com>
6116
6117 * server.h: Do not include cleanups.h.
6118
6119 2014-09-30 James Hogan <james.hogan@imgtec.com>
6120
6121 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6122 mips64-dsp-linux.c.
6123
6124 2014-09-23 Yao Qi <yao@codesourcery.com>
6125
6126 * linux-low.c (lp_status_maybe_breakpoint): New function.
6127 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6128 (count_events_callback): Likewise.
6129 (select_event_lwp_callback): Likewise.
6130 (cancel_breakpoints_callback): Likewise.
6131
6132 2014-09-19 Don Breazeal <donb@codesourcery.com>
6133
6134 * linux-low.c (handle_extended_wait): Call
6135 linux_ptrace_get_extended_event.
6136 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6137 linux_is_extended_waitstatus.
6138
6139 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6140
6141 * Makefile.in (CPPFLAGS): Define.
6142 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6143 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6144
6145 2014-09-16 Gary Benson <gbenson@redhat.com>
6146
6147 * inferiors.h (current_inferior): Renamed as...
6148 (current_thread): New variable. All uses updated.
6149 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6150 (maybe_move_out_of_jump_pad): Likewise.
6151 (cancel_breakpoint): Likewise.
6152 (linux_low_filter_event): Likewise.
6153 (wait_for_sigstop): Likewise.
6154 (linux_resume_one_lwp): Likewise.
6155 (need_step_over_p): Likewise.
6156 (start_step_over): Likewise.
6157 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6158 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6159 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6160 and save_inferior as saved_thread.
6161 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6162 saved_thread.
6163 (regcache_invalidate_thread): Likewise.
6164 * remote-utils.c (prepare_resume_reply): Likewise.
6165 * thread-db.c (thread_db_get_tls_address): Likewise.
6166 (disable_thread_event_reporting): Likewise.
6167 (remove_thread_event_breakpoints): Likewise.
6168 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6169 as saved_thread.
6170 * target.h (set_desired_inferior): Renamed as...
6171 (set_desired_thread): New declaration. All uses updated.
6172 * server.c (myresume): Updated comment to reference thread instead
6173 of inferior.
6174 (handle_serial_event): Likewise.
6175 (handle_target_event): Likewise.
6176
6177 2014-09-12 Tom Tromey <tromey@redhat.com>
6178 Gary Benson <gbenson@redhat.com>
6179
6180 * regcache.h: Include common-regcache.h.
6181 (regcache_read_pc): Don't declare.
6182 * regcache.c (get_thread_regcache_for_ptid): New function.
6183
6184 2014-09-11 Tom Tromey <tromey@redhat.com>
6185 Gary Benson <gbenson@redhat.com>
6186
6187 * symbol.c: New file.
6188 * Makefile.in (SFILES): Add symbol.c.
6189 (OBS): Add symbol.o.
6190
6191 2014-09-11 Gary Benson <gbenson@redhat.com>
6192
6193 * target.c (target_stop_ptid, target_continue_ptid): New
6194 functions.
6195
6196 2014-09-11 Tom Tromey <tromey@redhat.com>
6197 Gary Benson <gbenson@redhat.com>
6198
6199 * target.h: Include target/target.h.
6200 * target.c (target_read_memory, target_read_uint32)
6201 (target_write_memory): New functions.
6202
6203 2014-09-11 Gary Benson <gbenson@redhat.com>
6204
6205 * server.h (debug_hw_points): Don't declare.
6206 * server.c (debug_hw_points): Don't define. Replace all uses
6207 with show_debug_regs.
6208 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6209 all uses with show_debug_regs.
6210
6211 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6212
6213 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6214 endianness into account.
6215 (ppc_supply_ptrace_register): Likewise.
6216
6217 2014-09-03 James Hogan <james.hogan@imgtec.com>
6218
6219 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6220 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6221
6222 2014-09-03 Gary Benson <gbenson@redhat.com>
6223
6224 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6225 ALL_DEBUG_ADDRESS_REGISTERS.
6226
6227 2014-09-02 Gary Benson <gbenson@redhat.com>
6228
6229 * i386-low.h: Renamed as...
6230 * x86-low.h: New file. All type, function and variable name
6231 prefixes changed from "i386_" to "x86_". All references updated.
6232 * i386-low.c: Renamed as...
6233 * x86-low.c: New file. All type, function and variable name
6234 prefixes changed from "i386_" to "x86_". All references updated.
6235
6236 2014-09-02 Gary Benson <gbenson@redhat.com>
6237
6238 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6239 (x86_linux_new_thread): Likewise.
6240
6241 2014-08-29 Gary Benson <gbenson@redhat.com>
6242
6243 * server.h (setjmp.h): Do not include.
6244 (toplevel): Do not declare.
6245 (common-exceptions.h): Include.
6246 (cleanups.h): Likewise.
6247 * server.c (toplevel): Do not define.
6248 (exit_code): New static global.
6249 (detach_or_kill_for_exit_cleanup): New function.
6250 (main): New function. Original main renamed to...
6251 (captured_main): New function.
6252 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6253
6254 2014-08-29 Gary Benson <gbenson@redhat.com>
6255
6256 * Makefile.in (SFILES): Add common/common-exceptions.c.
6257 (OBS): Add common-exceptions.o.
6258 (common-exceptions.o): New rule.
6259 * utils.c (prepare_to_throw_exception): New function.
6260
6261 2014-08-29 Gary Benson <gbenson@redhat.com>
6262
6263 * config.in: Regenerate.
6264 * configure: Likewise.
6265
6266 2014-08-29 Gary Benson <gbenson@redhat.com>
6267
6268 * Makefile.in (SFILES): Add common/cleanups.c.
6269 (OBS): cleanups.o.
6270 (cleanups.o): New rule.
6271
6272 2014-08-29 Gary Benson <gbenson@redhat.com>
6273
6274 * utils.c (internal_vwarning): New function.
6275
6276 2014-08-28 Gary Benson <gbenson@redhat.com>
6277
6278 * utils.h (fatal): Remove declaration.
6279 * utils.c (fatal): Remove function.
6280
6281 2014-08-28 Gary Benson <gbenson@redhat.com>
6282
6283 * tracepoint.c (gdb_agent_init): Replace fatal with
6284 perror_with_name.
6285 (initialize_tracepoint): Likewise.
6286
6287 2014-08-28 Gary Benson <gbenson@redhat.com>
6288
6289 * remote-utils.c (remote_prepare): Replace fatal with error.
6290
6291 2014-08-28 Gary Benson <gbenson@redhat.com>
6292
6293 * linux-low.c (linux_async): Replace fatal with warning.
6294 Tidy up and return.
6295 (linux_start_non_stop): Return -1 if linux_async failed.
6296
6297 2014-08-28 Gary Benson <gbenson@redhat.com>
6298
6299 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6300 gdb_assert.
6301 (i386_dr_low_get_addr): Remove vague comment.
6302 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6303 gdb_assert.
6304
6305 2014-08-28 Gary Benson <gbenson@redhat.com>
6306
6307 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6308 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6309 internal_error.
6310 (linux_resume_one_lwp): Likewise.
6311 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6312 gdb_assert.
6313 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6314 with internal_error.
6315 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6316 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6317 (find_register_by_name): Replace fatal with internal_error.
6318 (find_regno): Likewise.
6319 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6320 * thread-db.c (thread_db_create_event): Likewise.
6321 (thread_db_load_search): Likewise.
6322 (try_thread_db_load_1): Likewise.
6323 * tracepoint.c (get_jump_space_head): Replace fatal with
6324 internal_error.
6325 (claim_trampoline_space): Likewise.
6326 (have_fast_tracepoint_trampoline_buffer): Likewise.
6327 (cmd_qtstart): Likewise.
6328 (stop_tracing): Likewise.
6329 (fast_tracepoint_collecting): Likewise.
6330 (target_malloc): Likewise.
6331 (download_tracepoint): Likewise.
6332 (download_trace_state_variables): Replace check with gdb_assert.
6333 (upload_fast_traceframes): Replace fatal with internal_error.
6334
6335 2014-08-19 Tom Tromey <tromey@redhat.com>
6336 Gary Benson <gbenson@redhat.com>
6337
6338 * Makefile.in (SFILES): Add common/common-debug.c.
6339 (OBS): Add common-debug.o.
6340 (common-debug.o): New rule.
6341 * debug.h (debug_printf): Don't declare.
6342 * debug.c (debug_printf): Renamed and rewritten as...
6343 (debug_vprintf): New function.
6344
6345 2014-08-19 Gary Benson <gbenson@redhat.com>
6346
6347 * utils.h: Do not include print-utils.h.
6348
6349 2014-08-19 Tom Tromey <tromey@redhat.com>
6350 Gary Benson <gbenson@redhat.com>
6351
6352 * server.h: Add static assertion.
6353 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6354
6355 2014-08-19 Tom Tromey <tromey@redhat.com>
6356 Gary Benson <gbenson@redhat.com>
6357
6358 * Makefile.in (SFILES): Add common/errors.c.
6359 (OBS): Add errors.o.
6360 (IPA_OBS): Add errors-ipa.o.
6361 (errors.o): New rule.
6362 (errors-ipa.o): Likewise.
6363 * utils.h (perror_with_name, error, warning): Don't declare.
6364 * utils.c (warning): Renamed and rewritten as...
6365 (vwarning): New function.
6366 (error): Renamed and rewritten as...
6367 (verror): New function.
6368 (internal_error): Renamed and rewritten as...
6369 (internal_verror): New function.
6370
6371 2014-08-07 Gary Benson <gbenson@redhat.com>
6372
6373 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6374 * configure: Regenerate.
6375 * config.in: Likewise.
6376 * server.h: Do not include errno.h.
6377 * event-loop.c: Likewise.
6378 * hostio-errno.c: Likewise.
6379 * linux-low.c: Likewise.
6380 * remote-utils.c: Likewise.
6381 * spu-low.c: Likewise.
6382 * utils.c: Likewise.
6383 * gdbreplay.c: Unconditionally include errno.h.
6384
6385 2014-08-07 Gary Benson <gbenson@redhat.com>
6386
6387 * server.h: Do not include string.h.
6388 * event-loop.c: Likewise.
6389 * linux-low.c: Likewise.
6390 * regcache.c: Likewise.
6391 * remote-utils.c: Likewise.
6392 * spu-low.c: Likewise.
6393 * utils.c: Likewise.
6394
6395 2014-08-07 Gary Benson <gbenson@redhat.com>
6396
6397 * server.h: Do not include gdb_assert.h.
6398
6399 2014-08-07 Gary Benson <gbenson@redhat.com>
6400
6401 * server.h: Do not include common-utils.h.
6402
6403 2014-08-07 Gary Benson <gbenson@redhat.com>
6404
6405 * server.h: Do not include ptid.h.
6406 * notif.h: Likewise.
6407
6408 2014-08-07 Gary Benson <gbenson@redhat.com>
6409
6410 * server.h: Do not include gdb_locale.h.
6411
6412 2014-08-07 Gary Benson <gbenson@redhat.com>
6413
6414 * server.h: Do not include gdb/signals.h.
6415 * win32-low.c: Likewise.
6416
6417 2014-08-07 Gary Benson <gbenson@redhat.com>
6418
6419 * server.h: Do not include pathmax.h.
6420
6421 2014-08-07 Gary Benson <gbenson@redhat.com>
6422
6423 * server.h: Do not include libiberty.h.
6424 * linux-bfin-low.c: Likewise.
6425
6426 2014-08-07 Gary Benson <gbenson@redhat.com>
6427
6428 * server.h: Do not include ansidecl.h.
6429
6430 2014-08-07 Gary Benson <gbenson@redhat.com>
6431
6432 * linux-x86-low.c: Do not include stddef.h.
6433 * lynx-ppc-low.c: Likewise.
6434 * tracepoint.c: Likewise.
6435
6436 2014-08-07 Gary Benson <gbenson@redhat.com>
6437
6438 * server.h: Do not include stdarg.h.
6439 * nto-low.c: Likewise.
6440
6441 2014-08-07 Gary Benson <gbenson@redhat.com>
6442
6443 * server.h: Do not include stdlib.h.
6444 * inferiors.c: Likewise.
6445 * linux-low.c: Likewise.
6446 * regcache.c: Likewise.
6447 * spu-low.c: Likewise.
6448 * tracepoint.c: Likewise.
6449 * utils.c: Likewise.
6450
6451 2014-08-07 Gary Benson <gbenson@redhat.com>
6452
6453 * server.h: Do not include stdio.h.
6454 * linux-low.c: Likewise.
6455 * remote-utils.c: Likewise.
6456 * spu-low.c: Likewise.
6457 * utils.c: Likewise.
6458 * wincecompat.c: Likewise.
6459
6460 2014-08-06 Gary Benson <gbenson@redhat.com>
6461
6462 * regcache.c (init_register_cache): Move conditionals inside if.
6463
6464 2014-08-06 Gary Benson <gbenson@redhat.com>
6465
6466 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6467
6468 2014-07-31 Gary Benson <gbenson@redhat.com>
6469
6470 * ax.h: Do not include server.h.
6471 * gdbthread.h: Likewise.
6472 * lynx-low.h: Likewise.
6473 * notif.h: Likewise.
6474
6475 2014-07-30 Gary Benson <gbenson@redhat.com>
6476
6477 * server.h: Include common-defs.h.
6478 Do not include config.h or build-gnulib-gdbserver/config.h.
6479
6480 2014-07-30 Gary Benson <gbenson@redhat.com>
6481
6482 * hostio-errno.c: Move server.h to top of includes list.
6483 * inferiors.c: Likewise.
6484 * linux-x86-low.c: Likewise.
6485 * notif.c: Include server.h.
6486
6487 2014-07-24 Tom Tromey <tromey@redhat.com>
6488 Gary Benson <gbenson@redhat.com>
6489
6490 * server.h (CORE_ADDR): Now unsigned.
6491
6492 2014-07-16 Pedro Alves <palves@redhat.com>
6493
6494 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6495
6496 2014-07-15 Pedro Alves <palves@redhat.com>
6497
6498 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6499 copy.
6500
6501 2014-07-11 Pedro Alves <palves@redhat.com>
6502
6503 * linux-low.c (kill_wait_lwp): New function, based on
6504 kill_one_lwp_callback, but use my_waitpid directly.
6505 (kill_one_lwp_callback, linux_kill): Use it.
6506
6507 2014-06-23 Pedro Alves <palves@redhat.com>
6508
6509 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6510 before setting DR0..DR3.
6511
6512 2014-06-20 Gary Benson <gbenson@redhat.com>
6513
6514 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6515 * configure: Regenerated.
6516 * config.in: Likewise.
6517
6518 2014-06-20 Gary Benson <gbenson@redhat.com>
6519
6520 * Makefile.in (SFILES): Update locations for files moved
6521 from common to nat.
6522 (object file files): Reordered.
6523
6524 2014-06-20 Gary Benson <gbenson@redhat.com>
6525
6526 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6527 (i386_dr_low_set_addr): Likewise.
6528 (i386_dr_low_get_addr): Likewise.
6529 (i386_dr_low_can_set_control): Likewise.
6530 (i386_dr_low_set_control): Likewise.
6531 (i386_dr_low_get_control): Likewise.
6532 (i386_dr_low_get_status): Likewise.
6533 (i386_get_debug_register_length): Likewise.
6534 * linux-x86-low.c (i386_dr_low_set_addr):
6535 Changed signature. Made static.
6536 (i386_dr_low_get_addr): Likewise.
6537 (i386_dr_low_set_control): Likewise.
6538 (i386_dr_low_get_control): Likewise.
6539 (i386_dr_low_get_status): Likewise.
6540 (i386_dr_low): New global variable.
6541 * win32-i386-low.c (i386_dr_low_set_addr):
6542 Changed signature. Made static.
6543 (i386_dr_low_get_addr): Likewise.
6544 (i386_dr_low_set_control): Likewise.
6545 (i386_dr_low_get_control): Likewise.
6546 (i386_dr_low_get_status): Likewise.
6547 (i386_dr_low): New global variable.
6548
6549 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6550
6551 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6552 * Makefile.in (AR, AR_FLAGS): Define.
6553 * configure: Regenerate.
6554
6555 2014-06-19 Gary Benson <gbenson@redhat.com>
6556
6557 * Makefile.in (i386-dregs.o): New rule.
6558 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6559 * i386-low.c (target.h): Remove include.
6560 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6561 (DR_CONTROL_SHIFT): Likewise.
6562 (DR_CONTROL_SIZE): Likewise.
6563 (DR_RW_EXECUTE): Likewise.
6564 (DR_RW_WRITE): Likewise.
6565 (DR_RW_READ): Likewise.
6566 (DR_RW_IORW): Likewise.
6567 (DR_LEN_1): Likewise.
6568 (DR_LEN_2): Likewise.
6569 (DR_LEN_4): Likewise.
6570 (DR_LEN_8): Likewise.
6571 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6572 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6573 (DR_ENABLE_SIZE): Likewise.
6574 (DR_LOCAL_SLOWDOWN): Likewise.
6575 (DR_GLOBAL_SLOWDOWN): Likewise.
6576 (DR_CONTROL_RESERVED): Likewise.
6577 (I386_DR_CONTROL_MASK): Likewise.
6578 (I386_DR_VACANT): Likewise.
6579 (I386_DR_LOCAL_ENABLE): Likewise.
6580 (I386_DR_GLOBAL_ENABLE): Likewise.
6581 (I386_DR_DISABLE): Likewise.
6582 (I386_DR_SET_RW_LEN): Likewise.
6583 (I386_DR_GET_RW_LEN): Likewise.
6584 (I386_DR_WATCH_HIT): Likewise.
6585 (i386_wp_op_t): Likewise.
6586 (i386_show_dr): Likewise.
6587 (i386_length_and_rw_bits): Likewise.
6588 (i386_insert_aligned_watchpoint): Likewise.
6589 (i386_remove_aligned_watchpoint): Likewise.
6590 (i386_handle_nonaligned_watchpoint): Likewise.
6591 i386_update_inferior_debug_regs(): Likewise.
6592 (i386_dr_insert_watchpoint): Likewise.
6593 (i386_dr_remove_watchpoint): Likewise.
6594 (i386_dr_region_ok_for_watchpoint): Likewise.
6595 (i386_dr_stopped_data_address): Likewise.
6596 (i386_dr_stopped_by_watchpoint): Likewise.
6597
6598 2014-06-19 Gary Benson <gbenson@redhat.com>
6599
6600 * i386-low.c (i386_dr_show): Renamed to
6601 i386_show_dr and made static. All uses updated.
6602 (i386_dr_length_and_rw_bits): Renamed to
6603 i386_length_and_rw_bits and made static.
6604 All uses updated.
6605 (i386_dr_insert_aligned_watchpoint): Renamed to
6606 i386_insert_aligned_watchpoint and made static.
6607 All uses updated.
6608 (i386_dr_remove_aligned_watchpoint): Renamed to
6609 i386_remove_aligned_watchpoint and made static.
6610 All uses updated.
6611 (i386_dr_update_inferior_debug_regs): Renamed to
6612 i386_update_inferior_debug_regs and made static.
6613 All uses updated.
6614
6615 2014-06-18 Gary Benson <gbenson@redhat.com>
6616
6617 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6618 (i386_dr_low_can_set_control): Likewise.
6619 (i386_get_debug_register_length): Likewise.
6620 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6621 (i386_dr_low_can_set_control): Likewise.
6622 (i386_get_debug_register_length): Likewise.
6623
6624 2014-06-17 Gary Benson <gbenson@redhat.com>
6625
6626 * i386-low.h (i386-dregs.h): New include.
6627 (DR_FIRSTADDR): Now in i386-dregs.h.
6628 (DR_LASTADDR): Likewise.
6629 (DR_NADDR): Likewise.
6630 (DR_STATUS): Likewise.
6631 (DR_CONTROL): Likewise.
6632 (i386_debug_reg_state): Likewise.
6633 (i386_dr_insert_watchpoint): Likewise.
6634 (i386_dr_remove_watchpoint): Likewise.
6635 (i386_dr_region_ok_for_watchpoint): Likewise.
6636 (i386_dr_stopped_data_address): Likewise.
6637 (i386_dr_stopped_by_watchpoint): Likewise.
6638 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6639
6640 2014-06-18 Gary Benson <gbenson@redhat.com>
6641
6642 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6643 i386_dr_insert_watchpoint.
6644 (i386_low_remove_watchpoint): Renamed to
6645 i386_dr_remove_watchpoint.
6646 (i386_low_region_ok_for_watchpoint): Renamed to
6647 i386_dr_region_ok_for_watchpoint.
6648 (i386_low_stopped_data_address): Renamed to
6649 i386_dr_stopped_data_address.
6650 (i386_low_stopped_by_watchpoint): Renamed to
6651 i386_dr_stopped_by_watchpoint.
6652 * i386-low.c (i386_show_dr): Renamed to
6653 i386_dr_show and made nonstatic. All uses updated.
6654 (i386_length_and_rw_bits): Renamed to
6655 i386_dr_length_and_rw_bits and made nonstatic.
6656 All uses updated.
6657 (i386_insert_aligned_watchpoint): Renamed to
6658 i386_dr_insert_aligned_watchpoint and made nonstatic.
6659 All uses updated.
6660 (i386_remove_aligned_watchpoint): Renamed to
6661 i386_dr_remove_aligned_watchpoint and made nonstatic.
6662 All uses updated.
6663 (i386_update_inferior_debug_regs): Renamed to
6664 i386_dr_update_inferior_debug_regs and made nonstatic.
6665 All uses updated.
6666 (i386_low_insert_watchpoint): Renamed to
6667 i386_dr_insert_watchpoint. All uses updated.
6668 (i386_low_remove_watchpoint): Renamed to
6669 i386_dr_remove_watchpoint. All uses updated.
6670 (i386_low_region_ok_for_watchpoint): Renamed to
6671 i386_dr_region_ok_for_watchpoint. All uses updated.
6672 (i386_low_stopped_data_address): Renamed to
6673 i386_dr_stopped_data_address. All uses updated.
6674 (i386_low_stopped_by_watchpoint): Renamed to
6675 i386_dr_stopped_by_watchpoint. All uses updated.
6676
6677 2014-06-18 Gary Benson <gbenson@redhat.com>
6678
6679 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6680 (i386_dr_low_can_set_control): Likewise.
6681 (i386_insert_aligned_watchpoint): New check.
6682
6683 2014-06-18 Gary Benson <gbenson@redhat.com>
6684
6685 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6686 Renamed to state.
6687
6688 2014-06-18 Gary Benson <gbenson@redhat.com>
6689
6690 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6691 instead of fatal and error.
6692 (i386_handle_nonaligned_watchpoint): Likewise.
6693
6694 2014-06-18 Gary Benson <gbenson@redhat.com>
6695
6696 * i386-low.c (i386_get_debug_register_length): New macro.
6697 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6698 (i386_show_dr): Use debug_printf instead of fprintf. Use
6699 phex to format values.
6700
6701 2014-06-18 Gary Benson <gbenson@redhat.com>
6702
6703 * i386-low.h: Comment changes.
6704 * i386-low.c: Likewise.
6705
6706 2014-06-18 Gary Benson <gbenson@redhat.com>
6707
6708 * i386-low.c: Whitespace changes.
6709
6710 2014-06-12 Tom Tromey <tromey@redhat.com>
6711
6712 * utils.c (freeargv): Remove.
6713
6714 2014-06-12 Tom Tromey <tromey@redhat.com>
6715
6716 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6717 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6718 (parse_debug_format_options): Likewise.
6719 (gdbserver_usage): Likewise.
6720 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6721 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6722 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6723 against libiberty.
6724 ($(LIBGNU)): Depend on libiberty.
6725 (all-lib): Recurse into all subdirs.
6726 (install-only): Invoke "install" target in subdirs.
6727 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6728 targets.
6729 * configure: Rebuild.
6730 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6731 for vasprintf, vsnprintf, or gettimeofday.
6732 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6733 srv_tgtobj.
6734
6735 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6736
6737 * development.sh: Delete.
6738 * Makefile.in (config.status): Adjust dependency on development.sh.
6739 * configure.ac: Adjust development.sh source call.
6740 * configure: Regenerate.
6741
6742 2014-06-02 Pedro Alves <palves@redhat.com>
6743
6744 * ax.c (gdb_free_agent_expr): New function.
6745 * ax.h (gdb_free_agent_expr): New declaration.
6746 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6747 list.
6748 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6749 static.
6750 (clear_breakpoint_conditions_and_commands): New function.
6751 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6752 (clear_breakpoint_conditions_and_commands): New declaration.
6753
6754 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6755
6756 * linux-aarch64-low.c (asm/ptrace.h): Include.
6757
6758 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6759
6760 Fix TLS access for -static -pthread.
6761 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6762 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6763 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6764
6765 2014-05-20 Pedro Alves <palves@redhat.com>
6766
6767 * linux-aarch64-low.c (aarch64_insert_point)
6768 (aarch64_remove_point): No longer check whether the type is
6769 supported here. Adjust to new interface.
6770 (the_low_target): Install aarch64_supports_z_point_type as
6771 supports_z_point_type method.
6772 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6773 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6774 instead of a Z packet char. Adjust.
6775 (arm_supports_z_point_type): New function.
6776 (arm_insert_point, arm_remove_point): Adjust to new interface.
6777 (the_low_target): Install arm_supports_z_point_type.
6778 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6779 (cris_insert_point, cris_remove_point): Adjust to new interface.
6780 Don't check whether the type is supported here.
6781 (the_low_target): Install cris_supports_z_point_type.
6782 * linux-low.c (linux_supports_z_point_type): New function.
6783 (linux_insert_point, linux_remove_point): Adjust to new interface.
6784 * linux-low.h (struct linux_target_ops) <insert_point,
6785 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6786 raw_breakpoint pointer parameter.
6787 <supports_z_point_type>: New method.
6788 * linux-mips-low.c (mips_supports_z_point_type): New function.
6789 (mips_insert_point, mips_remove_point): Adjust to new interface.
6790 Use mips_supports_z_point_type.
6791 (the_low_target): Install mips_supports_z_point_type.
6792 * linux-ppc-low.c (the_low_target): Install NULL as
6793 supports_z_point_type method.
6794 * linux-s390-low.c (the_low_target): Install NULL as
6795 supports_z_point_type method.
6796 * linux-sparc-low.c (the_low_target): Install NULL as
6797 supports_z_point_type method.
6798 * linux-x86-low.c (x86_supports_z_point_type): New function.
6799 (x86_insert_point): Adjust to new insert_point interface. Use
6800 insert_memory_breakpoint. Adjust to new
6801 i386_low_insert_watchpoint interface.
6802 (x86_remove_point): Adjust to remove_point interface. Use
6803 remove_memory_breakpoint. Adjust to new
6804 i386_low_remove_watchpoint interface.
6805 (the_low_target): Install x86_supports_z_point_type.
6806 * lynx-low.c (lynx_target_ops): Install NULL as
6807 supports_z_point_type callback.
6808 * nto-low.c (nto_supports_z_point_type): New.
6809 (nto_insert_point, nto_remove_point): Adjust to new interface.
6810 (nto_target_ops): Install nto_supports_z_point_type.
6811 * mem-break.c: Adjust intro comment.
6812 (struct raw_breakpoint) <raw_type, size>: New fields.
6813 <inserted>: Update comment.
6814 <shlib_disabled>: Delete field.
6815 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6816 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6817 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6818 (raw_bkpt_type_to_target_hw_bp_type): New function.
6819 (find_enabled_raw_code_breakpoint_at): New function.
6820 (find_raw_breakpoint_at): New type and size parameters. Use them.
6821 (insert_memory_breakpoint): New function, based off
6822 set_raw_breakpoint_at.
6823 (remove_memory_breakpoint): New function.
6824 (set_raw_breakpoint_at): Reimplement.
6825 (set_breakpoint): New, based on set_breakpoint_at.
6826 (set_breakpoint_at): Reimplement.
6827 (delete_raw_breakpoint): Go through the_target->remove_point
6828 instead of assuming memory breakpoints.
6829 (find_gdb_breakpoint_at): Delete.
6830 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6831 (find_gdb_breakpoint): New function.
6832 (set_gdb_breakpoint_at): Delete.
6833 (z_type_supported): New function.
6834 (set_gdb_breakpoint_1): New function, loosely based off
6835 set_gdb_breakpoint_at.
6836 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6837 (delete_gdb_breakpoint_at): Delete.
6838 (delete_gdb_breakpoint_1): New function, loosely based off
6839 delete_gdb_breakpoint_at.
6840 (delete_gdb_breakpoint): New function.
6841 (clear_gdb_breakpoint_conditions): Rename to ...
6842 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6843 breakpoint.
6844 (add_condition_to_breakpoint): Make static.
6845 (add_breakpoint_condition): Take a struct breakpoint pointer
6846 instead of an address. Adjust.
6847 (gdb_condition_true_at_breakpoint): Rename to ...
6848 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6849 z_type parameter.
6850 (gdb_condition_true_at_breakpoint): Reimplement.
6851 (add_breakpoint_commands): Take a struct breakpoint pointer
6852 instead of an address. Adjust.
6853 (gdb_no_commands_at_breakpoint): Rename to ...
6854 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6855 parameter. Return true if no breakpoint was found. Change debug
6856 output.
6857 (gdb_no_commands_at_breakpoint): Reimplement.
6858 (run_breakpoint_commands): Rename to ...
6859 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6860 and change return type to boolean.
6861 (run_breakpoint_commands): New function.
6862 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6863 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6864 breakpoint. Go through the_target->remove_point instead of
6865 assuming memory breakpoint.
6866 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6867 software and hardware breakpoints.
6868 (reinsert_raw_breakpoint): Go through the_target->insert_point
6869 instead of assuming memory breakpoint.
6870 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6871 software and hardware breakpoints.
6872 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6873 Check both software and hardware breakpoints.
6874 (validate_inserted_breakpoint): Assert the breakpoint is a
6875 software breakpoint. Set the inserted flag to -1 instead of
6876 setting shlib_disabled.
6877 (delete_disabled_breakpoints): Adjust.
6878 (validate_breakpoints): Only validate software breakpoints.
6879 Adjust to inserted flag change.
6880 (check_mem_read, check_mem_write): Skip breakpoint types other
6881 than software breakpoints. Adjust to inserted flag change.
6882 * mem-break.h (enum raw_bkpt_type): New enum.
6883 (raw_breakpoint, struct process_info): Forward declare.
6884 (Z_packet_to_target_hw_bp_type): Delete declaration.
6885 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6886 (set_gdb_breakpoint, delete_gdb_breakpoint)
6887 (clear_breakpoint_conditions): New declarations.
6888 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6889 (breakpoint_inserted_here): Update comment.
6890 (add_breakpoint_condition, add_breakpoint_commands): Replace
6891 address parameter with a breakpoint pointer parameter.
6892 (gdb_breakpoint_here): Update comment.
6893 (delete_gdb_breakpoint_at): Delete.
6894 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6895 * server.c (process_point_options): Take a struct breakpoint
6896 pointer instead of an address. Adjust.
6897 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6898 delete_gdb_breakpoint.
6899 * spu-low.c (spu_target_ops): Install NULL as
6900 supports_z_point_type method.
6901 * target.h: Include mem-break.h.
6902 (struct target_ops) <prepare_to_access_memory>: Update comment.
6903 <supports_z_point_type>: New field.
6904 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6905 instead of a char. Also take a raw breakpoint pointer.
6906 * win32-arm-low.c (the_low_target): Install NULL as
6907 supports_z_point_type.
6908 * win32-i386-low.c (i386_supports_z_point_type): New function.
6909 (i386_insert_point, i386_remove_point): Adjust to new interface.
6910 (the_low_target): Install i386_supports_z_point_type.
6911 * win32-low.c (win32_supports_z_point_type): New function.
6912 (win32_insert_point, win32_remove_point): Adjust to new interface.
6913 (win32_target_ops): Install win32_supports_z_point_type.
6914 * win32-low.h (struct win32_target_ops):
6915 <supports_z_point_type>: New method.
6916 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6917 instead of a char. Also take a raw breakpoint pointer.
6918
6919 2014-05-20 Pedro Alves <palves@redhat.com>
6920
6921 * mem-break.h: Include break-common.h.
6922 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6923 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6924 (Z_packet_to_target_hw_bp_type): New declaration.
6925 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6926 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6927 (Z_PACKET_ACCESS_WP): Delete macros.
6928 (Z_packet_to_hw_type): Delete function.
6929 * i386-low.h: Don't include break-common.h here.
6930 (Z_packet_to_hw_type): Delete declaration.
6931 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6932 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6933 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6934 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6935 * linux-aarch64-low.c: Don't include break-common.h here.
6936 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6937 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6938 (Z_packet_to_target_hw_bp_type): Delete function.
6939 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6940 function.
6941 (mips_insert_point, mips_remove_point): Use
6942 Z_packet_to_target_hw_bp_type.
6943
6944 2014-05-20 Pedro Alves <palves@redhat.com>
6945
6946 * linux-aarch64-low.c: Include break-common.h.
6947 (enum target_point_type): Delete.
6948 (Z_packet_to_point_type): Rename to ...
6949 (Z_packet_to_target_hw_bp_type): ... this, and return a
6950 target_hw_bp_type instead.
6951 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6952 instead of an enum target_point_type.
6953 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6954 breakpoint type.
6955 (aarch64_dr_state_insert_one_point)
6956 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6957 (aarch64_handle_aligned_watchpoint)
6958 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6959 Take an enum target_hw_bp_type instead of an enum
6960 target_point_type.
6961 (aarch64_supports_z_point_type): New function.
6962 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6963 use Z_packet_to_target_hw_bp_type.
6964
6965 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6966
6967 * configure.ac: Only use -Werror by default when DEVELOPMENT
6968 is true.
6969 * configure: Regenerate.
6970
6971 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6972
6973 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6974 * linux-x86-low.c (X86_64_USER_REGS): New.
6975 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6976
6977 2014-04-28 Yao Qi <yao@codesourcery.com>
6978
6979 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6980 name.
6981
6982 2014-04-25 Pedro Alves <palves@redhat.com>
6983
6984 PR server/16255
6985 * linux-low.c (linux_attach_fail_reason_string): New function.
6986 (linux_attach_lwp): Delete.
6987 (linux_attach_lwp_1): Rename to ...
6988 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6989 argument. Remove "initial" parameter. Return int instead of
6990 void. Don't error or warn here.
6991 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6992 failure to attach to the tgid. Call warning when failing to
6993 attach to an lwp.
6994 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6995 argument. Remove "initial" parameter. Return int instead of
6996 void. Don't error or warn here.
6997 (linux_attach_fail_reason_string): New declaration.
6998 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6999 interface change. Use linux_attach_fail_reason_string.
7000
7001 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7002 Walfred Tedeschi <walfred.tedeschi@intel.com>
7003
7004 * Makefile.in: Added rules to handle new files
7005 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7006 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7007 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7008 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7009 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7010 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7011 x32-avx512-linux.o.
7012 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7013 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7014 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7015 i386/x32-avx512.xml.
7016 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7017 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7018 i386/x32-avx512-linux.xml.
7019 * i387-fp.c (num_avx512_k_registers): New constant for number
7020 of K registers.
7021 (num_avx512_zmmh_low_registers): New constant for number of
7022 lower ZMM registers (0-15).
7023 (num_avx512_zmmh_high_registers): New constant for number of
7024 higher ZMM registers (16-31).
7025 (num_avx512_ymmh_registers): New contant for number of higher
7026 YMM registers (ymm16-31 added by avx521 on x86_64).
7027 (num_avx512_xmm_registers): New constant for number of higher
7028 XMM registers (xmm16-31 added by AVX512 on x86_64).
7029 (struct i387_xsave): Add space for AVX512 registers.
7030 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7031 Add code to handle AVX512 registers.
7032 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7033 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7034 prototypei from generated file.
7035 (tdesc_amd64_avx512_linux): Likewise.
7036 (init_registers_x32_avx512_linux): Likewise.
7037 (tdesc_x32_avx512_linux): Likewise.
7038 (init_registers_i386_avx512_linux): Likewise.
7039 (tdesc_i386_avx512_linux): Likewise.
7040 (x86_64_regmap): Add AVX512 registers.
7041 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7042 mask.
7043 (initialize_low_arch): Add code to initialize AVX512 registers.
7044
7045 2014-04-23 Pedro Alves <palves@redhat.com>
7046
7047 * mem-break.c (find_gdb_breakpoint_at): Make static.
7048 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7049
7050 2014-04-23 Pedro Alves <palves@redhat.com>
7051
7052 * i386-low.c: Don't include break-common.h here.
7053 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7054 prototype to take target_hw_bp_type as argument instead of a Z
7055 packet char.
7056 * i386-low.h: Include break-common.h here.
7057 (Z_packet_to_hw_type): Declare.
7058 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7059 prototypes.
7060 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7061 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7062 (x86_remove_point): Convert the packet number to a
7063 target_hw_bp_type before calling i386_low_remove_watchpoint.
7064 * win32-i386-low.c (i386_insert_point): Convert the packet number
7065 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7066 (i386_remove_point): Convert the packet number to a
7067 target_hw_bp_type before calling i386_low_remove_watchpoint.
7068
7069 2014-04-23 Pedro Alves <palves@redhat.com>
7070
7071 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7072
7073 2014-04-10 Pedro Alves <palves@redhat.com>
7074
7075 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7076 Check if the condition or command is NULL before checking if the
7077 breakpoint is known. On success, return true.
7078 * mem-break.h (add_breakpoint_condition): Document return.
7079 (add_breakpoint_commands): Add describing comment.
7080 * server.c (skip_to_semicolon): New function.
7081 (process_point_options): Use it.
7082
7083 2014-04-09 Pedro Alves <palves@redhat.com>
7084
7085 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7086 to lwpid_of.
7087
7088 2014-02-27 Pedro Alves <palves@redhat.com>
7089
7090 PR 12702
7091 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7092 macros.
7093 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7094 output.
7095 (last_thread_of_process_p): Take a PID argument instead of a
7096 thread pointer.
7097 (linux_wait_for_lwp): Delete.
7098 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7099 functions.
7100 (linux_low_filter_event): New function, party factored out from
7101 linux_wait_for_event.
7102 (linux_wait_for_event): Rename to ...
7103 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7104 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7105 sigsuspend. Check for zombie leaders.
7106 (linux_wait_for_event): Reimplement as wrapper around
7107 linux_wait_for_event_filtered.
7108 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7109 a normal or signal exit is seen, it's the whole process exiting.
7110 (wait_for_sigstop): No longer a for_each_inferior callback.
7111 Rewrite on top of linux_wait_for_event_filtered.
7112 (stop_all_lwps): Call wait_for_sigstop directly.
7113 * server.c (resume, handle_target_event): Handle
7114 TARGET_WAITKIND_NO_RESUMED.
7115
7116 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7117
7118 * win32-low.c (psapi_get_dll_name,
7119 * win32_CreateToolhelp32Snapshot): Delete.
7120 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7121 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7122 Delete.
7123 (handle_load_dll): Add function description.
7124 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7125
7126 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7127
7128 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7129 Add comment.
7130 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7131 base address when calling win32_add_one_solib.
7132 (handle_load_dll): Delete local variable load_addr.
7133 Remove 0x1000 offset applied to DLL base address when calling
7134 win32_add_one_solib.
7135 (handle_unload_dll): Add comment.
7136
7137 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7138
7139 * win32-low.c (win32_add_all_dlls): Renames
7140 win32_ensure_ntdll_loaded. Rewrite function documentation.
7141 Adjust implementation to always load all DLLs.
7142 Add 0x1000 offset to DLL base address when calling
7143 win32_add_one_solib.
7144 (child_initialization_done): New static global.
7145 (do_initial_child_stuff): Set child_initialization_done to
7146 zero during child initialization, and 1 after. Replace call
7147 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7148 Add comment.
7149 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7150 (handle_unload_dll): Add function documentation.
7151 (get_child_debug_event): Ignore load and unload DLL events
7152 during child initialization.
7153
7154 2014-02-20 Doug Evans <dje@google.com>
7155
7156 Remove global all_lwps.
7157 * inferiors.h (ptid_of): Move here from linux-low.h.
7158 (pid_of, lwpid_of): Ditto.
7159 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7160 parameter is a struct thread_info * now.
7161 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7162 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7163 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7164 directly.
7165 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7166 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7167 * linux-arm-low.c (update_registers_callback): Update, "entry"
7168 parameter is a struct thread_info * now.
7169 Fetch lwpid from current_inferior directly.
7170 (arm_insert_point): Pass &all_threads to find_inferior instead of
7171 &all_lwps.
7172 (arm_remove_point): Ditto.
7173 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7174 (arm_prepare_to_resume): Fetch pid from thread.
7175 (arm_read_description): Fetch lwpid from current_inferior directly.
7176 * linux-low.c (all_lwps): Delete.
7177 (delete_lwp): Delete call to remove_inferior.
7178 (handle_extended_wait): Fetch lwpid from thread.
7179 (add_lwp): Don't set lwp->entry.id. Remove call to
7180 add_inferior_to_list.
7181 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7182 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7183 (kill_one_lwp_callback): Ditto.
7184 (linux_kill): Don't dereference NULL pointer.
7185 Fetch ptid,lwpid from thread.
7186 (get_detach_signal): Fetch ptid from thread.
7187 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7188 Simplify call to regcache_invalidate_thread.
7189 (delete_lwp_callback): Update, "entry" parameter is a
7190 struct thread_info * now. Fetch pid from thread.
7191 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7192 (status_pending_p_callback): Update, "entry" parameter is a
7193 struct thread_info * now. Fetch ptid from thread.
7194 (find_lwp_pid): Update, "entry" parameter is a
7195 struct thread_info * now.
7196 (linux_wait_for_lwp): Fetch pid from thread.
7197 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7198 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7199 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7200 (dequeue_one_deferred_signal): Ditto.
7201 (cancel_breakpoint): Fetch ptid from current_inferior.
7202 (linux_wait_for_event): Pass &all_threads to find_inferior,
7203 not &all_lwps. Fetch ptid, lwpid from thread.
7204 (count_events_callback): Update, "entry" parameter is a
7205 struct thread_info * now.
7206 (select_singlestep_lwp_callback): Ditto.
7207 (select_event_lwp_callback): Ditto.
7208 (cancel_breakpoints_callback): Ditto.
7209 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7210 not &all_lwps.
7211 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7212 (unsuspend_one_lwp): Update, "entry" parameter is a
7213 struct thread_info * now.
7214 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7215 not &all_lwps.
7216 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7217 Fetch lwpid from thread, not lwp.
7218 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7219 Pass &all_threads to find_inferior, not &all_lwps.
7220 (send_sigstop): Fetch lwpid from thread, not lwp.
7221 (send_sigstop_callback): Update, "entry" parameter is a
7222 struct thread_info * now.
7223 (suspend_and_send_sigstop_callback): Ditto.
7224 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7225 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7226 struct thread_info * now.
7227 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7228 from thread, lwp.
7229 (lwp_running): Update, "entry" parameter is a
7230 struct thread_info * now.
7231 (stop_all_lwps): Fetch ptid from thread.
7232 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7233 (linux_resume_one_lwp): Fetch lwpid from thread.
7234 (linux_set_resume_request): Update, "entry" parameter is a
7235 struct thread_info * now. Fetch pid, lwpid from thread.
7236 (resume_status_pending_p): Update, "entry" parameter is a
7237 struct thread_info * now.
7238 (need_step_over_p): Ditto. Fetch lwpid from thread.
7239 (start_step_over): Fetch lwpid from thread.
7240 (linux_resume_one_thread): Update, "entry" parameter is a
7241 struct thread_info * now. Fetch lwpid from thread.
7242 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7243 (proceed_one_lwp): Update, "entry" parameter is a
7244 struct thread_info * now. Fetch lwpid from thread.
7245 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7246 struct thread_info * now.
7247 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7248 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7249 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7250 directly.
7251 (regsets_store_inferior_registers): Ditto.
7252 (fetch_register, store_register): Ditto.
7253 (linux_read_memory, linux_write_memory): Ditto.
7254 (linux_request_interrupt): Ditto.
7255 (linux_read_auxv): Ditto.
7256 (linux_xfer_siginfo): Ditto.
7257 (linux_qxfer_spu): Ditto.
7258 (linux_qxfer_libraries_svr4): Ditto.
7259 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7260 moved to inferiors.h.
7261 (get_lwp): Delete.
7262 (get_thread_lwp): Update.
7263 (struct lwp_info): Delete member "entry". Simplify comment for
7264 member "thread".
7265 (all_lwps): Delete.
7266 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7267 current_inferior directly.
7268 (update_watch_registers_callback): Update, "entry" parameter is a
7269 struct thread_info * now. Fetch pid from thread.
7270 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7271 (mips_insert_point): Fetch lwpid from current_inferior.
7272 Pass &all_threads to find_inferior, not &all_lwps.
7273 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7274 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7275 directly.
7276 (mips_stopped_data_address): Ditto.
7277 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7278 directly.
7279 * linux-tile-low.c (tile_arch_setup): Ditto.
7280 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7281 (update_debug_registers_callback): Update, "entry" parameter is a
7282 struct thread_info * now. Fetch pid from thread.
7283 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7284 Pass &all_threads to find_inferior, not &all_lwps.
7285 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7286 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7287 Pass &all_threads to find_inferior, not &all_lwps.
7288 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7289 (i386_dr_low_get_status): Ditto.
7290 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7291 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7292 (x86_linux_read_description): Ditto.
7293 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7294
7295 2014-02-20 Doug Evans <dje@google.com>
7296
7297 * inferiors.c (get_first_inferior): Fix buglet.
7298
7299 2014-02-19 Doug Evans <dje@google.com>
7300
7301 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7302 * inferiors.c (add_thread): Change result type to struct thread_info *.
7303 All callers updated.
7304 (add_lwp): Call add_thread here instead of in callers.
7305 All callers updated.
7306 * linux-low.h (get_lwp_thread): Rewrite.
7307 (struct lwp_info): New member "thread".
7308
7309 2014-02-19 Doug Evans <dje@google.com>
7310
7311 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7312 All callers updated.
7313
7314 2014-02-19 Doug Evans <dje@google.com>
7315
7316 * inferiors.c (add_thread): Fix whitespace.
7317
7318 2014-02-19 Doug Evans <dje@google.com>
7319
7320 * dll.c (clear_dlls): Replace accessing list implemention details
7321 with API function.
7322 * gdbthread.h (get_first_thread): Declare.
7323 * inferiors.c (for_each_inferior_with_data): New function.
7324 (get_first_thread): New function.
7325 (find_thread_ptid): Simplify.
7326 (get_first_inferior): New function.
7327 (clear_list): Delete.
7328 (one_inferior_p): New function.
7329 (clear_inferior_list): New function.
7330 (clear_inferiors): Update.
7331 * inferiors.h (for_each_inferior_with_data): Declare.
7332 (clear_inferior_list): Declare.
7333 (one_inferior_p): Declare.
7334 (get_first_inferior): Declare.
7335 * linux-low.c (linux_wait_for_event): Replace accessing list
7336 implemention details with API function.
7337 * server.c (target_running): Ditto.
7338 (accumulate_file_name_length): New function.
7339 (emit_dll_description): New function.
7340 (handle_qxfer_libraries): Replace accessing list implemention
7341 details with API function.
7342 (handle_qxfer_threads_worker): New function.
7343 (handle_qxfer_threads_proper): Replace accessing list implemention
7344 details with API function.
7345 (handle_query): Ditto.
7346 (visit_actioned_threads_callback_ftype): New typedef.
7347 (visit_actioned_threads_data): New struct.
7348 (visit_actioned_threads): Rewrite to be find_inferior callback.
7349 (resume): Call find_inferior.
7350 (handle_status): Replace accessing list implemention
7351 details with API function.
7352 (process_serial_event): Replace accessing list implemention details
7353 with API function.
7354 * target.c (set_desired_inferior): Replace accessing list implemention
7355 details with API function.
7356 * tracepoint.c (same_process_p): New function.
7357 (gdb_agent_about_to_close): Replace accessing list implemention
7358 details with API function.
7359 * win32-low.c (child_delete_thread): Replace accessing list
7360 implemention details with API function.
7361 (match_dll_by_basename): New function.
7362 (dll_is_loaded_by_basename): New function.
7363 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7364 details call to dll_is_loaded_by_basename.
7365
7366 2014-02-19 Doug Evans <dje@google.com>
7367
7368 * dll.h (struct dll_info): Add comment.
7369 * gdbthread.h (struct thread_info): Add comment.
7370 (current_ptid): Simplify.
7371 * inferiors.c (add_process): Update.
7372 (remove_process): Update.
7373 * inferiors.h (struct process_info): Rename member "head" to "entry".
7374 * linux-low.c (delete_lwp): Update.
7375 (add_lwp): Update.
7376 (last_thread_of_process_p): Update.
7377 (kill_one_lwp_callback, linux_kill): Update.
7378 (status_pending_p_callback): Update.
7379 (wait_for_sigstop): Update. Simplify read of ptid.
7380 (start_step_over): Update.
7381 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7382 (get_lwp_thread): Update.
7383 (struct lwp_info): Rename member "head" to "entry".
7384 * regcache.h (inferior_list_entry): Delete.
7385 * server.c (kill_inferior_callback): Update.
7386 (detach_or_kill_inferior_callback): Update.
7387 (print_started_pid): Update.
7388 (print_attached_pid): Update.
7389 (process_serial_event): Simplify read of ptid.
7390 * thread-db.c (thread_db_create_event): Update.
7391 (thread_db_get_tls_address): Update.
7392 * win32-low.c (current_inferior_ptid): Simplify.
7393
7394 2014-02-19 Tom Tromey <tromey@redhat.com>
7395
7396 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7397 argument.
7398 (target_supports_btrace): Update.
7399
7400 2014-02-14 Yao Qi <yao@codesourcery.com>
7401
7402 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7403 (rsp-low-ipa.o): New target.
7404
7405 2014-02-12 Tom Tromey <tromey@redhat.com>
7406
7407 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7408 convert_ascii_to_int.
7409 * regcache.c (registers_to_string): Likewise.
7410 * remote-utils.c (decode_M_packet): Likewise.
7411 * server.c (process_serial_event): Likewise.
7412
7413 2014-02-12 Tom Tromey <tromey@redhat.com>
7414
7415 * server.c (handle_query, handle_v_run): Use hex2bin, not
7416 unhexify.
7417 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7418
7419 2014-02-12 Tom Tromey <tromey@redhat.com>
7420
7421 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7422 convert_int_to_ascii.
7423 * regcache.c (registers_to_string, collect_register_as_string):
7424 Likewise.
7425 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7426 Likewise.
7427 * server.c (process_serial_event): Likewise.
7428 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7429 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7430
7431 2014-02-12 Tom Tromey <tromey@redhat.com>
7432
7433 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7434 bin2hex, not hexify.
7435 * tracepoint.c (cmd_qtstatus): Likewise.
7436
7437 2014-02-12 Tom Tromey <tromey@redhat.com>
7438
7439 * remote-utils.c (monitor_output): Pass explicit length to
7440 hexify.
7441
7442 2014-02-12 Tom Tromey <tromey@redhat.com>
7443
7444 * tracepoint.c: Include rsp-low.h.
7445 * server.c: Include rsp-low.h.
7446 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7447 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7448 declare.
7449 * remote-utils.c: Include rsp-low.h.
7450 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7451 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7452 (convert_int_to_ascii, convert_ascii_to_int): Move to
7453 common/rsp-low.c.
7454 * regcache.c: Include rsp-low.h.
7455 * ax.c: Include rsp-low.h.
7456 * Makefile.in (SFILES): Add common/rsp-low.c.
7457 (OBS): Add rsp-low.o.
7458 (rsp-low.o): New target.
7459
7460 2014-02-12 Tom Tromey <tromey@redhat.com>
7461
7462 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7463 Include print-utils.h.
7464 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7465 (plongest, thirty_two, phex_nz): Remove.
7466 * Makefile.in (SFILES): Add common/print-utils.c.
7467 (OBS): Add print-utils.o.
7468 (print-utils-ipa.o): New target.
7469 (print-utils.o): New target.
7470 (IPA_OBJS): Add print-utils-ipa.o.
7471
7472 2014-02-06 Tom Tromey <tromey@redhat.com>
7473
7474 * Makefile.in (SFILES): Fix indentation.
7475
7476 2014-02-05 Doug Evans <dje@google.com>
7477
7478 * linux-low.c (linux_wait_for_event): Improve comment.
7479 (linux_wait_1): Keep current_inferior in sync with event_child.
7480
7481 2014-01-22 Doug Evans <dje@google.com>
7482
7483 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7484
7485 2014-01-22 Doug Evans <dje@google.com>
7486
7487 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7488 * configure: Regenerate.
7489 * config.in: Regenerate.
7490 * Makefile.in (SFILES): Add debug.c.
7491 (OBS): Add debug.o.
7492 * debug.c: New file.
7493 * debug.h: New file.
7494 * linux-aarch64-low.c (*): Update all debugging printfs to use
7495 debug_printf instead of fprintf.
7496 * linux-arm-low.c (*): Ditto.
7497 * linux-cris-low.c (*): Ditto.
7498 * linux-crisv32-low.c (*): Ditto.
7499 * linux-m32r-low.c (*): Ditto.
7500 * linux-sparc-low.c (*): Ditto.
7501 * linux-x86.c (*): Ditto.
7502 * linux-low.c (*): Ditto.
7503 (linux_wait_1): Add calls to debug_enter, debug_exit.
7504 (linux_wait): Remove redundant debugging printf.
7505 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7506 (linux_resume, unstop_all_lwps): Ditto.
7507 * mem-break.c (*): Update all debugging printfs to use
7508 debug_printf instead of fprintf.
7509 * remote-utils.c (*): Ditto.
7510 * thread-db.c (*): Ditto.
7511 * server.c #include <ctype.h>, "gdb_vecs.h".
7512 (debug_threads): Moved to debug.c.
7513 (*): Update all debugging printfs to use debug_printf instead of
7514 fprintf.
7515 (start_inferior): Replace call to fflush with call to debug_flush.
7516 (monitor_show_help): Mention set debug-format.
7517 (parse_debug_format_options): New function.
7518 (handle_monitor_command): Handle "monitor set debug-format".
7519 (gdbserver_usage): Mention --debug-format.
7520 (main): Parse --debug-format.
7521 * server.h (debug_threads): Declaration moved to debug.h.
7522 #include "debug.h".
7523 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7524 trace_debug_1 that uses debug_printf.
7525 (tracepoint_look_up_symbols): Update all debugging printfs to use
7526 debug_printf instead of fprintf.
7527
7528 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7529
7530 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7531 sys/ptrace.h.
7532
7533 2014-01-17 Pedro Alves <palves@redhat.com>
7534
7535 PR build/16445
7536 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7537 defined after including gdb_proc_service.h.
7538
7539 2014-01-16 Doug Evans <dje@google.com>
7540
7541 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7542 (match_dll): Use it.
7543
7544 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7545
7546 * target.h (target_ops) <read_btrace>: Change parameters and
7547 return type to allow error reporting.
7548 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7549 trace reading errors on.
7550 * linux-low.c (linux_low_read_btrace): Pass trace reading
7551 errors on.
7552 (linux_low_disable_btrace): New.
7553
7554 2014-01-15 Doug Evans <dje@google.com>
7555
7556 * inferiors.c (thread_id_to_gdb_id): Delete.
7557 * inferiors.h (thread_id_to_gdb_id): Delete.
7558
7559 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7560
7561 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7562 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7563 versions.
7564
7565 2014-01-08 Pedro Alves <palves@redhat.com>
7566
7567 * server.c (handle_status): Don't discard previous queued stop
7568 replies or thread's pending status here.
7569 (main) <disconnection>: Do it here instead.
7570
7571 2014-01-08 Pedro Alves <palves@redhat.com>
7572
7573 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7574 * server.c (visit_actioned_threads, handle_pending_status): New
7575 function.
7576 (handle_v_cont): Factor out parts to ...
7577 (resume): ... this new function. If in all-stop, and a thread
7578 being resumed has a pending status, report it without actually
7579 resuming.
7580 (myresume): Adjust to use the new 'resume' function.
7581 (clear_pending_status_callback, set_pending_status_callback)
7582 (find_status_pending_thread_callback): New functions.
7583 (handle_status): Handle the case of multiple threads having
7584 interesting statuses to report. Report threads' real last signal
7585 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7586 with an interesting thread to report the status for, instead of
7587 always reporting the status of the first thread.
7588
7589 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7590
7591 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7592 * gdbreplay.c (gdbreplay_version): Likewise.
7593
7594 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7595
7596 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7597 iov.iov_len with the real length in use.
7598
7599 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7600
7601 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7602 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7603 for all targets that use win32-low.c.
7604 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7605 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7606
7607 2013-12-13 Pedro Alves <palves@redhat.com>
7608
7609 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7610 if equal to TARGET_WAITKIND_LOADED.
7611 * win32-low.c (cached_status): New static global.
7612 (win32_wait): Add declaration.
7613 (do_initial_child_stuff): Flush all initial pending debug events
7614 up to the initial breakpoint.
7615 (win32_wait): If CACHED_STATUS was set, return that instead
7616 of doing a real wait. Remove the code resuming the execution
7617 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7618 during the initial phase. Also remove the code changing
7619 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7620 TARGET_WAITKIND_STOPPED.
7621
7622 2013-12-11 Yao Qi <yao@codesourcery.com>
7623
7624 * notif.c (handle_notif_ack): Return 0 if no notification
7625 matches.
7626
7627 2013-11-20 Doug Evans <dje@google.com>
7628
7629 * linux-low.c (linux_set_resume_request): Fix comment.
7630
7631 2013-11-20 Doug Evans <dje@google.com>
7632
7633 * linux-low.c (resume_status_pending_p): Tweak comment.
7634
7635 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7636
7637 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7638 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7639 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7640 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7641 (srv_amd64_regobj): Add amd64-mpx.o.
7642 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7643 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7644 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7645 * i387-fp.c (num_pl_bnd_register) Added constant.
7646 (num_pl_bnd_cfg_registers) Added constant.
7647 (struct i387_xsave) Added reserved area and MPX fields.
7648 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7649 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7650 function.
7651 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7652 (init_registers_amd64_mpx_linux): Declare new function.
7653 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7654 (x86_64_regmap): Add MPX registers.
7655 (x86_linux_read_description): Add MPX case.
7656 (initialize_low_arch): Initialize MPX targets.
7657
7658 2013-11-18 Tom Tromey <tromey@redhat.com>
7659
7660 * configure: Rebuild.
7661 * configure.ac: Don't check for stdlib.h.
7662 * gdbreplay.c: Unconditionally include stdlib.h.
7663
7664 2013-11-18 Tom Tromey <tromey@redhat.com>
7665
7666 * config.in: Rebuild.
7667 * configure: Rebuild.
7668 * configure.ac: Don't use AC_HEADER_DIRENT.
7669
7670 2013-11-18 Tom Tromey <tromey@redhat.com>
7671
7672 * server.h: Don't check HAVE_STRING_H.
7673 * gdbreplay.c: Don't check HAVE_STRING_H.
7674 * configure: Rebuild.
7675
7676 2013-11-18 Tom Tromey <tromey@redhat.com>
7677
7678 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7679 LIBGNU.
7680
7681 2013-11-08 Tom Tromey <tromey@redhat.com>
7682
7683 * configure, config.in: Rebuild.
7684 * configure.ac: Remove unused configury.
7685
7686 2013-11-08 Tom Tromey <tromey@redhat.com>
7687
7688 * acinclude.m4: Include common.m4, codeset.m4.
7689 * configure, config.in: Rebuild.
7690 * configure.ac: Use GDB_AC_COMMON.
7691
7692 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7693
7694 * linux-s390-low.c (HWCAP_S390_TE): New define.
7695 (s390_arch_setup): Consider the TE field in the HWCAP for
7696 determining 'have_regset_tdb'.
7697
7698 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7699
7700 PR gdb/16014
7701 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7702 call to sizeof.
7703
7704 2013-10-02 Pedro Alves <palves@redhat.com>
7705
7706 * server.c (process_serial_event): Don't output "GDBserver
7707 exiting" if GDB is connected through stdio.
7708 * target.c (mywait): Likewise, be silent if GDB is connected
7709 through stdio.
7710
7711 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7712
7713 * lynx-low.c (lynx_add_threads_after_attach): New function.
7714 (lynx_attach): Remove call to add_thread. Add call to
7715 lynx_add_threads_after_attach instead.
7716
7717 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7718
7719 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7720 * config.in, configure: Regenerated.
7721
7722 2013-09-18 Yao Qi <yao@codesourcery.com>
7723
7724 PR server/15959
7725 * server.c (start_inferior): Clear 'resume_info'.
7726
7727 2013-09-16 Jiong Wang <jiwang@tilera.com>
7728
7729 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7730 for each register.
7731
7732 2013-09-16 Jiong Wang <jiwang@tilera.com>
7733
7734 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7735 linux-tile-low.o to srv_tgtobj.
7736
7737 2013-09-16 Will Newton <will.newton@linaro.org>
7738
7739 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7740 out regs.
7741
7742 2013-09-06 Pedro Alves <palves@redhat.com>
7743
7744 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7745 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7746 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7747 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7748 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7749 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7750
7751 2013-09-06 Pedro Alves <palves@redhat.com>
7752
7753 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7754 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7755
7756 2013-09-06 Pedro Alves <palves@redhat.com>
7757
7758 * linux-amd64-ipa.c: Include tracepoint.h.
7759 * linux-i386-ipa.c: Include tracepoint.h.
7760
7761 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7762
7763 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7764 (ps_get_thread_area): New function.
7765
7766 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7767
7768 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7769 (initialize_low_arch): Call init_registers_crisv32 rather than
7770 init_register_crisv32.
7771
7772 2013-09-05 Pedro Alves <palves@redhat.com>
7773
7774 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7775 to ...
7776 * hostio.h: ... this new file.
7777 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7778 win32-low.c: Include hostio.h.
7779
7780 2013-09-05 Pedro Alves <palves@redhat.com>
7781
7782 * server.h (gdb_client_data, handler_func, callback_handler_func)
7783 (delete_file_handler, add_file_handler, append_callback_event)
7784 (delete_callback_event, start_event_loop, initialize_event_loop):
7785 Move to event-loop.h and include it.
7786 * event-loop.h: New file.
7787
7788 2013-09-05 Pedro Alves <palves@redhat.com>
7789
7790 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7791 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7792 (loaded_dll, unloaded_dll): Move to ...
7793 * dll.h: ... this new file.
7794 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7795
7796 2013-09-05 Pedro Alves <palves@redhat.com>
7797
7798 * server.h (current_process, get_thread_process, all_processes)
7799 (add_inferior_to_list, for_each_inferior, current_inferior)
7800 (remove_inferior, add_process, remove_process, find_process_pid)
7801 (have_started_inferiors_p, have_attached_inferiors_p)
7802 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7803 (clear_inferiors, find_inferior, find_inferior_id)
7804 (inferior_target_data, set_inferior_target_data)
7805 (inferior_regcache_data, set_inferior_regcache_data): Move to
7806 inferiors.h, and include it.
7807 * inferiors.h: New file.
7808
7809 2013-09-05 Pedro Alves <palves@redhat.com>
7810
7811 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7812 Move ...
7813 * ax.h: ... here.
7814
7815 2013-09-05 Pedro Alves <palves@redhat.com>
7816
7817 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7818 tracepoint.h.
7819 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7820 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7821 (handle_tracepoint_general_set, handle_tracepoint_query)
7822 (tracepoint_finished_step, tracepoint_was_hit)
7823 (release_while_stepping_state_list, current_traceframe)
7824 (in_readonly_region, traceframe_read_mem)
7825 (fetch_traceframe_registers, traceframe_read_sdata)
7826 (traceframe_read_info, struct fast_tpoint_collect_status)
7827 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7828 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7829 (supply_fast_tracepoint_registers)
7830 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7831 (ipa_tdesc, claim_trampoline_space)
7832 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7833 (agent_mem_read, agent_get_trace_state_variable_value)
7834 (agent_set_trace_state_variable_value, agent_tsv_read)
7835 (agent_mem_read_string, get_raw_reg_func_addr)
7836 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7837 * tracepoint.h: ... this new file.
7838
7839 2013-09-05 Pedro Alves <palves@redhat.com>
7840
7841 * server.h (perror_with_name, error, fatal, warning, paddress)
7842 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7843 include it.
7844 * utils.h: New file.
7845
7846 2013-09-05 Pedro Alves <palves@redhat.com>
7847
7848 * server.h (remote_debug, noack_mode, transport_is_reliable)
7849 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7850 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7851 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7852 (write_enn, initialize_async_io, enable_async_io)
7853 (disable_async_io, check_remote_input_interrupt_request)
7854 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7855 (dead_thread_notify, prepare_resume_reply)
7856 (decode_address_to_semicolon, decode_address, decode_m_packet)
7857 (decode_M_packet, decode_X_packet, decode_xfer_write)
7858 (decode_search_memory_packet, unhexify, hexify)
7859 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7860 (look_up_one_symbol, relocate_instruction)
7861 (monitor_output): Move to remote-utils.h, and include it.
7862 * remote-utils.h: New file.
7863
7864 2013-09-05 Pedro Alves <palves@redhat.com>
7865
7866 * server.h (_): Delete.
7867
7868 2013-09-02 Pedro Alves <palves@redhat.com>
7869
7870 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7871 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7872 allocated.
7873 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7874
7875 2013-09-02 Pierre Muller <muller@sourceware.org>
7876
7877 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7878 or WriteProcessMemory complete successfully and handle
7879 ERROR_PARTIAL_COPY error.
7880
7881 2013-09-02 Pedro Alves <palves@redhat.com>
7882
7883 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7884 error instead of EIO.
7885
7886 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7887
7888 PR server/15604
7889 * linux-low.c: Include filestuff.h.
7890 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7891 * lynx-low.c: Include filestuff.h.
7892 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7893 * server.c: Include filestuff.h.
7894 (main): Call notice_open_fds.
7895 * spu-low.c: Include filestuff.h.
7896 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7897
7898 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7899
7900 * Makefile.in: Explain why ../target and ../nat are not
7901 listed as include file search paths.
7902 (linux-waitpid.o): New object file rule.
7903 * configure.srv (srv_native_linux_obj): New variable.
7904 Replace all occurrences of linux native object files with
7905 $srv_native_linux_obj.
7906 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7907 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7908 (linux_enable_event_reporting): Remove declaration.
7909 (my_waitpid): Moved to common/linux-waitpid.c.
7910 (linux_wait_for_event): Pass ptid when calling
7911 linux_enable_event_reporting.
7912 (linux_supports_tracefork_flag): Remove.
7913 (linux_enable_event_reporting): Likewise.
7914 (linux_tracefork_grandchild): Remove.
7915 (STACK_SIZE): Moved to common/linux-ptrace.c.
7916 (linux_tracefork_child): Remove.
7917 (linux_test_for_tracefork): Remove.
7918 (linux_look_up_symbols): Call linux_supports_traceclone.
7919 (initialize_low): Remove call to linux_test_for_tracefork.
7920 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7921 common/linux-ptrace.h.
7922 (PTRACE_TYPE_ARG4): Likewise.
7923 Include linux-ptrace.h.
7924
7925 2013-08-21 Pedro Alves <palves@redhat.com>
7926
7927 * config.in: Renegerate.
7928
7929 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7930
7931 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7932 (SFILES): Remove $(srcdir)/common/target-common.c and
7933 add $(srcdir)/target/waitstatus.c.
7934 (OBS): Remove target-common.o and add waitstatus.o.
7935 (server_h): Remove $(srcdir)/../common/target-common.h and
7936 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7937 and $(srcdir)/../target/waitstatus.h.
7938 (target-common.o): Remove.
7939 (waitstatus.o): New target object file.
7940 * target.h: Do not include target-common.h and
7941 include target/resume.h, target/wait.h and
7942 target/waitstatus.h.
7943
7944 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7945
7946 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7947 to PTRACE_TYPE_ARG3.
7948 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7949 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7950 PTRACE_TYPE_ARG4.
7951 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7952 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7953
7954 2013-07-27 Jie Zhang <jie@codesourcery.com>
7955 Daniel Jacobowitz <dan@codesourcery.com>
7956 Yao Qi <yao@codesourcery.com>
7957
7958 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7959 (mips-linux-watch.o): New rule.
7960 (mips_linux_watch_h): New variable.
7961 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7962 srv_tgtobj.
7963 * linux-mips-low.c: Include mips-linux-watch.h.
7964 (struct arch_process_info, struct arch_lwp_info): New.
7965 (update_watch_registers_callback): New function.
7966 (mips_linux_new_process, mips_linux_new_thread) New functions.
7967 (mips_linux_prepare_to_resume, mips_insert_point): New
7968 functions.
7969 (mips_remove_point, mips_stopped_by_watchpoint): New
7970 functions.
7971 (rsp_bp_type_to_target_hw_bp_type): New function.
7972 (mips_stopped_data_address): New function.
7973 (the_low_target): Add watchpoint support functions.
7974
7975 2013-07-27 Yao Qi <yao@codesourcery.com>
7976
7977 * i386-low.c: Include break-common.h.
7978 (enum target_hw_bp_type): Remove.
7979
7980 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7981
7982 * Makefile.in (SFILES): /common/target-common.c.
7983 (OBS): Add target-common.o.
7984 (server_h): Add $(srcdir)/../common/target-common.h.
7985 (target-common.o): New target.
7986 * server.c (queue_stop_reply_callback): Free
7987 status string after use.
7988 * target.c (target_waitstatus_to_string): Remove.
7989 * target.h: Include target-common.h.
7990 (resume_kind): Likewise.
7991 (target_waitkind): Likewise.
7992 (target_waitstatus): Likewise.
7993 (TARGET_WNOHANG): Likewise.
7994
7995 2013-07-04 Yao Qi <yao@codesourcery.com>
7996
7997 * Makefile.in (host_alias): Use @host_noncanonical@.
7998 (target_alias): Use @target_noncanonical@.
7999 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8000 ACX_NONCANONICAL_HOST.
8001 * configure: Regenerated.
8002
8003 Revert:
8004 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8005
8006 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8007 * configure: Rebuild.
8008 * Makefile.in (version_host, version_target): Get from configure.
8009 (version.c): Use $(version_host) and $(version_target).
8010
8011 2013-07-03 Pedro Alves <palves@redhat.com>
8012
8013 * Makefile.in (config.status): Depend on development.sh.
8014 * acinclude.m4: Include libmcheck.m4.
8015 * configure: Regenerate.
8016
8017 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8018
8019 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8020 attribute inside the parentheses.
8021 (winapi_DebugSetProcessKillOnExit): Ditto.
8022 (winapi_DebugBreakProcess): Ditto.
8023 (winapi_GenerateConsoleCtrlEvent): Ditto.
8024
8025 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8026
8027 * notif.h (notif_event): Add a dummy member to avoid compiler
8028 errors.
8029
8030 2013-07-01 Pedro Alves <palves@redhat.com>
8031
8032 * hostio.c (HOSTIO_PATH_MAX): Define.
8033 (require_filename, handle_open, handle_unlink, handle_readlink):
8034 Use it.
8035
8036 2013-07-01 Pedro Alves <palves@redhat.com>
8037
8038 * server.h: Include "pathmax.h".
8039 * linux-low.c: Don't include sys/param.h.
8040 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8041 MAXPATHLEN.
8042 * win32-low.c: Don't include sys/param.h.
8043 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8044
8045 2013-07-01 Pedro Alves <palves@redhat.com>
8046
8047 * event-loop.c: Don't check HAVE_UNISTD_H before including
8048 <unistd.h>.
8049 * gdbreplay.c: Likewise.
8050 * remote-utils.c: Likewise.
8051 * server.c: Likewise.
8052 * configure.ac: Don't check for unistd.h.
8053 * configure: Regenerate.
8054
8055 2013-06-28 Tom Tromey <tromey@redhat.com>
8056
8057 * Makefile.in (version.c): Use version.in, not
8058 common/version.in.
8059
8060 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8061
8062 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8063 * configure: Rebuild.
8064 * Makefile.in (version_host, version_target): Get from configure.
8065 (version.c): Use $(version_host) and $(version_target).
8066
8067 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8068
8069 Fix trace-status to output user name without trailing colon.
8070 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8071
8072 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8073
8074 Fix trace-status to output proper start-time and stop-time.
8075 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8076 output start time and stop time in hex as gdb expects.
8077
8078 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8079
8080 * tracepoint.c (build_traceframe_info_xml): Output trace state
8081 variables present in the trace buffer.
8082
8083 2013-06-24 Tom Tromey <tromey@redhat.com>
8084
8085 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8086 create-version.sh.
8087 (version.o): Remove.
8088 * gdbreplay.c: Include version.h.
8089 (version, host_name): Don't declare.
8090 * server.h: Include version.h.
8091 (version, host_name): Don't declare.
8092
8093 2013-06-12 Pedro Alves <palves@redhat.com>
8094
8095 * linux-x86-low.c (linux_is_elf64): Delete global.
8096 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8097 with local linux_pid_exe_is_elf_64_file use.
8098
8099 2013-06-11 Pedro Alves <palves@redhat.com>
8100
8101 * linux-low.c (regset_disabled, disable_regset): New functions.
8102 (regsets_fetch_inferior_registers)
8103 (regsets_store_inferior_registers): Use them.
8104 (initialize_regsets_info); Don't allocate the disabled_regsets
8105 array here.
8106 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8107 comment.
8108
8109 2013-06-11 Pedro Alves <palves@redhat.com>
8110
8111 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8112 xmalloc.
8113
8114 2013-06-11 Pedro Alves <palves@redhat.com>
8115
8116 * linux-x86-low.c (initialize_low_arch): Call
8117 init_registers_x32_avx_linux.
8118
8119 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8120
8121 Fix compatibility with Android Bionic.
8122 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8123 it is not empty.
8124
8125 2013-06-07 Pedro Alves <palves@redhat.com>
8126
8127 PR server/14823
8128 * Makefile.in (OBS): Add tdesc.o.
8129 (IPA_OBJS): Add tdesc-ipa.o.
8130 (tdesc-ipa.o): New rule.
8131 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8132 interface.
8133 * linux-low.c (new_inferior): Delete.
8134 (disabled_regsets, num_regsets): Delete.
8135 (linux_add_process): Adjust to set the new per-process
8136 new_inferior flag.
8137 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8138 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8139 was a stop. When calling arch_setup, switch the current inferior
8140 to the thread that got an event.
8141 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8142 (regsets_fetch_inferior_registers)
8143 (regsets_store_inferior_registers): New regsets_info parameter.
8144 Adjust to use it.
8145 (linux_register_in_regsets): New regs_info parameter. Adjust to
8146 use it.
8147 (register_addr, fetch_register, store_register): New usrregs_info
8148 parameter. Adjust to use it.
8149 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8150 parameter regs_info. Adjust to use it.
8151 (linux_fetch_registers): Get the current inferior's regs_info, and
8152 adjust to use it.
8153 (linux_store_registers): Ditto.
8154 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8155 (initialize_low): Don't initialize the target_regsets here. Call
8156 initialize_low_arch.
8157 * linux-low.h (target_regsets): Delete declaration.
8158 (struct regsets_info): New.
8159 (struct usrregs_info): New.
8160 (struct regs_info): New.
8161 (struct process_info_private) <new_inferior>: New field.
8162 (struct linux_target_ops): Delete the num_regs, regmap, and
8163 regset_bitmap fields. New field regs_info.
8164 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8165 * i387-fp.c (num_xmm_registers): Delete.
8166 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8167 calls to new interface.
8168 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8169 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8170 Infer the number of xmm registers from the regcache's target
8171 description.
8172 * i387-fp.h (num_xmm_registers): Delete.
8173 * inferiors.c (add_thread): Don't install the thread's regcache
8174 here.
8175 * proc-service.c (gregset_info): Fetch the current inferior's
8176 regs_info. Adjust to use it.
8177 * regcache.c: Include tdesc.h.
8178 (register_bytes, reg_defs, num_registers)
8179 (gdbserver_expedite_regs): Delete.
8180 (get_thread_regcache): If the thread doesn't have a regcache yet,
8181 create one, instead of aborting gdbserver.
8182 (regcache_invalidate_one): Rename to ...
8183 (regcache_invalidate_thread): ... this.
8184 (regcache_invalidate_one): New.
8185 (regcache_invalidate): Only invalidate registers of the current
8186 process.
8187 (init_register_cache): Add target_desc parameter, and use it.
8188 (new_register_cache): Ditto. Assert the target description has a
8189 non zero registers_size.
8190 (regcache_cpy): Add assertions. Adjust.
8191 (realloc_register_cache, set_register_cache): Delete.
8192 (registers_to_string, registers_from_string): Adjust.
8193 (find_register_by_name, find_regno, find_register_by_number)
8194 (register_cache_size): Add target_desc parameter, and use it.
8195 (free_register_cache_thread, free_register_cache_thread_one)
8196 (regcache_release, register_cache_size): New.
8197 (register_size): Add target_desc parameter, and use it.
8198 (register_data, supply_register, supply_register_zeroed)
8199 (supply_regblock, supply_register_by_name, collect_register)
8200 (collect_register_as_string, collect_register_by_name): Adjust.
8201 * regcache.h (struct target_desc): Forward declare.
8202 (struct regcache) <tdesc>: New field.
8203 (init_register_cache, new_register_cache): Add target_desc
8204 parameter.
8205 (regcache_invalidate_thread): Declare.
8206 (regcache_invalidate_one): Delete declaration.
8207 (regcache_release): Declare.
8208 (find_register_by_number, register_cache_size, register_size)
8209 (find_regno): Add target_desc parameter.
8210 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8211 declarations.
8212 * remote-utils.c: Include tdesc.h.
8213 (outreg, prepare_resume_reply): Adjust.
8214 * server.c: Include tdesc.h.
8215 (gdbserver_xmltarget): Delete declaration.
8216 (get_features_xml, process_serial_event): Adjust.
8217 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8218 declare.
8219 (struct process_info) <tdesc>: New field.
8220 (ipa_tdesc): Declare.
8221 * tdesc.c: New file.
8222 * tdesc.h: New file.
8223 * tracepoint.c: Include tdesc.h.
8224 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8225 (get_context_regcache): Adjust to pass ipa_tdesc down.
8226 (do_action_at_tracepoint): Adjust to get the register cache size
8227 from the context regcache's description.
8228 (traceframe_walk_blocks): Adjust to get the register cache size
8229 from the current trace frame's description.
8230 (traceframe_get_pc): Adjust to get current trace frame's
8231 description and pass it down.
8232 (gdb_collect): Adjust to get the register cache size from the
8233 IPA's description.
8234 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8235 (gdbserver_xmltarget): Delete.
8236 (initialize_low_tracepoint): Set the ipa's target description.
8237 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8238 (initialize_low_tracepoint): Set the ipa's target description.
8239 * linux-x86-low.c: Include tdesc.h.
8240 [__x86_64__] (is_64bit_tdesc): New.
8241 (ps_get_thread_area, x86_get_thread_area): Use it.
8242 (i386_cannot_store_register): Rename to ...
8243 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8244 (i386_cannot_fetch_register): Rename to ...
8245 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8246 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8247 to new interface.
8248 (target_regsets): Rename to ...
8249 (x86_regsets): ... this.
8250 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8251 interface.
8252 (x86_siginfo_fixup): Use is_64bit_tdesc.
8253 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8254 (tdesc_x32_avx_linux, tdesc_x32_linux)
8255 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8256 Declare.
8257 (x86_linux_update_xmltarget): Delete.
8258 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8259 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8260 (AMD64_LINUX_USER64_CS): New.
8261 (x86_linux_read_description): New, based on
8262 x86_linux_update_xmltarget.
8263 (same_process_callback): New.
8264 (x86_arch_setup_process_callback): New.
8265 (x86_linux_update_xmltarget): New.
8266 (x86_regsets_info): New.
8267 (amd64_linux_regs_info): New.
8268 (i386_linux_usrregs_info): New.
8269 (i386_linux_regs_info): New.
8270 (x86_linux_regs_info): New.
8271 (x86_arch_setup): Reimplement.
8272 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8273 (x86_emit_ops): Ditto.
8274 (the_low_target): Adjust. Install x86_linux_regs_info,
8275 x86_cannot_fetch_register, and x86_cannot_store_register.
8276 (initialize_low_arch): New.
8277 * linux-ia64-low.c (tdesc_ia64): Declare.
8278 (ia64_fetch_register): Adjust.
8279 (ia64_usrregs_info, regs_info): New globals.
8280 (ia64_regs_info): New function.
8281 (the_low_target): Adjust.
8282 (initialize_low_arch): New function.
8283 * linux-sparc-low.c (tdesc_sparc64): Declare.
8284 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8285 Adjust.
8286 (sparc_arch_setup): New function.
8287 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8288 (the_low_target): Adjust.
8289 (initialize_low_arch): New function.
8290 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8291 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8292 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8293 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8294 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8295 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8296 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8297 (tdesc_powerpc_isa205_vsx64l): Declare.
8298 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8299 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8300 (ppc_set_pc, ppc_get_hwcap): Adjust.
8301 (ppc_usrregs_info): Forward declare.
8302 (!__powerpc64__) ppc_regmap_adjusted: New global.
8303 (ppc_arch_setup): Adjust to the current process'es target
8304 description.
8305 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8306 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8307 (ppc_store_evrregset): Adjust.
8308 (target_regsets): Rename to ...
8309 (ppc_regsets): ... this, and make static.
8310 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8311 (ppc_regs_info): New function.
8312 (the_low_target): Adjust.
8313 (initialize_low_arch): New function.
8314 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8315 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8316 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8317 (tdesc_s390x_linux64v2): Declare.
8318 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8319 (s390_fill_gregset, s390_store_last_break): Adjust.
8320 (target_regsets): Rename to ...
8321 (s390_regsets): ... this, and make static.
8322 (s390_get_pc, s390_set_pc): Adjust.
8323 (s390_get_hwcap): New target_desc parameter, and use it.
8324 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8325 (s390_arch_setup): Adjust to set the current process'es target
8326 description. Don't adjust the regmap.
8327 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8328 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8329 (regs_info_3264): New globals.
8330 (s390_regs_info): New function.
8331 (the_low_target): Adjust.
8332 (initialize_low_arch): New function.
8333 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8334 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8335 [__mips64] (init_registers_mips_linux)
8336 (init_registers_mips_dsp_linux): Delete defines.
8337 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8338 (have_dsp): New global.
8339 (mips_read_description): New, based on mips_arch_setup.
8340 (mips_arch_setup): Reimplement.
8341 (get_usrregs_info): New function.
8342 (mips_cannot_fetch_register, mips_cannot_store_register)
8343 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8344 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8345 (target_regsets): Rename to ...
8346 (mips_regsets): ... this, and make static.
8347 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8348 (dsp_regs_info, regs_info): New globals.
8349 (mips_regs_info): New function.
8350 (the_low_target): Adjust.
8351 (initialize_low_arch): New function.
8352 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8353 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8354 Declare.
8355 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8356 (arm_read_description): New, with bits factored from
8357 arm_arch_setup.
8358 (arm_arch_setup): Reimplement.
8359 (target_regsets): Rename to ...
8360 (arm_regsets): ... this, and make static.
8361 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8362 (arm_regs_info): New function.
8363 (the_low_target): Adjust.
8364 (initialize_low_arch): New function.
8365 * linux-m68k-low.c (tdesc_m68k): Declare.
8366 (target_regsets): Rename to ...
8367 (m68k_regsets): ... this, and make static.
8368 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8369 (m68k_regs_info): New function.
8370 (m68k_arch_setup): New function.
8371 (the_low_target): Adjust.
8372 (initialize_low_arch): New function.
8373 * linux-sh-low.c (tdesc_sharch): Declare.
8374 (target_regsets): Rename to ...
8375 (sh_regsets): ... this, and make static.
8376 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8377 (sh_regs_info, sh_arch_setup): New functions.
8378 (the_low_target): Adjust.
8379 (initialize_low_arch): New function.
8380 * linux-bfin-low.c (tdesc_bfin): Declare.
8381 (bfin_arch_setup): New function.
8382 (bfin_usrregs_info, regs_info): New globals.
8383 (bfin_regs_info): New function.
8384 (the_low_target): Adjust.
8385 (initialize_low_arch): New function.
8386 * linux-cris-low.c (tdesc_cris): Declare.
8387 (cris_arch_setup): New function.
8388 (cris_usrregs_info, regs_info): New globals.
8389 (cris_regs_info): New function.
8390 (the_low_target): Adjust.
8391 (initialize_low_arch): New function.
8392 * linux-cris-low.c (tdesc_crisv32): Declare.
8393 (cris_arch_setup): New function.
8394 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8395 (cris_regs_info): New function.
8396 (the_low_target): Adjust.
8397 (initialize_low_arch): New function.
8398 * linux-m32r-low.c (tdesc_m32r): Declare.
8399 (m32r_arch_setup): New function.
8400 (m32r_usrregs_info, regs_info): New globals.
8401 (m32r_regs_info): Adjust.
8402 (initialize_low_arch): New function.
8403 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8404 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8405 (tic6x_usrregs_info): Forward declare.
8406 (tic6x_read_description): New function, based on ...
8407 (tic6x_arch_setup): ... this. Reimplement.
8408 (target_regsets): Rename to ...
8409 (tic6x_regsets): ... this, and make static.
8410 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8411 (tic6x_regs_info): New function.
8412 (the_low_target): Adjust.
8413 (initialize_low_arch): New function.
8414 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8415 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8416 (target_regsets): Rename to ...
8417 (xtensa_regsets): ... this, and make static.
8418 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8419 globals.
8420 (xtensa_arch_setup, xtensa_regs_info): New functions.
8421 (the_low_target): Adjust.
8422 (initialize_low_arch): New function.
8423 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8424 (nios2_arch_setup): Set the current process'es tdesc.
8425 (target_regsets): Rename to ...
8426 (nios2_regsets): ... this.
8427 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8428 (nios2_regs_info): New function.
8429 (the_low_target): Adjust.
8430 (initialize_low_arch): New function.
8431 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8432 (aarch64_arch_setup): Set the current process'es tdesc.
8433 (target_regsets): Rename to ...
8434 (aarch64_regsets): ... this.
8435 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8436 (aarch64_regs_info): New function.
8437 (the_low_target): Adjust.
8438 (initialize_low_arch): New function.
8439 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8440 globals.
8441 (target_regsets): Rename to ...
8442 (tile_regsets): ... this.
8443 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8444 (tile_regs_info): New function.
8445 (tile_arch_setup): Set the current process'es tdesc.
8446 (the_low_target): Adjust.
8447 (initialize_low_arch): New function.
8448 * spu-low.c (tdesc_spu): Declare.
8449 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8450 * win32-arm-low.c (tdesc_arm): Declare.
8451 (arm_arch_setup): New function.
8452 (the_low_target): Install arm_arch_setup instead of
8453 init_registers_arm.
8454 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8455 (init_windows_x86): Rename to ...
8456 (i386_arch_setup): ... this. Set `win32_tdesc'.
8457 (the_low_target): Adjust.
8458 * win32-low.c (win32_tdesc): New global.
8459 (child_add_thread): Don't create the thread cache here.
8460 (do_initial_child_stuff): Set the new process'es tdesc.
8461 * win32-low.h (struct target_desc): Forward declare.
8462 (win32_tdesc): Declare.
8463 * lynx-i386-low.c (tdesc_i386): Declare global.
8464 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8465 * lynx-low.c (lynx_tdesc): New global.
8466 (lynx_add_process): Set the new process'es tdesc.
8467 * lynx-low.h (struct target_desc): Forward declare.
8468 (lynx_tdesc): Declare global.
8469 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8470 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8471 * nto-low.c (nto_tdesc): New global.
8472 (do_attach): Set the new process'es tdesc.
8473 * nto-low.h (struct target_desc): Forward declare.
8474 (nto_tdesc): Declare.
8475 * nto-x86-low.c (tdesc_i386): Declare.
8476 (nto_x86_arch_setup): Set `nto_tdesc'.
8477
8478 2013-06-04 Gary Benson <gbenson@redhat.com>
8479
8480 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8481 to qSupported response when appropriate.
8482 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8483 with nonzero-length annex.
8484 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8485 arguments supplied in annex.
8486
8487 2013-05-31 Doug Evans <dje@google.com>
8488
8489 PR server/15594
8490 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8491 64 bits in 64-cross-32 environment.
8492
8493 2013-05-28 Pedro Alves <palves@redhat.com>
8494
8495 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8496 (aarch64-without-fpu.c): Delete rule.
8497 * configure.srv (aarch64*-*-linux*): Remove references to
8498 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8499 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8500 declaration.
8501
8502 2013-05-24 Pedro Alves <palves@redhat.com>
8503
8504 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8505 instead of strchr/decode_address. Error if the range isn't split
8506 with a ','. Don't assume there's be a ':' in the action.
8507
8508 2013-05-23 Yao Qi <yao@codesourcery.com>
8509 Pedro Alves <palves@redhat.com>
8510
8511 * linux-low.c (lwp_in_step_range): New function.
8512 (linux_wait_1): If the thread was range stepping and stopped
8513 outside the stepping range, report the stop to GDB. Otherwise,
8514 continue stepping. Add range stepping debug output.
8515 (linux_set_resume_request): Copy the step range from the resume
8516 request to the lwp.
8517 (linux_supports_range_stepping): New.
8518 (linux_target_ops) <supports_range_stepping>: Set to
8519 linux_supports_range_stepping.
8520 * linux-low.h (struct linux_target_ops)
8521 <supports_range_stepping>: New field.
8522 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8523 * linux-x86-low.c (x86_supports_range_stepping): New.
8524 (the_low_target) <supports_range_stepping>: Set to
8525 x86_supports_range_stepping.
8526 * server.c (handle_v_cont): Handle 'r' action.
8527 (handle_v_requests): Append ";r" if the target supports range
8528 stepping.
8529 * target.h (struct thread_resume) <step_range_start,
8530 step_range_end>: New fields.
8531 (struct target_ops) <supports_range_stepping>:
8532 New field.
8533 (target_supports_range_stepping): New macro.
8534
8535 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8536
8537 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8538 confusion in comment.
8539
8540 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8541
8542 * lynx-low.c (struct process_info_private): New type.
8543 (lynx_add_process): New function.
8544 (lynx_create_inferior, lynx_attach): Replace calls to
8545 add_process by calls to lynx_add_process.
8546 (lynx_resume): If PTID is null, then try using
8547 current_process()->private->last_wait_event_ptid.
8548 Add comments.
8549 (lynx_clear_inferiors): Delete. The contents of that function
8550 has been inlined in lynx_mourn;
8551 (lynx_wait_1): Save the ptid in the process's private data.
8552 (lynx_mourn): Free the process' private data. Replace call
8553 to lynx_clear_inferiors by call to clear_inferiors.
8554
8555 2013-05-17 Yao Qi <yao@codesourcery.com>
8556
8557 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8558 the right place.
8559
8560 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8561
8562 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8563 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8564 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8565 PT_TEXT_END_ADDR guards. Update comments.
8566 (linux_target_op) <read_offsets>: Conditionally define to
8567 linux_read_offsets if the target is UCLIBC and if it defines
8568 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8569
8570 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8571 Andrew Jenner <andrew@codesourcery.com>
8572
8573 * Makefile.in (SFILES): Add linux-nios2-low.c.
8574 (clean): Add action to delete nios2-linux.c.
8575 (nios2-linux.c): New rule.
8576 * configure.srv: Add nios2*-*-linux*.
8577 * linux-nios2-low.c: New.
8578
8579 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8580
8581 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8582
8583 2013-04-25 Hui Zhu <hui@codesourcery.com>
8584
8585 PR gdb/15186
8586 * ax.c (ax_printf): Add fflush.
8587
8588 2013-04-22 Tom Tromey <tromey@redhat.com>
8589
8590 * Makefile.in (SFILES): Add filestuff.c.
8591 (OBS): Add filestuff.o.
8592 (filestuff.o): New target.
8593 * config.in, configure: Rebuild.
8594 * configure.ac: Check for fdwalk, pipe2.
8595
8596 2013-04-17 Pedro Alves <palves@redhat.com>
8597
8598 * configure.ac (USE_THREAD_DB): Delete variable.
8599 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8600 Don't AC_SUBST USE_THREAD_DB.
8601 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8602 * config.in, configure: Regenerate.
8603
8604 2013-04-16 Pedro Alves <palves@redhat.com>
8605
8606 * linux-low.h (struct lwp_info) <thread_known>: Move under
8607 the USE_THREAD_DB #ifdef.
8608
8609 2013-04-16 Pedro Alves <palves@redhat.com>
8610
8611 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8612 (linux-low.o): Delete rule.
8613 * linux-low.h: Always include "gdb_thread_db.h" instead of
8614 conditionally including thread_db.h.
8615 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8616 HAVE_THREAD_DB_H.
8617
8618 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8619
8620 * Makefile.in (install-only): Fix make install regression.
8621
8622 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8623
8624 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8625 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8626 installation.
8627 * gdbserver.1: Remove.
8628
8629 2013-03-22 Pedro Alves <palves@redhat.com>
8630
8631 * linux-low.c (handle_extended_wait): Don't call
8632 linux_enable_event_reporting.
8633
8634 2013-03-15 Tony Theodore <tonyt@logyst.com>
8635
8636 PR build/9098:
8637 * Makefile.in (SHELL): Use @SHELL@.
8638
8639 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8640
8641 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8642 compiler warning.
8643
8644 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8645
8646 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8647 Remove extraneous NULL element.
8648
8649 2013-03-13 Yao Qi <yao@codesourcery.com>
8650
8651 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8652 'V' block in trace frame.
8653
8654 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8655
8656 * target.h (struct target_ops): Add btrace ops.
8657 (target_supports_btrace): New macro.
8658 (target_enable_btrace): New macro.
8659 (target_disable_btrace): New macro.
8660 (target_read_btrace): New macro.
8661 * gdbthread.h (struct thread_info): Add btrace field.
8662 * server.c: Include btrace-common.h.
8663 (handle_btrace_general_set): New function.
8664 (handle_btrace_enable): New function.
8665 (handle_btrace_disable): New function.
8666 (handle_general_set): Call handle_btrace_general_set.
8667 (handle_qxfer_btrace): New function.
8668 (struct qxfer qxfer_packets[]): Add btrace entry.
8669 * inferiors.c (remove_thread): Disable btrace.
8670 * linux-low: Include linux-btrace.h.
8671 (linux_low_enable_btrace): New function.
8672 (linux_low_read_btrace): New function.
8673 (linux_target_ops): Add btrace ops.
8674 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8675 Add srv_linux_btrace=yes.
8676 (x86_64-*-linux*): Add linux-btrace.o.
8677 Add srv_linux_btrace=yes.
8678 * configure.ac: Define HAVE_LINUX_BTRACE.
8679 * config.in: Regenerated.
8680 * configure: Regenerated.
8681
8682 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8683
8684 * server.c (handle_qxfer): Preserve error message if -3 is
8685 returned.
8686 (qxfer): Document the -3 return value.
8687
8688 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8689
8690 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8691 (linux_btrace_h): New variable.
8692 (linux-btrace.o): New rule.
8693
8694 2013-03-08 Stan Shebs <stan@codesourcery.com>
8695 Hafiz Abid Qadeer <abidh@codesourcery.com>
8696
8697 * tracepoint.c (trace_buffer_size): New global.
8698 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8699 (init_trace_buffer): Change to one-argument function. Allocate
8700 trace buffer memory.
8701 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8702 handle QTBuffer:size packet.
8703 (cmd_bigqtbuffer_size): New function.
8704 (initialize_tracepoint): Call init_trace_buffer with
8705 DEFAULT_TRACE_BUFFER_SIZE.
8706 * server.c (handle_query): Add QTBuffer:size in the
8707 supported packets.
8708
8709 2013-03-07 Yao Qi <yao@codesourcery.com>
8710
8711 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8712 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8713 of -1.
8714 (cmd_qtsp): Adjust condition. Do post increment.
8715 Set cur_action and cur_step_action back to 0.
8716
8717 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8718
8719 PR server/15236
8720 * linux-low.c (linux_write_memory): Return early success if LEN is
8721 zero.
8722
8723 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8724
8725 * configure.srv: Add x86_64-*-cygwin* as target.
8726
8727 2013-02-28 Tom Tromey <tromey@redhat.com>
8728
8729 * configure.ac: Invoke AC_SYS_LARGEFILE.
8730 * configure, config.in: Rebuild.
8731
8732 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8733
8734 * win32-low.c: Throughout, fix format strings and casts of
8735 printf-like functions to avoid type related warnings on all
8736 platforms.
8737 (get_child_debug_event): Print dwDebugEventCode as hex since
8738 that's how it's usually documented.
8739
8740 2013-02-28 Yao Qi <yao@codesourcery.com>
8741
8742 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8743 pulongest.
8744
8745 2013-02-27 Jiong Wang <jiwang@tilera.com>
8746
8747 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8748 (reg-tilegx32.c): New rule.
8749 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8750 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8751 different register info initializer according to elf class.
8752 (init_registers_tilgx32): New function. The tilegx32 register info
8753 initializer.
8754 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8755 (tile_store_gregset): Likewise.
8756
8757 2013-02-27 Yao Qi <yao@codesourcery.com>
8758
8759 * server.c (process_point_options): Print debug message when
8760 debug_threads is true.
8761
8762 2013-02-26 Yao Qi <yao@codesourcery.com>
8763
8764 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8765
8766 2013-02-19 Pedro Alves <palves@redhat.com>
8767 Kai Tietz <ktietz@redhat.com>
8768
8769 PR gdb/15161
8770
8771 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8772 instead of strtoul to extract address from packet.
8773 (process_serial_event) <'z'>: Likewise.
8774
8775 2013-02-18 Yao Qi <yao@codesourcery.com>
8776
8777 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8778
8779 2013-02-14 Pedro Alves <palves@redhat.com>
8780
8781 Plug memory leak.
8782
8783 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8784 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8785
8786 2013-02-14 Pedro Alves <palves@redhat.com>
8787
8788 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8789
8790 2013-02-14 Pedro Alves <palves@redhat.com>
8791
8792 * tracepoint.c (save_string): Delete.
8793 (add_tracepoint_action): Use savestring instead of save_string.
8794
8795 2013-02-12 Pedro Alves <palves@redhat.com>
8796
8797 * linux-xtensa-low.c: Ditto.
8798 * xtensa-xtregs.c: Ditto.
8799
8800 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8801
8802 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8803 thread_db.
8804
8805 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8806
8807 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8808 aarch64_num_wp_regs and aarch64_num_bp_regs to
8809 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8810
8811 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8812
8813 * linux-aarch64-low.c (ps_get_thread_area): Replace
8814 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8815
8816 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8817 Marcus Shawcroft <marcus.shawcroft@arm.com>
8818 Nigel Stephens <nigel.stephens@arm.com>
8819 Yufeng Zhang <yufeng.zhang@arm.com>
8820
8821 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8822 (aarch64.c, aarch64-without-fpu.c): New targets.
8823 * configure.srv (aarch64*-*-linux*): New.
8824 * linux-aarch64-low.c: New file.
8825
8826 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8827
8828 * linux-low.c (handle_extended_wait, linux_create_inferior)
8829 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8830 (dequeue_one_deferred_signal, linux_resume_one_thread)
8831 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8832 (linux_tracefork_grandchild, linux_test_for_tracefork)
8833 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8834 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8835 where the argument is 0.
8836
8837 2013-01-25 Yao Qi <yao@codesourcery.com>
8838
8839 * event-loop.c: Include "queue.h".
8840 (gdb_event_p): New typedef.
8841 (struct gdb_event) <next_event>: Remove.
8842 (event_queue): Change to QUEUE(gdb_event_p).
8843 (async_queue_event): Remove.
8844 (gdb_event_xfree): New.
8845 (initialize_event_loop): New.
8846 (process_event): Use API from QUEUE.
8847 (wait_for_event): Likewise.
8848 * server.c (main): Call initialize_event_loop.
8849 * server.h (initialize_event_loop): Declare.
8850
8851 2013-01-18 Yao Qi <yao@codesourcery.com>
8852
8853 * ax.h (struct eval_agent_expr_context): New.
8854 (gdb_eval_agent_expr): Update declaration.
8855 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8856 TFRAME. Add new argument CTX.
8857 * server.h (struct eval_agent_expr_context): Declare.
8858 (agent_mem_read, agent_tsv_read): Update declaration.
8859 (agent_mem_read_string): Likewise.
8860 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8861 (add_traceframe_block): Add new argument TPOINT.
8862 Increase TPOINT->traceframe_usage.
8863 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8864 eval_tracepoint_agent_expr.
8865 (condition_true_at_tracepoint): Likewise.
8866 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8867 (agent_mem_read_string, agent_tsv_read): Likewise.
8868
8869 2013-01-16 Yao Qi <yao@codesourcery.com>
8870
8871 * linux-low.c (linux_resume_one_lwp): Don't check
8872 'lwp->bp_reinsert != 0'.
8873
8874 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8875 Pedro Alves <palves@redhat.com>
8876
8877 * lynx-low.c (ptrace_request_to_str): Define a temporary
8878 macro and use it to simplify this function's implementation.
8879
8880 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8881
8882 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8883 sets errno.
8884
8885 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8886
8887 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8888
8889 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8890
8891 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8892
8893 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8894
8895 * lynx-low.c (lynx_resume): Use the resume_info parameter
8896 to determine the ptid for the lynx_ptrace call, unless
8897 it is equal to minus_one_ptid, in which case we use the
8898 ptid of the current_inferior.
8899 (lynx_wait_1): After having received a thread create/exit
8900 event, resume the inferior's execution using the signaling
8901 thread's ptid, rather than the old ptid.
8902
8903 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8904
8905 * lynx-low.c (lynx_resume): Delete variable ret.
8906
8907 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8908
8909 * gdbreplay.c (gdbreplay_version): Update copyright year.
8910 * server.c (gdbserver_version): Likewise.
8911
8912 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8913
8914 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8915 new thread.
8916
8917 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8918
8919 * lynx-low.c (ptrace_request_to_str): Add handling for
8920 PTRACE_GETTRACESIG.
8921
8922 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8923
8924 * lynx-low.c (lynx_attach): Delete variable new_process.
8925
8926 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8927
8928 * lynx-low.c (lynx_create_inferior): Delete variable
8929 new_process.
8930
8931 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8932
8933 * lynx-low.c (ptrace_request_to_str): Do not handle
8934 PTRACE_GETTHREADLIST if this macro does not exist.
8935
8936 2012-12-15 Yao Qi <yao@codesourcery.com>
8937
8938 * Makefile.in (OBS): Add notif.o.
8939 * notif.c, notif.h: New.
8940 * server.c: Include "notif.h".
8941 (struct vstop_notif) <next>: Remove.
8942 <base>: New field.
8943 (queue_stop_reply): Update.
8944 (push_event, send_next_stop_reply): Remove.
8945 (discard_queued_stop_replies): Update.
8946 (notif_stop): New variable.
8947 (handle_v_stopped): Remove.
8948 (handle_v_requests): Don't call handle_v_stopped. Call
8949 handle_ack_notif instead.
8950 (queue_stop_reply_callback): Call notif_event_enque instead
8951 of queue_stop_reply.
8952 (handle_status): Don't call send_next_stop_reply, call
8953 notif_write_event instead.
8954 (kill_inferior_callback): Likewise.
8955 (detach_or_kill_inferior_callback): Likewise.
8956 (main): Call initialize_notif.
8957 (process_serial_event): Call QUEUE_is_empty.
8958 (handle_target_event): Call notif_push instead of push event.
8959 * server.h (push_event): Remove declaration.
8960
8961 2012-12-10 Tom Tromey <tromey@redhat.com>
8962
8963 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8964 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8965 macros.
8966 (.c.o): Rewrite.
8967 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8968 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8969 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8970 (amd64-linux-ipa.o, ax.o): Rewrite.
8971 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8972 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8973 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8974 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8975 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8976 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8977 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8978 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8979 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8980 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8981 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8982 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8983 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8984 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8985 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8986 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8987 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8988 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8989 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8990 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8991 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8992 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8993 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8994 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8995 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8996 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8997 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8998 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8999 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9000 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9001 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9002 (reg-tilegx.o): Remove.
9003 (all_object_files): New macro.
9004 Include .deps files.
9005 * aclocal.m4, configure: Rebuild.
9006 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9007 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9008 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9009
9010 2012-12-05 Tom Tromey <tromey@redhat.com>
9011
9012 PR gdb/14917:
9013 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9014
9015 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9016
9017 * configure.ac: Check for linux/perf_event.h.
9018 * config.in: Regenerated.
9019 * configure: Regenerated.
9020
9021 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9022
9023 * hostio.c (handle_readlink): Decrease buffer size
9024 parameter passed to readlink by one byte.
9025
9026 2012-11-26 Yao Qi <yao@codesourcery.com>
9027
9028 * configure.ac (build_warnings): Append '-Wempty-body'.
9029 * configure: Regenerated.
9030 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9031 body.
9032
9033 2012-11-15 Pierre Muller <muller@sourceware.org>
9034
9035 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9036 * config.in: Regenerate.
9037 * configure: Regenerate.
9038 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9039 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9040 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9041 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9042 header.
9043 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9044 instead of <sys/wait.h> header.
9045 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9046
9047 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9048
9049 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9050 (various make rules): Remove -DGDBSERVER
9051
9052 2012-11-09 Yao Qi <yao@codesourcery.com>
9053
9054 * spu-low.c (current_ptid): Move it to ..
9055 * gdbthread.h: ... here. New.
9056 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9057 * server.c (myresume, process_serial_event): Likewise.
9058 * thread-db.c (thread_db_find_new_threads): Likewise.
9059 * tracepoint.c (run_inferior_command): Likewise.
9060
9061 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9062
9063 * server.c (handle_search_memory_1): Include access length in
9064 warning message.
9065
9066 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9067
9068 * linux-crisv32-low.c: Fix compile errors.
9069
9070 2012-09-04 Yao Qi <yao@codesourcery.com>
9071
9072 * tracepoint.c (cmd_qtsv): Adjust debug message.
9073 Don't check CUR_TPOINT.
9074
9075 2012-08-28 Yao Qi <yao@codesourcery.com>
9076
9077 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9078 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9079 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9080 Remove declarations of xmalloc, xreallloc, xstrdup and
9081 freeargv.
9082 * Makefile.in (libiberty_h): New.
9083 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9084 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9085
9086 2012-08-23 Yao Qi <yao@codesourcery.com>
9087
9088 * server.h: Remove declaration of 'xsnprintf'.
9089
9090 2012-08-22 Keith Seitz <keiths@redhat.com>
9091
9092 * server.h: Include build-gnulib-gbserver/config.h.
9093 * gdbreplay.c: Likewise.
9094
9095 2012-08-08 Doug Evans <dje@google.com>
9096
9097 * Makefile.in (SFILES): Add gdb_vecs.c.
9098 (OBS): Add gdb_vecs.o.
9099 (gdb_vecs_h, host_defs_h): New variables.
9100 (thread-db.o): Add $(gdb_vecs_h) dependency.
9101 (gdb_vecs.o): New rule.
9102 * thread-db.c: #include "gdb_vecs.h".
9103 (thread_db_load_search): Use a vector to iterate over path elements.
9104 Handle text appearing after "$pdir".
9105
9106 * configure.ac: Add check for strstr.
9107 * config.in: Regenerate.
9108 * configure: Regenerate.
9109
9110 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9111
9112 * hostio.c (handle_pread): If pread fails, fall back to attempting
9113 lseek/read.
9114 (handle_pwrite): Likewise for pwrite.
9115
9116 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9117
9118 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9119 between unsupported TYPE and unimplementable ADDR/LEN combination.
9120 (arm_insert_point): Act on new return value.
9121
9122 2012-07-31 Pedro Alves <palves@redhat.com>
9123
9124 * server.c (process_point_options): Only skip tokens if we find
9125 one that is unrecognized. Don't treat 'X' specially while
9126 skipping unrecognized tokens.
9127
9128 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9129
9130 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9131 to 4-byte-align HW breakpoint addresses for Thumb.
9132
9133 2012-07-27 Yao Qi <yao@codesourcery.com>
9134
9135 PR remote/14161.
9136
9137 * server.h: Declare gdb_agent_about_to_close.
9138 * target.c (kill_inferior): Include "agent.h".
9139 New. Send command 'kill'.
9140 * target.h (kill_inferior): Removed macro.
9141 * tracepoint.c (gdb_agent_about_to_close): New.
9142 (gdb_agent_helper_thread): Handle command 'close'.
9143 Wait endlessly until the inferior stops.
9144 Install gdb_agent_remove_socket to atexit hook.
9145 (agent_socket_name): New static variable.
9146 (gdb_agent_socket_init): Replace local variable 'name' with
9147 'agent_socket_name'.
9148 (gdb_agent_remove_socket): New.
9149
9150 2012-07-27 Yao Qi <yao@codesourcery.com>
9151
9152 * server.c (process_point_options): Stop at 'X' when parsing.
9153
9154 2012-07-19 Michael Eager <eager@eagercon.com>
9155
9156 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9157 to hw_execute.
9158 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9159 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9160 hardware breakpoint.
9161
9162 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9163
9164 * gdbserver/linux-low.c (initialize_low): Call
9165 linux_ptrace_init_warnings.
9166
9167 2012-07-02 Doug Evans <dje@google.com>
9168
9169 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9170 pointer to int.
9171
9172 2012-07-02 Stan Shebs <stan@codesourcery.com>
9173
9174 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9175 (ax.o): Add it to build rule.
9176 (ax-ipa.o): Ditto.
9177 (OBS): Add format.o.
9178 (IPA_OBS): Add format.o.
9179 * server.c (handle_query): Claim support for breakpoint commands.
9180 (process_point_options): Add command case.
9181 (process_serial_event): Leave running if there are printfs in
9182 effect.
9183 * mem-break.h (any_persistent_commands): Declare.
9184 (add_breakpoint_commands): Declare.
9185 (gdb_no_commands_at_breakpoint): Declare.
9186 (run_breakpoint_commands): Declare.
9187 * mem-break.c (struct point_command_list): New struct.
9188 (struct breakpoint): New field command_list.
9189 (any_persistent_commands): New function.
9190 (add_commands_to_breakpoint): New function.
9191 (add_breakpoint_commands): New function.
9192 (gdb_no_commands_at_breakpoint): New function.
9193 (run_breakpoint_commands): New function.
9194 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9195 locally.
9196 * ax.c: Include format.h.
9197 (ax_printf): New function.
9198 (gdb_eval_agent_expr): Add printf opcode.
9199
9200 2012-06-13 Yao Qi <yao@codesourcery.com>
9201
9202 * server.c (start_inferior): Remove duplicated writes to fields
9203 'last_resume_kind' and 'last_status' of 'current_inferior'.
9204
9205 2012-06-12 Yao Qi <yao@codesourcery.com>
9206 Pedro Alves <palves@redhat.com>
9207
9208 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9209 comment.
9210 * server.c (handle_v_cont): Extend comment.
9211
9212 2012-06-11 Yao Qi <yao@codesourcery.com>
9213
9214 * linux-low.c (linux_attach): Add 'static'.
9215
9216 2012-06-06 Yao Qi <yao@codesourcery.com>
9217
9218 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9219
9220 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9221
9222 Fix gcc -flto compilation warning.
9223 * server.c (main): Make variable multi_mode and attach volatile.
9224
9225 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9226
9227 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9228 if the platform doesn't know about it.
9229
9230 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9231
9232 * Makefile.in (SFILES): Add linux-tile-low.c.
9233 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9234 * configure.srv: Handle tilegx-*-linux*.
9235 * linux-tile-low.c: New file.
9236
9237 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9238
9239 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9240
9241 2012-05-24 Pedro Alves <palves@redhat.com>
9242
9243 PR gdb/7205
9244
9245 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9246
9247 2012-05-24 Pedro Alves <palves@redhat.com>
9248
9249 PR gdb/7205
9250
9251 Replace target_signal with gdb_signal throughout.
9252
9253 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9254
9255 * linux-low.c (linux_store_registers): Avoid the copying sequence
9256 when no data has been retrieved by ptrace.
9257
9258 2012-05-22 Will Deacon <will.deacon@arm.com>
9259
9260 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9261 Include asm/ptrace.h.
9262 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9263 already defined.
9264
9265 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9266
9267 * linux-low.c (linux_store_registers): Don't re-retrieve data
9268 with ptrace that has already been obtained from /proc. Always
9269 copy any data retrieved with ptrace to the buffer supplied.
9270
9271 2012-05-11 Yao Qi <yao@codesourcery.com>
9272 Pedro Alves <palves@redhat.com>
9273
9274 * linux-low.c (enum stopping_threads_kind): New.
9275 (stopping_threads): Change type to `enum stopping_threads_kind'.
9276 (handle_extended_wait): If stopping and suspending threads, leave
9277 the new_lwp suspended too.
9278 (linux_wait_for_event): Adjust.
9279 (stop_all_lwps): Set `stopping_threads' to
9280 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9281 whether we're suspending threads or just stopping them. Assert no
9282 recursion happens.
9283
9284 2012-04-29 Yao Qi <yao@codesourcery.com>
9285
9286 * server.h: Move some code to ...
9287 * gdbthread.h: ... here. New.
9288 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9289 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9290 (nto-low.o, win32-low.o): Likewise.
9291 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9292 * regcache.c, remote-utils.c, server.c: Likewise.
9293 * target.c, tracepoint.c, win32-low.c: Likewise.
9294
9295 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9296
9297 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9298 (PTRACE_ARG4_TYPE): Likewise.
9299 (PTRACE_XFER_TYPE): Likewise.
9300 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9301 ptrace to PTRACE_ARG3_TYPE.
9302 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9303 (PTRACE_ARG4_TYPE): Likewise.
9304 (PTRACE_XFER_TYPE): Likewise.
9305 (linux_detach_one_lwp): Cast fourth argument of
9306 ptrace to long then PTRACE_ARG4_TYPE.
9307 (regsets_fetch_inferior_registers): Cast third argument of
9308 ptrace to long then PTRACE_ARG3_TYPE.
9309 (regsets_store_inferior_registers): Likewise.
9310
9311 2012-04-20 Pedro Alves <palves@redhat.com>
9312
9313 * configure: Regenerate.
9314
9315 2012-04-19 Pedro Alves <palves@redhat.com>
9316
9317 * Makefile.in (GNULIB_BUILDDIR): New.
9318 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9319 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9320 (all, install-only, uninstall, clean-info, all-lib, clean): No
9321 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9322 (maintainer-clean realclean distclean): Use subdir_do.
9323 (subdir_do): New.
9324 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9325 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9326 * acinclude.m4: Include acx_configure_dir.m4.
9327 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9328 calls. Call AC_PROG_RANLIB. Configure gnulib using
9329 ACX_CONFIGURE_DIR.
9330 (GNULIB): New.
9331 (GNULIB_STDINT_H): Adjust.
9332 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9333 * gdbreplay.c: Include build-gnulib/config.h.
9334 * server.h: Likewise.
9335 * aclocal.m4: Regenerate.
9336 * config.in: Regenerate.
9337 * configure: Regenerate.
9338
9339 2012-04-19 Pedro Alves <palves@redhat.com>
9340
9341 * Makefile.in (LIBGNU, INCGNU): Adjust.
9342 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9343 (all, install-only, uninstall, clean-info, all-lib, clean)
9344 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9345 * configure.ac: Adjust AC_OUTPUT output.
9346 * aclocal.m4: Regenerate.
9347 * configure: Regenerate.
9348
9349 2012-04-19 Pedro Alves <palves@redhat.com>
9350
9351 * Makefile.in (generated_files): New.
9352 (server_h): Remove the explicit dependency on config.h, and depend
9353 on $generated_files.
9354
9355 2012-04-19 Pedro Alves <palves@redhat.com>
9356
9357 * Makefile.in (INCGNU): Add -Ignulib.
9358
9359 2012-04-19 Pedro Alves <palves@redhat.com>
9360
9361 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9362 (INCGNU): ... this, and spell out -I here.
9363 (GNULIB_LIB): Rename to ...
9364 (LIBGNU): ... this.
9365 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9366
9367 2012-04-19 Pedro Alves <palves@redhat.com>
9368
9369 * config.in: Regenerate.
9370
9371 2012-04-19 Pedro Alves <palves@redhat.com>
9372
9373 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9374 * server.h (memmem): Remove declaration.
9375 * config.in: Regenerate.
9376 * configure: Regenerate.
9377
9378 2012-04-19 Yao Qi <yao@codesourcery.com>
9379
9380 * Makefile.in (SFILES): Add common/vec.c.
9381 (OBS): Add vec.o.
9382 (vec.o): New rule.
9383
9384 2012-04-19 Yao Qi <yao@codesourcery.com>
9385
9386 * remote-utils.c (prepare_resume_reply): Replace with macro
9387 target_core_of_thread.
9388 * server.c (handle_qxfer_threads_proper): Likewise.
9389 * target.h (traget_core_of_thread): New macro.
9390
9391 2012-04-18 Pedro Alves <palves@redhat.com>
9392
9393 * aclocal.m4: Regenerate.
9394 * configure: Regenerate.
9395
9396 2012-04-16 Yao Qi <yao@codesourcery.com>
9397
9398 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9399 duplicated on address.
9400
9401 2012-04-16 Yao Qi <yao@codesourcery.com>
9402
9403 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9404 (struct tracepoint_action_ops) <send>: New field.
9405 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9406 (agent_expr_send, x_tracepoint_action_send): New.
9407 (l_tracepoint_action_send): New.
9408 (cmd_qtdp): Download and install tracepoint
9409 according to `use_agent'.
9410 (run_inferior_command): Add one more parameter `len'.
9411 Update callers.
9412 (tracepoint_send_agent): New.
9413 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9414
9415 2012-04-16 Yao Qi <yao@codesourcery.com>
9416
9417 * tracepoint.c (download_tracepoints): Moved to ...
9418 (cmd_qtstart): ... here.
9419
9420 2012-04-14 Yao Qi <yao@codesourcery.com>
9421
9422 * tracepoint.c: Include inttypes.h.
9423 (struct collect_memory_action): Use sized types.
9424 (struct tracepoint): Likewise.
9425 (cmd_qtdp, stop_tracing): Update print specifiers.
9426 (cmd_qtp, response_tracepoint): Likewise.
9427 (collect_data_at_tracepoint): Likewise.
9428 (collect_data_at_step): Likewise.
9429
9430 2012-04-14 Yao Qi <yao@codesourcery.com>
9431
9432 Import gnulib module inttypes.
9433 * aclocal.m4, config.in, configure: Regenerated.
9434
9435 2012-04-14 Yao Qi <yao@codesourcery.com>
9436
9437 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9438 Makefile and config.status at last.
9439
9440 2012-04-13 Yao Qi <yao@codesourcery.com>
9441
9442 * tracepoint.c: Include stdint.h unconditionally.
9443
9444 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9445
9446 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9447 on BFD_HAVE_SYS_PROCFS_TYPE.
9448 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9449 * configure: Regenerate.
9450 * config.in: Likewise.
9451
9452 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9453
9454 * Makefile.in (clean): Also remove x32.c x32-linux.c
9455 x32-avx.c x32-avx-linux.c.
9456 (x32.o): New target.
9457 (x32.c): Likewise.
9458 (x32-linux.o): Likewise.
9459 (x32-linux.c): Likewise.
9460 (x32-avx.o): Likewise.
9461 (x32-avx.c): Likewise.
9462 (x32-avx-linux.o): Likewise.
9463 (x32-avx-linux.c): Likewise.
9464
9465 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9466 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9467 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9468 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9469 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9470 i386/x32-avx-linux.xml.
9471
9472 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9473 (init_registers_x32_avx_linux): Likwise.
9474 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9475 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9476
9477 2012-04-13 Pedro Alves <palves@redhat.com>
9478
9479 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9480 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9481 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9482 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9483 the sub-make.
9484
9485 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9486
9487 * linux-x86-low.c (compat_x32_clock_t): New.
9488 (compat_x32_siginfo_t): Likewise.
9489 (compat_x32_siginfo_from_siginfo): Likewise.
9490 (siginfo_from_compat_x32_siginfo): Likewise.
9491 (linux_is_elf64): Likewise.
9492 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9493 and siginfo_from_compat_x32_siginfo for x32.
9494 (x86_arch_setup): Set linux_is_elf64.
9495
9496 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9497
9498 PR gdb/13969
9499 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9500 e_machine field.
9501 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9502 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9503 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9504 compatible with process.
9505
9506 2012-04-12 Yao Qi <yao@codesourcery.com>
9507
9508 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9509 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9510 (install-only, install-info, clean): Handle sub dir gnulib.
9511 (all-lib, am--refresh): New targets.
9512 (memmem.o): Remove target.
9513 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9514 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9515 (AC_REPLACE_FUNCS): Remove memmem.
9516 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9517 (AC_OUTPUT): Generate Makefile in gnulib/.
9518 * aclocal.m4, config.in, configure: Regenerated.
9519
9520 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9521
9522 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9523
9524 2012-04-05 Pedro Alves <palves@redhat.com>
9525
9526 -Werror=strict-aliasing
9527
9528 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9529 pointer.
9530
9531 2012-04-04 Pedro Alves <palves@redhat.com>
9532
9533 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9534 (sparc_store_gregset_from_stack, sparc_store_gregset)
9535 (sparc_breakpoint_at): Fix formatting.
9536
9537 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9538
9539 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9540 are available.
9541 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9542 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9543 * config.in: Regenerate.
9544 * configure: Likewise.
9545
9546 2012-03-29 Pedro Alves <palves@redhat.com>
9547
9548 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9549 Correct ptrace arguments.
9550
9551 2012-03-28 Pedro Alves <palves@redhat.com>
9552
9553 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9554 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9555 (IA64_FR1_REGNUM): New defines.
9556 (ia64_fetch_register): New.
9557 (the_low_target): Install it.
9558 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9559 field.
9560 * linux-low.c (linux_fetch_registers): Try the
9561 the_low_target.fetch_register hook first.
9562
9563 * linux-arm-low.c (the_low_target): Adjust.
9564 * linux-bfin-low.c (the_low_target): Adjust.
9565 * linux-cris-low.c (the_low_target): Adjust.
9566 * linux-crisv32-low.c (the_low_target): Adjust.
9567 * linux-m32r-low.c (the_low_target): Adjust.
9568 * linux-m68k-low.c (the_low_target): Adjust.
9569 * linux-mips-low.c (the_low_target): Adjust.
9570 * linux-ppc-low.c (the_low_target): Adjust.
9571 * linux-s390-low.c (the_low_target): Adjust.
9572 * linux-sh-low.c (the_low_target): Adjust.
9573 * linux-sparc-low.c (the_low_target): Adjust.
9574 * linux-tic6x-low.c (the_low_target): Adjust.
9575 * linux-x86-low.c (the_low_target): Adjust.
9576 * linux-xtensa-low.c (the_low_target): Adjust.
9577
9578 2012-03-26 Pedro Alves <palves@redhat.com>
9579
9580 * server.c (handle_qxfer_libraries): Don't bail early if
9581 the_target->qxfer_libraries_svr4 is not NULL.
9582
9583 2012-03-26 Pedro Alves <palves@redhat.com>
9584
9585 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9586
9587 2012-03-23 Pedro Alves <palves@redhat.com>
9588
9589 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9590 "library-list-svr4" element's start tag when the the DSO list is
9591 empty.
9592
9593 2012-03-23 Pedro Alves <palves@redhat.com>
9594
9595 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9596 a variable whose type size is the same as the inferior's pointer
9597 size.
9598
9599 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9600
9601 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9602 struct siginfo.
9603 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9604 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9605 * linux-low.h: Include <signal.h>.
9606 (struct siginfo): Remove forward declaration.
9607 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9608 struct siginfo.
9609
9610 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9611
9612 * .gitignore: Ignore more files.
9613
9614 2012-03-19 Pedro Alves <palves@redhat.com>
9615 Jan Kratochvil <jan.kratochvil@redhat.com>
9616
9617 * server.c (cont_thread, general_thread): Add describing comments.
9618 (start_inferior): Clear `cont_thread'.
9619 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9620 of a process.
9621
9622 2012-03-15 Yao Qi <yao@codesourcery.com>
9623
9624 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9625 handling to ...
9626 (cmd_qtdp): ... here.
9627
9628 2012-03-15 Yao Qi <yao@codesourcery.com>
9629
9630 * tracepoint.c (struct tracepoint_action_ops): New.
9631 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9632 (m_tracepoint_action_download): New.
9633 (r_tracepoint_action_download): New.
9634 (x_tracepoint_action_download): New.
9635 (l_tracepoint_action_download): New.
9636 (add_tracepoint_action): Install `action->ops' according type.
9637 (download_tracepoint_1): Move code `download' function pointer
9638 of various tracepoint_action_ops.
9639
9640 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9641
9642 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9643 linux_ptrace_attach_warnings.
9644
9645 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9646
9647 * Makefile.in (linux-ptrace.o): New.
9648 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9649 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9650 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9651 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9652 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9653 of these targets.
9654 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9655
9656 2012-03-08 Yao Qi <yao@codesourcery.com>
9657 Pedro Alves <palves@redhat.com>
9658
9659 Fix PR server/13392.
9660 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9661 offset of JMP insn.
9662 * tracepoint.c (remove_tracepoint): New.
9663 (cmd_qtdp): Call remove_tracepoint when failed to install.
9664
9665 2012-03-07 Pedro Alves <palves@redhat.com>
9666
9667 * linux-low.c (get_detach_signal): New.
9668 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9669 Pass on pending signals to PTRACE_DETACH. Check the result of the
9670 ptrace call.
9671 * server.c (program_signals, program_signals_p): New.
9672 (handle_general_set): Handle QProgramSignals.
9673 * server.h (program_signals, program_signals_p): Declare.
9674
9675 2012-03-05 Pedro Alves <palves@redhat.com>
9676 Jan Kratochvil <jan.kratochvil@redhat.com>
9677
9678 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9679 New comment why.
9680
9681 2012-03-03 Yao Qi <yao@codesourcery.com>
9682
9683 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9684 agent_look_up_symbols.
9685
9686 2012-03-03 Yao Qi <yao@codesourcery.com>
9687
9688 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9689 (linux-x86-low.o): Likewise.
9690 * server.h: Remove in_process_agent_loaded.
9691 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9692 common/agent.c.
9693 Update callers.
9694
9695 2012-03-03 Yao Qi <yao@codesourcery.com>
9696
9697 * tracepoint.c (gdb_agent_capability): New global.
9698 (in_process_agent_loaded_ust): Renamed to
9699 `in_process_agent_supports_ust'.
9700 Update callers.
9701 (in_process_agent_supports_ust): Call agent_capability_check.
9702 (clear_installed_tracepoints): Assert that agent supports
9703 agent.
9704
9705 2012-03-03 Yao Qi <yao@codesourcery.com>
9706
9707 * linux-low.c (linux_supports_agent): New.
9708 (linux_target_ops): Initialize field `supports_agent' with
9709 linux_supports_agent.
9710 * target.h (struct target_ops) <supports_agent>: New.
9711 (target_supports_agent): New macro.
9712 * server.c (handle_general_set): Handle packet 'QAgent'.
9713 (handle_query): Send `QAgent+'.
9714 * Makefile.in (server.o): Depends on agent.h.
9715
9716 2012-03-03 Yao Qi <yao@codesourcery.com>
9717
9718 * Makefile.in (OBS): Add agent.o.
9719 Add new rule for agent.o.
9720 Track dependence of tracepoint.c on agent.h.
9721 * tracepoint.c (run_inferior_command_1):
9722 (run_inferior_command): Call agent_run_command.
9723 (gdb_ust_connect_sync_socket): Deleted. Move it to
9724 common/agent.c.
9725 (resume_thread, stop_thread): Likewise.
9726 (gdb_ust_socket_init): Renamed to ...
9727 (gdb_agent_socket_init): ... New.
9728 (gdb_ust_thread): Renamed to ...
9729 (gdb_agent_helper_thread): ... New.
9730 (gdb_ust_init): Move some code to ...
9731 (gdb_agent_init): ... here. New.
9732 [HAVE_UST]: Call gdb_ust_init.
9733 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9734 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9735 * config.in, configure: Regenerated.
9736
9737 2012-03-02 Pedro Alves <palves@redhat.com>
9738
9739 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9740 * linux-low.c (struct simple_pid_list): New.
9741 (stopped_pids): New a struct simple_pid_list pointer.
9742 (add_to_pid_list, pull_pid_from_list): New.
9743 (handle_extended_wait): Don't assume the first signal new children
9744 report is SIGSTOP. Adjust call to pull_pid_from_list.
9745 (linux_wait_for_lwp): Adjust.
9746
9747 2012-03-02 Yao Qi <yao@codesourcery.com>
9748
9749 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9750 debug log.
9751
9752 2012-03-02 Yao Qi <yao@codesourcery.com>
9753
9754 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9755 `stop_pc' and `tpoint'. Update caller.
9756
9757 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9758
9759 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9760 * linux-low.c (use_linux_regsets): New macro.
9761 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9762 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9763 (linux_register_in_regsets): New function.
9764 (usr_fetch_inferior_registers): Skip registers covered by
9765 regsets.
9766 (usr_store_inferior_registers): Likewise.
9767 (usr_fetch_inferior_registers): New macro.
9768 (usr_store_inferior_registers): Likewise.
9769 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9770 (linux_store_registers): Likewise.
9771 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9772 prototype.
9773 (init_registers_mips64_dsp_linux): Likewise.
9774 (init_registers_mips_linux): New macro.
9775 (init_registers_mips_dsp_linux): Likewise.
9776 (mips_dsp_num_regs): Likewise.
9777 (DSP_BASE, DSP_CONTROL): New fallback macros.
9778 (mips_base_regs): New macro.
9779 (mips_regmap): Use it. Fix the size.
9780 (mips_dsp_regmap): New variable.
9781 (mips_dsp_regset_bitmap): Likewise.
9782 (mips_arch_setup): New function.
9783 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9784 than mips_regmap.
9785 (mips_cannot_store_register): Likewise.
9786 (the_low_target): Update .arch_setup, .num_regs and .regmap
9787 initializers. Add .regset_bitmap initializer.
9788 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9789 initializer.
9790 * linux-bfin-low.c (the_low_target): Likewise.
9791 * linux-cris-low.c (the_low_target): Likewise.
9792 * linux-crisv32-low.c (the_low_target): Likewise.
9793 * linux-ia64-low.c (the_low_target): Likewise.
9794 * linux-m32r-low.c (the_low_target): Likewise.
9795 * linux-m68k-low.c (the_low_target): Likewise.
9796 * linux-ppc-low.c (the_low_target): Likewise.
9797 * linux-s390-low.c (the_low_target): Likewise.
9798 * linux-sh-low.c (the_low_target): Likewise.
9799 * linux-sparc-low.c (the_low_target): Likewise.
9800 * linux-tic6x-low.c (the_low_target): Likewise.
9801 * linux-x86-low.c (the_low_target): Likewise.
9802 * linux-xtensa-low.c (the_low_target): Likewise.
9803 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9804 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9805 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9806 srv_xmlfiles.
9807 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9808 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9809
9810 2012-02-29 Yao Qi <yao@codesourcery.com>
9811 Pedro Alves <palves@redhat.com>
9812
9813 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9814 `step_over_finished' is true.
9815
9816 2012-02-27 Pedro Alves <palves@redhat.com>
9817
9818 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9819 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9820
9821 2012-02-27 Pedro Alves <palves@redhat.com>
9822
9823 PR server/9684
9824 * linux-low.c (pid_is_stopped): New.
9825 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9826
9827 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9828
9829 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9830 of conditions.
9831
9832 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9833
9834 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9835
9836 2012-02-24 Luis Machado <lgustavo@codesourcery>
9837
9838 * server.c (handle_query): Advertise support for target-side
9839 breakpoint condition evaluation.
9840 (process_point_options): New function.
9841 (process_serial_event): When inserting a breakpoint, check for
9842 a target-side condition that should be evaluated.
9843
9844 * mem-break.c: Include regcache.h and ax.h.
9845 (point_cond_list_t): New data structure.
9846 (breakpoint) <cond_list>: New field.
9847 (find_gdb_breakpoint_at): Make non-static.
9848 (delete_gdb_breakpoint_at): Clear any target-side
9849 conditions.
9850 (clear_gdb_breakpoint_conditions): New function.
9851 (add_condition_to_breakpoint): Likewise.
9852 (add_breakpoint_condition): Likewise.
9853 (gdb_condition_true_at_breakpoint): Likewise.
9854 (gdb_breakpoint_here): Return result directly instead
9855 of going through a local variable.
9856
9857 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9858 (clear_gdb_breakpoint_conditions): Likewise.
9859 (add_breakpoint_condition): Likewise.
9860 (gdb_condition_true_at_breakpoint): Likewise.
9861
9862 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9863 (need_step_over_p): Take target-side breakpoint condition into
9864 consideration.
9865
9866 2012-02-24 Luis Machado <lgustavo@codesourcery>
9867
9868 * server.h: Include tracepoint.h.
9869 (agent_mem_read, agent_get_trace_state_variable_value,
9870 agent_set_trace_state_variable_value,
9871 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9872 get_set_tsv_func_addr): New prototypes.
9873
9874 * ax.h: New include file.
9875 * ax.c: New source file.
9876
9877 * tracepoint.c: Include ax.h.
9878 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9879 agent_expr, eval_result_type): Move to ax.h.
9880 (parse_agent_expr): Rename to ...
9881 (gdb_parse_agent_expr): ... this, make it non-static and move
9882 to ax.h.
9883 (unparse_agent_expr) Rename to ...
9884 (gdb_unparse_agent_expr): ... this, make it non-static and move
9885 to ax.h.
9886 (eval_agent_expr): Rename to ...
9887 (eval_tracepoint_agent_expr): ... this.
9888 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9889 forward declarations.
9890 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9891 (agent_get_trace_state_variable_value): New function.
9892 (agent_set_trace_state_variable_value): New function.
9893 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9894 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9895 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9896 (condition_true_at_tracepoint): Likewise.
9897 (parse_agent_expr): Rename to ...
9898 (gdb_parse_agent_expr): ... this and move to ax.c.
9899 (unparse_agent_expr): Rename to ...
9900 (gdb_unparse_agent_expr): ... this and move to ax.c.
9901 (gdb_agent_op_name): Move to ax.c.
9902 (eval_agent_expr): Rename to ...
9903 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9904 and move to ax.c.
9905 (eval_tracepoint_agent_expr): New function.
9906 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9907 non-static.
9908 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9909 ax.c.
9910 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9911 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9912 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9913 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9914 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9915 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9916 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9917 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9918 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9919 (compile_bytecodes): Remove forward declaration.
9920 (is_goto_target): Move to ax.c.
9921 (compile_bytecodes): Move to ax.c and call
9922 agent_get_trace_state_variable_value (...) and
9923 agent_set_trace_state_variable_value (...).
9924
9925 * Makefile.in: Update ax.c and IPA dependencies.
9926
9927 2012-02-24 Pedro Alves <palves@redhat.com>
9928
9929 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9930 (cmd_bigqtbuffer_circular): ... this. Only handle
9931 'QTBuffer:circular:'.
9932 (handle_tracepoint_general_set): Adjust.
9933
9934 2012-02-16 Yao Qi <yao@codesourcery.com>
9935
9936 * inferiors.c: Move code to ...
9937 * dll.c: .... here. New.
9938 * server.h: Declare clear_dlls.
9939 * Makefile.in (SFILES): Add dll.c.
9940 (OBS): Add dll.o
9941 (dll.o): New rule.
9942
9943 2012-02-11 Yao Qi <yao@codesourcery.com>
9944
9945 * server.c: (handle_monitor_command): Add a new parameter
9946 `own_buf'.
9947 (handle_query): Update caller.
9948
9949 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9950
9951 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9952 * configure, config.in: Regenerate.
9953 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9954 is not defined.
9955
9956 2012-02-02 Pedro Alves <palves@redhat.com>
9957
9958 Try SIGKILL first, then PTRACE_KILL.
9959 * linux-low.c (linux_kill_one_lwp): New.
9960 (linux_kill_one_lwp): Rename to ...
9961 (kill_one_lwp_callback): ... this. Use the new
9962 linux_kill_one_lwp.
9963
9964 2012-02-02 Pedro Alves <palves@redhat.com>
9965
9966 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9967 inferior.
9968
9969 2012-01-27 Pedro Alves <palves@redhat.com>
9970
9971 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9972 (elf_64_file_p): Make static.
9973 (linux_pid_exe_is_elf_64_file): New.
9974 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9975 Delete declarations.
9976 (linux_pid_exe_is_elf_64_file): Declare.
9977 * linux-x86-low.c (x86_arch_setup): Use
9978 linux_pid_exe_is_elf_64_file.
9979
9980 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9981
9982 * linux-low.c (linux_wait_for_event_1): Rename to ...
9983 (linux_wait_for_event): ... here and merge it with former
9984 linux_wait_for_event - new variable wait_ptid, use it.
9985 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9986
9987 2012-01-23 Pedro Alves <palves@redhat.com>
9988
9989 * server.c (main): Avoid yet another case of infinite loop while
9990 detaching/killing after a longjmp.
9991
9992 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9993
9994 Code cleanup.
9995 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9996
9997 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9998
9999 * hostio.c (handle_readlink): New function.
10000 (handle_vFile): Call it to handle "vFile:readlink" packets.
10001
10002 2012-01-20 Pedro Alves <palves@redhat.com>
10003 Ulrich Weigand <ulrich.weigand@linaro.org>
10004
10005 * server.c (handle_v_requests): Only support vAttach and vRun to
10006 start multiple processes when in extended protocol mode.
10007
10008 2012-01-17 Pedro Alves <palves@redhat.com>
10009
10010 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10011 memalign plus mprotect to allocate the scratch buffer.
10012
10013 2012-01-13 Pedro Alves <palves@redhat.com>
10014
10015 * server.c (attach_inferior): Clear `cont_thread'.
10016
10017 2012-01-13 Pedro Alves <palves@redhat.com>
10018
10019 * server.c (main): Avoid infinite loop while detaching/killing
10020 after a longjmp.
10021
10022 2012-01-09 Doug Evans <dje@google.com>
10023
10024 * server.c (start_inferior): Set last_ptid in --wrapper case.
10025
10026 2012-01-06 Yao Qi <yao@codesourcery.com>
10027
10028 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10029 defined.
10030 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10031
10032 2012-01-04 Yao Qi <yao@codesourcery.com>
10033
10034 * tracepoint.c (cmd_qtdp): Print debug message
10035 for static tracepoint.
10036
10037 2012-01-04 Yao Qi <yao@codesourcery.com>
10038
10039 * tracepoint.c (trace_vdebug): Differentiate debug message
10040 between gdbserver and IPA.
10041
10042 2012-01-03 Yao Qi <yao@codesourcery.com>
10043
10044 * tracepoint.c (tracepoint_was_hit): Don't collect for
10045 static tracepoint.
10046
10047 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10048
10049 * terminal.h: Reformat copyright header.
10050
10051 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10052
10053 * server.c (gdbserver_version): Update copyright year.
10054 * gdbreplay.c (gdbreplay_version): Likewise.
10055
10056 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10057
10058 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10059
10060 Revert:
10061 2011-12-18 Hui Zhu <teawater@gmail.com>
10062 * linux-low.c (linux_create_inferior): Save return value to ret.
10063
10064 2011-12-18 Hui Zhu <teawater@gmail.com>
10065
10066 * linux-low.c (linux_create_inferior): Save return value to ret.
10067
10068 2011-12-16 Doug Evans <dje@google.com>
10069
10070 * linux-low.c (linux_create_inferior): If stdio connection,
10071 redirect stdin from /dev/null, stdout to stderr.
10072 * remote-utils.c (remote_is_stdio): New static global.
10073 (remote_connection_is_stdio): New function.
10074 (remote_prepare): Handle stdio connection.
10075 (remote_open): Ditto.
10076 (remote_close): Don't close stdin for stdio connections.
10077 (read_prim,write_prim): New functions. Replace all calls to
10078 read/write to these.
10079 * server.c (main): Watch for "-" argument. Move call to
10080 remote_prepare before start_inferior.
10081 * server.h (STDIO_CONNECTION_NAME): New macro.
10082 (remote_connection_is_stdio): Declare.
10083
10084 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10085 in debugging output.
10086
10087 2011-12-15 Yao Qi <yao@codesourcery.com>
10088
10089 * tracepoint.c: Include sys/syscall.h.
10090 (gdb_ust_thread): Remove preprocessor conditional.
10091
10092 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10093
10094 * linux-low.c (linux_detach_one_lwp): Call
10095 the_low_target.prepare_to_resume before detaching.
10096
10097 2011-12-14 Yao Qi <yao@codesourcery.com>
10098
10099 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10100 of write.
10101
10102 2011-12-14 Yao Qi <yao@codesourcery.com>
10103
10104 * i386-low.c (i386_low_stopped_data_address): Initialize local
10105 variable `control'.
10106
10107 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10108
10109 PR remote/13492
10110
10111 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10112 DR_CONTROL unless necessary. Extend comments.
10113 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10114 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10115
10116 2011-12-13 Yao Qi <yao@codesourcery.com>
10117
10118 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10119 macros.
10120 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10121
10122 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10123
10124 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10125 Print new debug message for such case.
10126
10127 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10128
10129 Fix overlapping memcpy.
10130 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10131 the read_inferior_memory transfer.
10132 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10133 write_inferior_memory transfer.
10134 (set_fast_tracepoint_jump): New variable buf. Use it for the
10135 read_inferior_memory and write_inferior_memory transfers.
10136 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10137 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10138 Use it for the write_inferior_memory transfer.
10139 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10140 buffers.
10141
10142 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10143
10144 * linux-low.c (fetch_register, store_register): Make code
10145 consistent, fix formatting.
10146
10147 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10148
10149 * linux-low.c (usr_store_inferior_registers): Factor out code
10150 to handle individual registers into...
10151 (store_register): ... this new function.
10152
10153 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10154
10155 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10156 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10157 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10158 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10159 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10160 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10161 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10162 (srv_xmlfiles): Add new XML files.
10163
10164 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10165 and <sys/uio.h>.
10166 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10167 (init_registers_s390_linux32v1): Add prototype.
10168 (init_registers_s390_linux32v2): Likewise.
10169 (init_registers_s390_linux64v1): Likewise.
10170 (init_registers_s390_linux64v2): Likewise.
10171 (init_registers_s390x_linux64v1): Likewise.
10172 (init_registers_s390x_linux64v2): Likewise.
10173 (s390_num_regs): Increment to 52.
10174 (s390_regmap): Add orig_r2 register.
10175 (s390_num_regs_3264): Increment to 68.
10176 (s390_regmap_3264): Add orig_r2 register.
10177 (s390_collect_ptrace_register): Handle orig_r2 register.
10178 (s390_supply_ptrace_register): Likewise.
10179 (s390_fill_last_break): New function.
10180 (s390_store_last_break): Likewise.
10181 (s390_fill_system_call): New function.
10182 (s390_store_system_call): Likewise.
10183 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10184 register sets.
10185 (s390_check_regset): New function.
10186 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10187 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10188 Update target_regsets for available register sets.
10189
10190 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10191 Jan Kratochvil <jan.kratochvil@redhat.com>
10192
10193 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10194 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10195 New.
10196 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10197 * linux-low.h (struct process_info_private): New member r_debug.
10198 * server.c (handle_qxfer_libraries): Call
10199 the_target->qxfer_libraries_svr4.
10200 (handle_qxfer_libraries_svr4): New function.
10201 (qxfer_packets): New entry "libraries-svr4".
10202 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10203 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10204 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10205 PACKET_qXfer_libraries_svr4.
10206
10207 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10208
10209 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10210 PSW address/mask between 8-byte and 16-byte formats.
10211 (s390_supply_ptrace_register): Likewise.
10212 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10213 basic addressing mode bit.
10214
10215 2011-11-24 Stan Shebs <stan@codesourcery.com>
10216
10217 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10218
10219 2011-11-17 Stan Shebs <stan@codesourcery.com>
10220
10221 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10222 (tracing_start_time): New global.
10223 (tracing_stop_time): New global.
10224 (tracing_user_name): New global.
10225 (tracing_notes): New global.
10226 (tracing_stop_note): New global.
10227 (cmd_qtstart): Set traceframe_usage, start_time.
10228 (stop_tracing): Set stop_time.
10229 (cmd_qtstatus): Report additional status.
10230 (cmd_qtp): New function.
10231 (handle_tracepoint_query): Call it.
10232 (cmd_qtnotes): New function.
10233 (handle_tracepoint_general_set): Call it.
10234 (get_timestamp): Rename from tsv_get_timestamp.
10235
10236 2011-11-14 Stan Shebs <stan@codesourcery.com>
10237 Kwok Cheung Yeung <kcy@codesourcery.com>
10238
10239 * linux-x86-low.c (small_jump_insn): New.
10240 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10241 trampoline and error message, build a trampoline and issue a small
10242 jump instruction to it.
10243 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10244 trampoline and error message.
10245 (x86_get_min_fast_tracepoint_insn_len): New.
10246 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10247 * linux-low.h (struct linux_target_ops): Add arguments to
10248 install_fast_tracepoint_jump_pad operation, add new operation.
10249 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10250 arguments.
10251 (linux_get_min_fast_tracepoint_insn_len): New function.
10252 (linux_target_op): Add new operation.
10253 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10254 (gdb_trampoline_buffer_end): Ditto.
10255 (gdb_trampoline_buffer_error): Ditto.
10256 (struct ipa_sym_addresses): Add fields for new IPA variables.
10257 (symbol_list): Add entries for new IPA variables.
10258 (struct tracepoint): Add fields to hold the address range of the
10259 trampoline used by the tracepoint.
10260 (trampoline_buffer_head): New static variable.
10261 (trampoline_buffer_tail): Ditto.
10262 (claim_trampoline_space): New function.
10263 (have_fast_tracepoint_trampoline_buffer): New function.
10264 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10265 structure.
10266 (install_fast_tracepoint): Ditto, also add error buffer argument.
10267 (cmd_qtminftpilen): New function.
10268 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10269 (fast_tracepoint_from_trampoline_address): New function.
10270 (fast_tracepoint_collecting): Handle trampoline as part of jump
10271 pad space.
10272 (set_trampoline_buffer_space): New function.
10273 (initialize_tracepoint): Initialize new IPA variables.
10274 * target.h (struct target_ops): Add arguments to
10275 install_fast_tracepoint_jump_pad operation, add new
10276 get_min_fast_tracepoint_insn_len operation.
10277 (target_get_min_fast_tracepoint_insn_len): New.
10278 (install_fast_tracepoint_jump_pad): Add arguments.
10279 * server.h (IPA_BUFSIZ): Define.
10280 * linux-i386-ipa.c: Include extra header files.
10281 (initialize_fast_tracepoint_trampoline_buffer): New function.
10282 (initialize_low_tracepoint): Call it.
10283 * server.h (set_trampoline_buffer_space): Declare.
10284 (claim_trampoline_space): Ditto.
10285 (have_fast_tracepoint_trampoline_buffer): Ditto.
10286
10287 2011-11-14 Yao Qi <yao@codesourcery.com>
10288
10289 * server.c (handle_query): Handle InstallInTrace for qSupported.
10290 * tracepoint.c (add_tracepoint): Sort list.
10291 (install_tracepoint, download_tracepoint): New.
10292 (cmd_qtdp): Call them to install and download tracepoints.
10293 (sort_tracepoints): Removed.
10294 (cmd_qtstart): Update.
10295
10296 2011-11-14 Yao Qi <yao@codesourcery.com>
10297
10298 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10299 * mem-break.h: Declare.
10300 * tracepoint.c (cmd_qtstart): Move some code to ...
10301 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10302 New.
10303 (download_tracepoints): Move some code to ...
10304 (download_tracepoint_1): ... here. New.
10305
10306 2011-11-08 Yao Qi <yao@codesourcery.com>
10307
10308 * remote-utils.c (relocate_instruction): A comment fix.
10309
10310 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10311
10312 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10313 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10314 dr_status_mirror and dr_control_mirror from debug_reg_state.
10315 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10316 (i386_initial_stuff): Remove use of deleted globals.
10317 (i386_get_thread_context, i386_set_thread_context,
10318 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10319 from debug_reg_state.
10320
10321 2011-11-05 Yao Qi <yao@codesourcery.com>
10322
10323 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10324 address as TPOINT's.
10325
10326 2011-11-02 Stan Shebs <stan@codesourcery.com>
10327
10328 * tracepoint.c (agent_mem_read_string): New function.
10329 (eval_agent_expr): Call it for tracenz.
10330 * server.c (handle_query): Report support for tracenz.
10331
10332 2011-11-02 Yao Qi <yao@codesourcery.com>
10333
10334 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10335
10336 2011-11-02 Yao Qi <yao@codesourcery.com>
10337
10338 * target.h: Fix a typo in comment.
10339
10340 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10341
10342 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10343 clobber the breakpoints' shadows with fast tracepoint jumps.
10344 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10345 * target.c (write_inferior_memory): Also pass MYADDR down to
10346 check_mem_write.
10347
10348 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10349
10350 * configure.ac: Check support for personality routine.
10351 * configure: Regenerate.
10352 * config.in: Likewise.
10353 * linux-low.c: Include <sys/personality.h>.
10354 Define ADDR_NO_RANDOMIZE if necessary.
10355 (linux_create_inferior): Disable address space randomization when
10356 forking inferior, if requested.
10357 (linux_supports_disable_randomization): New function.
10358 (linux_target_ops): Install it.
10359 * server.h (disable_randomization): Declare.
10360 * server.c (disable_randomization): New global variable.
10361 (handle_general_set): Handle QDisableRandomization.
10362 (handle_query): Likewise for qSupported.
10363 (main): Support --disable-randomization and --no-disable-randomization
10364 command line arguments.
10365 * target.h (struct target_ops): Add supports_disable_randomization.
10366 (target_supports_disable_randomization): New macro.
10367
10368 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10369
10370 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10371 ifdef check.
10372 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10373 [!PT_GETDSBT] (target_loadmap): New definition.
10374 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10375 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10376 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10377 and PT_GETDSBT to LINUX_LOADMAP.
10378 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10379 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10380
10381 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10382
10383 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10384 (arm_linux_hwbp_cap): New static variable.
10385 (arm_linux_get_hwbp_cap): Replace by ...
10386 (arm_linux_init_hwbp_cap): ... this new function.
10387 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10388 (arm_linux_get_hw_watchpoint_count): Likewise.
10389 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10390 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10391 (arm_prepare_to_resume): Use perror_with_name instead of error.
10392
10393 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10394
10395 * linux-arm-low.c: Include <signal.h>.
10396 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10397 (struct arm_linux_hwbp_cap): New data type.
10398 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10399 (struct arm_linux_hw_breakpoint): New data type.
10400 (MAX_BPTS, MAX_WPTS): Define.
10401 (struct arch_process_info, struct arch_lwp_info): New data types.
10402 (arm_linux_get_hwbp_cap): New function.
10403 (arm_linux_get_hw_breakpoint_count): Likewise.
10404 (arm_linux_get_hw_watchpoint_count): Likewise.
10405 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10406 (arm_hwbp_control_initialize): Likewise.
10407 (arm_hwbp_control_is_enabled): Likewise.
10408 (arm_hwbp_control_is_initialized): Likewise.
10409 (arm_hwbp_control_disable): Likewise.
10410 (arm_linux_hw_breakpoint_equal): Likewise.
10411 (arm_linux_hw_point_initialize): Likewise.
10412 (struct update_registers_data): New data structure.
10413 (update_registers_callback: New function.
10414 (arm_insert_point): Likewise.
10415 (arm_remove_point): Likewise.
10416 (arm_stopped_by_watchpoint): Likewise.
10417 (arm_stopped_data_address): Likewise.
10418 (arm_new_process): Likewise.
10419 (arm_new_thread): Likewise.
10420 (arm_prepare_to_resume): Likewise.
10421 (the_low_target): Register arm_insert_point, arm_remove_point,
10422 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10423 arm_new_thread, and arm_prepare_to_resume.
10424
10425 2011-09-15 Stan Shebs <stan@codesourcery.com>
10426
10427 * server.h (struct emit_ops): Add compare-goto fields.
10428 * tracepoint.c (gdb_agent_op_sizes): New table.
10429 (emit_eq_goto): New function.
10430 (emit_ne_goto): New function.
10431 (emit_lt_goto): New function.
10432 (emit_le_goto): New function.
10433 (emit_gt_goto): New function.
10434 (emit_ge_goto): New function.
10435 (is_goto_target): New function.
10436 (compile_bytecodes): Recognize special cases of compare-goto
10437 combinations and call specialized emitters for them.
10438 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10439 (amd64_emit_ne_goto): New function.
10440 (amd64_emit_lt_goto): New function.
10441 (amd64_emit_le_goto): New function.
10442 (amd64_emit_gt_goto): New function.
10443 (amd64_emit_ge_goto): New function.
10444 (amd64_emit_ops): Add the new functions.
10445 (i386_emit_eq_goto): New function.
10446 (i386_emit_ne_goto): New function.
10447 (i386_emit_lt_goto): New function.
10448 (i386_emit_le_goto): New function.
10449 (i386_emit_gt_goto): New function.
10450 (i386_emit_ge_goto): New function.
10451 (i386_emit_ops): Add the new functions.
10452
10453 2011-09-08 Stan Shebs <stan@codesourcery.com>
10454
10455 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10456 (i386_emit_epilogue): Restore %ebx.
10457
10458 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10459
10460 * server.c (step_thread): Remove definition.
10461 (process_serial_event): Don't handle Hs.
10462 * server.h (step_thread): Remove declaration.
10463 * target.c (set_desired_inferior): Remove use of step_thread.
10464
10465 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10466
10467 * linux-low.c: Include linux-procfs.h.
10468 (linux_attach_lwp_1): Update comments.
10469 (linux_attach): Scan for existing threads when attaching to a
10470 process that is the tgid.
10471 * Makefile.in: Update dependencies.
10472
10473 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10474
10475 * configure.srv: Add linux-procfs.o dependencies.
10476
10477 2011-08-14 Yao Qi <yao@codesourcery.com>
10478
10479 * target.h (struct target_ops): Fix indent.
10480 * win32-low.c (win32_target_ops): Fix comment.
10481
10482 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10483 Yao Qi <yao@codesourcery.com>
10484
10485 * Makefile.in (clean): Remove tic6x-*.c files.
10486 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10487 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10488 (tic6x-c64xp-linux.c): Likewise.
10489 * configure.srv: Add support for tic6x-*-uclinux.
10490 * linux-tic6x-low.c: New.
10491 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10492
10493 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10494 Yao Qi <yao@codesourcery.com>
10495
10496 * target.h (struct target_ops): Add read_loadmap.
10497 * linux-low.c (struct target_loadseg): New type.
10498 (struct target_loadmap): New type.
10499 (linux_read_loadmap): New function.
10500 (linux_target_ops): Add linux_read_loadmap.
10501 * server.c (handle_query): Support qXfer:fdpic:read packet.
10502 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10503 to NULL.
10504
10505 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10506
10507 * win32-low.c: Include <stdint.h>.
10508
10509 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10510
10511 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10512 to the inferior here.
10513 (i386_remove_aligned_watchpoint): Ditto.
10514 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10515 fit part of the watchpoint in the debug registers.
10516 (i386_update_inferior_debug_regs): New.
10517 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10518 registers, and only update the inferior on success.
10519 (i386_low_remove_watchpoint): Ditto.
10520
10521 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10522
10523 * linux-low.c (compare_ints, unique, list_threads, show_process,
10524 linux_core_of_thread): Delete.
10525 (linux_target_ops): Change linux_core_of_thread to
10526 linux_common_core_of_thread.
10527 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10528 * utils.c (malloc_failure): Change type of argument.
10529 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10530 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10531 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10532 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10533 (IPA_OBJS): Add common-utils-ipa.o.
10534 (ptid_h, linux_osdata_h): New macros.
10535 (server_h): Add common/common-utils.h, common/xml-utils.h,
10536 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10537 common/ptid.h.
10538 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10539 ptid.o, buffer.o): New rules.
10540 (linux-low.o): Add common/linux-osdata.h as a dependency.
10541 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10542 * configure.ac: Add AC_HEADER_DIRENT check.
10543 * config.in: Regenerate.
10544 * configure: Regenerate.
10545 * remote-utils.c (xml_escape_text): Delete.
10546 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10547 buffer_xml_printf): Move to common/buffer.c.
10548 * server.c (main): Remove call to initialize_inferiors.
10549 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10550 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10551 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10552 internal_error, gdb_assert, gdb_assert_fail): Delete.
10553 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10554 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10555 common/buffer.h.
10556 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10557 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10558 initialize_inferiors): Delete.
10559
10560 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10561
10562 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10563 symbol error.
10564
10565 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10566
10567 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10568 assertion.
10569 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10570
10571 2011-05-26 Yao Qi <yao@codesourcery.com>
10572
10573 * Makefile.in (thread-db.o): Track dependence to
10574 common/gdb_thread_db.h.
10575 * thread-db.c: include gdb_thread_db.h from right place.
10576
10577 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10578
10579 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10580 __FILE__ and __LINE__ to internal_error.
10581
10582 2011-05-13 Doug Evans <dje@google.com>
10583
10584 * thread-db.c (try_thread_db_load_from_sdir): New function.
10585 (try_thread_db_load_from_dir): New function.
10586 (thread_db_load_search): Handle $sdir, ignore $pdir.
10587 Remove trying of system directories if search of
10588 libthread-db-search-path fails, that is now done via $sdir.
10589
10590 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10591
10592 * server.c (handle_query): Add EnableDisableTracepoints to the list
10593 of supported features.
10594 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10595 tracepoints.
10596 (cmd_qtenable_disable): New.
10597 (cmd_qtstart): Install tracepoints even if disabled.
10598 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10599 receiving a QTEnable or QTDisable packet.
10600 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10601 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10602 tracepoints.
10603 (gdb_probe): Skip data collection if static tracepoint is disabled.
10604
10605 2011-05-10 Doug Evans <dje@google.com>
10606
10607 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10608
10609 2011-05-04 Doug Evans <dje@google.com>
10610
10611 * linux-low.c (linux_join): Skip process lookup.
10612 * spu-low.c (spu_join): Ditto.
10613 * server.c (join_inferiors_callback): Delete.
10614 (process_serial_event): For 'D' packet (detach) call join_inferior
10615 directly.
10616
10617 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10618
10619 * README: Don't mention xscale*-*-linux*.
10620 * configure.srv (xscale*-*-linux*): Don't handle target.
10621
10622 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10623
10624 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10625 casting pointers.
10626 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10627 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10628 (i386_emit_void_call_2): Likewise.
10629
10630 2011-04-26 Yao Qi <yao@codesourcery.com>
10631
10632 * linux-low.c: Move common macros to linux-ptrace.h.
10633 Include linux-ptrace.h.
10634 * Makefile.in (linux_ptrace_h): New.
10635 (linux-low.o): Depends on linux-ptrace.h.
10636
10637 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10638
10639 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10640 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10641 (remote_prepare): New function with most of the TCP code from ...
10642 (remote_open): ... here. Detect PORT here unconditionally. Move also
10643 setting transport_is_reliable.
10644 * server.c (run_once): New variable.
10645 (gdbserver_usage): Document it.
10646 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10647 the first run if RUN_ONCE.
10648 * server.h (run_once, remote_prepare): New declarations.
10649
10650 2011-04-19 Tom Tromey <tromey@redhat.com>
10651
10652 * win32-low.c (handle_load_dll): Remove duplicate "the".
10653
10654 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10655
10656 Remove support for old Cygwin 1.5 versions.
10657 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10658 function to avoid warning.
10659 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10660 warning.
10661
10662 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10663
10664 * gdbserver/server.h (Macro _): Define it if not available.
10665
10666 2011-03-14 Michael Snyder <msnyder@vmware.com>
10667
10668 * hostio.c (handle_close): Remove unnecessary null test.
10669
10670 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10671
10672 * Makefile.in (maintainer-clean realclean distclean): Remove
10673 "make ... subdir_do" command.
10674
10675 2011-03-10 Michael Snyder <msnyder@vmware.com>
10676
10677 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10678
10679 * server.c (handle_v_run): Free alloced buffer on early return.
10680
10681 2011-03-09 Yao Qi <yao@codesourcery.com>
10682
10683 Revert:
10684 2011-03-04 Yao Qi <yao@codesourcery.com>
10685
10686 * Makefile.in: Remove GNU make feature --directory.
10687
10688 2011-03-05 Yao Qi <yao@codesourcery.com>
10689
10690 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10691 (subdir_do): New make target. Copied from gdb/Makefile.
10692 (maintainer-clean, realclean, distclean, clean): Call corresponding
10693 make targets in common/Makefile.
10694
10695 2011-02-11 Yao Qi <yao@codesourcery.com>
10696
10697 * configure.ac: Call AC_PROG_RANLIB.
10698 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10699 * configure: Regenerate.
10700
10701 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10702
10703 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10704
10705 2011-03-06 Yao Qi <yao@codesourcery.com>
10706
10707 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10708
10709 2011-03-05 Yao Qi <yao@codesourcery.com>
10710
10711 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10712 (subdir_do): New make target. Copied from gdb/Makefile.
10713 (maintainer-clean, realclean, distclean, clean): Call corresponding
10714 make targets in common/Makefile.
10715
10716 2011-03-04 Yao Qi <yao@codesourcery.com>
10717
10718 * Makefile.in: Remove GNU make feature --directory.
10719
10720 2011-03-04 Michael Snyder <msnyder@vmware.com>
10721
10722 * server.c (queue_stop_reply): Call xmalloc not malloc.
10723
10724 2011-03-02 Michael Snyder <msnyder@vmware.com>
10725
10726 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10727
10728 2011-02-28 Michael Snyder <msnyder@vmware.com>
10729
10730 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10731 (cmd_qtframe): Ditto.
10732 (cmd_qtbuffer): Ditto.
10733 (cmd_bigqtbuffer): Ditto.
10734
10735 * utils.c (decimal2str): Initialize 'width' to nine, then
10736 don't mess with it.
10737
10738 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10739
10740 * hostio.c (require_data): Free *data, not data.
10741
10742 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10743
10744 * hostio.c (require_data): Use free, not xfree.
10745
10746 2011-02-27 Michael Snyder <msnyder@vmware.com>
10747
10748 * server.c (handle_query): Discard unused value.
10749
10750 * hostio.c (require_data): Free malloc memory before returning
10751 error.
10752
10753 2011-02-26 Michael Snyder <msnyder@vmware.com>
10754
10755 * linux-low.c (list_threads): Call closedir for dirent.
10756
10757 2011-02-27 Michael Snyder <msnyder@vmware.com>
10758
10759 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10760 a case statement falls through.
10761
10762 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10763
10764 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10765 in comparison.
10766
10767 2011-02-26 Michael Snyder <msnyder@vmware.com>
10768
10769 * utils.c (decimal2str): Eliminate dead code and dead param.
10770 (pulongest): Drop dead param from call to decimal2str.
10771 (plongest): Ditto.
10772
10773 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10774
10775 Revert the following patch (not approved yet):
10776 2011-02-21 Hui Zhu <teawater@gmail.com>
10777 * tracepoint.c (tp_printf): New function.
10778 (eval_agent_expr): Handle gdb_agent_op_printf.
10779
10780 2011-02-21 Hui Zhu <teawater@gmail.com>
10781
10782 * tracepoint.c (tp_printf): New function.
10783 (eval_agent_expr): Handle gdb_agent_op_printf.
10784
10785 2011-02-18 Tom Tromey <tromey@redhat.com>
10786
10787 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10788 (tracepoint.o): Likewise.
10789 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10790 (gdb_agent_op_names): Likewise.
10791
10792 2011-02-18 Tom Tromey <tromey@redhat.com>
10793
10794 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10795 gdb_agent_op_rot>: New constants.
10796 (gdb_agent_op_names): Add pick and roll.
10797 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10798 cases.
10799
10800 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10801
10802 * aclocal.m4: Regenerated with aclocal-1.11.1.
10803
10804 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10805
10806 * server.c (handle_qxfer_traceframe_info): New.
10807 (qxfer_packets): Register "traceframe-info".
10808 (handle_query): Report support for qXfer:traceframe-info:read+.
10809 * tracepoint.c (match_blocktype): New.
10810 (traceframe_find_block_type): Rename to ...
10811 (traceframe_walk_blocks): ... this. Add callback filter argument,
10812 and use it.
10813 (traceframe_find_block_type): New, reimplemented on top of
10814 traceframe_walk_blocks.
10815 (build_traceframe_info_xml): New.
10816 (traceframe_read_info): New.
10817 * server.h (traceframe_read_info): Declare.
10818
10819 2011-02-11 Yao Qi <yao@codesourcery.com>
10820
10821 * configure.ac: Call AC_PROG_RANLIB.
10822 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10823 * configure: Regenerate.
10824
10825 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10826
10827 * server.c (gdb_read_memory): Change return semantics to allow
10828 partial transfers.
10829 (handle_search_memory_1): Adjust.
10830 (process_serial_event) <'m' packet>: Handle partial transfers.
10831 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10832
10833 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10834
10835 * regcache.c (init_register_cache): Initialize
10836 regcache->register_status.
10837 (free_register_cache): Release regcache->register_status.
10838 (regcache_cpy): Copy register_status.
10839 (registers_to_string): Print 'x's for unavailable registers.
10840 (supply_register): Mark the register's status valid or
10841 unavailable, depending on whether a buffer was passed in or not.
10842 (supply_register_zeroed): New.
10843 (supply_regblock): Mark the registers' status valid or
10844 unavailable, depending on whether a buffer was passed in or not.
10845 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10846 (struct regcache): New `register_status' field.
10847 (supply_register_zeroed): Declare.
10848 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10849 supply_register_zeroed, rather than passing a NULL buffer to
10850 supply_register.
10851 * tracepoint.c (fetch_traceframe_registers): Update comment.
10852
10853 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10854
10855 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10856 buffer explicit.
10857
10858 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10859
10860 * server.h (decode_xfer_write): Change prototype.
10861 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10862 and don't extract the annex here.
10863 * server.c (decode_xfer_read): Remove `annex' parameter,
10864 and don't extract the annex here.
10865 (decode_xfer): New.
10866 (struct qxfer): New.
10867 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10868 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10869 (handle_qxfer_statictrace): New functions, abstracted out from
10870 handle_query, and made to use the struct qxfer interface.
10871 (handle_threads_qxfer_proper): Rename to ...
10872 (handle_qxfer_threads_proper): ... this.
10873 (handle_threads_qxfer): Rename to ...
10874 (handle_qxfer_threads): ... this. Adjust.
10875 (qxfer_packets): New array.
10876 (handle_qxfer): New function.
10877 (handle_query): Use handle_qxfer.
10878
10879 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10880
10881 * gdbreplay.c: Shorten lines of >= 80 columns.
10882 * linux-low.c: Ditto.
10883 * linux-ppc-low.c: Ditto.
10884 * linux-s390-low.c: Ditto.
10885 * linux-sparc-low.c: Ditto.
10886 * linux-x86-low.c: Ditto.
10887 * linux-xtensa-low.c: Ditto.
10888 * mem-break.c: Ditto.
10889 * nto-low.c: Ditto.
10890 * regcache.h: Ditto.
10891 * remote-utils.c: Ditto.
10892 * server.c: Ditto.
10893 * server.h: Ditto.
10894 * thread-db.c: Ditto.
10895 * tracepoint.c: Ditto.
10896 * utils.c: Ditto.
10897 * win32-low.h: Ditto.
10898
10899 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10900
10901 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10902 update.
10903
10904 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10905
10906 * server.c (gdbserver_version): Update copyright year in version
10907 output.
10908 * gdbreplay.c (gdbreplay_version): Ditto.
10909
10910 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10911
10912 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10913 * linux-bfin-low.c: New file.
10914 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10915 PT_DATA_ADDR for BFIN targets.
10916 * Makefile.in (SFILES): Add linux-bfin-low.c.
10917 (clean): Remove reg-bfin.c.
10918 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10919 * README: Mention supported Blackfin targets.
10920
10921 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10922
10923 * .gitignore: New file.
10924
10925 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10926
10927 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10928
10929 2010-10-22 Jie Zhang <jie@codesourcery.com>
10930
10931 * Makefile.in: Add FLAGS_TO_PASS variable.
10932 (install): Remove dependency of install-only and recursively
10933 invoke make for install-only.
10934
10935 2010-10-04 Doug Evans <dje@google.com>
10936
10937 * Makefile.in (uninstall): Use $(DESTDIR).
10938
10939 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10940
10941 PR gdb/11842
10942
10943 * linux-x86-low.c (compat_siginfo_from_siginfo)
10944 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10945 si_code is < 0. Check for si_code == SI_TIMER before checking for
10946 si_code < 0.
10947
10948 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10949
10950 * lynx-i386-low.c: New file.
10951 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10952
10953 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10954
10955 * lynx-low.c (ptrace_request_to_str): Remove handling for
10956 request values that have been removed in LynxOS 5.x.
10957
10958 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10959
10960 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10961 <ptrace.h>
10962
10963 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10964
10965 * configure.ac: Add --enable-inprocess-agent option.
10966 * configure: Rebuilt.
10967
10968 2010-09-06 Yao Qi <yao@codesourcery.com>
10969
10970 * linux-low.c (linux_kill): Remove unused variable.
10971 (linux_stabilize_threads): Likewise.
10972 * server.c (start_inferior): Likewise.
10973 (queue_stop_reply_callback): Likewise.
10974 * tracepoint.c (do_action_at_tracepoint): Likewise.
10975
10976 2010-09-06 Yao Qi <yao@codesourcery.com>
10977
10978 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10979 on return.
10980
10981 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10982
10983 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10984
10985 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10986
10987 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10988 "$(IPA_DEPFILES)".
10989
10990 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10991
10992 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10993 gdbserver/lynx-ppc-low.c: New files.
10994 * Makefile.in (lynx_low_h): New variable.
10995 (lynx-low.o, lynx-ppc-low.o): New rules.
10996 * configure.ac: On LynxOS, link with -lnetinet.
10997 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10998 * configure: regenerate.
10999
11000 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11001
11002 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11003 * configure.ac: Add check for vasprintf and vsnprintf.
11004 * configure, config.in: Regenerate.
11005 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11006
11007 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11008
11009 * gdbreplay.c: Move include of alloca.h up, next to include of
11010 malloc.h.
11011 * server.h: Add include of malloc.h.
11012 * mem-break.c: Remove include of malloc.h.
11013 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11014
11015 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11016
11017 * Makefile.in (memmem.o): Build with -Wno-error.
11018
11019 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11020
11021 * utils.c (xsnprintf): Make non-static.
11022 * server.h: Add xsnprintf declaration.
11023 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11024 replace calls to snprintf by calls to xsnprintf throughout.
11025
11026 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11027
11028 * configure.ac: Add configure check for alloca.
11029 * configure, config.in: Regenerate.
11030 * server.h: Include alloca.h if it exists.
11031 * gdbreplay.c: Include alloca.h if it exists.
11032
11033 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11034
11035 * linux-low.c (__SIGRTMIN): Define if not already defined.
11036 (linux_create_inferior): Check for __ANDROID__ rather than
11037 __SIGRTMIN.
11038 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11039 are already deferred.
11040 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11041 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11042 stopped and already has a pending signal to report.
11043 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11044 a pending signal to report or is moving out of a jump pad.
11045 (linux_init_signals): Check for __ANDROID__ rather than
11046 __SIGRTMIN.
11047
11048 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11049
11050 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11051 debug_threads check. Avoid a linear search when not doing debug
11052 output.
11053
11054 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11055
11056 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11057 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11058 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11059 (process_event): Change local fd's type to gdb_fildes_t.
11060 (create_file_handler): Adjust prototype.
11061 (delete_file_handler): Adjust prototype.
11062 (handle_file_event): Adjust prototype. Use pfildes.
11063 (create_file_event): Adjsut prototype.
11064 * remote-utils.c (remote_desc, listen_desc): Change type to
11065 gdb_fildes_t.
11066 * server.h: New gdb_fildes_t typedef.
11067 [USE_WIN32API]: Include winsock2.h.
11068 (delete_file_handler, add_file_handler): Adjust prototypes.
11069 (pfildes): Declare.
11070 * utils.c (pfildes): New.
11071
11072 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11073
11074 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11075 * configure: Regenerate.
11076
11077 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11078
11079 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11080 (linux_done_accessing_memory): ... this.
11081 (linux_target_ops): Adjust.
11082 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11083 * nto-low.c (nto_target_ops): Adjust comment.
11084 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11085 * spu-low.c (spu_target_ops): Adjust comment.
11086 * target.h (target_ops): Rename unprepare_to_access_memory field
11087 to done_accessing_memory.
11088 (unprepare_to_access_memory): Rename to ...
11089 (done_accessing_memory): ... this.
11090
11091 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11092
11093 * linux-low.c (linux_prepare_to_access_memory): New.
11094 (linux_unprepare_to_access_memory): New.
11095 (linux_target_ops): Install them.
11096 * server.c (read_memory): Rename to ...
11097 (gdb_read_memory): ... this. Use
11098 prepare_to_access_memory/prepare_to_access_memory.
11099 (write_memory): Rename to ...
11100 (gdb_write_memory): ... this. Use
11101 prepare_to_access_memory/prepare_to_access_memory.
11102 (handle_search_memory_1): Adjust.
11103 (process_serial_event): Adjust.
11104 * target.h (struct target_ops): New fields
11105 prepare_to_access_memory and unprepare_to_access_memory.
11106 (prepare_to_access_memory, unprepare_to_access_memory): New.
11107 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11108 prepare_to_access_memory/prepare_to_access_memory.
11109 * nto-low.c (nto_target_ops): Adjust.
11110 * spu-low.c (spu_target_ops): Adjust.
11111 * win32-low.c (win32_target_ops): Adjust.
11112
11113 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11114
11115 * Makefile.in (WARN_CFLAGS): Get it from configure.
11116 (WERROR_CFLAGS): New.
11117 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11118 * configure.ac: Introduce --enable-werror, which adds -Werror to
11119 the compiler command line. Enabled by default. Disable with
11120 --disable-werror. Add -Wdeclaration-after-statement
11121 Wpointer-arith and -Wformat-nonliteral to warning flags.
11122 * configure: Regenerate.
11123
11124 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11125
11126 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11127
11128 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11129
11130 * gdbreplay.c (remote_error): New.
11131 (gdbchar): New.
11132 (expect): Use gdbchar. Check for error reading from GDB.
11133 Clarify sync error output.
11134 (play): Check for errors writing to GDB.
11135 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11136 * remote-utils.c (getpkt): Check for errors writing to the remote
11137 descriptor.
11138
11139 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11140
11141 * linux-low.c (linux_wait_1): Move non-debugging code out of
11142 `debug_threads' control.
11143
11144 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11145
11146 * linux-low.c (linux_wait_1): Don't set last_status here.
11147 * server.c (push_event, queue_stop_reply_callback): Assert we're
11148 not pushing a TARGET_WAITKIND_IGNORE event.
11149 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11150 (myresume, handle_target_event): Set the thread's last_resume_kind
11151 and last_status from the target returned status.
11152
11153 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11154
11155 PR threads/10729
11156
11157 * linux-x86-low.c (update_debug_registers_callback): New.
11158 (i386_dr_low_set_addr): Use it.
11159 (i386_dr_low_get_addr): New.
11160 (i386_dr_low_set_control): Use update_debug_registers_callback.
11161 (i386_dr_low_get_control): New.
11162 (i386_dr_low_get_status): Adjust.
11163 * linux-low.c (linux_stop_lwp): New.
11164 * linux-low.h (linux_stop_lwp): Declare.
11165
11166 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11167 argument instead of a i386_debug_reg_state.
11168 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11169 a i386_debug_reg_state.
11170 (i386_insert_aligned_watchpoint): Adjust.
11171 (i386_remove_aligned_watchpoint): Adjust.
11172 (i386_low_stopped_data_address): Read the debug registers from the
11173 inferior instead of from the mirrors.
11174 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11175 (i386_dr_low_get_addr): Declare.
11176 (i386_dr_low_get_control): Declare.
11177 (i386_dr_low_get_status): Change prototype.
11178
11179 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11180 (i386_dr_low_get_addr): New.
11181 (i386_dr_low_get_control): New.
11182 (i386_dr_low_get_status): Adjust prototype. Return
11183 dr_status_mirror.
11184 (i386_initial_stuff): Clear dr_status_mirror and
11185 dr_control_mirror.
11186 (i386_get_thread_context): Adjust.
11187 (i386_set_thread_context): Adjust.
11188 (i386_thread_added): Adjust.
11189
11190 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11191
11192 * linux-low.h (linux_thread_area): Delete declaration.
11193
11194 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11195
11196 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11197 after its termination.
11198
11199 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11200
11201 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11202 (gdb_wants_all_stopped): Delete.
11203 (linux_wait_1): Don't call them.
11204 * server.c (handle_v_cont): Tag all threads as want-stopped.
11205 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11206 stopped as "client-wants-stopped".
11207
11208 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11209
11210 * Makefile.in (signals_h): New.
11211 (server_h): Depend on it.
11212 (server.o): Don't depend on $(signals_def).
11213 (signals.o): Depend on $(signals_def).
11214
11215 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11216
11217 * Makefile.in (signals_def): New.
11218 (server_h): Append include/gdb/signals.h and signals_def.
11219 (server.o): Append signals_def.
11220
11221 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11222
11223 * server.c (handle_target_event): Use target_signal_to_host for
11224 resume_info.sig initialization.
11225 * target.h (struct thread_resume) <sig>: New comment.
11226
11227 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11228
11229 * server.c (handle_query): strcpy() the returned string from paddress()
11230 instead of sprintf().
11231 * utils.c (paddress): Return phex_nz().
11232
11233 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11234
11235 * server.c (handle_v_cont): Call mourn_inferior if process
11236 just exited.
11237 (myresume): Likewise.
11238
11239 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11240
11241 Static tracepoints, and integration with UST.
11242
11243 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11244 * mem-break.c (uninsert_all_breakpoints)
11245 (reinsert_all_breakpoints): New.
11246 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11247 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11248 (gdb_agent_ust_loaded, helper_thread_id)
11249 (gdb_agent_helper_thread_id): New macros.
11250 (struct ipa_sym_addresses): Add addr_ust_loaded,
11251 addr_helper_thread_id, addr_cmd_buf.
11252 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11253 (in_process_agent_loaded_ust): New.
11254 (write_e_ust_not_loaded): New.
11255 (maybe_write_ipa_ust_not_loaded): New.
11256 (struct collect_static_trace_data_action): New.
11257 (enum tracepoint_type) <static_tracepoint>: New.
11258 (struct tracepoint) <handle>: Mention static tracepoints.
11259 (struct static_tracepoint_ctx): New.
11260 (CMD_BUF_SIZE): New.
11261 (add_tracepoint_action): Handle static tracepoint actions.
11262 (unprobe_marker_at): New.
11263 (clear_installed_tracepoints): Handle static tracepoints.
11264 (cmd_qtdp): Handle static tracepoints.
11265 (probe_marker_at): New.
11266 (cmd_qtstart): Handle static tracepoints.
11267 (response_tracepoint): Handle static tracepoints.
11268 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11269 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11270 (get_context_regcache): Handle static tracepoints.
11271 (do_action_at_tracepoint): Handle static tracepoint actions.
11272 (traceframe_find_block_type): Handle static trace data blocks.
11273 (traceframe_read_sdata): New.
11274 (download_tracepoints): Download static tracepoint actions.
11275 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11276 (GDB_PROBE_NAME): New.
11277 (ust_ops): New.
11278 (GET_UST_SYM): New.
11279 (USTF): New.
11280 (dlsym_ust): New.
11281 (ust_marker_to_static_tracepoint): New.
11282 (gdb_probe): New.
11283 (collect_ust_data_at_tracepoint): New.
11284 (gdb_ust_probe): New.
11285 (UNIX_PATH_MAX, SOCK_DIR): New.
11286 (gdb_ust_connect_sync_socket): New.
11287 (resume_thread, stop_thread): New.
11288 (run_inferior_command): New.
11289 (init_named_socket): New.
11290 (gdb_ust_socket_init): New.
11291 (cstr_to_hexstr): New.
11292 (next_st): New.
11293 (first_marker, next_marker): New.
11294 (response_ust_marker): New.
11295 (cmd_qtfstm, cmd_qtsstm): New.
11296 (unprobe_marker_at, probe_marker_at): New.
11297 (cmd_qtstmat, gdb_ust_thread): New.
11298 (gdb_ust_init): New.
11299 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11300 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11301 (ST_REGENTRY): New.
11302 (x86_64_st_collect_regmap): New.
11303 (X86_64_NUM_ST_COLLECT_GREGS): New.
11304 (AMD64_RIP_REGNUM): New.
11305 (supply_static_tracepoint_registers): New.
11306 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11307 (ST_REGENTRY): New.
11308 (i386_st_collect_regmap): New.
11309 (i386_NUM_ST_COLLECT_GREGS): New.
11310 (supply_static_tracepoint_registers): New.
11311 * server.c (handle_query): Handle qXfer:statictrace:read.
11312 <qSupported>: Report support for StaticTracepoints, and
11313 qXfer:statictrace:read features.
11314 * server.h (traceframe_read_sdata)
11315 (supply_static_tracepoint_registers): Declare.
11316 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11317 (unpack_varlen_hex): Include in IPA build.
11318 * Makefile.in (ustlibs, ustinc): New.
11319 (IPA_OBJS): Add remote-utils-ipa.o.
11320 ($(IPA_LIB)): Link -ldl and -lpthread.
11321 (UST_CFLAGS): New.
11322 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11323 * config.in, configure: Regenerate.
11324
11325 2010-06-20 Ian Lance Taylor <iant@google.com>
11326 Pedro Alves <pedro@codesourcery.com>
11327
11328 * linux-x86-low.c (always_true): Delete.
11329 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11330 trying to fool the compiler with always_true.
11331
11332 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11333
11334 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11335 conditions in gdbserver.
11336
11337 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11338
11339 * spu-low.c (spu_read_memory): Wrap around local store limit.
11340 (spu_write_memory): Likewise.
11341
11342 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11343
11344 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11345 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11346 LONGEST uses.
11347 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11348 uses.
11349 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11350 uses with LONGEST uses.
11351
11352 2010-06-14 Stan Shebs <stan@codesourcery.com>
11353 Pedro Alves <pedro@codesourcery.com>
11354
11355 Bytecode compiler.
11356
11357 * linux-x86-low.c: Include limits.h.
11358 (add_insns): New.
11359 (always_true): New.
11360 (EMIT_ASM): New.
11361 (EMIT_ASM32): New.
11362 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11363 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11364 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11365 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11366 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11367 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11368 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11369 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11370 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11371 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11372 (amd64_emit_void_call_2): New.
11373 (amd64_emit_ops): New.
11374 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11375 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11376 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11377 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11378 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11379 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11380 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11381 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11382 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11383 (i386_emit_stack_adjust, i386_emit_int_call_1)
11384 (i386_emit_void_call_2): New.
11385 (i386_emit_ops): New.
11386 (x86_emit_ops): New.
11387 (the_low_target): Install x86_emit_ops.
11388 * server.h (struct emit_ops): New.
11389 (get_raw_reg_func_addr): Declare.
11390 (current_insn_ptr, emit_error): Declare.
11391 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11392 (set_trace_state_variable_value): New defines.
11393 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11394 addr_get_trace_state_variable_value and
11395 addr_set_trace_state_variable_value.
11396 (symbol_list): New fields for get_raw_reg,
11397 get_trace_state_variable_value and set_trace_state_variable_value.
11398 (condfn): New typedef.
11399 (struct tracepoint): New field `compiled_cond'.
11400 (do_action_at_tracepoint): Clear compiled_cond.
11401 (get_trace_state_variable_value, set_trace_state_variable_value):
11402 Export in the IPA.
11403 (condition_true_at_tracepoint): If there's a compiled condition,
11404 run that.
11405 (current_insn_ptr, emit_error): New globals.
11406 (struct bytecode_address): New.
11407 (get_raw_reg_func_addr): New.
11408 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11409 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11410 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11411 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11412 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11413 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11414 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11415 (compile_tracepoint_condition, compile_bytecodes): New.
11416 * target.h (emit_ops): Forward declare.
11417 (struct target_ops): New field emit_ops.
11418 (target_emit_ops): New.
11419 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11420 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11421 * linux-low.c (linux_emit_ops): New.
11422 (linux_target_ops): Install it.
11423 * linux-low.h (struct linux_target_ops): New field emit_ops.
11424
11425 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11426
11427 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11428 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11429
11430 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11431 Stan Shebs <stan@codesourcery.com>
11432
11433 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11434 (all): Depend on $(extra_libraries).
11435 (install-only): Install the IPA.
11436 (IPA_OBJS, IPA_LIB): New.
11437 (clean): Remove the IPA lib.
11438 (IPAGENT_CFLAGS): New.
11439 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11440 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11441 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11442 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11443 * configure.ac: Check for atomic builtins support in the compiler.
11444 (IPA_DEPFILES, extra_libraries): Define.
11445 * configure.srv (ipa_obj): Add description.
11446 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11447 (i[34567]86-*-linux*): Set ipa_obj.
11448 (x86_64-*-linux*): Set ipa_obj.
11449 * linux-low.c (stabilizing_threads): New.
11450 (supports_fast_tracepoints): New.
11451 (linux_detach): Stabilize threads before detaching.
11452 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11453 the lwp is either not stabilizing, or is moving out of a jump pad.
11454 (linux_fast_tracepoint_collecting): New.
11455 (maybe_move_out_of_jump_pad): New.
11456 (enqueue_one_deferred_signal): New.
11457 (dequeue_one_deferred_signal): New.
11458 (linux_wait_for_event_1): If moving out of a jump pad, defer
11459 pending signals to later.
11460 (linux_stabilize_threads): New.
11461 (linux_wait_1): Check if threads need moving out of jump pads, and
11462 do it if so.
11463 (stuck_in_jump_pad_callback): New.
11464 (move_out_of_jump_pad_callback): New.
11465 (lwp_running): New.
11466 (linux_resume_one_lwp): Handle moving out of jump pads.
11467 (linux_set_resume_request): Dequeue deferred signals.
11468 (need_step_over_p): Also step over fast tracepoint jumps.
11469 (start_step_over): Also uninsert fast tracepoint jumps.
11470 (finish_step_over): Also reinsert fast tracepoint jumps.
11471 (linux_install_fast_tracepoint_jump): New.
11472 (linux_target_ops): Install linux_stabilize_threads and
11473 linux_install_fast_tracepoint_jump_pad.
11474 * linux-low.h (linux_target_ops) <get_thread_area,
11475 install_fast_tracepoint_jump_pad>: New fields.
11476 (struct lwp_info) <collecting_fast_tracepoint,
11477 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11478 (linux_get_thread_area): Declare.
11479 * linux-x86-low.c (jump_insn): New.
11480 (x86_get_thread_area): New.
11481 (append_insns): New.
11482 (push_opcode): New.
11483 (amd64_install_fast_tracepoint_jump_pad): New.
11484 (i386_install_fast_tracepoint_jump_pad): New.
11485 (x86_install_fast_tracepoint_jump_pad): New.
11486 (the_low_target): Install x86_get_thread_area and
11487 x86_install_fast_tracepoint_jump_pad.
11488 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11489 (struct fast_tracepoint_jump): New.
11490 (fast_tracepoint_jump_insn): New.
11491 (fast_tracepoint_jump_shadow): New.
11492 (find_fast_tracepoint_jump_at): New.
11493 (fast_tracepoint_jump_here): New.
11494 (delete_fast_tracepoint_jump): New.
11495 (set_fast_tracepoint_jump): New.
11496 (uninsert_fast_tracepoint_jumps_at): New.
11497 (reinsert_fast_tracepoint_jumps_at): New.
11498 (set_breakpoint_at): Use write_inferior_memory.
11499 (uninsert_raw_breakpoint): Use write_inferior_memory.
11500 (check_mem_read): Mask out fast tracepoint jumps.
11501 (check_mem_write): Mask out fast tracepoint jumps.
11502 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11503 (set_fast_tracepoint_jump): Declare.
11504 (delete_fast_tracepoint_jump)
11505 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11506 (reinsert_fast_tracepoint_jumps_at): Declare.
11507 * regcache.c: Don't compile many functions when building the
11508 in-process agent library.
11509 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11510 the register buffer in the heap.
11511 (free_register_cache): If the register buffer isn't owned by the
11512 regcache, don't free it.
11513 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11514 pre-existing register caches.
11515 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11516 type.
11517 (convert_ascii_to_int): : Constify `from' parameter type.
11518 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11519 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11520 the needed buffer in-place.
11521 (relocate_instruction): New.
11522 * server.c (handle_query) <qSymbols>: If the target supports
11523 tracepoints, give it a chance of looking up symbols. Report
11524 support for fast tracepoints.
11525 (handle_status): Stabilize threads.
11526 (process_serial_event): Adjust.
11527 * server.h (struct fast_tracepoint_jump): Forward declare.
11528 (struct process_info) <fast_tracepoint_jumps>: New field.
11529 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11530 (decode_X_packet, decode_M_packet): Adjust.
11531 (relocate_instruction): Declare.
11532 (in_process_agent_loaded): Declare.
11533 (tracepoint_look_up_symbols): Declare.
11534 (struct fast_tpoint_collect_status): Declare.
11535 (fast_tracepoint_collecting): Declare.
11536 (force_unlock_trace_buffer): Declare.
11537 (handle_tracepoint_bkpts): Declare.
11538 (initialize_low_tracepoint)
11539 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11540 * target.h (struct target_ops) <stabilize_threads,
11541 install_fast_tracepoint_jump_pad>: New fields.
11542 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11543 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11544 [HAVE_STDINT_H]: Include stdint.h.
11545 (trace_debug_1): Rename to ...
11546 (trace_vdebug): ... this.
11547 (trace_debug): Rename to ...
11548 (trace_debug_1): ... this. Add `level' parameter.
11549 (trace_debug): New.
11550 (ATTR_USED, ATTR_NOINLINE): New.
11551 (IP_AGENT_EXPORT): New.
11552 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11553 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11554 (about_to_request_buffer_space, trace_buffer_is_full)
11555 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11556 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11557 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11558 (traceframe_write_count, traceframes_created)
11559 (trace_state_variables)
11560 New renaming defines.
11561 (struct ipa_sym_addresses): New.
11562 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11563 (symbol_list): New.
11564 (ipa_sym_addrs): New.
11565 (all_tracepoint_symbols_looked_up): New.
11566 (in_process_agent_loaded): New.
11567 (write_e_ipa_not_loaded): New.
11568 (maybe_write_ipa_not_loaded): New.
11569 (tracepoint_look_up_symbols): New.
11570 (debug_threads) [IN_PROCESS_AGENT]: New.
11571 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11572 (UNKNOWN_SIDE_EFFECTS): New.
11573 (stop_tracing): New.
11574 (flush_trace_buffer): New.
11575 (stop_tracing_bkpt): New.
11576 (flush_trace_buffer_bkpt): New.
11577 (read_inferior_integer): New.
11578 (read_inferior_uinteger): New.
11579 (read_inferior_data_pointer): New.
11580 (write_inferior_data_pointer): New.
11581 (write_inferior_integer): New.
11582 (write_inferior_uinteger): New.
11583 (struct collect_static_trace_data_action): Delete.
11584 (enum tracepoint_type): New.
11585 (struct tracepoint) <type>: New field `type'.
11586 <actions_str, step_actions, step_actions_str>: Only include in
11587 GDBserver.
11588 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11589 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11590 (tracepoints): Use IP_AGENT_EXPORT.
11591 (last_tracepoint): Don't include in the IPA.
11592 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11593 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11594 (alloced_trace_state_variables): New.
11595 (trace_state_variables): Use IP_AGENT_EXPORT.
11596 (traceframe_t): Delete unused variable.
11597 (circular_trace_buffer): Don't include in the IPA.
11598 (trace_buffer_start): Delete.
11599 (struct trace_buffer_control): New.
11600 (trace_buffer_free): Delete.
11601 (struct ipa_trace_buffer_control): New.
11602 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11603 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11604 New.
11605 (trace_buffer_ctrl): New.
11606 (TRACE_BUFFER_CTRL_CURR): New.
11607 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11608 Reimplement as macros.
11609 (trace_buffer_wrap): Delete.
11610 (traceframe_write_count, traceframe_read_count)
11611 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11612 (struct tracepoint_hit_ctx) <type>: New field.
11613 (struct fast_tracepoint_ctx): New.
11614 (memory_barrier): New.
11615 (cmpxchg): New.
11616 (record_tracepoint_error): Update atomically in the IPA.
11617 (clear_inferior_trace_buffer): New.
11618 (about_to_request_buffer_space): New.
11619 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11620 updating the same buffer.
11621 (add_tracepoint): Default the tracepoint's type to trap
11622 tracepoint, and orig_size to -1.
11623 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11624 internal variables.
11625 (create_trace_state_variable): New parameter `gdb'. Handle it.
11626 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11627 (cmd_qtdp): Handle fast tracepoints.
11628 (cmd_qtdv): Adjust.
11629 (max_jump_pad_size): New.
11630 (gdb_jump_pad_head): New.
11631 (get_jump_space_head): New.
11632 (claim_jump_space): New.
11633 (sort_tracepoints): New.
11634 (MAX_JUMP_SIZE): New.
11635 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11636 IPA.
11637 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11638 support. Upload fast traceframes, and delete internal IPA
11639 breakpoints.
11640 (stop_tracing_handler): New.
11641 (flush_trace_buffer_handler): New.
11642 (cmd_qtstop): Upload fast tracepoints.
11643 (response_tracepoint): Handle fast tracepoints.
11644 (tracepoint_finished_step): Upload fast traceframes. Set the
11645 tracepoint hit context's tracepoint type.
11646 (handle_tracepoint_bkpts): New.
11647 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11648 type. Add comment about fast tracepoints.
11649 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11650 non-existing action_str field.
11651 (get_context_regcache): Handle fast tracepoints.
11652 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11653 to the regcache.
11654 (fast_tracepoint_from_jump_pad_address): New.
11655 (fast_tracepoint_from_ipa_tpoint_address): New.
11656 (collecting_t): New.
11657 (force_unlock_trace_buffer): New.
11658 (fast_tracepoint_collecting): New.
11659 (collecting): New.
11660 (gdb_collect): New.
11661 (write_inferior_data_ptr): New.
11662 (target_tp_heap): New.
11663 (target_malloc): New.
11664 (download_agent_expr): New.
11665 (UALIGN): New.
11666 (download_tracepoints): New.
11667 (download_trace_state_variables): New.
11668 (upload_fast_traceframes): New.
11669 (IPA_FIRST_TRACEFRAME): New.
11670 (IPA_NEXT_TRACEFRAME_1): New.
11671 (IPA_NEXT_TRACEFRAME): New.
11672 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11673 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11674 (gdb_jump_pad_buffer_end): New.
11675 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11676 (initialize_tracepoint): Adjust.
11677 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11678 buffer. Initialize the low module.
11679 * utils.c (PREFIX, TOOLNAME): New.
11680 (malloc_failure): Use PREFIX.
11681 (error): In the IPA, an error causes an exit.
11682 (fatal, warning): Use PREFIX.
11683 (internal_error): Use TOOLNAME.
11684 (NUMCELLS): Increase to 10.
11685 * configure, config.in: Regenerate.
11686
11687 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11688
11689 * server.c (handle_query) <qSupported>: Do two passes over the
11690 qSupported string to avoid nesting strtok.
11691
11692 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11693
11694 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11695 (CDEPS): New.
11696 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11697 -Wl,--dynamic-list.
11698 * configure: Regenerate.
11699 * proc-service.list: New.
11700
11701 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11702
11703 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11704 New comment.
11705
11706 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11707
11708 * gdbreplay.c (remote_open): Check error return from socket() call by
11709 its equality to -1 not by it being negative.
11710 * remote-utils.c (remote_open): Likewise.
11711
11712 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11713
11714 * config.h: Regenerate.
11715
11716 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11717
11718 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11719 doesn't provide PTRACE_GET_THREAD_AREA.
11720
11721 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11722
11723 * linux-m68k-low.c: Include <asm/ptrace.h>
11724 (ps_get_thread_area): Implement.
11725
11726 2010-05-03 Doug Evans <dje@google.com>
11727
11728 * event-loop.c (struct callback_event): New struct.
11729 (callback_list): New global.
11730 (append_callback_event, delete_callback_event): New functions.
11731 (process_callback): New function.
11732 (start_event_loop): Call it.
11733 * remote-utils.c (NOT_SCHEDULED): Define.
11734 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11735 moved out of readchar.
11736 (readchar): Rewrite. Call reschedule before returning.
11737 (reset_readchar): New function.
11738 (remote_close): Call it.
11739 (process_remaining, reschedule): New functions.
11740 * server.h (callback_handler_func): New typedef.
11741 (append_callback_event, delete_callback_event): Declare.
11742
11743 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11744
11745 * proc-service.c (ps_pglobal_lookup): Use
11746 thread_db_look_up_one_symbol.
11747 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11748 parameter. Use it instead of all_symbols_looked_up.
11749 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11750 field.
11751 (all_symbols_looked_up): Don't declare.
11752 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11753 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11754 field.
11755 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11756 Set all_symbols_looked_up here.
11757 (thread_db_look_up_one_symbol): New.
11758 (thread_db_get_tls_address): Adjust.
11759 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11760 thread_db object on the heap, and tentatively set it in the
11761 process structure.
11762 (thread_db_init): Don't set all_symbols_looked_up here.
11763 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11764
11765 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11766
11767 * linux-low.c (linux_kill, linux_detach): Adjust.
11768 (status_pending_p_callback): Remove redundant statement. Check
11769 for !TARGET_WAITIKIND_IGNORE, instead of
11770 TARGET_WAITKIND_STOPPED.
11771 (handle_tracepoints): Make sure LWP is locked. Adjust.
11772 (linux_wait_for_event_1): Adjust.
11773 (linux_cancel_breakpoints): New.
11774 (unsuspend_one_lwp): New.
11775 (unsuspend_all_lwps): New.
11776 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11777 (send_sigstop_callback): Change return type to int, add new
11778 `except' parameter and handle it.
11779 (suspend_and_send_sigstop_callback): New.
11780 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11781 pass them down. If SUSPEND, also increment the lwp's suspend
11782 count.
11783 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11784 (need_step_over_p): Don't consider suspended LWPs.
11785 (start_step_over): Adjust.
11786 (proceed_one_lwp): Change return type to int, add new `except'
11787 parameter and handle it.
11788 (unsuspend_and_proceed_one_lwp): New.
11789 (proceed_all_lwps): Use find_inferior instead of
11790 for_each_inferior.
11791 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11792 also decrement the suspend count of LWPs. Pass `except' down,
11793 instead of hacking its suspend count.
11794 (linux_pause_all): Add `freeze' parameter. Adjust.
11795 (linux_unpause_all): New.
11796 (linux_target_ops): Install linux_unpause_all.
11797 * server.c (handle_status): Adjust.
11798 * target.h (struct target_ops): New fields `unpause_all' and
11799 `cancel_breakpoints'. Add new parameter to `pause_all'.
11800 (pause_all): Add new `freeze' parameter.
11801 (unpause_all): New.
11802 (cancel_breakpoints): New.
11803 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11804 cancel breakpoints.
11805 (cmd_qtstart): Pause threads.
11806 (stop_tracing): Pause threads, and cancel breakpoints.
11807 * win32-low.c (win32_target_ops): Adjust.
11808
11809 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11810
11811 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11812 the inferior right away from here...
11813 (linux_wait_1): ... to here, and adjust to check the thread's
11814 last_resume_kind instead of the lwp's step or stop_expected flags.
11815
11816 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11817
11818 * README: Use consistent `GDB' and `GDBserver' spellings.
11819
11820 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11821
11822 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11823 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11824 (linux_detach_one_lwp): Assume the lwp is stopped.
11825 (any_thread_of): Delete.
11826 (linux_detach): Stop all lwps here. Don't blindly delete all
11827 breakpoints.
11828 (delete_lwp_callback): New.
11829 (linux_mourn): Delete all lwps of the process that is gone.
11830 (linux_wait_1): Don't delete the last lwp of the process here.
11831 * mem-break.h (mark_breakpoints_out): Declare.
11832 * mem-break.c (mark_breakpoints_out): New.
11833 (free_all_breakpoints): Use it.
11834 * server.c (handle_target_event): If the process is gone, mark
11835 breakpoints out.
11836 * thread-db.c (struct thread_db) <create_bp>: New field.
11837 (thread_db_enable_reporting): Fix prototype. Store a thread event
11838 breakpoint reference in the thread_db struct.
11839 (thread_db_load_search): Clear the thread_db object.
11840 (try_thread_db_load_1): Ditto.
11841 (switch_to_process): New.
11842 (disable_thread_event_reporting): Use it.
11843 (remove_thread_event_breakpoints): New.
11844 (thread_db_detach, thread_db_mourn): Use it.
11845
11846 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11847
11848 * linux-low.c (linux_enable_event_reporting): New.
11849 (linux_wait_for_event_1, handle_extended_wait): Use it.
11850
11851 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11852
11853 * linux-low.c (linux_kill_one_lwp, linux_kill)
11854 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11855 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11856 SIGSTOP even if the LWP is stopped.
11857 (send_sigstop_callback): New.
11858 (stop_all_lwps): Use send_sigstop_callback instead.
11859 (linux_resume_one_thread): Adjust.
11860 (proceed_one_lwp): Still proceed an LWP that the client has
11861 requested to stop, if we haven't reported it as stopped yet. Make
11862 sure that LWPs the client want stopped, have a pending SIGSTOP.
11863
11864 2010-04-26 Doug Evans <dje@google.com>
11865
11866 * server.c (handle_general_set): Make static.
11867
11868 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11869 Print received char after testing for error/eof instead of before.
11870 (input_interrupt): Tweak comment.
11871
11872 2010-04-23 Doug Evans <dje@google.com>
11873
11874 * server.c (start_inferior): Print inferior argv if --debug.
11875
11876 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11877
11878 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11879 * nto-x86-low.c: Include server.h
11880
11881 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11882
11883 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11884 be consistent with other sources of this directory.
11885 (init_registers_amd64): Correct name of source file of this function
11886 in the comment.
11887
11888 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11889
11890 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11891 64-bit executables.
11892
11893 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11894
11895 * win32-i386-low.c: Add 64-bit support.
11896 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11897 (init_registers_amd64): Declare.
11898 (mappings): Add 64-bit version of array.
11899 (init_windows_x86): New function.
11900 (the_low_target): Change init_arch field to init_windows_x86.
11901
11902 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11903
11904 * win32-low.c: Adapt to support also 64-bit architecture.
11905 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11906 (get_image_name): Use SIZE_T type for local variable `done'.
11907 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11908 (toolhelp_get_dll_name): Idem.
11909 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11910 Use uintptr_t typecast to avoid warning.
11911 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11912 (handle_exception): Use phex_nz to avoid warning.
11913 (win32_wait): Remove unused local variable `process'.
11914
11915 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11916
11917 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11918 `amd64-avx.o'.
11919
11920 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11921
11922 * configure.ac: Use `ws2_32' library for srv_mingw.
11923 * configure: Regenerate.
11924 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11925 * remote-utils.c: Likewise.
11926
11927 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11928
11929 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11930 if __x86_64__ is defined.
11931
11932 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11933
11934 * configure: Regenerate.
11935
11936 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11937
11938 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11939 * target.h (target_ops): New get_tib_address field.
11940 * win32-low.h (win32_thread_info): Add thread_local_base field.
11941 * win32-low.c (child_add_thread): Add tlb argument.
11942 Set thread_local_base field to TLB.
11943 (get_child_debug_event): Adapt to child_add_thread change.
11944 (win32_get_tib_address): New function.
11945 (win32_target_ops): Set get_tib_address field to
11946 win32_get_tib_address.
11947 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11948
11949 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11950
11951 * linux-low.c (linux_mourn): Also remove the process.
11952 * server.c (handle_target_event): Don't remove the process here.
11953 * nto-low.c (nto_mourn): New.
11954 (nto_target_ops): Install it.
11955 * spu-low.c (spu_mourn): New.
11956 (spu_target_ops): Install it.
11957 * win32-low.c (win32_mourn): New.
11958 (win32_target_ops): Install it.
11959
11960 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11961
11962 * server.h (buffer_xml_printf): Remove redundant `;'.
11963
11964 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11965
11966 * regcache.c (set_register_cache): Invalidate regcaches before
11967 changing the register cache layout.
11968 (regcache_invalidate_one): Allow a NULL regcache.
11969 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11970 regcaches before changing the register cache layout or the target
11971 regsets.
11972
11973 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11974
11975 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11976 variable warning on Linux/x86-64.
11977
11978 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11979
11980 GDBserver disconnected tracing support.
11981
11982 * linux-low.c (linux_remove_process): Delete.
11983 (add_lwp): Don't set last_resume_kind here.
11984 (linux_kill): Use `mourn'.
11985 (linux_detach): Use `thread_db_detach', and `mourn'.
11986 (linux_mourn): New.
11987 (linux_attach_lwp_1): Adjust comment.
11988 (linux_attach): last_resume_kind moved the thread_info; adjust.
11989 (status_pending_p_callback): Adjust.
11990 (linux_wait_for_event_1): Adjust.
11991 (count_events_callback, select_singlestep_lwp_callback)
11992 (select_event_lwp_callback, cancel_breakpoints_callback)
11993 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11994 (proceed_one_lwp): Adjust.
11995 (linux_async): Add debug output.
11996 (linux_thread_stopped): New.
11997 (linux_pause_all): New.
11998 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11999 linux_pause_all.
12000 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12001 (thread_db_free): Delete declaration.
12002 (thread_db_detach, thread_db_mourn): Declare.
12003 * thread-db.c (thread_db_init): Use thread_db_mourn.
12004 (thread_db_free): Delete, split in two.
12005 (disable_thread_event_reporting): New.
12006 (thread_db_detach): New.
12007 (thread_db_mourn): New.
12008
12009 * server.h (struct thread_info) <last_resume_kind>: New field.
12010 <attached>: Add comment.
12011 <gdb_detached>: New field.
12012 (handler_func): Change return type to int.
12013 (handle_serial_event, handle_target_event): Ditto.
12014 (gdb_connected): Declare.
12015 (tracing): Delete.
12016 (disconnected_tracing): Declare.
12017 (stop_tracing): Declare.
12018
12019 * server.c (handle_query) <qSupported>: Report support for
12020 disconnected tracing.
12021 (queue_stop_reply_callback): Account for running threads.
12022 (gdb_wants_thread_stopped): New.
12023 (gdb_wants_all_threads_stopped): New.
12024 (gdb_reattached_process): New.
12025 (handle_status): Clear the `gdb_detached' flag of all processes.
12026 In all-stop, stop all threads.
12027 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12028 (process_serial_event): If the remote connection breaks, or if an
12029 exit was forced with "monitor exit", force an event loop exit.
12030 Handle disconnected tracing on detach.
12031 (handle_serial_event): Adjust.
12032 (handle_target_event): If GDB isn't connected, forward events back
12033 to the inferior, unless the last process exited, in which case,
12034 exit gdbserver. Adjust interface.
12035
12036 * remote-utils.c (remote_open): Don't block in accept. Instead
12037 register an event loop source on the listen socket file
12038 descriptor. Refactor bits into ...
12039 (listen_desc): ... this new global.
12040 (gdb_connected): ... this new function.
12041 (enable_async_notification): ... this new function.
12042 (handle_accept_event): ... this new function.
12043 (remote_close): Clear remote_desc.
12044
12045 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12046
12047 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12048 New fields.
12049 (mourn_inferior): Define.
12050 (target_process_qsupported): Avoid the dangling else problem.
12051 (thread_stopped): Define.
12052 (pause_all): Define.
12053 (target_waitstatus_to_string): Declare.
12054 * target.c (target_waitstatus_to_string): New.
12055
12056 * tracepoint.c (tracing): Make extern.
12057 (disconnected_tracing): New.
12058 (stop_tracing): Make extern. Handle tracing stops due to GDB
12059 disconnecting.
12060 (cmd_qtdisconnected): New.
12061 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12062 (handle_tracepoint_general_set): Handle QTDisconnected.
12063
12064 * event-loop.c (event_handler_func): Change return type to int.
12065 (process_event): Bail out if the event handler wants the event
12066 loop to stop.
12067 (handle_file_event): Ditto.
12068 (start_event_loop): Bail out if the event handler wants the event
12069 loop to stop.
12070
12071 * nto-low.c (nto_target_ops): Adjust.
12072 * spu-low.c (spu_wait): Don't remove the process here.
12073 (spu_target_ops): Adjust.
12074 * win32-low.c (win32_wait): Don't remove the process here.
12075 (win32_target_ops): Adjust.
12076
12077 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12078
12079 * regcache.c (realloc_register_cache): Invalidate inferior's
12080 regcache before recreating it.
12081
12082 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12083
12084 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12085
12086 2010-04-09 Stan Shebs <stan@codesourcery.com>
12087 Pedro Alves <pedro@codesourcery.com>
12088
12089 * server.h (LONGEST): New.
12090 (struct thread_info) <while_stepping>: New field.
12091 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12092 Declare.
12093 (initialize_tracepoint, handle_tracepoint_general_set)
12094 (handle_tracepoint_query, tracepoint_finished_step)
12095 (tracepoint_was_hit, release_while_stepping_state_list):
12096 (current_traceframe): Declare.
12097 * server.c (handle_general_set): Handle tracepoint packets.
12098 (read_memory): New.
12099 (write_memory): New.
12100 (handle_search_memory_1): Use read_memory.
12101 (handle_query): Report support for conditional tracepoints, trace
12102 state variables, and tracepoint sources. Handle tracepoint
12103 queries.
12104 (main): Initialize the tracepoints module.
12105 (process_serial_event): Handle traceframe reads/writes.
12106
12107 * linux-low.c (handle_tracepoints): New.
12108 (linux_wait_1): Call it.
12109 (linux_resume_one_lwp): Handle while-stepping.
12110 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12111 (linux_target_ops): Install them.
12112 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12113 New field.
12114 * linux-x86-low.c (x86_supports_tracepoints): New.
12115 (the_low_target). Install it.
12116
12117 * mem-break.h (delete_breakpoint): Declare.
12118 * mem-break.c (delete_breakpoint): Make external.
12119
12120 * target.h (struct target_ops): Add `supports_tracepoints',
12121 `read_pc', and `write_pc' fields.
12122 (target_supports_tracepoints): Define.
12123 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12124 (phex_nz): New.
12125
12126 * regcache.h (struct regcache) <registers_owned>: New field.
12127 (init_register_cache, regcache_cpy): Declare.
12128 (regcache_read_pc, regcache_write_pc): Declare.
12129 (register_cache_size): Declare.
12130 (supply_regblock): Declare.
12131 * regcache.c (init_register_cache): New.
12132 (new_register_cache): Use it.
12133 (regcache_cpy): New.
12134 (register_cache_size): New.
12135 (supply_regblock): New.
12136 (regcache_read_pc, regcache_write_pc): New.
12137
12138 * tracepoint.c: New.
12139
12140 * Makefile.in (OBS): Add tracepoint.o.
12141 (tracepoint.o): New rule.
12142
12143 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12144
12145 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12146 (i386-mmx.o): New.
12147 (i386-mmx.c): Likewise.
12148 (i386-mmx-linux.o): Likewise.
12149 (i386-mmx-linux.c): Likewise.
12150
12151 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12152 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12153 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12154 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12155
12156 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12157 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12158 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12159
12160 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12161
12162 * Makefile.in (clean): Updated.
12163 (i386-avx.o): New.
12164 (i386-avx.c): Likewise.
12165 (i386-avx-linux.o): Likewise.
12166 (i386-avx-linux.c): Likewise.
12167 (amd64-avx.o): Likewise.
12168 (amd64-avx.c): Likewise.
12169 (amd64-avx-linux.o): Likewise.
12170 (amd64-avx-linux.c): Likewise.
12171
12172 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12173 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12174 (srv_amd64_regobj): Add amd64-avx.o.
12175 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12176 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12177 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12178 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12179 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12180 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12181 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12182
12183 * i387-fp.c: Include "i386-xstate.h".
12184 (i387_xsave): New.
12185 (i387_cache_to_xsave): Likewise.
12186 (i387_xsave_to_cache): Likewise.
12187 (x86_xcr0): Likewise.
12188
12189 * i387-fp.h (i387_cache_to_xsave): Likewise.
12190 (i387_xsave_to_cache): Likewise.
12191 (x86_xcr0): Likewise.
12192
12193 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12194 * linux-crisv32-low.c (target_regsets): Likewise.
12195 * linux-m68k-low.c (target_regsets): Likewise.
12196 * linux-mips-low.c (target_regsets): Likewise.
12197 * linux-ppc-low.c (target_regsets): Likewise.
12198 * linux-s390-low.c (target_regsets): Likewise.
12199 * linux-sh-low.c (target_regsets): Likewise.
12200 * linux-sparc-low.c (target_regsets): Likewise.
12201 * linux-xtensa-low.c (target_regsets): Likewise.
12202
12203 * linux-low.c: Include <sys/uio.h>.
12204 (regsets_fetch_inferior_registers): Support nt_type.
12205 (regsets_store_inferior_registers): Likewise.
12206 (linux_process_qsupported): New.
12207 (linux_target_ops): Add linux_process_qsupported.
12208
12209 * linux-low.h (regset_info): Add nt_type.
12210 (linux_target_ops): Add process_qsupported.
12211
12212 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12213 and <sys/uio.h>.
12214 (init_registers_i386_avx_linux): New.
12215 (init_registers_amd64_avx_linux): Likewise.
12216 (xmltarget_i386_linux_no_xml): Likewise.
12217 (xmltarget_amd64_linux_no_xml): Likewise.
12218 (PTRACE_GETREGSET): Likewise.
12219 (PTRACE_SETREGSET): Likewise.
12220 (x86_fill_xstateregset): Likewise.
12221 (x86_store_xstateregset): Likewise.
12222 (use_xml): Likewise.
12223 (x86_linux_update_xmltarget): Likewise.
12224 (x86_linux_process_qsupported): Likewise.
12225 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12226 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12227 init_registers_i386_linux here. Call
12228 x86_linux_update_xmltarget.
12229 (the_low_target): Add x86_linux_process_qsupported.
12230
12231 * server.c (handle_query): Call target_process_qsupported.
12232
12233 * target.h (target_ops): Add process_qsupported.
12234 (target_process_qsupported): New.
12235
12236 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12237
12238 * inferiors.c (add_thread): Set last_status kind to
12239 TARGET_WAITKIND_IGNORE.
12240 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12241 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12242 (linux_wait_1): Move `thread' local definition to block that uses
12243 it. Don't NULL initialize `event_child'.
12244 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12245 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12246 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12247
12248 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12249
12250 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12251 an extended waitstatus, or by a watchpoint.
12252 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12253 thread was stepping or has been stopped by a watchpoint.
12254
12255 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12256
12257 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12258 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12259 of another, then delete the previous, and validate all
12260 breakpoints.
12261 (validate_inserted_breakpoint): New.
12262 (delete_disabled_breakpoints): New.
12263 (validate_breakpoints): New.
12264 (check_mem_read): Validate breakpoints before trusting their
12265 shadow. Delete disabled breakpoints.
12266 (check_mem_write): Validate breakpoints before trusting they
12267 should be inserted. Delete disabled breakpoints.
12268 * mem-break.h (validate_breakpoints):
12269 * server.c (handle_query): Validate breakpoints when we see a
12270 qSymbol query.
12271
12272 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12273
12274 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12275 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12276 if we could tell there's a GDB breakpoint at stop_pc.
12277 (need_step_over_p): Don't do a step over if we find a GDB
12278 breakpoint at the resume PC.
12279
12280 * mem-break.c (struct raw_breakpoint): New.
12281 (enum bkpt_type): New type `gdb_breakpoint'.
12282 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12283 fields. New field `raw'.
12284 (find_raw_breakpoint_at): New.
12285 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12286 breakpoint instead.
12287 (set_breakpoint_at): Adjust.
12288 (delete_raw_breakpoint): New.
12289 (release_breakpoint): New.
12290 (delete_breakpoint): Rename to...
12291 (delete_breakpoint_1): ... this. Add proc parameter. Use
12292 release_breakpoint. Return ENOENT.
12293 (delete_breakpoint): Reimplement.
12294 (find_breakpoint_at): Delete.
12295 (find_gdb_breakpoint_at): New.
12296 (delete_breakpoint_at): Delete.
12297 (set_gdb_breakpoint_at): New.
12298 (delete_gdb_breakpoint_at): New.
12299 (gdb_breakpoint_here): New.
12300 (set_reinsert_breakpoint): Use release_breakpoint.
12301 (uninsert_breakpoint): Rename to ...
12302 (uninsert_raw_breakpoint): ... this.
12303 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12304 (reinsert_raw_breakpoint): Change parameter type to
12305 raw_breakpoint.
12306 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12307 instead.
12308 (check_breakpoints): Adjust. Use release_breakpoint.
12309 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12310 (breakpoint_inserted_here): Ditto.
12311 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12312 Don't trust the breakpoint's shadow if it is not inserted.
12313 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12314 (delete_all_breakpoints): Adjust.
12315 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12316 use delete_breakpoint_1.
12317
12318 * mem-break.h (breakpoints_supported): Delete declaration.
12319 (set_gdb_breakpoint_at): Declare.
12320 (gdb_breakpoint_here): Declare.
12321 (delete_breakpoint_at): Delete.
12322 (delete_gdb_breakpoint_at): Declare.
12323
12324 * server.h (struct raw_breakpoint): Forward declare.
12325 (struct process_info): New field `raw_breakpoints'.
12326
12327 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12328 breakpoints.
12329
12330 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12331
12332 * linux-low.c (status_pending_p_callback): Fix comment.
12333 (linux_wait_for_event_1): Move most of the internal breakpoint
12334 handling from here...
12335 (linux_wait_1): ... to here.
12336 (count_events_callback): New.
12337 (select_singlestep_lwp_callback): New.
12338 (select_event_lwp_callback): New.
12339 (cancel_breakpoints_callback): New.
12340 (select_event_lwp): New.
12341 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12342 priority to all LWPs that have had events that should be reported
12343 to the client. Cancel breakpoints when about to reporting the
12344 event to the client, not while stopping lwps. No longer cancel
12345 finished single-steps here.
12346 (cancel_finished_single_step): Delete.
12347 (cancel_finished_single_steps): Delete.
12348
12349 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12350
12351 * mem-break.c (enum bkpt_type): New.
12352 (struct breakpoint): New field `type'.
12353 (set_breakpoint_at): Change return type to struct breakpoint
12354 pointer. Set type to `other_breakpoint' by default.
12355 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12356 in the breakpoint list.
12357 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12358 (reinsert_breakpoint): Rename to ...
12359 (reinsert_raw_breakpoint): ... this.
12360 (reinsert_breakpoints_at): Adjust.
12361 * mem-break.h (struct breakpoint): Declare.
12362 (set_breakpoint_at): Change return type to struct breakpoint
12363 pointer.
12364
12365 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12366
12367 * server.c (handle_query): Assign, not compare.
12368
12369 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12370
12371 Teach linux gdbserver to step-over-breakpoints.
12372
12373 * linux-low.c (can_hardware_single_step): New.
12374 (supports_breakpoints): New.
12375 (handle_extended_wait): If stopping threads, read the stop pc of
12376 the new cloned LWP.
12377 (get_pc): New.
12378 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12379 low target doesn't support retrieving the PC.
12380 (add_lwp): Set last_resume_kind to resume_continue.
12381 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12382 (linux_attach): Don't clear stop_expected. Set the lwp's
12383 last_resume_kind to resume_stop.
12384 (linux_detach_one_lwp): Don't check for removed breakpoints.
12385 (check_removed_breakpoint): Delete.
12386 (status_pending_p): Rename to ...
12387 (status_pending_p_callback): ... this. Don't check for removed
12388 breakpoints. Don't consider threads that are stopped from GDB's
12389 perspective.
12390 (linux_wait_for_lwp): Always read the stop_pc here.
12391 (cancel_breakpoint): New.
12392 (step_over_bkpt): New global.
12393 (linux_wait_for_event_1): Implement stepping over breakpoints.
12394 (gdb_wants_lwp_stopped): New.
12395 (gdb_wants_all_stopped): New.
12396 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12397 single-step traps here. Store the thread's last reported target
12398 wait status.
12399 (send_sigstop): Don't clear stop_expected. Always set it,
12400 instead.
12401 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12402 (cancel_finished_single_step): New.
12403 (cancel_finished_single_steps): New.
12404 (wait_for_sigstop): Don't cancel finished single-step traps here.
12405 (linux_resume_one_lwp): Don't check for removed breakpoints.
12406 Don't set `step' on non-hardware step archs.
12407 (linux_set_resume_request): Ignore resume_stop requests if already
12408 stopping or stopped. Set the lwp's last_resume_kind.
12409 (resume_status_pending_p): Don't check for removed breakpoints.
12410 (need_step_over_p): New.
12411 (start_step_over): New.
12412 (finish_step_over): New.
12413 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12414 requests. Clear the thread's last reported target waitstatus.
12415 Don't use the `suspended' flag. Don't consider pending breakpoints.
12416 (linux_resume): Start a step-over if necessary.
12417 (proceed_one_lwp): New.
12418 (proceed_all_lwps): New.
12419 (unstop_all_lwps): New.
12420 * linux-low.h (struct lwp_info): Rewrite comment for the
12421 `suspended' flag. Add the `stop_pc' field. Delete the
12422 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12423 Add `'last_resume_kind' and `need_step_over' fields.
12424 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12425 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12426 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12427 (set_raw_breakpoint_at): New.
12428 (set_breakpoint_at): Rewrite to use it.
12429 (reinsert_breakpoint_handler): Delete.
12430 (set_reinsert_breakpoint): New.
12431 (reinsert_breakpoint_by_bp): Delete.
12432 (delete_reinsert_breakpoints): New.
12433 (uninsert_breakpoint): Rewrite.
12434 (uninsert_breakpoints_at): New.
12435 (reinsert_breakpoint): Rewrite.
12436 (reinsert_breakpoints_at): New.
12437 (check_breakpoints): Rewrite.
12438 (breakpoint_here): New.
12439 (breakpoint_inserted_here): New.
12440 (check_mem_read): Adjust.
12441 * mem-break.h (breakpoints_supported, breakpoint_here)
12442 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12443 (reinsert_breakpoint_by_bp): Delete declaration.
12444 (delete_reinsert_breakpoints): Declare.
12445 (reinsert_breakpoint): Delete declaration.
12446 (reinsert_breakpoints_at): Declare.
12447 (uninsert_breakpoint): Delete declaration.
12448 (uninsert_breakpoints_at): Declare.
12449 (check_breakpoints): Adjust prototype.
12450 * server.h: Adjust include order.
12451 (struct thread_info): Declare here. Add a `last_status' field.
12452
12453 2010-03-23 Michael Snyder <msnyder@vmware.com>
12454
12455 * server.c (crc32): New function.
12456 (handle_query): Add handling for 'qCRC:' request.
12457
12458 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12459
12460 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12461 lwp had been stopped by a watchpoint.
12462
12463 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12464
12465 * server.h (internal_error): Declare.
12466 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12467 * utils.c (internal_error): New function.
12468
12469 2010-03-15 Andreas Schwab <schwab@redhat.com>
12470
12471 * configure.srv: Fix typo setting srv_regobj.
12472
12473 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12474
12475 * linux-low.c (fetch_register): Avoid passing a non string literal
12476 format to `error'.
12477 (usr_store_inferior_registers): Ditto.
12478
12479 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12480
12481 * linux-low.c (linux_write_memory): Bail out early if peeking
12482 memory failed.
12483
12484 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12485
12486 * linux-low.h (struct lwp_info): New fields
12487 `stopped_by_watchpoint' and `stopped_data_address'.
12488 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12489 here, and cache them in the lwp object.
12490 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12491 directly.
12492 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12493 field.
12494 (linux_stopped_by_watchpoint): Rewrite.
12495 (linux_stopped_data_address): Rewrite.
12496
12497 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12498
12499 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12500 switching the current inferior, not before.
12501
12502 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12503
12504 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12505 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12506 i386-linux.c and amd64-linux.c.
12507 (reg-i386.o): Removed.
12508 (reg-i386.c): Likewise.
12509 (reg-i386-linux.o): Likewise.
12510 (reg-i386-linux.c): Likewise.
12511 (reg-x86-64.o): Likewise.
12512 (reg-x86-64.c): Likewise.
12513 (reg-x86-64-linux.o): Likewise.
12514 (reg-x86-64-linux.c): Likewise.
12515 (i386.o): New.
12516 (i386.c): Likewise.
12517 (i386-linux.o): Likewise.
12518 (i386-linux.c): Likewise.
12519 (amd64.o): Likewise.
12520 (amd64.c): Likewise.
12521 (amd64-linux.o): Likewise.
12522 (amd64-linux.c): Likewise.
12523
12524 * configure.srv (srv_i386_regobj): New.
12525 (srv_i386_linux_regobj): Likewise.
12526 (srv_amd64_regobj): Likewise.
12527 (srv_amd64_linux_regobj): Likewise.
12528 (srv_i386_32bit_xmlfiles): Likewise.
12529 (srv_i386_64bit_xmlfiles): Likewise.
12530 (srv_i386_xmlfiles): Likewise.
12531 (srv_amd64_xmlfiles): Likewise.
12532 (srv_i386_linux_xmlfiles): Likewise.
12533 (srv_amd64_linux_xmlfiles): Likewise.
12534 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12535 srv_xmlfiles to $srv_i386_xmlfiles.
12536 (i[34567]86-*-mingw32ce*): Likewise.
12537 (i[34567]86-*-mingw*): Likewise.
12538 (i[34567]86-*-nto*): Likewise.
12539 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12540 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12541 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12542 (x86_64-*-linux*): Likewise.
12543
12544 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12545 (init_registers_amd64_linux): New.
12546 (x86_arch_setup): Replace init_registers_x86_64_linux with
12547 init_registers_amd64_linux.
12548
12549 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12550
12551 * configure.ac: Check for libdl. If it is not available link against
12552 static libthread_db.
12553 * configure: Regenerate.
12554
12555 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12556
12557 PR9605
12558
12559 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12560 handing a read watchpoint.
12561 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12562
12563 2010-02-12 Doug Evans <dje@google.com>
12564
12565 * linux-low.c (linux_supports_tracefork_flag): Document.
12566 (linux_look_up_symbols): Add comment.
12567
12568 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12569
12570 * regcache.c (supply_register): Clear regcache if buf is NULL.
12571
12572 2010-02-02 Nicolas Roche <roche@sourceware.org>
12573 Joel Brobecker <brobecker@adacore.com>
12574
12575 * inferiors.c (find_inferior): Add function documentation.
12576 (unloaded_dll): Handle the case where the unloaded dll has not
12577 been previously registered in the dll list.
12578
12579 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12580
12581 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12582 (thumb2_breakpoint): New.
12583 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12584
12585 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12586
12587 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12588 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12589 breakpoints.
12590
12591 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12592
12593 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12594
12595 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12596
12597 * linux-s390-low.c (s390_collect_ptrace_register)
12598 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12599
12600 2010-01-21 Doug Evans <dje@google.com>
12601
12602 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12603 (PTRACE_ARG4_TYPE): New macro.
12604 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12605 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12606 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12607 (usr_store_inferior_registers): Ditto.
12608 (linux_read_memory, linux_write_memory): Ditto.
12609 (linux_test_for_tracefork): Ditto.
12610
12611 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12612 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12613
12614 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12615
12616 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12617 target.
12618
12619 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12620
12621 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12622 prototype to take a regcache. Adjust.
12623
12624 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12625
12626 * regcache.h (struct thread_info): Forward declare.
12627 (struct regcache): New.
12628 (new_register_cache): Adjust prototype.
12629 (get_thread_regcache): Declare.
12630 (free_register_cache): Adjust prototype.
12631 (registers_to_string, registers_from_string): Ditto.
12632 (supply_register, supply_register_by_name, collect_register)
12633 (collect_register_as_string, collect_register_by_name): Ditto.
12634 * regcache.c (struct inferior_regcache_data): Delete.
12635 (get_regcache): Rename to ...
12636 (get_thread_regcache): ... this. Adjust. Switch inferior before
12637 fetching registers.
12638 (regcache_invalidate_one): Adjust.
12639 (regcache_invalidate): Fix prototype.
12640 (new_register_cache): Return the new register cache.
12641 (free_register_cache): Change prototype.
12642 (realloc_register_cache): Adjust.
12643 (registers_to_string): Change prototype to take a regcache. Adjust.
12644 (registers_from_string): Ditto.
12645 (register_data): Ditto.
12646 (supply_register): Ditto.
12647 (supply_register_by_name): Ditto.
12648 (collect_register): Ditto.
12649 (collect_register_as_string): Ditto.
12650 (collect_register_by_name): Ditto.
12651 * server.c (process_serial_event): Adjust.
12652 * linux-low.h (regset_fill_func, regset_store_func): Change
12653 prototype.
12654 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12655 Change prototype.
12656 * linux-low.c (get_stop_pc): Adjust.
12657 (check_removed_breakpoint): Adjust.
12658 (linux_wait_for_event): Adjust.
12659 (linux_resume_one_lwp): Adjust.
12660 (fetch_register): Add regcache parameter. Adjust.
12661 (usr_store_inferior_registers): Ditto.
12662 (regsets_fetch_inferior_registers): Ditto.
12663 (regsets_store_inferior_registers): Ditto.
12664 (linux_fetch_registers, linux_store_registers): Ditto.
12665 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12666 regcache. Adjust.
12667 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12668 Ditto.
12669 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12670 prototype to take a regcache.
12671 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12672 * remote-utils.c (convert_ascii_to_int, outreg)
12673 (prepare_resume_reply): Change prototype to take a regcache.
12674 Adjust.
12675 * target.h (struct target_ops) <fetch_registers, store_registers>:
12676 Change prototype to take a regcache.
12677 (fetch_inferior_registers, store_inferior_registers): Change
12678 prototype to take a regcache. Adjust.
12679 * proc-service.c (ps_lgetregs): Adjust.
12680 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12681 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12682 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12683 take a regcache. Adjust.
12684 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12685 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12686 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12687 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12688 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12689 (cris_cannot_fetch_register):
12690 (cris_breakpoint_at): Change prototype to take a regcache.
12691 Adjust.
12692 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12693 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12694 to take a regcache. Adjust.
12695 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12696 Adjust.
12697 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12698 take a regcache. Adjust.
12699 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12700 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12701 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12702 * linux-mips-low.c (mips_get_pc):
12703 (mips_set_pc): Change prototype to take a regcache. Adjust.
12704 (mips_reinsert_addr): Adjust.
12705 (mips_collect_register): Change prototype to take a regcache.
12706 Adjust.
12707 (mips_supply_register):
12708 (mips_collect_register_32bit, mips_supply_register_32bit)
12709 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12710 (mips_store_fpregset): Ditto.
12711 * linux-ppc-low.c (ppc_supply_ptrace_register)
12712 (ppc_supply_ptrace_register): Ditto.
12713 (parse_spufs_run): Adjust.
12714 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12715 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12716 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12717 take a regcache. Adjust.
12718 * linux-s390-low.c (s390_collect_ptrace_register)
12719 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12720 (s390_set_pc): Change prototype to take a regcache. Adjust.
12721 (s390_arch_setup): Adjust.
12722 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12723 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12724 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12725 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12726 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12727 regcache. Adjust.
12728 (sparc_breakpoint_at): Adjust.
12729 * linux-xtensa-low.c (xtensa_fill_gregset):
12730 (xtensa_store_gregset):
12731 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12732 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12733 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12734 prototype to take a regcache. Adjust.
12735 * win32-arm-low.c (arm_fetch_inferior_register)
12736 (arm_store_inferior_register): Change prototype to take a
12737 regcache. Adjust.
12738 * win32-i386-low.c (i386_fetch_inferior_register)
12739 (i386_store_inferior_register): Change prototype to take a
12740 regcache. Adjust.
12741 * win32-low.c (child_fetch_inferior_registers)
12742 (child_store_inferior_registers): Change prototype to take a
12743 regcache. Adjust.
12744 (win32_wait): Adjust.
12745 (win32_fetch_inferior_registers): Change prototype to take a
12746 regcache. Adjust.
12747 (win32_store_inferior_registers): Adjust.
12748 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12749 store_inferior_register>: Change prototype to take a regcache.
12750
12751 2010-01-20 Doug Evans <dje@google.com>
12752
12753 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12754 #ifdef.
12755 (linux_wait_for_event1, linux_init_signals): Ditto.
12756 (W_STOPCODE): Provide definition if missing.
12757
12758 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12759
12760 * linux-low.c (linux_core_of_thread): New.
12761 (compare_ints, show_process, list_threads): New.
12762 (linux_qxfer_osdata): Report threads and cores.
12763 (linux_target_op): Register linux_core_of_thread.
12764 * remote-utils.c (prepare_resume_reply): Report the core.
12765 (buffer_xml_printf): Support %d specifier.
12766 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12767 New.
12768 (handle_query): Handle qXfer:threads. Announce availability
12769 thereof.
12770 * target.h (struct target_ops): New field core_of_thread.
12771
12772 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12773
12774 * Makefile.in (clean): Remove new generated files.
12775 (reg-s390.o, reg-s390.c): Remove rules.
12776 (reg-s390x.o, reg-s390x.c): Likewise.
12777 (s390-linux32.o, s390-linux32.c): Add rules.
12778 (s390-linux64.o, s390-linux64.c): Likewise.
12779 (s390x-linux64.o, s390x-linux64.c): Likewise.
12780 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12781 * linux-s390-low.c: Include <elf.h>.
12782 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12783 (init_registers_s390): Remove prototype.
12784 (init_registers_s390x): Likewise.
12785 (init_registers_s390_linux32): Add prototype.
12786 (init_registers_s390_linux64): Likewise.
12787 (init_registers_s390x_linux64): Likewise.
12788 (s390_num_regs_3264): New define.
12789 (s390_regmap_3264): New global variable.
12790 (s390_cannot_fetch_register): Remove obsolete check.
12791 (s390_cannot_store_register): Likewise.
12792 (s390_collect_ptrace_register): Handle upper/lower register halves.
12793 (s390_supply_ptrace_register): Likewise.
12794 (s390_fill_gregset): Update to register number changes.
12795 (s390_get_hwcap): New routine.
12796 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12797 Install appropriate regmap and register set.
12798
12799 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12800
12801 * server.c (gdbserver_version): Update copyright year to 2010.
12802 * gdbreplay.c (gdbreplay_version): Likewise.
12803
12804 2009-12-28 Doug Evans <dje@google.com>
12805
12806 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12807 elf/external.h. Include <elf.h> instead but only if necessary.
12808
12809 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12810
12811 * linux-low.c (linux_remove_process): Remove `detaching'
12812 parameter. Don't release/detach from thread_db here.
12813 (linux_kill): Release/detach from thread_db here, ...
12814 (linux_detach): ... and here, before actually detaching.
12815 (linux_wait_1): ... and here, when a process exits.
12816 * thread-db.c (any_thread_of): New.
12817 (thread_db_free): Switch the current inferior to a thread of the
12818 passed in process.
12819
12820 2009-12-21 Doug Evans <dje@google.com>
12821
12822 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12823
12824 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12825 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12826 warning ifndef __NR_tkill. Move setting of errno there too.
12827 Delete unnecessary resetting of errno after syscall.
12828 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12829
12830 * configure.ac: Check for dladdr.
12831 * config.in: Regenerate.
12832 * configure: Regenerate.
12833 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12834 (try_thread_db_load): Update.
12835
12836 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12837
12838 2009-12-18 Doug Evans <dje@google.com>
12839
12840 * event-loop.c: Include unistd.h if it exists.
12841
12842 * linux-low.c (my_waitpid): Move definition away from being in
12843 between linux_tracefork_child/linux_test_for_tracefork.
12844
12845 * gdb_proc_service.h (psaddr_t): Fix type.
12846 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12847 signature to match glibc.
12848
12849 2009-12-16 Doug Evans <dje@google.com>
12850
12851 * linux-low.c (linux_read_memory): Fix argument to read.
12852
12853 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12854
12855 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12856 events, don't leave current_inferior pointing at null.
12857
12858 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12859
12860 * win32-low.c (LOG): Delete.
12861 (OUTMSG): Output to stderr.
12862 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12863 on compile time LOG macro.
12864 (win32_wait): Fix debug output.
12865
12866 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12867
12868 * win32-low.c (win32_add_one_solib): If the dll name is
12869 "ntdll.dll", prepend the system directory to the dll path.
12870
12871 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12872
12873 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12874
12875 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12876 Vladimir Prus <vladimir@codesourcery.com>
12877
12878 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12879 * configure.ac: Check for __mcoldfire__ and set
12880 gdb_cv_m68k_is_coldfire.
12881 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12882 reg-cf.o and reg-m68k.o.
12883 * configure: Regenerated.
12884
12885 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12886
12887 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12888 Pass it to thread_db_free.
12889 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12890 proper `detaching' argument to linux_remove_process.
12891 * linux-low.h (thread_db_free): Add `detaching' parameter.
12892 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12893 to thread_db_free.
12894 (thread_db_free): Add `detaching' parameter. Only
12895 call td_ta_clear_event if detaching from process.
12896
12897 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12898
12899 * thread-db.c (thread_db_free): Fix typo.
12900
12901 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12902
12903 PR gdb/10838
12904 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12905
12906 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12907
12908 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12909 with an i686 compiler.
12910 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12911 needed.
12912 * configure: Rebuilt.
12913
12914 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12915
12916 PR gdb/10783
12917
12918 * server.c (handle_search_memory_1): Correct read_addr initialization
12919 in loop for searching subsequent chunks.
12920
12921 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12922
12923 * configure.ac: New --with-libthread-db option.
12924 * thread-db.c: Allow direct dependence on libthread_db.
12925 (thread_db_free): Adjust.
12926 * config.in: Regenerate.
12927 * configure: Likewise.
12928
12929 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12930
12931 PR gdb/10757
12932 * thread-db.c (attach_thread): New function.
12933 (maybe_attach_thread): Return success/failure.
12934 (find_new_threads_callback): Adjust.
12935 (thread_db_find_new_threads): Loop until no new threads.
12936
12937 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12938
12939 * proc-service.c (ps_lgetregs): Formatting.
12940
12941 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12942
12943 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12944 * configure.ac: Adjust.
12945 * linux-low.h (struct process_info_private): Move members to struct
12946 thread_db.
12947 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12948 * linux-low.c (linux_remove_process): Adjust.
12949 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12950 * server.c (handle_query): Move code ...
12951 (handle_monitor_command): ... here. New function.
12952 * target.h (struct target_ops): New member.
12953 * thread-db.c (struct thread_db): New.
12954 (libthread_db_search_path): New variable.
12955 (thread_db_create_event, thread_db_enable_reporting)
12956 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12957 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12958 (try_thread_db_load_1, dladdr_to_soname): New functions.
12959 (try_thread_db_load, thread_db_load_search): New functions.
12960 (thread_db_init): Search for libthread_db.
12961 (thread_db_free): New function.
12962 (thread_db_handle_monitor_command): Likewise.
12963 * config.in: Regenerate.
12964 * configure: Regenerate.
12965
12966 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12967
12968 * spu-low.c (spu_kill): Wait for inferior to terminate.
12969 Call clear_inferiors.
12970 (spu_detach): Call clear_inferiors.
12971
12972 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12973
12974 * aclocal.m4: Regenerate.
12975 * config.in: Likewise.
12976 * configure: Likewise.
12977
12978 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12979
12980 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12981 (parse_spufs_run): New function.
12982 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12983 (ppc_breakpoint_at): Handle SPU breakpoints.
12984
12985 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12986
12987 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12988 (SPUFS_MAGIC): Define.
12989 (spu_enumerate_spu_ids): New function.
12990 (linux_qxfer_spu): New function.
12991 (linux_target_ops): Install linux_qxfer_spu.
12992
12993 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12994
12995 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12996 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12997 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12998 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12999 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13000 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13001 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13002 (init_registers_powerpc_cell32l): Add prototype.
13003 (init_registers_powerpc_cell64l): Likewise.
13004 (ppc_arch_setup): Detect Cell/B.E. architecture.
13005
13006 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13007
13008 * Makefile.in (datarootdir): New variable.
13009
13010 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13011
13012 * linux-low.c (linux_write_memory): Update debugging output.
13013 * Makefile.in (clean): Add new descriptions.
13014 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13015 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13016 * configure.srv: Add new files for arm*-*-linux*.
13017 * linux-arm-low.c: Add new declarations.
13018 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13019 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13020 (HWCAP_VFPv3D16): New.
13021 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13022 instead of __IWMMXT__.
13023 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13024 (arm_arch_setup): New.
13025 (target_regsets): Remove #ifdef. Add VFP regset.
13026 (the_low_target): Use arm_arch_setup.
13027
13028 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13029
13030 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13031 the main thread again.
13032
13033 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13034
13035 Adding Neutrino gdbserver.
13036 * configure: Regenerated.
13037 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13038 * configure.srv (i[34567]86-*-nto*): New target.
13039 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13040 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13041 (nto_comctrl) [__QNX__]: New function.
13042 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13043
13044 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13045
13046 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13047 srv_tgtobj.
13048
13049 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13050 Pedro Alves <pedro@codesourcery.com>
13051
13052 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13053 don't support CONTEXT_EXTENDED_REGISTERS.
13054 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13055 (the_low_target): Install them.
13056 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13057 failing with ERROR_PIPE_NOT_CONNECTED.
13058
13059 2009-06-30 Doug Evans <dje@google.com>
13060 Pierre Muller <muller@ics.u-strasbg.fr>
13061
13062 Add h/w watchpoint support to x86-linux, win32-i386.
13063 * Makefile.in (SFILES): Add i386-low.c
13064 (i386_low_h): Define.
13065 (i386-low.o): Add dependencies.
13066 (linux-x86-low.o): Add i386-low.h dependency.
13067 (win32-i386-low.o): Ditto.
13068 * i386-low.c: New file.
13069 * i386-low.h: New file.
13070 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13071 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13072 * linux-low.c (linux_add_process): Initialize arch_private.
13073 (linux_remove_process): Free arch_private.
13074 (add_lwp): Initialize arch_private.
13075 (delete_lwp): Free arch_private.
13076 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13077 provided.
13078 * linux-low.h (process_info_private): New member arch_private.
13079 (lwp_info): New member arch_private.
13080 (linux_target_ops): New members new_process, new_thread,
13081 prepare_to_resume.
13082 (ptid_of): New macro.
13083 * linux-x86-low.c: Include stddef.h, i386-low.h.
13084 (arch_process_info): New struct.
13085 (arch_lwp_info): New struct.
13086 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13087 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13088 (i386_dr_low_get_status): New function.
13089 (x86_insert_point, x86_remove_point): New functions.
13090 (x86_stopped_by_watchpoint): New function.
13091 (x86_stopped_data_address): New function.
13092 (x86_linux_new_process, x86_linux_new_thread): New functions.
13093 (x86_linux_prepare_to_resume): New function.
13094 (the_low_target): Add entries for insert_point, remove_point,
13095 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13096 prepare_to_resume.
13097 * server.c (debug_hw_points): New global.
13098 (monitor_show_help): Document set debug-hw-points.
13099 (handle_query): Process "set debug-hw-points".
13100 * server.h (debug_hw_points): Declare.
13101 (paddress): Declare.
13102 * utils.c (NUMCELLS, CELLSIZE): New macros.
13103 (get_sell, xsnprintf, paddress): New functions.
13104 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13105 remove_point, stopped_by_watchpoint, stopped_data_address.
13106 * win32-i386-low.c: Include i386-low.h.
13107 (debug_reg_state): Replaces dr.
13108 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13109 (i386_dr_low_get_status): New function.
13110 (i386_insert_point, i386_remove_point): New functions.
13111 (i386_stopped_by_watchpoint): New function.
13112 (i386_stopped_data_address): New function.
13113 (i386_initial_stuff): Update.
13114 (get_thread_context,set_thread_context,i386_thread_added): Update.
13115 (the_low_target): Add entries for insert_point,
13116 remove_point, stopped_by_watchpoint, stopped_data_address.
13117 * win32-low.c (win32_insert_watchpoint): New function.
13118 (win32_remove_watchpoint): New function.
13119 (win32_stopped_by_watchpoint): New function.
13120 (win32_stopped_data_address): New function.
13121 (win32_target_ops): Add entries for insert_watchpoint,
13122 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13123 * win32-low.h (win32_target_ops): New members insert_point,
13124 remove_point, stopped_by_watchpoint, stopped_data_address.
13125
13126 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13127
13128 * server.c (process_serial_event): Re-return unsupported, not
13129 error, if the type isn't recognized. Re-allow supporting only
13130 insert or remove packets. Also call require_running for
13131 breakpoints. Add missing break statement to default case. Tidy.
13132 * target.h (struct target_ops): Rename insert_watchpoint to
13133 insert_point, and remove_watchpoint to remove_point.
13134
13135 * linux-low.h (struct linux_target_ops): Likewise.
13136 * linux-low.c (linux_insert_watchpoint): Rename to ...
13137 (linux_insert_point): ... this. Adjust.
13138 (linux_remove_watchpoint): Rename to ...
13139 (linux_remove_point): ... this. Adjust.
13140 (linux_target_ops): Adjust.
13141 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13142 (cris_insert_point): ... this.
13143 (cris_remove_watchpoint): Rename to ...
13144 (cris_remove_point): ... this.
13145 (the_low_target): Adjust.
13146
13147 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13148
13149 * server.c (handle_v_kill): Pass signal_pid to
13150 kill_inferior if multi_process is zero.
13151
13152 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13153
13154 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13155 * target.h (target_ops): Comment for *_watchpoint to make it clear
13156 the functions can get types '0' and '1'.
13157
13158 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13159
13160 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13161 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13162 * regcache.c (get_regcache): Likewise.
13163 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13164 * win32-low.c (child_fetch_inferior_registers): Remove check for
13165 regno 0.
13166
13167 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13168 Pedro Alves <pedro@codesourcery.com>
13169
13170 * target.h (struct target_ops) <supports_multi_process>: New
13171 callback.
13172 (target_supports_multi_process): New.
13173 * server.c (handle_query): Even if GDB reports support, only
13174 enable multi-process if the target also supports it. Report
13175 multi-process support only if the target backend supports it.
13176 * linux-low.c (linux_supports_multi_process): New function.
13177 (linux_target_ops): Install it as target_supports_multi_process
13178 callback.
13179
13180 2009-05-24 Doug Evans <dje@google.com>
13181
13182 Global renaming of find_thread_pid to find_thread_ptid.
13183 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13184 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13185 All callers updated.
13186
13187 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13188 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13189 directly.
13190
13191 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13192 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13193 (linux_resume_one_lwp): Ditto.
13194
13195 2009-05-23 Doug Evans <dje@google.com>
13196
13197 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13198 from struct inferior_list_entry * to struct lwp_info *.
13199 All callers updated.
13200
13201 2009-05-13 Doug Evans <dje@google.com>
13202
13203 * linux-x86-low.c: Don't include assert.h.
13204 (x86_siginfo_fixup): Use fatal, not assert.
13205 (x86_arch_setup): Fix comment.
13206
13207 2009-05-12 Doug Evans <dje@google.com>
13208
13209 Biarch support for i386/amd64 gdbserver.
13210 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13211 Add linux-x86-low.c.
13212 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13213 (linux-x86-low.o): Add.
13214 * linux-x86-64-low.c: Delete.
13215 * linux-i386-low.c: Delete.
13216 * linux-x86-low.c: New file.
13217 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13218 linux-x86-low.o.
13219 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13220 linux-x86-low.o.
13221 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13222 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13223 (linux_child_pid_to_exec_file): New function.
13224 (elf_64_header_p, elf_64_file_p): New functions.
13225 (siginfo_fixup): New function.
13226 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13227 give target a chance to convert layout.
13228 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13229 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13230
13231 2009-05-07 Doug Evans <dje@google.com>
13232
13233 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13234 (regsets_store_inferior_registers): Ditto.
13235
13236 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13237
13238 PR server/10048
13239
13240 * linux-low.c (must_set_ptrace_flags): Delete.
13241 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13242 of the global.
13243 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13244 `lwp->must_set_ptrace_flags' instead.
13245 (linux_wait_for_event_1): Set ptrace options here.
13246 (linux_wait_1): ... not here.
13247
13248 2009-04-30 Doug Evans <dje@google.com>
13249
13250 * inferiors.c (started_inferior_callback): New function.
13251 (attached_inferior_callback): New function.
13252 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13253 * server.c (print_started_pid, print_attached_pid): New functions.
13254 (detach_or_kill_for_exit): New function.
13255 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13256 * server.h (have_started_inferiors_p): Declare.
13257 (have_attached_inferiors_p): Declare.
13258
13259 * inferiors.c (remove_process): Fix memory leak, free process.
13260 * linux-low.c (linux_remove_process): New function.
13261 (linux_kill): Call it instead of remove_process.
13262 (linux_detach, linux_wait_1): Ditto.
13263
13264 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13265
13266 * configure.srv: Add x86 Windows CE target.
13267
13268 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13269
13270 * inferiors.c (get_thread_process): Make global.
13271 * server.h (get_thread_process): Add prototype.
13272 * thread-db.c (find_one_thread): Use get_thread_process
13273 instead of current_process.
13274 (thread_db_get_tls_address): Do not crash if called when
13275 thread layer is not yet initialized.
13276
13277 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13278
13279 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13280 * spu-low.c (current_tid): Rename to ...
13281 (current_ptid): ... this.
13282 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13283 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13284 ptid_get_lwp (current_ptid) instead of current_tid.
13285 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13286 instead of current_tid. Use find_process_pid to verify pid
13287 argument is valid. Pass proper argument to remove_process.
13288 (spu_thread_alive): Compare current_ptid instead of current_tid.
13289 (spu_resume): Likewise.
13290
13291 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13292
13293 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13294 variable.
13295
13296 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13297
13298 Implement the multiprocess extensions, and add linux multiprocess
13299 support.
13300
13301 * server.h (ULONGEST): Declare.
13302 (struct ptid, ptid_t): New.
13303 (minus_one_ptid, null_ptid): Declare.
13304 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13305 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13306 (struct inferior_list_entry): Change `id' type from unsigned from
13307 to ptid_t.
13308 (struct sym_cache, struct breakpoint, struct
13309 process_info_private): Forward declare.
13310 (struct process_info): Declare.
13311 (current_process): Declare.
13312 (all_processes): Declare.
13313 (initialize_inferiors): Declare.
13314 (add_thread): Adjust to use ptid_t.
13315 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13316 (add_process, remove_process, find_thread_pid): Declare.
13317 (find_inferior_id): Adjust to use ptid_t.
13318 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13319 (multi_process): Declare.
13320 (push_event): Adjust to use ptid_t.
13321 (read_ptid, write_ptid): Declare.
13322 (prepare_resume_reply): Adjust to use ptid_t.
13323 (clear_symbol_cache): Declare.
13324 * inferiors.c (all_processes): New.
13325 (null_ptid, minus_one_ptid): New.
13326 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13327 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13328 (add_thread): Change unsigned long to ptid. Remove gdb_id
13329 parameter. Adjust.
13330 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13331 (gdb_id_to_thread): Rename to ...
13332 (find_thread_pid): ... this. Change unsigned long to ptid.
13333 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13334 (loaded_dll, pull_pid_from_list): Adjust.
13335 (add_process, remove_process, find_process_pid)
13336 (get_thread_process, current_process, initialize_inferiors): New.
13337 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13338 (struct target_waitstatus) <related_pid>: Ditto.
13339 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13340 return type to int.
13341 (struct target_ops) <join>: Add `pid' argument.
13342 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13343 (struct target_ops) <wait>: Add `ptid' field. Change return type
13344 to ptid.
13345 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13346 (mywait): Add `ptid' argument. Change return type to ptid_t.
13347 (target_pid_to_str): Declare.
13348 * target.c (set_desired_inferior): Adjust to use ptids.
13349 (mywait): Add new `ptid' argument. Adjust.
13350 (target_pid_to_str): New.
13351 * mem-break.h (free_all_breakpoints): Declare.
13352 * mem-break.c (breakpoints): Delelete.
13353 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13354 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13355 to use per-process breakpoint list.
13356 (free_all_breakpoints): New.
13357 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13358 (symbol_cache, all_symbols_looked_up): Delete.
13359 (hexchars): New.
13360 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13361 read_ptid): New.
13362 (prepare_resume_reply): Change ptid argument's type from unsigned
13363 long to ptid_t. Adjust. Implement W;process and X;process.
13364 (free_sym_cache, clear_symbol_cache): New.
13365 (look_up_one_symbol): Adjust to per-process symbol cache. *
13366 * server.c (cont_thread, general_thread, step_thread): Change type
13367 to ptid_t.
13368 (attached): Delete.
13369 (multi_process): New.
13370 (last_ptid): Change type to ptid_t.
13371 (struct vstop_notif) <ptid>: Change type to ptid_t.
13372 (queue_stop_reply, push_event): Change `ptid' argument's type to
13373 ptid_t.
13374 (discard_queued_stop_replies): Add `pid' argument.
13375 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13376 changes. Don't reference the `attached' global.
13377 (attach_inferior): Adjust to mywait interface changes.
13378 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13379 features. Handle and report "multiprocess+". Handle
13380 "qAttached:PID".
13381 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13382 changes.
13383 (handle_v_kill): New.
13384 (handle_v_stopped): Adjust to use target_pid_to_str.
13385 (handle_v_requests): Allow multiple attaches and runs when
13386 multiprocess extensions are in effect. Handle "vKill".
13387 (myresume): Adjust to use ptids.
13388 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13389 (handle_status): Adjust to discard_queued_stop_replies interface
13390 change.
13391 (first_thread_of, kill_inferior_callback)
13392 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13393 (main): Call initialize_inferiors. Adjust to use ptids, killing
13394 and detaching from all inferiors. Handle multiprocess packet
13395 variants.
13396 * linux-low.h: Include gdb_proc_service.h.
13397 (struct process_info_private): New.
13398 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13399 <lwpid_of>: Use ptid_get_lwp.
13400 (get_lwp_thread): Adjust.
13401 (struct lwp_info): Add `dead' member.
13402 (find_lwp_pid): Declare.
13403 * linux-low.c (thread_db_active): Delete.
13404 (new_inferior): Adjust comment.
13405 (inferior_pid): Delete.
13406 (linux_add_process): New.
13407 (handle_extended_wait): Adjust.
13408 (add_lwp): Change unsigned long to ptid.
13409 (linux_create_inferior): Add process to processes table. Adjust
13410 to use ptids. Don't set new_inferior here.
13411 (linux_attach_lwp): Rename to ...
13412 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13413 it. Adjust to use ptids.
13414 (linux_attach_lwp): New.
13415 (linux_attach): Add process to processes table. Don't set
13416 new_inferior here.
13417 (struct counter): New.
13418 (second_thread_of_pid_p, last_thread_of_process_p): New.
13419 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13420 multiple processes.
13421 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13422 processes. Remove process from process table.
13423 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13424 to multiple processes.
13425 (any_thread_of): New.
13426 (linux_detach): Add `pid' argument, and handle it. Remove process
13427 from processes table.
13428 (linux_join): Add `pid' argument. Handle it.
13429 (linux_thread_alive): Change unsighed long argument to ptid_t.
13430 Consider dead lwps as not being alive.
13431 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13432 threads we're not interested in.
13433 (same_lwp, find_lwp_pid): New.
13434 (linux_wait_for_lwp): Change `pid' argument's type from int to
13435 ptid_t. Adjust.
13436 (linux_wait_for_event): Rename to ...
13437 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13438 from int to ptid_t. Adjust.
13439 (linux_wait_for_event): New.
13440 (linux_wait_1): Add `ptid' argument. Change return type to
13441 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13442 that exit from the process table.
13443 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13444 Adjust.
13445 (mark_lwp_dead): New.
13446 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13447 stopping all threads, mark its main lwp as dead.
13448 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13449 ptids.
13450 (fetch_register, usr_store_inferior_registers)
13451 (regsets_fetch_inferior_registers)
13452 (regsets_store_inferior_registers, linux_read_memory)
13453 (linux_write_memory): Inline `inferior_pid'.
13454 (linux_look_up_symbols): Adjust to use per-process
13455 `thread_db_active'.
13456 (linux_request_interrupt): Adjust to use ptids.
13457 (linux_read_auxv): Inline `inferior_pid'.
13458 (initialize_low): Don't reference thread_db_active.
13459 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13460 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13461 (ps_getpid): Return the pid of the current inferior.
13462 * thread-db.c (proc_handle, thread_agent): Delete.
13463 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13464 per-process data.
13465 (find_one_thread): Change argument type to ptid_t. Adjust to
13466 per-process data.
13467 (maybe_attach_thread): Adjust to per-process data and ptids.
13468 (thread_db_find_new_threads): Ditto.
13469 (thread_db_init): Ditto.
13470 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13471 processes table. Adjust to use ptids.
13472 (spu_kill, spu_detach): Adjust interface. Remove process from
13473 processes table.
13474 (spu_join, spu_thread_alive): Adjust interface.
13475 (spu_wait): Adjust interface. Remove process from processes
13476 table. Adjust to use ptids.
13477 * win32-low.c (current_inferior_tid): Delete.
13478 (current_inferior_ptid): New.
13479 (debug_event_ptid): New.
13480 (thread_rec): Take a ptid. Adjust.
13481 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13482 (child_delete_thread): Ditto.
13483 (do_initial_child_stuff): Add `attached' argument. Add process to
13484 processes table.
13485 (child_fetch_inferior_registers, child_store_inferior_registers):
13486 Adjust.
13487 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13488 (win32_attach): Pass 1 to do_initial_child_stuff.
13489 (win32_kill): Adjust interface. Remove process from processes
13490 table.
13491 (win32_detach): Ditto.
13492 (win32_join): Adjust interface.
13493 (win32_thread_alive): Take a ptid.
13494 (win32_resume): Adjust to use ptids.
13495 (get_child_debug_event): Ditto.
13496 (win32_wait): Adjust interface. Remove exiting process from
13497 processes table.
13498
13499 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13500
13501 Non-stop mode support.
13502
13503 * server.h (non_stop): Declare.
13504 (gdb_client_data, handler_func): Declare.
13505 (delete_file_handler, add_file_handler, start_event_loop):
13506 Declare.
13507 (handle_serial_event, handle_target_event, push_event)
13508 (putpkt_notif): Declare.
13509 * target.h (enum resume_kind): New.
13510 (struct thread_resume): Replace `step' field by `kind' field.
13511 (TARGET_WNOHANG): Define.
13512 (struct target_ops) <wait>: Add `options' argument.
13513 <supports_non_stop, async, start_non_stop>: New fields.
13514 (target_supports_non_stop, target_async): New.
13515 (start_non_stop): Declare.
13516 (mywait): Add `options' argument.
13517 * target.c (mywait): Add `options' argument. Print child exit
13518 notifications here.
13519 (start_non_stop): New.
13520 * server.c (non_stop, own_buf, mem_buf): New globals.
13521 (struct vstop_notif): New.
13522 (notif_queue): New global.
13523 (queue_stop_reply, push_event, discard_queued_stop_replies)
13524 (send_next_stop_reply): New.
13525 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13526 interface changes.
13527 (attach_inferior): In non-stop mode, don't wait for the target
13528 here.
13529 (handle_general_set): Handle QNonStop.
13530 (handle_query): When handling qC, return the current general
13531 thread, instead of the first thread of the list.
13532 (handle_query): If the backend supports non-stop mode, include
13533 QNonStop+ in the qSupported query response.
13534 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13535 and non-stop mode.
13536 (handle_v_attach, handle_v_run): Handle non-stop mode.
13537 (handle_v_stopped): New.
13538 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13539 (myresume): Adjust to use resume_kind. Handle non-stop.
13540 (queue_stop_reply_callback): New.
13541 (handle_status): Handle non-stop mode.
13542 (main): Clear non_stop flag on reconnection. Use the event-loop.
13543 Refactor serial protocol handling from here ...
13544 (process_serial_event): ... to this new function. When GDB
13545 selects any thread, select one here. In non-stop mode, wait until
13546 GDB acks all pending events before exiting.
13547 (handle_serial_event, handle_target_event): New.
13548 * remote-utils.c (remote_open): Install remote_desc in the event
13549 loop.
13550 (remote_close): Remove remote_desc from the event loop.
13551 (putpkt_binary): Rename to...
13552 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13553 (putpkt_binary): New as wrapper around putpkt_binary_1.
13554 (putpkt_notif): New.
13555 (prepare_resume_reply): In non-stop mode, don't change the
13556 general_thread.
13557 * event-loop.c: New.
13558 * Makefile.in (OBJ): Add event-loop.o.
13559 (event-loop.o): New rule.
13560
13561 * linux-low.h (pid_of): Moved here.
13562 (lwpid_of): New.
13563 (get_lwp_thread): Use lwpid_of.
13564 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13565 * linux-low.c (pid_of): Delete.
13566 (inferior_pid): Use lwpid_of.
13567 (linux_event_pipe): New.
13568 (target_is_async_p): New.
13569 (delete_lwp): New.
13570 (handle_extended_wait): Use lwpid_of.
13571 (add_lwp): Don't set lwpid field.
13572 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13573 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13574 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13575 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13576 first. Adjust to linux_wait_for_event interface changes. Use
13577 lwpid_of.
13578 (linux_detach): Don't delete the main lwp here.
13579 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13580 (status_pending_p): Don't consider explicitly suspended lwps.
13581 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13582 pointer. Add OPTIONS argument. Change return type to int. Use
13583 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13584 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13585 pointer. Add status pointer argument. Return a pid instead of a
13586 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13587 changes. In non-stop mode, don't switch to a random thread.
13588 (linux_wait): Rename to...
13589 (linux_wait_1): ... this. Add target_options argument, and handle
13590 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13591 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13592 clean exit and signal exit code. Don't stop all threads in
13593 non-stop mode. In all-stop mode, only stop all threads when
13594 reporting a stop to GDB. Handle explicit thread stop requests.
13595 (async_file_flush, async_file_mark): New.
13596 (linux_wait): New.
13597 (send_sigstop): Use lwpid_of.
13598 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13599 interface changes. In non-stop mode, don't switch to a random
13600 thread.
13601 (linux_resume_one_lwp): Use lwpid_of.
13602 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13603 (linux_resume_one_thread): ... this. Handle resume_stop. In
13604 non-stop mode, don't look for pending flag in all threads.
13605 (resume_status_pending_p): Don't consider explicitly suspended
13606 threads.
13607 (my_waitpid): Reimplement. Emulate __WALL.
13608 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13609 Use lwpid_of.
13610 (sigchld_handler, linux_supports_non_stop, linux_async)
13611 (linux_start_non_stop): New.
13612 (linux_target_ops): Register linux_supports_non_stop, linux_async
13613 and linux_start_non_stop.
13614 (initialize_low): Install SIGCHLD handler.
13615 * thread-db.c (thread_db_create_event, find_one_thread)
13616 (thread_db_get_tls_address): Use lwpid_of.
13617 * win32-low.c (win32_detach): Adjust to use resume_kind.
13618 (win32_wait): Add `options' argument.
13619 * spu-low.c (spu_resume): Adjust to use resume_kind.
13620 (spu_wait): Add `options' argument.
13621
13622 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13623
13624 Decouple target code from remote protocol.
13625
13626 * target.h (enum target_waitkind): New.
13627 (struct target_waitstatus): New.
13628 (struct target_ops) <wait>: Return an unsigned long. Take a
13629 target_waitstatus pointer instead of a char pointer.
13630 (mywait): Likewise.
13631 * target.c (mywait): Change prototype to return an unsigned long.
13632 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13633 * server.h (thread_from_wait, old_thread_from_wait): Delete
13634 declarations.
13635 (prepare_resume_reply): Change prototype to take a
13636 target_waitstatus.
13637 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13638 (last_status, last_ptid): New.
13639 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13640 pid instead of a signal.
13641 (attach_inferior): Remove "status" and "signal" parameters.
13642 Adjust.
13643 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13644 not as an address.
13645 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13646 (handle_v_requests, myresume): Remove "status" and "signal"
13647 parameters. Adjust.
13648 (handle_status): New.
13649 (main): Delete local `status'. Adjust.
13650 * remote-utils.c: Include target.h.
13651 (prepare_resume_reply): Change prototype to take a
13652 target_waitstatus. Adjust.
13653
13654 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13655 interface.
13656 * spu-low.c (spu_wait): Adjust.
13657 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13658 Delete.
13659 (win32_wait): Adjust.
13660
13661 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13662
13663 * target.h (struct thread_resume): Delete leave_stopped member.
13664 (struct target_ops): Add a `n' argument to the `resume' callback.
13665 * server.c (start_inferior): Adjust.
13666 (handle_v_cont, myresume): Adjust.
13667 * linux-low.c (check_removed_breakpoint): Adjust to resume
13668 interface change, and to removed leave_stopped field.
13669 (resume_ptr): Delete.
13670 (struct thread_resume_array): New.
13671 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13672 resume interface change.
13673 (linux_continue_one_thread, linux_queue_one_thread)
13674 (resume_status_pending_p): Check if the resume field is NULL
13675 instead of checking the leave_stopped member.
13676 (linux_resume): Adjust to the target resume interface change.
13677 * spu-low.c (spu_resume): Adjust to the target resume interface
13678 change.
13679 * win32-low.c (win32_detach, win32_resume): Ditto.
13680
13681 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13682
13683 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13684 flag.
13685 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13686 pending.
13687 (linux_continue_one_thread): Only preserve the stepping flag if
13688 there's a pending breakpoint.
13689
13690 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13691
13692 * server.c (main): After the inferior having exited, call
13693 remote_close before exiting gdbserver.
13694
13695 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13696
13697 Fix size of FPSCR in Power 7 processors.
13698 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13699 (PPC_FEATURE_HAS_DFP): New #define.
13700 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13701 size of the FPSCR.
13702
13703 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13704
13705 * server.c (handle_query) Whitespace and formatting.
13706
13707 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13708
13709 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13710 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13711 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13712 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13713 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13714 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13715 Makefile.in, configure.ac: Fix whitespace throughout.
13716 * configure: Regenerate.
13717
13718 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13719
13720 * inferiors.c (find_inferior): Make it safe for the callback
13721 function to delete the currently iterated inferior.
13722
13723 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13724
13725 * Makefile.in (linuw_low_h): Move higher.
13726 (thread-db.o): Depend on $(linux_low_h).
13727
13728 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13729
13730 Rename "process" to "lwp" throughout.
13731
13732 * linux-low.c (all_processes): Rename to...
13733 (all_lwps): ... this.
13734 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13735 (add_process): Rename to ...
13736 (add_lwp): ... this. Adjust.
13737 (linux_create_inferior): Adjust.
13738 (linux_attach_lwp): Adjust.
13739 (linux_attach): Adjust.
13740 (linux_kill_one_process): Rename to ...
13741 (linux_kill_one_lwp): ... this. Adjust.
13742 (linux_kill): Adjust.
13743 (linux_detach_one_process): Rename to ...
13744 (linux_detach_one_lwp): ... this. Adjust.
13745 (linux_detach): Adjust.
13746 (check_removed_breakpoint): Adjust.
13747 (status_pending_p): Adjust.
13748 (linux_wait_for_process): Rename to ...
13749 (linux_wait_for_lwp): ... this. Adjust.
13750 (linux_wait_for_event): Adjust.
13751 (send_sigstop): Adjust.
13752 (wait_for_sigstop): Adjust.
13753 (stop_all_processes): Rename to ...
13754 (stop_all_lwps): ... this.
13755 (linux_resume_one_process): Rename to ...
13756 (linux_resume_one_lwp): ... this. Adjust.
13757 (linux_set_resume_request, linux_continue_one_thread)
13758 (linux_queue_one_thread, resume_status_pending_p)
13759 (usr_store_inferior_registers, regsets_store_inferior_registers)
13760 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13761 Adjust.
13762 * linux-low.h (get_process): Rename to ...
13763 (get_lwp): ... this. Adjust.
13764 (get_thread_process): Rename to ...
13765 (get_thread_lwp): ... this. Adjust.
13766 (get_process_thread): Rename to ...
13767 (get_lwp_thread): ... this. Adjust.
13768 (struct process_info): Rename to ...
13769 (struct lwp_info): ... this.
13770 (all_processes): Rename to ...
13771 (all_lwps): ... this.
13772 * proc-service.c (ps_lgetregs): Adjust.
13773 * thread-db.c (thread_db_create_event, find_one_thread)
13774 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13775
13776 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13777
13778 * server.c (handle_query): Handle "qAttached".
13779
13780 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13781
13782 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13783 GPLv3, update license URL.
13784
13785 2009-03-01 Doug Evans <dje@google.com>
13786
13787 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13788 (server_h): Add gdb_signals.h.
13789 (signals.o): Update.
13790 * server.h (target_signal_from_host,target_signal_to_host_p)
13791 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13792
13793 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13794
13795 * remote-utils.c (getpkt): Also generate remote-debug
13796 information if noack_mode is set.
13797
13798 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13799
13800 * server.c (handle_query): Report qXfer:siginfo:read and
13801 qXfer:siginfo:write as supported and handle them.
13802 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13803 * linux-low.c (linux_xfer_siginfo): New.
13804 (linux_target_ops): Set it.
13805
13806 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13807
13808 * server.c (gdbserver_usage): Mention --remote-debug.
13809 (main): Accept '--remote-debug' switch.
13810
13811 2009-01-18 Doug Evans <dje@google.com>
13812
13813 * regcache.c (new_register_cache): No need to check result of xcalloc.
13814 * server.c (handle_search_memory): Back out calls to xmalloc,
13815 result is checked and error is returned to user upon failure.
13816 (handle_query): Ditto. Add more checks for result of malloc.
13817 (handle_v_cont): Check result of malloc, report error back to
13818 user upon failure.
13819 (handle_v_run): Ditto. Call freeargv.
13820 * server.h (freeargv): Declare.
13821 * utils.c (freeargv): New fn.
13822
13823 2009-01-15 Doug Evans <dje@google.com>
13824
13825 * gdbreplay.c (perror_with_name): Make arg const char *.
13826 * server.h (target_signal_to_name): Make return type const char *.
13827 * thread-db.c (thread_db_err_str): Make return type const char *.
13828 * utils.c (perror_with_name): Make arg const char *.
13829
13830 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13831
13832 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13833 when handling a EXIT_PROCESS_DEBUG_EVENT.
13834
13835 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13836
13837 * gdbreplay.c (gdbreplay_version): Update copyright year.
13838 * server.c (gdbserver_version): Likewise.
13839
13840 2009-01-05 Doug Evans <dje@google.com>
13841
13842 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13843 (handle_extended_wait): Improve comment.
13844
13845 2008-12-13 Doug Evans <dje@google.com>
13846
13847 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13848 * server.h (ATTR_MALLOC): New macro.
13849 (xmalloc,xcalloc,xstrdup): Declare.
13850 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13851 * inferiors.c: Ditto.
13852 * linux-low.c: Ditto.
13853 * mem-break.c: Ditto.
13854 * regcache.c: Ditto.
13855 * remote-utils.c: Ditto.
13856 * server.c: Ditto.
13857 * target.c: Ditto.
13858 * win32-low.c: Ditto.
13859
13860 2008-12-12 Doug Evans <dje@google.com>
13861
13862 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13863 in debugging printf.
13864
13865 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13866
13867 2008-12-09 Doug Evans <dje@google.com>
13868
13869 * linux-low.h (struct process_info): Delete member tid, unused.
13870 * thread-db.c (find_one_thread): Update.
13871 (maybe_attach_thread): Update.
13872
13873 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13874
13875 * target.h (struct target_ops): Add qxfer_osdata member.
13876 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13877 and dirent.h.
13878 (linux_qxfer_osdata): New functions.
13879 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13880 callback.
13881 * server.c (handle_query): Handle "qXfer:osdata:read:".
13882 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13883 (buffer_xml_printf): New functions.
13884 * server.h (struct buffer): New.
13885 (buffer_grow_str, buffer_grow_str0): New macros.
13886 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13887 (buffer_xml_printf): Declare.
13888
13889 2008-11-24 Doug Evans <dje@google.com>
13890
13891 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13892
13893 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13894
13895 * server.c (handle_v_run): Always use the supplied argument list.
13896
13897 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13898
13899 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13900 (xtensa_regmap_table): Add entry for scompare1.
13901
13902 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13903
13904 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13905 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13906 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13907 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13908 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13909 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13910 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13911 XML target descriptions.
13912 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13913 when inferior is running on an ISA 2.05 or later processor. Add
13914 special case to return offset for full 64-bit slot of FPSCR when
13915 in 32-bits.
13916
13917 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13918
13919 * Makefile.in (SFILES, clean): Added sparc64 files.
13920 (reg-sparc64.o, reg-sparc64.c): New.
13921 * configure.srv (sparc*-*-linux*): New configuration.
13922 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13923 syscall arguments for SPARC.
13924 (regsets_store_inferior_registers): Likewise.
13925 * linux-sparc-low.c: New file.
13926
13927 2008-10-21 Doug Evans <dje@google.com>
13928
13929 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13930 (READLINE_DIR,READLINE_DEP): Delete.
13931 (INTERNAL_CFLAGS): Update.
13932 (LINTFLAGS): Update.
13933
13934 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13935
13936 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13937 whole argv from the last run, not just argv[0].
13938
13939 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13940
13941 * regcache.c (new_register_cache): Return NULL if the register
13942 cache size isn't known yet.
13943 (free_register_cache): Avoid dereferencing a NULL regcache.
13944
13945 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13946
13947 * configure.srv: Merge MIPS and MIPS64.
13948
13949 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13950
13951 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13952
13953 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13954
13955 * Makefile.in: Add required vsx dependencies.
13956
13957 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13958 Declare init_registers_powerpc_vsx32l.
13959 Declare init_registers_powerpc_vsx64l.
13960 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13961 (ppc_arch_setup): Check for VSX in hwcap.
13962 (ppc_fill_vsxregset): New function.
13963 (ppc_store_vsxregset): New function.
13964 Add new VSX entry in regset_info target_regsets.
13965
13966 * configure.srv: Add new VSX dependencies.
13967
13968 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13969
13970 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13971 (remote_open): Set or clear transport_is_reliable.
13972 (putpkt_binary): Don't expect acks in noack mode.
13973 (getpkt): Don't send ack/nac in noack mode.
13974 * server.c (handle_general_set): Handle QStartNoAckMode.
13975 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13976 qSupported.
13977 (main): Reset noack_mode on every connection.
13978 * server.h (noack_mode): Declare.
13979
13980 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13981
13982 * Makefile.in (GDBREPLAY_OBS): New variable.
13983 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13984
13985 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13986 Daniel Jacobowitz <dan@codesourcery.com>
13987
13988 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13989 (usr_store_inferior_registers): Likewise.
13990 (regsets_store_inferior_registers): Likewise.
13991
13992 2008-07-31 Rolf Jansen <rj@surtec.com>
13993 Pedro Alves <pedro@codesourcery.com>
13994
13995 * configure.ac: Check for memmem declaration.
13996 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13997 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13998 (disable_packet_qfThreadInfo): Unconditionally compile.
13999 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14000 * configure, config.in: Regenerate.
14001
14002 2008-07-28 Doug Kwan <dougkwan@google.com>
14003
14004 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14005 (linux_write_memory): Remove declaration of errno.
14006
14007 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14008
14009 * linux-low.c (handle_extended_wait): Do not use "status"
14010 variable uninitialized.
14011
14012 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14013
14014 * server.c (handle_v_attach): Inhibit reporting dll changes.
14015
14016 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14017
14018 * remote-utils.c (prepare_resume_reply): If requested, don't
14019 output "thread:TID" in the T stop reply.
14020
14021 * server.c (disable_packet_vCont, disable_packet_Tthread)
14022 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14023 (handle_query): If requested, disable support for qC, qfThreadInfo
14024 and qsThreadInfo.
14025 (handle_v_requests): If requested, disable support for vCont.
14026 (gdbserver_show_disableable): New.
14027 (main): Handle --disable-packet and --disable-packet=LIST.
14028
14029 * server.h (disable_packet_vCont, disable_packet_Tthread)
14030 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14031
14032 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14033
14034 * server.c (gdbserver_usage): Mention --version.
14035
14036 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14037
14038 * Makefile.in (gdbreplay.o): New rule.
14039
14040 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14041
14042 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14043 message, not gdbserver.
14044
14045 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14046 Nathan Sidwell <nathan@codesourcery.com>
14047 Joseph Myers <joseph@codesourcery.com>
14048
14049 * acinclude.m4: Include ../../config/acx.m4.
14050 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14051 * configure, config.in: Regenerate.
14052 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14053 * server.c (gdbserver_version): Print PKGVERSION.
14054 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14055 (main): Adjust gdbserver_usage calls.
14056 * gdbreplay.c (version, host_name): Add declarations.
14057 (gdbreplay_version, gdbreplay_usage): New.
14058 (main): Accept --version and --help options.
14059
14060 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14061
14062 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14063 (arm_breakpoint_at): Handle Thumb.
14064 (the_low_target): Add comment.
14065
14066 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14067
14068 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14069
14070 2008-05-09 Doug Evans <dje@google.com>
14071
14072 * server.h (decode_search_memory_packet): Declare.
14073 * remote-utils.c (decode_search_memory_packet): New fn.
14074 * server.c (handle_search_memory_1): New fn.
14075 (handle_search_memory): New fn.
14076 (handle_query): Process qSearch:memory packets.
14077
14078 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14079
14080 * regcache.c (registers_length): Remove.
14081 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14082 full register packet.
14083 * regcache.h (registers_length): Remove prototype.
14084 * server.h (PBUFSIZ): Define to 16384.
14085
14086 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14087
14088 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14089 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14090 powerpc-64l.o, and powerpc-altivec64l.o.
14091 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14092 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14093 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14094 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14095 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14096 to srv_xmlfiles.
14097
14098 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14099 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14100 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14101 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14102 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14103 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14104 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14105 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14106 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14107 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14108 (clean): Update.
14109
14110 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14111 (init_registers_powerpc_32l): ... this new prototype.
14112 (init_registers_powerpc_32): Remove, replace by ...
14113 (init_registers_powerpc_altivec32l): ... this new prototype.
14114 (init_registers_powerpc_e500): Remove, replace by ...
14115 (init_registers_powerpc_e500l): ... this new prototype.
14116 (init_registers_ppc64): Remove, replace by ...
14117 (init_registers_powerpc_64l): ... this new prototype.
14118 (init_registers_powerpc_64): Remove, replace by ...
14119 (init_registers_powerpc_altivec64l): ... this new prototype.
14120 (ppc_num_regs): Set to 73.
14121 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14122 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14123 (ppc_cannot_store_register): Handle orig_r3 and trap.
14124 (ppc_arch_setup): Update init_registers_... calls.
14125 (ppc_fill_gregset): Handle orig_r3 and trap.
14126
14127 * inferiors.c (clear_inferiors): Reset current_inferior.
14128
14129 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14130
14131 * acinclude.m4: Add override.m4.
14132 * configure: Regenerate.
14133
14134 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14135
14136 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14137 initial call to init_register_ppc64.
14138
14139 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14140
14141 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14142 single powerpc*-*-linux* case.
14143 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14144
14145 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14146
14147 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14148 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14149 from reg_xmlfiles.
14150 * linux-ppc-low.c: Include <elf.h>.
14151 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14152 (ppc_hwcap): New global variable.
14153 (ppc_regmap): Remove __SPE__ #ifdef sections.
14154 (ppc_regmap_e500): New global variable.
14155 (ppc_cannot_store_register): Update __SPE__ special case.
14156 (ppc_get_hwcap): New function.
14157 (ppc_arch_setup): Use it to determine whether inferior supports
14158 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14159 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14160 Do not access registers if target does not support AltiVec.
14161 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14162 Do not access registers if target does not support SPE.
14163 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14164
14165 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14166
14167 * linux-low.c (disabled_regsets, num_regsets): New.
14168 (use_regsets_p): Delete.
14169 (linux_wait_for_process): Clear disabled_regsets.
14170 (regsets_fetch_inferior_registers): Check and set it.
14171 (regsets_store_inferior_registers): Likewise.
14172 (linux_fetch_registers, linux_store_registers): Do not use
14173 use_regsets_p.
14174 (initialize_low): Allocate disabled_regsets.
14175
14176 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * Makefile.in (LIBOBJS): New.
14179 (OBS): Use LIBOBJS.
14180 (memmem.o): New rule.
14181 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14182 * configure: Regenerated.
14183
14184 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14185
14186 * server.c (handle_query): Never return "unsupported" for
14187 qXfer:features:read queries.
14188
14189 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14190
14191 * server.c (get_features_xml): Fix inverted condition.
14192 (handle_query): Always support qXfer:feature:read.
14193
14194 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14195
14196 * server.c (wrapper_argv): New.
14197 (start_inferior): Handle wrapper_argv. If set, expect an extra
14198 trap.
14199 (gdbserver_usage): Document --wrapper.
14200 (main): Parse --wrapper.
14201
14202 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14203
14204 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14205 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14206 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14207 (ppc_set_pc): Likewise.
14208 (ppc_arch_setup): New function.
14209 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14210 of collect_register.
14211 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14212
14213 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14214
14215 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14216 instead of linux-ppc64-low.o.
14217 * linux-ppc64-low.c: Remove file.
14218 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14219 (linux-ppc64-low.o): Remove rule.
14220
14221 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14222 (init_registers_powerpc_64): Likewise.
14223 (ppc_regmap): Conditionally define depending on __powerpc64__.
14224 (ppc_cannot_store_register): Do not special-case "fpscr" when
14225 compiled on __powerpc64__.
14226 (ppc_collect_ptrace_register): New function.
14227 (ppc_supply_ptrace_register): New function.
14228 (ppc_breakpoint): Change type to "unsigned int".
14229 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14230 (the_low_target): Conditionally provide initializers for the
14231 arch_setup member depending on __powerpc64__. Install
14232 collect_ptrace_register and supply_ptrace_register members.
14233
14234 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14235
14236 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14237 * server.c (gdbserver_xmltarget): Define.
14238 (get_features_xml): Use it to replace "target.xml" and arch_string.
14239
14240 * configure.srv: Remove srv_xmltarget. Add XML files that were
14241 mentioned there to srv_xmlfiles instead. Remove conditional tests
14242 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14243 srv_xmlfiles and srv_regobj to include all possible choices.
14244 * configure.ac (srv_xmltarget): Remove.
14245 (srv_xmlfiles): Do not add "target.xml".
14246 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14247 checks for supplementary target information.
14248 * configure: Regenerate.
14249 * Makefile.in (XML_TARGET): Remove.
14250 (target.xml): Remove rule.
14251 (clean): Do not clean up target.xml.
14252 (.PRECIOUS): Do not mention target.xml.
14253
14254 * target.h (struct target_ops): Remove arch_string member.
14255 * linux-low.c (linux_arch_string): Remove.
14256 (linux_target_ops): Remove arch_string initializer.
14257 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14258 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14259 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14260 * spu-low.c (spu_arch_string): Remove.
14261 (spu_target_ops): Remove arch_string initializer.
14262 * win32-low.c (win32_arch_string): Remove.
14263 (win32_target_ops): Remove arch_string initializer.
14264 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14265 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14266 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14267
14268 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14269
14270 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14271 by collect_ptrace_register and supply_ptrace_register hooks.
14272 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14273 instead of checking for the_low_target.left_pad_xfer.
14274 (usr_store_inferior_registers): Use collect_ptrace_register callback
14275 instead of checking for the_low_target.left_pad_xfer.
14276
14277 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14278 (s390_supply_ptrace_register): Likewise.
14279 (s390_fill_gregset): Call s390_collect_ptrace_register.
14280 (the_low_target): Update.
14281
14282 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14283 (ppc_supply_ptrace_register): Likewise.
14284 (the_low_target): Update.
14285
14286 * linux-i386-low.c (the_low_target): Update.
14287 * linux-x86-64-low.c (the_low_target): Update.
14288
14289 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14290
14291 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14292 reg-s390.o and reg-s390x.o.
14293
14294 * linux-low.c (new_inferior): New global variable.
14295 (linux_create_inferior, linux_attach): Set it.
14296 (linux_wait_for_process): Call the_low_target.arch_setup after the
14297 target has stopped for the first time.
14298 (initialize_low): Do not call the_low_target.arch_setup.
14299
14300 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14301 (s390_set_pc): Likewise.
14302 (s390_arch_setup): New function.
14303 (the_low_target): Use s390_arch_setup as arch_setup routine.
14304
14305 * regcache.c (realloc_register_cache): New function.
14306 (set_register_cache): Call it for each existing regcache.
14307
14308 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14309
14310 * server.h (init_registers): Remove prototype.
14311
14312 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14313 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14314 instead of init_registers ().
14315 * linux-arm-low.c (init_registers_arm): Add prototype.
14316 (init_registers_arm_with_iwmmxt): Likewise.
14317 (the_low_target): Add initializer for arch_setup field.
14318 * linux-cris-low.c (init_registers_cris): Add prototype.
14319 (the_low_target): Add initializer for arch_setup field.
14320 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14321 (the_low_target): Add initializer for arch_setup field.
14322 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14323 (the_low_target): Add initializer for arch_setup field.
14324 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14325 (the_low_target): Add initializer for arch_setup field.
14326 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14327 (the_low_target): Add initializer for arch_setup field.
14328 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14329 (the_low_target): Add initializer for arch_setup field.
14330 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14331 (init_registers_mips64_linux): Likewise.
14332 (the_low_target): Add initializer for arch_setup field.
14333 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14334 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14335 (the_low_target): Add initializer for arch_setup field.
14336 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14337 (init_registers_powerpc_64): Likewise.
14338 (the_low_target): Add initializer for arch_setup field.
14339 * linux-s390-low.c (init_registers_s390): Add prototype.
14340 (init_registers_s390x): Likewise.
14341 (the_low_target): Add initializer for arch_setup field.
14342 * linux-sh-low.c (init_registers_sh): Add prototype.
14343 (the_low_target): Add initializer for arch_setup field.
14344 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14345 (the_low_target): Add initializer for arch_setup field.
14346 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14347 (the_low_target): Add initializer for arch_setup field.
14348
14349 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14350 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14351 instead of init_registers ().
14352 * win32-arm-low.c (init_registers_arm): Add prototype.
14353 (the_low_target): Add initializer for arch_setup field.
14354 * win32-i386-low.c (init_registers_i386): Add prototype.
14355 (the_low_target): Add initializer for arch_setup field.
14356
14357 * spu-low.c (init_registers_spu): Add prototype.
14358 (initialize_low): Call initialie_registers_spu () instead of
14359 initialize_registers ().
14360
14361 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14362
14363 * server.c (handle_v_requests): When handling the vRun and vAttach
14364 packets, if already debugging a process, don't kill it. Return an
14365 error instead.
14366
14367 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * server.c (handle_query): Correct length check.
14370
14371 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14372
14373 * win32-low.c (do_initial_child_stuff): Add process handle
14374 parameter. Set current_process_handle and current_process_id from the
14375 parameters. Clear globals.
14376 (win32_create_inferior): Don't set current_process_handle and
14377 current_process_id here. Instead pass them on the call to
14378 do_initial_child_stuff.
14379 (win32_attach): Likewise.
14380 (win32_clear_inferiors): New.
14381 (win32_kill): Don't close the current process handle or the
14382 current thread handle here. Instead call win32_clear_inferiors.
14383 (win32_detach): Don't open a new handle to the process. Call
14384 win32_clear_inferiors.
14385 (win32_join): Don't rely on current_process_handle; open a new
14386 handle using the process id.
14387 (win32_wait): Call win32_clear_inferiors when the inferior process
14388 has exited.
14389
14390 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14391
14392 * server.c (monitor_show_help): Add "exit".
14393
14394 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14395
14396 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14397 (clean): Add reg-xtensa.c.
14398 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14399 * configure.srv (xtensa*-*-linux*) New target.
14400 * linux-xtensa-low.c: New.
14401 * xtensa-xtregs.c: New.
14402
14403 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14404
14405 * hostio.c: Don't include errno.h.
14406 (errno_to_fileio_errno): Move to hostio-errno.
14407 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14408 error number outputting to the target->hostio_last_error callback.
14409 (hostio_packet_error): Use FILEIO_EINVAL directly.
14410 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14411 calls to hostio_error.
14412 * hostio-errno.c: New.
14413 * server.h (hostio_last_error_from_errno): Declare.
14414 * target.h (target_ops): Add hostio_last_error member.
14415 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14416 as hostio_last_error handler.
14417 * spu-low.c (spu_target_ops): Likewise.
14418 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14419 (wince_hostio_last_error): New functions.
14420 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14421 as hostio_last_error handler.
14422 (win32_target_ops) [!_WIN32_WCE]: Register
14423 hostio_last_error_from_errno as hostio_last_error handler.
14424 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14425 (hostio-errno.o): New rule.
14426 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14427 * configure.srv (srv_hostio_err_objs): New variable. Default to
14428 hostio-errno.o.
14429 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14430 * configure: Regenerate.
14431
14432 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14433
14434 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14435 (linux_kill, linux_detach): Clean up the process list.
14436 * remote-utils.c (remote_open): Improve port number parsing.
14437 (putpkt_binary, input_interrupt): Only send interrupts if the target
14438 is running.
14439 * server.c (extended_protocol): Make static.
14440 (attached): Define earlier.
14441 (exit_requested, response_needed, program_argv): New variables.
14442 (target_running): New.
14443 (start_inferior): Clear attached here.
14444 (attach_inferior): Set attached here.
14445 (require_running): Define.
14446 (handle_query): Use require_running and target_running. Implement
14447 "monitor exit".
14448 (handle_v_attach, handle_v_run): New.
14449 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14450 (gdbserver_usage): Update.
14451 (main): Redo argument parsing. Handle --debug and --multi. Handle
14452 --attach along with other options or after the port. Save
14453 program_argv. Support no initial program. Resynchronize
14454 communication with GDB after an error. Handle "monitor exit".
14455 Use require_running and target_running. Always allow the extended
14456 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14457 restart in extended mode.
14458 * README: Refer to the GDB manual. Update --attach usage.
14459
14460 2007-12-20 Andreas Schwab <schwab@suse.de>
14461
14462 * linux-low.c (STACK_SIZE): Define.
14463 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14464 (linux_test_for_tracefork): Likewise.
14465
14466 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14467
14468 * linux-low.c (linux_wait_for_event): Update messages. Do not
14469 reinsert auto-delete breakpoints.
14470 * mem-break.c (struct breakpoint): Change return type of handler to
14471 int.
14472 (set_breakpoint_at): Update handler type.
14473 (reinsert_breakpoint_handler): Return 1 instead of calling
14474 delete_breakpoint.
14475 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14476 setting a new one.
14477 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14478 * mem-break.h (set_breakpoint_at): Update handler type.
14479 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14480 * win32-low.c (auto_delete_breakpoint): New.
14481 (get_child_debug_event): Use it.
14482
14483 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14484
14485 * configure.ac: Check for pread and pwrite.
14486 * hostio.c (handle_pread): Fall back to lseek and read.
14487 (handle_pwrite): Fall back to lseek and write.
14488 * config.in, configure: Regenerated.
14489
14490 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14491
14492 * server.c (myresume): Add own_buf argument.
14493 (main): Update calls.
14494
14495 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14496
14497 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14498 * remote-utils.c (remote_open): Do not call disable_async_io.
14499 (block_async_io): Delete.
14500 (unblock_async_io): Make static.
14501 (initialize_async_io): New.
14502 * server.c (handle_v_cont): Handle async I/O here.
14503 (myresume): Likewise. Move other common resume tasks here...
14504 (main): ... from here. Call initialize_async_io. Disable async
14505 I/O before the main loop.
14506 * server.h (initialize_async_io): Declare.
14507 (block_async_io, unblock_async_io): Delete prototypes.
14508 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14509
14510 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14511
14512 * remote-utils.c (readchar): Allow binary data in received messages.
14513
14514 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14515
14516 * win32-low.c (attaching): New global.
14517 (win32_create_inferior): Clear the `attaching' global.
14518 (win32_attach): Set the `attaching' global.
14519 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14520 attaching. Only set a breakpoint at the entry point if not
14521 attaching.
14522
14523 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14524
14525 * server.c (main): Don't report dll events on the initial
14526 connection on attaches.
14527
14528 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14529
14530 * server.c (main): Relax numerical bases supported for the pid of
14531 the --attach command line argument.
14532
14533 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14534
14535 * win32-low.c (win32_attach): Call OpenProcess before
14536 DebugActiveProcess, not after. Add last error output to error
14537 call.
14538
14539 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14540
14541 * win32-low.c (win32_get_thread_context)
14542 (win32_set_thread_context): New functions.
14543 (thread_rec): Use win32_get_thread_context.
14544 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14545 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14546 field.
14547
14548 2007-12-03 Leo Zayas
14549 Pedro Alves <pedro_alves@portugalmail.pt>
14550
14551 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14552 global variables.
14553 (child_add_thread): Minor cleanup.
14554 (child_continue): Resume artificially suspended threads before
14555 calling ContinueDebugEvent.
14556 (suspend_one_thread): New.
14557 (fake_breakpoint_event): New.
14558 (get_child_debug_event): Change return type to int. Check here if
14559 gdb sent an interrupt request. If a soft interrupt was requested,
14560 fake a breakpoint event. Return 0 if there is no event to handle,
14561 and 1 otherwise.
14562 (win32_wait): Don't check here if gdb sent an interrupt request.
14563 Ensure there is a valid event to handle.
14564 (win32_request_interrupt): Add soft interruption method as last
14565 resort.
14566
14567 2007-12-03 Leo Zayas
14568 Pedro Alves <pedro_alves@portugalmail.pt>
14569
14570 * win32-low.h (win32_thread_info): Add descriptions to the
14571 structure members. Replace `suspend_count' counter by a
14572 `suspended' flag.
14573 * win32-low.c (thread_rec): Update condition of when to get the
14574 context from the inferior. Rely on ContextFlags being set if it
14575 has already been retrieved. Only suspend the inferior thread if
14576 we haven't already. Warn if that fails.
14577 (continue_one_thread): s/suspend_count/suspended/. Only call
14578 ResumeThread once. Warn if that fails.
14579
14580 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14581
14582 * win32-low.c (win32_wait): Don't read from the inferior when it
14583 has already exited.
14584
14585 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14586
14587 * Makefile.in (win32_low_h): New variable.
14588 (win32-low.o): Add dependency on $(win32_low_h).
14589 (win32-arm-low.o, win32-i386-low.o): New rules.
14590
14591 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * hostio.c: Correct copyright year.
14594
14595 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14596
14597 * Makefile.in (OBS): Add hostio.o.
14598 (hostio.o): New rule.
14599 * server.h (handle_vFile): Declare.
14600 * hostio.c: New file.
14601 * server.c (handle_v_requests): Take packet_len and new_packet_len
14602 for binary packets. Call handle_vFile.
14603 (main): Update call to handle_v_requests.
14604
14605 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * linux-low.c: Include <sched.h>.
14608
14609 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * linux-low.c (linux_tracefork_grandchild): New.
14612 (linux_tracefork_child): Use clone.
14613 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14614
14615 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14616
14617 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14618
14619 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14620
14621 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14622
14623 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14624
14625 * inferiors.c (change_inferior_id): Delete.
14626 (add_pid_to_list, pull_pid_from_list): New.
14627 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14628 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14629 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14630 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14631 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14632 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14633 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14634 (using_threads): Always set to 1.
14635 (handle_extended_wait): New.
14636 (add_process): Do not set TID.
14637 (linux_create_inferior): Set must_set_ptrace_flags.
14638 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14639 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14640 (linux_thread_alive): Rename TID argument to LWPID.
14641 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14642 (linux_wait_for_event): Do not use TID or check using_threads. Update
14643 call to dead_thread_notify. Call handle_extended_wait.
14644 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14645 (send_sigstop): Delete sigstop_sent.
14646 (wait_for_sigstop): Avoid TID.
14647 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14648 (linux_test_for_tracefork): New.
14649 (linux_lookup_signals): Use thread_db_active and
14650 linux_supports_tracefork_flag.
14651 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14652 * linux-low.h (get_process_thread): Avoid TID.
14653 (struct process_ifo): Move thread_known and tid to the end. Remove
14654 sigstop_sent.
14655 (linux_attach_lwp, thread_db_init): Update prototypes.
14656 * server.h (change_inferior_id): Delete prototype.
14657 (add_pid_to_list, pull_pid_from_list): New prototypes.
14658 * thread-db.c (thread_db_use_events): New.
14659 (find_first_thread): Rename to...
14660 (find_one_thread): ...this. Update callers and messages. Do not
14661 call fatal. Check thread_db_use_events. Do not call
14662 change_inferior_id or new_thread_notify.
14663 (maybe_attach_thread): Update. Do not call new_thread_notify.
14664 (thread_db_init): Set thread_db_use_events. Check use_events.
14665 * utils.c (fatal, warning): Correct message prefix.
14666
14667 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14668
14669 * Makefile.in (clean): Remove new files.
14670 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14671 (powerpc-64.o, powerpc-64.c): New rules.
14672 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14673 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14674 with SPE.
14675 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14676 SPE targets.
14677 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14678 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14679 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14680 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14681 (target_regsets): Add AltiVec and SPE register sets.
14682 * configure.ac: Check for AltiVec and SPE.
14683 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14684 (ppc_fill_vrregset, ppc_store_vrregset): New.
14685 (target_regsets): Add AltiVec register set.
14686 * configure: Regenerated.
14687
14688 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14689
14690 * linux-low.c (O_LARGEFILE): Define.
14691 (linux_read_memory): Use /proc/PID/mem.
14692 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14693 * configure, config.in: Regenerated.
14694
14695 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14696
14697 * linux-low.c (linux_wait_for_event): Do not pass signals while
14698 single-stepping.
14699
14700 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14701
14702 * win32-low.c (create_process): New.
14703 (win32_create_inferior): Use create_process instead of
14704 CreateProcess. If create_process failed retry appending an ".exe"
14705 suffix. Store the GetLastError result immediatelly after
14706 create_process calls and use it on the call to error.
14707
14708 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14709
14710 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14711
14712 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14713
14714 * configure.ac: Switch license to GPLv3.
14715
14716 2007-08-01 Michael Snyder <msnyder@access-company.com>
14717
14718 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14719
14720 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14721
14722 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14723 typedef.
14724 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14725 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14726 CloseToolhelp32Snapshot.
14727 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14728 CloseToolhelp32Snapshot.
14729
14730 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14731
14732 * server.c (main): Check for inferior exit before main loop.
14733
14734 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14735
14736 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14737 instead of on tmp_desc.
14738
14739 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14740 Daniel Jacobowitz <dan@codesourcery.com>
14741
14742 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14743 (add_thread): Minor cleanups.
14744 (clear_inferiors): Move lower in the file. Clear the DLL
14745 list.
14746 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14747 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14748 (xml_escape_text): New.
14749 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14750 for qSupported.
14751 (handle_v_cont): Report errors.
14752 (gdbserver_version): Update.
14753 (main): Correct size of own_buf. Do not report initial DLL events.
14754 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14755 (unloaded_dll, xml_escape_text): New.
14756 * win32-low.c (enum target_waitkind): Update comments.
14757 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14758 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14759 (win32_EnumProcessModules, win32_GetModuleInformation)
14760 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14761 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14762 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14763 (win32_Module32First, win32_Module32Next, load_toolhelp)
14764 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14765 (get_child_debug_event): Handle DLL events.
14766 (win32_wait): Likewise.
14767
14768 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14769
14770 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14771 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14772
14773 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14774
14775 * win32-low.c (handle_output_debug_string): Ignore event if not
14776 waiting.
14777
14778 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14779
14780 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14781
14782 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14783
14784 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14785
14786 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14787
14788 * inferiors.c (change_inferior_id): Add comment.
14789 * linux-low.c (check_removed_breakpoint): Add an early
14790 prototype. Improve debug output.
14791 (linux_attach): Doc update.
14792 (linux_detach_one_process, linux_detach): Clean up before releasing
14793 each process.
14794 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14795 * linux-low.h (struct process_info): Doc improvement.
14796 * mem-break.c (delete_all_breakpoints): New.
14797 * mem-break.h (delete_all_breakpoints): New prototype.
14798 * thread-db.c (find_first_thread): New.
14799 (thread_db_create_event): Call it instead of
14800 thread_db_find_new_threads. Clean up unused variables.
14801 (maybe_attach_thread): Remove first thread handling.
14802 (thread_db_find_new_threads): Use find_first_thread.
14803 (thread_db_get_tls_address): Likewise.
14804
14805 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14806
14807 * thread-db.c (thread_db_find_new_threads): Add prototype.
14808 (thread_db_create_event): Check for the main thread before adding
14809 a new thread.
14810 (maybe_attach_thread): Only enable event reporting if TID == 0.
14811 (thread_db_get_tls_address): Check for new threads.
14812
14813 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14814
14815 * linux-low.c (linux_create_inferior): Try execv before execvp.
14816 * spu-low.c (spu_create_inferior): Likewise.
14817
14818 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14819
14820 * linux-low.c (linux_create_inferior): Change execv to execvp.
14821 * spu-low.c (spu_create_inferior): Likewies.
14822
14823 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14824
14825 * Makefile.in (clean): Clean new files instead of deleted ones.
14826 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14827 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14828 rules.
14829 * configure.srv: Specify XML files and new regformats for MIPS and
14830 MIPS64 GNU/Linux.
14831 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14832 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14833 an entry for the restart register.
14834 (mips_cannot_fetch_register, mips_cannot_store_register)
14835 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14836 register names to match the XML descriptions.
14837 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14838 restart register instead of $0.
14839
14840 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14841 Markus Deuling <deuling@de.ibm.com>
14842
14843 * remote-utils.c (decode_xfer_write): New function.
14844 * server.h (decode_xfer_write): Add prototype.
14845 * server.c (handle_query): Add PACKET_LEN argument. Support
14846 qXfer:spu:read and qXfer:spu:write packets.
14847 (main): Pass packet_len to handle_query.
14848 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14849 * target.h (target_ops): Add qxfer_spu.
14850
14851 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14852
14853 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14854 accessing non-seekable spufs files.
14855
14856 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14857
14858 * server.c (handle_query): Add reply for qC packet.
14859
14860 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14861 Leo Zayas <lerele@champenstudios@com>
14862
14863 * server.h (check_remote_input_interrupt_request): New function.
14864 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14865 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14866 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14867 (check_remote_input_interrupt_request): New function.
14868 * server.h (check_remote_input_interrupt_request): Declare.
14869 * win32-low.c (winapi_DebugBreakProcess,
14870 winapi_GenerateConsoleCtrlEvent): New typedefs.
14871 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14872 to 250 ms.
14873 (win32_wait): Check for remote interrupt request
14874 with check_remote_input_interrupt_request.
14875 (win32_request_interrupt): New function.
14876 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14877
14878 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14879
14880 * win32-low.c (debug_registers_changed,
14881 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14882 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14883 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14884 (thread_rec): Get context using the low target.
14885 (child_add_thread): Call thread_added on the low target,
14886 which does the same thing.
14887 (regptr): Delete.
14888 (do_initial_child_stuff): Remove debug registers references.
14889 Set context using the low target. Resume threads after
14890 setting the contexts.
14891 (child_continue): Remove dead variable. Remove debug
14892 registers references.
14893 (child_fetch_inferior_registers): Go through the low target.
14894 (do_child_store_inferior_registers): Remove.
14895 (child_store_inferior_registers): Go through the low target.
14896 (win32_resume): Remove debug registers references.
14897 Set context using the low target.
14898 (handle_exception): Change return type to void. Don't record
14899 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14900 first chance exception.
14901 (get_child_debug_event): Change return type to void. Remove
14902 goto loop. Always return after waiting for debug event.
14903 (win32_wait): Convert to switch statement. Handle spurious
14904 events.
14905
14906 * win32-i386-low.c (debug_registers_changed,
14907 debug_registers_used): New.
14908 (initial_stuff): Rename to ...
14909 (i386_initial_stuff): ... this. Clear debug registers
14910 state variables.
14911 (store_debug_registers): Delete.
14912 (i386_get_thread_context): New.
14913 (load_debug_registers): Delete.
14914 (i386_set_thread_context): New.
14915 (i386_thread_added): New.
14916 (single_step): Rename to ...
14917 (i386_single_step): ... this.
14918 (do_fetch_inferior_registers): Rename to ...
14919 (i386_fetch_inferior_register): ... this.
14920 (i386_store_inferior_register): New.
14921 (the_low_target): Adapt to new interface.
14922
14923 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14924 (arm_get_thread_context): New.
14925 (arm_set_thread_context): New.
14926 (regptr): New.
14927 (do_fetch_inferior_registers): Rename to ...
14928 (arm_fetch_inferior_register): ... this.
14929 (arm_store_inferior_register): New.
14930 (arm_wince_breakpoint): Reimplement as unsigned long.
14931 (arm_wince_breakpoint_len): Define.
14932 (the_low_target): Adapt to new interface.
14933
14934 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14935 load_debug_registers. Add get_thread_context, set_thread_context,
14936 thread_added and store_inferior_register. Rename
14937 fetch_inferior_registers to fetch_inferior_register.
14938 (regptr): Remove declaration.
14939
14940 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14941
14942 * linux-low.c (linux_detach): Change return type to int. Return 0.
14943 * spu-low.c (spu_detach): Likewise.
14944
14945 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14946
14947 * target.h (target_ops): Change return type of detach to int.
14948 Add join.
14949 (join_inferior): New.
14950 * server.c (main): Don't skip detach support on mingw32.
14951 If the inferior doesn't support detaching return error.
14952 Call join_inferior instead of using waitpid.
14953 * linux-low.c (linux_join): New.
14954 (linux_target_op): Add linux_join.
14955 * spu-low.c (spu_join): New.
14956 (spu_target_ops): Add spu_join.
14957 * win32-low.c (win32_detach): Adapt to new interface.
14958 Reopen current_process_handle before detaching. Issue a child
14959 resume before detaching.
14960 (win32_join): New.
14961 (win32_target_op): Add win32_join.
14962
14963 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14964
14965 * win32-low.c (win32-attach): Fix return value.
14966 * target.h (target_ops): Describe ATTACH return values.
14967
14968 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14969
14970 * win32-low.c (GETPROCADDRESS): Define.
14971 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14972 (winapi_DebugSetProcessKillOnExit): Likewise.
14973 (win32_create_inferior): Force usage of ansi CreateProcessA.
14974 (win32_attach): Use GETPROCADDRESS.
14975 (win32_detach): Likewise.
14976
14977 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14978
14979 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14980
14981 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14982
14983 * win32-low.c: Commit leftover changes from 2007-03-29.
14984
14985 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14986
14987 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14988 fields short instead of int. Add explicit padding.
14989 (i387_cache_to_fsave): Remove unnecessary casts.
14990 (i387_fsave_to_cache): Doc fix.
14991 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14992
14993 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14994
14995 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14996 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14997
14998 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14999
15000 * configure.srv (arm*-*-mingw32ce*): Move near the other
15001 arm targets.
15002
15003 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15004
15005 * configure.ac: Add errno checking.
15006 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15007 sys/file.h and malloc.h.
15008 (AC_CHECK_DECLS): Add perror.
15009 (srv_mingwce): Handle.
15010 * configure.srv (i[34567]86-*-cygwin*): Add
15011 win32-i386-low.o to srv_tgtobj.
15012 (i[34567]86-*-mingw*): Likewise.
15013 (arm*-*-mingw32ce*): Add case.
15014 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15015 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15016 [__MINGW32CE__] (strerror): New function.
15017 [__MINGW32CE__] (errno): Define to GetLastError.
15018 [__MINGW32CE__] (COUNTOF): New macro.
15019 (remote_open): Remove extra close call.
15020 * mem-break.c (delete_breakpoint_at): New function.
15021 * mem-break.h (delete_breakpoint_at): Declare.
15022 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15023 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15024 [USE_WIN32API] (read, write): Add char* casts.
15025 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15026 * server.h: Include wincecompat.h on Windows CE.
15027 [HAVE_ERRNO_H]: Check.
15028 (perror): Declare if not declared.
15029 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15030 (perror_with_name): Remove errno declaration.
15031 * wincecompat.h: New.
15032 * wincecompat.c: New.
15033 * win32-low.h: New.
15034 * win32-arm-low.c: New.
15035 * win32-i386-low.c: New.
15036 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15037 (OUTMSG2): Make it safe.
15038 (_T): New macro.
15039 (COUNTOF): New macro.
15040 (NUM_REGS): Get it from the low target.
15041 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15042 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15043 (thread_rec): Let low target handle debug registers.
15044 (child_add_thread): Likewise.
15045 (child_init_thread_list): Likewise.
15046 (continue_one_thread): Likewise.
15047 (regptr): New.
15048 (do_child_fetch_inferior_registers): Move to ...
15049 * win32-i386-low.c: ... here, and rename to ...
15050 (do_fetch_inferior_registers): ... this.
15051 * win32-low.c (child_fetch_inferior_registers):
15052 Go through the low target.
15053 (do_child_store_inferior_registers): Use regptr.
15054 (strwinerror): New function.
15055 (win32_create_inferior): Handle Windows CE.
15056 Use strwinerror instead of strerror on Windows error
15057 codes. Add program to the error output.
15058 Don't close the main thread handle on Windows CE.
15059 (win32_attach): Use coredll.dll on Windows CE.
15060 (win32_kill): Close current process and current
15061 thread handles.
15062 (win32_detach): Use coredll.dll on Windows CE.
15063 (win32_resume): Let low target handle debug registers, and
15064 step request.
15065 (handle_exception): Add/Remove initial breakpoint. Avoid
15066 non-existant WSTOPSIG on Windows CE.
15067 (win32_read_inferior_memory): Cast to remove warning.
15068 (win32_arch_string): Go through the low target.
15069 (initialize_low): Call set_breakpoint_data with the low
15070 target's breakpoint.
15071 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15072 FOP_REGNUM, mappings): Move to ...
15073 * win32-i386-low.c: ... here.
15074 * win32-low.c (win32_thread_info): Move to ...
15075 * win32-low.h: ... here.
15076 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15077 win32-arm-low.c and wincecompat.c.
15078 (all:): Add $EXEEXT.
15079 (install-only:): Likewise.
15080 (gdbserver:): Likewise.
15081 (gdbreplay:): Likewise.
15082 * config.in: Regenerate.
15083 * configure: Regenerate.
15084
15085 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15086
15087 * win32-low.c: Rename typedef thread_info to
15088 win32_thread_info throughout.
15089
15090 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15091
15092 * win32-i386-low.c: Rename to ...
15093 * win32-low.c: ... this.
15094 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15095 * Makefile.in: Likewise.
15096
15097 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15098
15099 * remote-utils.c (monitor_output): Constify msg parameter.
15100 * server.h (monitor_output): Likewise.
15101 * win32-i386-low.c (handle_output_debug_string): New.
15102 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15103 handle_output_debug_string.
15104 (get_child_debug_event): Likewise.
15105
15106 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15107
15108 * server.c (main): Correct strtoul check.
15109
15110 2007-03-27 Jon Ringle <jon@ringle.org>
15111
15112 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15113
15114 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15115
15116 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15117
15118 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15119
15120 * terminal.h: Check HAVE_SGTTY_H.
15121
15122 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15123
15124 * remote-utils.c (remote_open): Print out the assigned port number.
15125
15126 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15127
15128 * remote-utils.c (monitor_output): New function.
15129 * server.c (debug_threads): Define here.
15130 (monitor_show_help): New function.
15131 (handle_query): Handle qRcmd.
15132 (main): Do not handle 'd' packet.
15133 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15134 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15135 of debug_threads.
15136
15137 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15138
15139 * Makefile.in (EXEEXT): New.
15140 (clean): Use $(EXEEXT).
15141
15142 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15143
15144 * target.h (target_ops): Rename send_signal to request_interrupt,
15145 and remove enum target_signal parameter.
15146 * linux-low.c (linux_request_interrupt): Rename from
15147 linux_send_signal, and always send SIGINT.
15148 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15149 and always send SIGINT.
15150 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15151 of send_signal.
15152 (input_interrupt): Likewise.
15153
15154 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15155
15156 * server.c (get_features_xml): Check if target implemented
15157 arch_string.
15158 * win32-i386-low.c (win32_arch_string): New.
15159 (win32_target_ops): Add win32_arch_string as arch_string member.
15160
15161 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15162
15163 * spu-low.c (spu_arch_string): New.
15164 (spu_target_ops): Add spu_arch_string.
15165
15166 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15167
15168 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15169 * configure.ac: Do not check for terminal.h.
15170 * configure, config.in: Regenerated.
15171
15172 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15173
15174 * Makefile.in (OBS): Add $(XML_BUILTIN).
15175 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15176 (clean): Update.
15177 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15178 (arm-with-iwmmxt.c): New.
15179 * config.in, configure: Regenerate.
15180 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15181 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15182 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15183 (arm*-*-linux*): Add iWMMXt and regset support.
15184 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15185 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15186 (arm_store_wmmxregset, target_regsets): New.
15187 * server.c (get_features_xml): Take annex argument. Check builtin
15188 XML documents.
15189 (handle_query): Handle multiple annexes.
15190
15191 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15192
15193 * remote-utils.c [USE_WIN32API] (read, write): Define.
15194 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15195 write.
15196
15197 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15198
15199 * linux-i386-low.c (the_low_target): Set arch_string.
15200 * linux-x86-64-low.c (the_low_target): Likewise.
15201 * linux-low.c (linux_arch_string): New.
15202 (linux_target_ops): Add it.
15203 * linux-low.h (struct linux_target_ops): Add arch_string.
15204 * server.c (write_qxfer_response): Use const void * for DATA.
15205 (get_features_xml): New.
15206 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15207 * target.h (struct target_ops): Add arch_string method.
15208
15209 2007-01-03 Denis Pilat <denis.pilat@st.com>
15210 Daniel Jacobowitz <dan@codesourcery.com>
15211
15212 * linux-low.c (linux_kill): Handle being called with no threads.
15213 * win32-i386-low.c (win32_kill): Likewise.
15214 (get_child_debug_event): Clear current_process_handle.
15215
15216 2006-12-30 Denis PILAT <denis.pilat@st.com>
15217 Daniel Jacobowitz <dan@codesourcery.com>
15218
15219 * remote-utils.c (remote_open): Check the type of specified
15220 serial port devices before opening them.
15221 * server.c (main): Kill the inferior if an error occurs during
15222 the first remote_open.
15223
15224 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15225
15226 * README: Update supported targets.
15227
15228 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15229
15230 * Makefile.in (clean): Remove reg-mips64.c.
15231 (reg-mips64.c, reg-mips64.o): New rules.
15232 * configure.srv: Handle mips64. Include regset support for mips.
15233 * linux-mips-low.c (union mips_register): New.
15234 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15235 (mips_breakpoint, mips_breakpoint_at): Use int.
15236 (mips_collect_register, mips_supply_register)
15237 (mips_collect_register_32bit, mips_supply_register_32bit)
15238 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15239 (mips_store_fpregset, target_regsets): New.
15240 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15241
15242 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15243
15244 * configure.srv: Add target "spu*-*-*".
15245 * Makefile.in (clean): Remove reg-spu.c.
15246 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15247 * spu-low.c: New file.
15248
15249 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15250
15251 * configure.ac: Correct td_thr_tls_get_addr test.
15252 * configure: Regenerated.
15253
15254 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15255
15256 * linux-low.c (linux_wait_for_event): Reformat. Use the
15257 pass_signals array.
15258 * remote-utils.c (decode_address_to_semicolon): New.
15259 * server.c (pass_signals, handle_general_set): New.
15260 (handle_query): Mention QPassSignals for qSupported.
15261 (main): Call handle_general_set.
15262 * server.h (pass_signals, decode_address_to_semicolon): New.
15263
15264 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15265
15266 * server.c (handle_query): Correct error handling for read_auxv.
15267
15268 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15269
15270 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15271 and srv_linux_thread_db to yes.
15272 * linux-s390-low.c (s390_fill_gregset): New function.
15273 (target_regsets): Define data structure.
15274
15275 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15276
15277 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15278 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15279 * config.in, configure: Regenerated.
15280 * inferiors.c (gdb_id_to_thread): New function.
15281 (gdb_id_to_thread_id): Use it.
15282 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15283 * linux-low.h (struct process_info): Add th member.
15284 (thread_db_get_tls_address): New prototype.
15285 * remote-utils.c (decode_address): Make non-static.
15286 * server.c (handle_query): Handle qGetTLSAddr.
15287 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15288 * target.h (struct target_ops): Add get_tls_address.
15289 * thread-db.c (maybe_attach_thread): Save the thread handle.
15290 (thread_db_get_tls_address): New.
15291
15292 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15293
15294 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15295 (linux_resume_one_process): Take a siginfo_t *. Update all
15296 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15297 (struct pending_signals): Add a siginfo_t.
15298 (linux_wait_for_process): Always set last_status.
15299 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15300 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15301 * linux-low.h (struct process_info): Add last_status.
15302
15303 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15304
15305 * remote-utils.c (try_rle): New function.
15306 (putpkt_binary): Use it.
15307
15308 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15309
15310 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15311 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15312 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15313 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15314 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15315 point registers.
15316
15317 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15318
15319 * server.c (terminal_fd): New variable.
15320 (old_foreground_pgrp): Likewise.
15321 (restore_old_foreground_pgrp): New function.
15322 (start_inferior): Record the terminal file descriptor in terminal_fd
15323 and its original foreground group in old_foreground_pgrp. Register
15324 restore_old_foreground_pgrp with atexit().
15325
15326 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15327
15328 * server.c (handle_query): Correct qPart to qXfer.
15329
15330 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15331
15332 * configure.ac: Check for more headers which are missing on
15333 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15334 * configure.srv: Add Cygwin and mingw32.
15335 * remote-utils.c: Don't include headers unconditionally which
15336 are missing on mingw32. Include <winsock.h> for mingw32.
15337 (remote_open): Adjust for mingw32 support. Flush
15338 standard error after writing to it.
15339 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15340 (unblock_async_io, enable_async_io, disable_async_io)
15341 (readchar, getpkt): Update for Winsock support.
15342 (prepare_resume_reply): Expect a protocol signal number.
15343 * server.c: Disable <sys/wait.h> on mingw32.
15344 (start_inferior): Adjust for mingw32 support. Flush
15345 standard error after writing to it.
15346 (attach_inferior): Likewise. Use protocol signal
15347 numbers.
15348 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15349 and names.
15350 * win32-i386-low.c: New file.
15351 * Makefile.in (XM_CLIBS): Set.
15352 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15353 (win32-i386-low.o): New dependency rule.
15354 * linux-low.c (linux_wait): Use target signal numbers.
15355 * target.h (struct target_ops): Doc fix.
15356 * server.h (target_signal_to_name): New prototype.
15357 * gdbreplay.c: Don't include headers unconditionally which
15358 are missing on mingw32. Include <winsock.h> for mingw32.
15359 (remote_close, remote_open): Adjust for Winsock support.
15360 * configure, config.in: Regenerated.
15361
15362 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15363
15364 * server.c (decode_xfer_read, write_qxfer_response): New.
15365 (handle_query): Take a packet length argument. Handle
15366 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15367 the qSupported response.
15368 (main): Update call to handle_query.
15369
15370 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15371
15372 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15373 (putpkt_binary): Renamed from putpkt and adjusted for binary
15374 data.
15375 (putpkt): New wrapper for putpkt_binary.
15376 (readchar): Don't mask off the high bit.
15377 (decode_X_packet): New function.
15378 * server.c (main): Call putpkt_binary if a handler sets the packet
15379 length. Save the length of the incoming packet. Handle 'X'.
15380 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15381
15382 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15383
15384 * server.c (handle_query): Handle qSupported.
15385
15386 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15387
15388 * remote-utils.c (all_symbols_looked_up): New variable.
15389 (look_up_one_symbol): Check it.
15390 * server.h (look_up_one_symbol): New declaration.
15391 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15392
15393 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15394
15395 * Makefile.in (linux-arm-low.o): Update dependencies.
15396 * linux-arm-low.c: Include "gdb_proc_service.h".
15397 (PTRACE_GET_THREAD_AREA): Define.
15398 (ps_get_thread_area): New function.
15399
15400 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15401
15402 * configure.srv (m68k*-*-uclinux*): New target.
15403 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15404 (linux_resume_one_process): Remove extraneous cast.
15405 (linux_read_offsets): New.
15406 (linux_target_op): Add linux_read_offsets on mmuless systems.
15407 * server.c (handle_query): Add qOffsets logic.
15408 * target.h (struct target_ops): Add read_offsets.
15409
15410 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15411
15412 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15413 (PTRACE_GET_THREAD_AREA): Define.
15414 (ps_get_thread_area): New function.
15415 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15416 (linux-x86-64-low.o): Update.
15417
15418 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15419
15420 * configure.ac: Remove checks for prfpregset_t.
15421 * gdb_proc_service.h: New file.
15422 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15423 new "gdb_proc_service.h".
15424 * proc-service.c: Likewise.
15425 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15426 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15427 * Makefile.in (gdb_proc_service_h): Updated.
15428 * configure, config.in: Regenerated.
15429
15430 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15431
15432 * remote-utils.c (prepare_resume_reply): Move declaration
15433 of gdb_id_from_wait to the top of the block.
15434
15435 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15436
15437 * linux-low.c (regsets_store_inferior_registers): Read the regset
15438 from the target before filling it.
15439
15440 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15441
15442 * server.c (attach_inferior): Return SIGTRAP for a successful
15443 attach.
15444
15445 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15446
15447 * Makefile.in (OBS): Add version.o.
15448 (STAGESTUFF): Delete.
15449 (version.o): Add dependencies.
15450 (version.c): Replace rule.
15451 (clean): Remove version.c.
15452 * server.c (gdbserver_version): New.
15453 (gdbserver_usage): Use printf.
15454 (main): Handle --version and --help.
15455 * server.h (version, host_name): Add declarations.
15456
15457 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15458
15459 * linux-arm-low.c:
15460 * linux-arm-low.c:
15461 * inferiors.c:
15462 * i387-fp.h:
15463 * i387-fp.c:
15464 * gdbreplay.c:
15465 * regcache.c:
15466 * proc-service.c:
15467 * mem-break.h:
15468 * mem-break.c:
15469 * linux-x86-64-low.c:
15470 * linux-sh-low.c:
15471 * linux-s390-low.c:
15472 * linux-ppc64-low.c:
15473 * linux-ppc-low.c:
15474 * linux-mips-low.c:
15475 * linux-m68k-low.c:
15476 * linux-m32r-low.c:
15477 * linux-low.h:
15478 * linux-low.c:
15479 * linux-ia64-low.c:
15480 * linux-i386-low.c:
15481 * linux-crisv32-low.c:
15482 * thread-db.c:
15483 * terminal.h:
15484 * target.h:
15485 * target.c:
15486 * server.h:
15487 * server.c:
15488 * remote-utils.c:
15489 * regcache.h:
15490 * utils.c:
15491 * Makefile.in:
15492 * configure.ac:
15493 * gdbserver.1: Add (C) after Copyright. Update the FSF
15494 address.
15495
15496 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15497
15498 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15499 (arm_breakpoint_at): Recognize both breakpoints.
15500 (the_low_target): Use the correct breakpoint instruction.
15501
15502 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15503
15504 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15505 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15506 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15507 (the_low_target): Update.
15508
15509 2005-10-25 Andreas Schwab <schwab@suse.de>
15510
15511 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15512
15513 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15514 (ia64_num_regs): Reduce to 462.
15515
15516 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15517
15518 * acinclude.m4: Correct quoting.
15519 * aclocal.m4: Regenerated.
15520
15521 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15522 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15523 (thread_db_init): Call thread_db_err_str.
15524 * configure.ac: Check for TD_VERSION.
15525 * config.in, configure: Regenerated.
15526
15527 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15528
15529 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15530
15531 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15532
15533 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15534 is not available. Define HAVE_PTRACE_GETREGS if it is.
15535 * config.in, configure: Regenerated.
15536 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15537 * linux-i386-low.c, linux-m68k-low.c: Update to use
15538 HAVE_PTRACE_GETREGS.
15539 * linux-low.c (regsets_fetch_inferior_registers)
15540 (regsets_store_inferior_registers): Only return 0 if we processed
15541 GENERAL_REGS.
15542 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15543 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15544
15545 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15546
15547 * inferiors.c (struct thread_info): Add gdb_id.
15548 (add_thread): Add gdb_id argument.
15549 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15550 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15551 calls to add_thread.
15552 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15553 * server.c (handle_query): Use thread_to_gdb_id.
15554 (handle_v_cont, main): Use gdb_id_to_thread_id.
15555 * server.h (add_thread): Update prototype.
15556 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15557 prototypes.
15558
15559 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15562 left-padded registers.
15563 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15564 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15565
15566 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15567
15568 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15569 * configure: Regenerate.
15570 * config.in: Regenerate.
15571 * server.h (NEED_DECLARATION_STRERROR):
15572 Replace with !HAVE_DECL_STRERROR.
15573
15574 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * linux-low.c (linux_wait, linux_send_signal): Don't test
15577 an unsigned long variable for > 0 if it could be MAX_ULONG.
15578 * server.c (myresume): Likewise.
15579 * target.c (set_desired_inferior): Likewise.
15580
15581 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15582
15583 * configure.ac: Simplify and improve check for socklen_t.
15584 * configure, config.in: Regenerate.
15585
15586 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15587
15588 * acconfig.h: Remove.
15589 * configure.ac: Add a test for socklen_t. Use three-argument
15590 AC_DEFINE throughout.
15591 * config.in: Regenerated using autoheader 2.59.
15592 * configure: Regenerated.
15593
15594 * gdbreplay.c (socklen_t): Provide a default.
15595 (remote_open): Use socklen_t.
15596 * remote-utils.c (socklen_t): Provide a default.
15597 (remote_open): Use socklen_t.
15598 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15599 unsigned char.
15600
15601 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15602 char for buffers.
15603 * linux-low.c (linux_read_memory, linux_write_memory)
15604 (linux_read_auxv): Likewise.
15605 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15606 (check_mem_write): Likewise.
15607 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15608 Likewise.
15609 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15610 (registers_from_string, register_data): Likewise.
15611 * server.c (handle_query, main): Likewise.
15612 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15613 (decode_M_packet): Likewise.
15614 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15615 * target.h (struct target_ops): Update read_memory, write_memory,
15616 and read_auxv.
15617 (read_inferior_memory, write_inferior_memory): Update.
15618 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15619 to unsigned char *.
15620 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15621 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15622 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15623 linux-s390-low.c, linux-sh-low.c: Update for changes in
15624 read_inferior_memory and the_low_target->breakpoint.
15625
15626 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15627
15628 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15629 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15630 * configure.srv: Add powerpc64-*-linux*.
15631 * linux-ppc64-low.c: New file.
15632
15633 2005-05-23 Orjan Friberg <orjanf@axis.com>
15634
15635 * linux-cris-low.c: New file with support for CRIS.
15636 * linux-crisv32-low.c: Ditto for CRISv32.
15637 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15638 (clean): Add reg-cris.c and reg-crisv32.c.
15639 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15640 reg-crisv32.o, and reg-crisv32.c to make rules.
15641 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15642 recognized targets.
15643
15644 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15645
15646 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15647 of sizeof (PTRACE_XFER_TYPE).
15648 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15649
15650 2005-05-12 Orjan Friberg <orjanf@axis.com>
15651
15652 * target.h (struct target_ops): Add insert_watchpoint,
15653 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15654 pointers for hardware watchpoint support.
15655 * linux-low.h (struct linux_target_ops): Ditto.
15656 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15657 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15658 to linux_target_ops.
15659 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15660 reply packet.
15661 * server.c (main): Recognize 'Z' and 'z' packets.
15662
15663 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15664
15665 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15666 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15667 (the_low_target): Add new members.
15668
15669 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15670
15671 * proc-service.c (ps_lgetregs): Search all_processes instead of
15672 all_threads.
15673
15674 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15675
15676 * server.c (start_inferior): Change return type to int.
15677 (attach_inferior): Change sigptr to int *.
15678 (handle_v_cont, handle_v_requests): Change signal to int *.
15679 (main): Change signal to int.
15680
15681 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15682
15683 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15684 * configure.srv: Add m32r*-*-linux*.
15685 * linux-m32r-low.c: New file.
15686
15687 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15688
15689 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15690
15691 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15692
15693 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15694 Take unsigned long arguments for PIDs.
15695 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15696 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15697 (wait_for_sigstop, linux_resume_one_process)
15698 (regsets_fetch_inferior_registers, linux_send_signal)
15699 (linux_read_auxv): Likewise. Update the types of variables holding
15700 PIDs. Update format string specifiers.
15701 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15702 * remote-utils.c (prepare_resume_reply): Likewise.
15703 * server.c (cont_thread, general_thread, step_thread)
15704 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15705 unsigned long.
15706 (handle_query): Update format specifiers.
15707 (handle_v_cont, main): Use strtoul for thread IDs.
15708 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15709 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15710 (general_thread, step_thread, thread_from_wait)
15711 (old_thread_from_wait): Update.
15712 * target.h (struct thread_resume): Use unsigned long for THREAD.
15713 (struct target_ops): Use unsigned long for arguments to attach and
15714 thread_alive.
15715
15716 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15717
15718 * acinclude.m4: Include bfd/bfd.m4 directly.
15719 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15720 <agriffis@toolchain.org>.
15721 * aclocal.m4, configure: Regenerated.
15722
15723 2005-01-07 Andrew Cagney <cagney@gnu.org>
15724
15725 * configure.ac: Rename configure.in, require autoconf 2.59.
15726 * configure: Re-generate.
15727
15728 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15729
15730 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15731 LIBS when finished.
15732 * aclocal.m4: Regenerated.
15733 * configure: Regenerated.
15734
15735 2004-11-21 Andreas Schwab <schwab@suse.de>
15736
15737 * linux-m68k-low.c (m68k_num_gregs): Define.
15738 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15739 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15740 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15741 (m68k_breakpoint_at): New. Add to the_low_target.
15742
15743 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15744 srv_linux_thread_db to yes.
15745
15746 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15747
15748 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15749 (ARCH_SET_FS): Likewise.
15750 (ARCH_GET_FS): Likewise.
15751 (ARCH_GET_GS): Likewise.
15752
15753 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15754
15755 * linux-i386-low.c (ps_get_thread_area): New.
15756 * linux-x86-64-low.c (ps_get_thread_area): New.
15757 * linux-low.c: Include <sys/syscall.h>.
15758 (linux_kill_one_process): Don't kill the first thread here.
15759 (linux_kill): Kill the first thread here.
15760 (kill_lwp): New function.
15761 (send_sigstop, linux_send_signal): Use it.
15762 * proc-service.c: Clean up #ifdefs.
15763 (fpregset_info): Delete.
15764 (ps_lgetregs): Update and enable implementation.
15765 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15766 implementations.
15767 * remote-utils.c (struct sym_cache, symbol_cache): New.
15768 (input_interrupt): Print a clearer message.
15769 (async_io_enabled): New variable.
15770 (enable_async_io, disable_async_io): Use it. Update comments.
15771 (look_up_one_symbol): Use the symbol cache.
15772 * thread-db.c (thread_db_look_up_symbols): New function.
15773 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15774
15775 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15776
15777 * configure.in: Test for -rdynamic.
15778 * configure: Regenerated.
15779 * Makefile (INTERNAL_LDFLAGS): New.
15780 (gdbserver, gdbreplay): Use it.
15781
15782 2004-09-02 Andrew Cagney <cagney@gnu.org>
15783
15784 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15785
15786 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15787
15788 * linux-low.c (linux_wait): Clear all_processes list also.
15789
15790 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15791
15792 * linux-low.c: Include <errno.h>. Remove extern declaration of
15793 errno.
15794
15795 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15796
15797 * gdbreplay.c, server.h, utils.c: Update copyright years.
15798
15799 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15800
15801 * server.c (main): Print child status or termination signal from
15802 variable 'signal', not 'sig'.
15803
15804 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15805
15806 * linux-low.c (linux_read_memory): Change return type to
15807 int. Check for and return error from ptrace().
15808 * target.c (read_inferior_memory): Change return type to int. Pass
15809 back return status from the_target->read_memory().
15810 * target.h (struct target_ops): Adapt *read_memory() prototype.
15811 Update comment.
15812 (read_inferior_memory): Adapt prototype.
15813 * server.c (main): Return an error packet if
15814 read_inferior_memory() returns an error.
15815
15816 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15817
15818 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15819 Unify with other clean targets.
15820
15821 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15822
15823 * server.c (handle_v_cont): Call set_desired_inferior.
15824
15825 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15826
15827 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15828
15829 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15830
15831 * linux-low.c (linux_wait): Unblock async I/O.
15832 (linux_resume): Block and enable async I/O.
15833 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15834 * server.h (block_async_io, unblock_async_io): Add prototypes.
15835
15836 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15837
15838 * remote-utils.c (remote_open): Print a status notice after
15839 opening a TCP port.
15840 * server.c (attach_inferior): Print a status notice after
15841 attaching.
15842
15843 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15844
15845 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15846
15847 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15848
15849 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15850 error packet.
15851 * server.c, target.h: Update copyright years.
15852
15853 2004-02-25 Roland McGrath <roland@redhat.com>
15854
15855 * target.h (struct target_ops): New member `read_auxv'.
15856 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15857 * linux-low.c (linux_read_auxv): New function.
15858 (linux_target_ops): Initialize `read_auxv' member to that.
15859
15860 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15861
15862 Committed by Jim Blandy <jimb@redhat.com>.
15863
15864 * linux-s390-low.c (s390_num_regs): Update.
15865 (s390_regmap): Remove control registers. Use __s390x__ predefine
15866 instead of GPR_SIZE to distiguish s390 and s390x targets.
15867
15868 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15869
15870 * linux-low.c: Update copyright year.
15871 (check_removed_breakpoint): Clear pending_is_breakpoint.
15872 (linux_set_resume_request, linux_queue_one_thread)
15873 (resume_status_pending_p): New functions.
15874 (linux_continue_one_thread): Use process->resume.
15875 (linux_resume): Only resume threads if there are no pending events.
15876 * linux-low.h (struct process_info): Add resume request
15877 pointer.
15878
15879 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15880
15881 * regcache.c (new_register_cache): Clear the allocated register
15882 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15883
15884 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15885
15886 * linux-low.c (linux_resume): Take a struct thread_resume *
15887 argument.
15888 (linux_wait): Update call.
15889 (resume_ptr): New static variable.
15890 (linux_continue_one_thread): Renamed from
15891 linux_continue_one_process. Use resume_ptr.
15892 (linux_resume): Use linux_continue_one_thread.
15893 * server.c (handle_v_cont, handle_v_requests): New functions.
15894 (myresume): New function.
15895 (main): Handle 'v' case.
15896 * target.h (struct thread_resume): New type.
15897 (struct target_ops): Change argument of "resume" to struct
15898 thread_resume *.
15899 (myresume): Delete macro.
15900
15901 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15902
15903 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15904 (uninstall): Support DESTDIR.
15905
15906 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15907
15908 * configure.srv: Add xscale*linux copy of arm*linux entry.
15909
15910 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15911
15912 * linux-arm-low.c (arm_reinsert_addr): New function.
15913 (the_low_target): Add arm_reinsert_addr.
15914
15915 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15916
15917 * mem-break.c: Remove whitespace at end of file.
15918
15919 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15920
15921 * configure.in: Check whether we need to prototype strerror.
15922 * server.h: Optionally prototype strerror.
15923 * gdbreplay.c (perror_with_name): Use strerror.
15924 * linux-low.c (linux_attach_lwp): Use strerror.
15925 * utils.c (perror_with_name): Use strerror.
15926 * config.in, configure: Regenerated.
15927
15928 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15929
15930 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15931 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15932
15933 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15934
15935 * Makefile.in (SFILES): Update.
15936 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15937 low-sun3.c: Remove files.
15938
15939 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15940
15941 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15942 (linux_detach_one_process, linux_detach): New functions.
15943 (linux_target_ops): Add linux_detach.
15944 * server.c (main): Handle 'D' packet.
15945 * target.h (struct target_ops): Add "detach" member.
15946 (detach_inferior): Define.
15947
15948 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15949
15950 From Kelley Cook <kelleycook@wideopenwest.com>:
15951 * configure.srv: Accept i[34567]86 variants.
15952
15953 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15954
15955 * linux-low.c (linux_wait_for_event): Correct comment typos.
15956 (linux_resume_one_process): Call check_removed_breakpoint.
15957 (linux_send_signal): New function.
15958 (linux_target_ops): Add linux_send_signal.
15959 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15960 of kill.
15961 * target.h (struct target_ops): Add send_signal.
15962
15963 2003-05-29 Jim Blandy <jimb@redhat.com>
15964
15965 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15966 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15967 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15968 away part of the register's value.
15969
15970 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15971
15972 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15973 (linux_wait_for_event, linux_init_signals): Likewise.
15974
15975 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15976
15977 * configure.in: Check for stdlib.h.
15978 * configure: Regenerated.
15979 * config.in: Regenerated.
15980
15981 2003-01-04 Andreas Schwab <schwab@suse.de>
15982
15983 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15984
15985 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15986
15987 * Makefile.in: Remove obsolete code.
15988
15989 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15990
15991 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15992 defined(PT_FPR0_HI).
15993
15994 2002-11-17 Stuart Hughes <seh@zee2.com>
15995
15996 * linux-arm-low.c (arm_num_regs): Increase.
15997 (arm_regmap): Include status register.
15998
15999 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16000
16001 * linux-low.c (register_addr): Remove incorrect -1 check.
16002
16003 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16004
16005 * linux-low.c (linux_create_inferior): Call setpgid. Return
16006 the new PID.
16007 (unstopped_p, linux_signal_pid): Remove.
16008 (linux_target_ops): Remove linux_signal_pid.
16009 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16010 global instead of target method.
16011 * target.h (struct target_ops): Remove signal_pid. Update comment
16012 for create_inferior.
16013 * server.c (signal_pid): New variable.
16014 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16015 gdbserver. Set the child to be the foreground process group.
16016 (attach_inferior): Set signal_pid.
16017
16018 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16019
16020 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16021
16022 2002-08-20 Jim Blandy <jimb@redhat.com>
16023
16024 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16025 default for this.
16026
16027 2002-08-01 Andrew Cagney <cagney@redhat.com>
16028
16029 * Makefile.in: Make chill references obsolete.
16030
16031 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16032
16033 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16034 * configure: Regenerate.
16035 * config.in: Regenerate.
16036
16037 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16038
16039 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16040 (perror_with_name, remote_close, remote_open, expect, play): Static.
16041
16042 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16043
16044 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16045 byte offsets instead of an array of indexes.
16046 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16047
16048 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16049
16050 * regcache.c: Add comment.
16051
16052 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16053
16054 * thread-db.c: New file.
16055 * proc-service.c: New file.
16056 * acinclude.m4: New file.
16057 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16058 proc-service.o, and thread-db.o.
16059 (linux-low.o): Add USE_THREAD_DB.
16060 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16061 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16062 * aclocal.m4: Regenerated.
16063 * config.in: Regenerated.
16064 * configure: Regenerated.
16065 * configure.in: Check for proc_service.h, sys/procfs.h,
16066 thread_db.h, and linux/elf.h headrs.
16067 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16068 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16069 Check for -lthread_db and thread support.
16070 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16071 PowerPC, and SuperH.
16072 * i387-fp.c: Constify arguments.
16073 * i387-fp.h: Likewise.
16074 * inferiors.c: (struct thread_info): Renamed from
16075 `struct inferior_info'. Remove PID member. Use generic inferior
16076 list header. All uses updated.
16077 (inferiors, signal_pid): Removed.
16078 (all_threads): New variable.
16079 (get_thread): Define.
16080 (add_inferior_to_list): New function.
16081 (for_each_inferior): New function.
16082 (change_inferior_id): New function.
16083 (add_inferior): Removed.
16084 (remove_inferior): New function.
16085 (add_thread): New function.
16086 (free_one_thread): New function.
16087 (remove_thread): New function.
16088 (clear_inferiors): Use for_each_inferior and free_one_thread.
16089 (find_inferior): New function.
16090 (find_inferior_id): New function.
16091 (inferior_target_data): Update argument type.
16092 (set_inferior_target_data): Likewise.
16093 (inferior_regcache_data): Likewise.
16094 (set_inferior_regcache_data): Likewise.
16095 * linux-low.c (linux_bp_reinsert): Remove.
16096 (all_processes, stopping_threads, using_thrads)
16097 (struct pending_signals, debug_threads, pid_of): New.
16098 (inferior_pid): Replace with macro.
16099 (struct inferior_linux_data): Remove.
16100 (get_stop_pc, add_process): New functions.
16101 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16102 Use add_process and add_thread.
16103 (linux_attach_lwp): New function, based on old linux_attach. Use
16104 add_process and add_thread. Set stop_expected for new threads.
16105 (linux_attach): New function.
16106 (linux_kill_one_process): New function.
16107 (linux_kill): Kill all LWPs.
16108 (linux_thread_alive): Use find_inferior_id.
16109 (check_removed_breakpoints, status_pending_p): New functions.
16110 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16111 Update. Use WNOHANG. Wait for cloned processes also. Update process
16112 struct for the found process.
16113 (linux_wait_for_event): New function.
16114 (linux_wait): Use it. Support LWPs.
16115 (send_sigstop, wait_for_sigstop, stop_all_processes)
16116 (linux_resume_one_process, linux_continue_one_process): New functions.
16117 (linux_resume): Support LWPs.
16118 (REGISTER_RAW_SIZE): Remove.
16119 (fetch_register): Use register_size instead. Call supply_register.
16120 (usr_store_inferior_registers): Likewise. Call collect_register.
16121 Fix recursive case.
16122 (regsets_fetch_inferior_registers): Improve error message.
16123 (regsets_store_inferior_registers): Add debugging.
16124 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16125 (unstopped_p, linux_signal_pid): New functions.
16126 (linux_target_ops): Add linux_signal_pid.
16127 (linux_init_signals): New function.
16128 (initialize_low): Call it. Initialize using_threads.
16129 * regcache.c (inferior_regcache_data): Add valid
16130 flag.
16131 (get_regcache): Fetch registers lazily. Add fetch argument
16132 and update all callers.
16133 (regcache_invalidate_one, regcache_invalidate): New
16134 functions.
16135 (new_register_cache): Renamed from create_register_cache.
16136 Return the new regcache.
16137 (free_register_cache): Change argument to a void *.
16138 (registers_to_string, registers_from_string): Call get_regcache
16139 with fetch flag set.
16140 (register_data): Make static. Pass fetch flag to get_regcache.
16141 (supply_register): Call get_regcache with fetch flag clear.
16142 (collect_register): Call get_regcache with fetch flag set.
16143 (collect_register_as_string): New function.
16144 * regcache.h: Update.
16145 * remote-utils.c (putpkt): Flush after debug output and use
16146 stderr.
16147 Handle input interrupts while waiting for an ACK.
16148 (input_interrupt): Use signal_pid method.
16149 (getpkt): Flush after debug output and use stderr.
16150 (outreg): Use collect_register_as_string.
16151 (new_thread_notify, dead_thread_notify): New functions.
16152 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16153 and general_thread.
16154 (look_up_one_symbol): Flush after debug output.
16155 * server.c (step_thread, server_waiting): New variables.
16156 (start_inferior): Don't use signal_pid. Update call to mywait.
16157 (attach_inferior): Update call to mywait.
16158 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16159 (main): Don't fetch/store registers explicitly. Use
16160 set_desired_inferior. Support proposed ``Hs'' packet. Update
16161 calls to mywait.
16162 * server.h: Update.
16163 (struct inferior_list, struct_inferior_list_entry): New.
16164 * target.c (set_desired_inferior): New.
16165 (write_inferior_memory): Constify.
16166 (mywait): New function.
16167 * target.h: Update.
16168 (struct target_ops): New signal_pid method.
16169 (mywait): Removed macro, added prototype.
16170
16171 * linux-low.h (regset_func): Removed.
16172 (regset_fill_func, regset_store_func): New.
16173 (enum regset_type): New.
16174 (struct regset_info): Add type field. Use new operation types.
16175 (struct linux_target_ops): stop_pc renamed to get_pc.
16176 Add decr_pc_after_break and breakpoint_at.
16177 (get_process, get_thread_proess, get_process_thread)
16178 (strut process_info, all_processes, linux_attach_lwp)
16179 (thread_db_init): New.
16180
16181 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16182 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16183 (the_low_target): Add new members.
16184 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16185 (i386_store_fpxregset): Constify.
16186 (target_regsets): Add new kind identifier.
16187 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16188 (i386_set_pc): Add debugging.
16189 (i386_breakpoint_at): New function.
16190 (the_low_target): Add new members.
16191 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16192 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16193 (mips_breakpoint_at): New.
16194 (the_low_target): Add new members.
16195 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16196 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16197 (the_low_target): Add new members.
16198 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16199 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16200 (the_low_target): Add new members.
16201 * linux-x86-64-low.c (target_regsets): Add new kind
16202 identifier.
16203
16204 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16205
16206 From Martin Pool <mbp@samba.org>:
16207 * server.c (gdbserver_usage): New function.
16208 (main): Call it.
16209
16210 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16211
16212 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16213 stop_at -> stop_pc.
16214
16215 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16216
16217 * Makefile.in: Remove obsolete code.
16218
16219 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16220
16221 * linux-low.c (regsets_fetch_inferior_registers),
16222 (regsets_store_inferior_registers): Removed cast to int from
16223 ptrace() calls.
16224 * regcache.h: Added declaration of struct inferior_info.
16225
16226 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16227
16228 * inferiors.c (struct inferior_info): Add regcache_data.
16229 (add_inferior): Call create_register_cache.
16230 (clear_inferiors): Call free_register_cache.
16231 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16232 * regcache.c (struct inferior_regcache_data): New.
16233 (registers): Remove.
16234 (get_regcache): New function.
16235 (create_register_cache, free_register_cache): New functions.
16236 (set_register_cache): Don't initialize the register cache here.
16237 (registers_to_string, registers_from_string, register_data): Call
16238 get_regcache.
16239 * regcache.h: Add prototypes.
16240 * server.h: Likewise.
16241
16242 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16243
16244 * mem-break.c: New file.
16245 * mem-break.h: New file.
16246 * Makefile.in: Add mem-break.o rule; update server.h
16247 dependencies.
16248 * inferiors.c (struct inferior_info): Add target_data
16249 member.
16250 (clear_inferiors): Free target_data member if set.
16251 (inferior_target_data, set_inferior_target_data): New functions.
16252 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16253 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16254 * linux-low.c (linux_bp_reinsert): New variable.
16255 (struct inferior_linux_data): New.
16256 (linux_create_inferior): Use set_inferior_target_data.
16257 (linux_attach): Likewise. Call add_inferior.
16258 (linux_wait_for_one_inferior): New function.
16259 (linux_wait): Call it.
16260 (linux_write_memory): Add const.
16261 (initialize_low): Call set_breakpoint_data.
16262 * linux-low.h (struct linux_target_ops): Add breakpoint
16263 handling members.
16264 * server.c (attach_inferior): Remove extra add_inferior
16265 call.
16266 * server.h: Include mem-break.h. Update inferior.c
16267 prototypes.
16268 * target.c (read_inferior_memory)
16269 (write_inferior_memory): New functions.
16270 * target.h (read_inferior_memory)
16271 (write_inferior_memory): Change macros to prototypes.
16272 (struct target_ops): Update comments. Add const to write_memory
16273 definition.
16274
16275 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16276
16277 * linux-low.c (usr_store_inferior_registers): Support
16278 registers which are allowed to fail to store.
16279 * linux-low.h (linux_target_ops): Likewise.
16280 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16281 (ppc_cannot_store_register): FPSCR may not be storable.
16282
16283 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16284
16285 * server.h: Include <string.h> if HAVE_STRING_H.
16286 * ChangeLog: Correct paths in last ChangeLog entry.
16287
16288 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16289
16290 * linux-low.h: Remove obsolete prototypes.
16291 (struct linux_target_ops): New.
16292 (extern the_low_target): New.
16293 * linux-low.c (num_regs, regmap): Remove declarations.
16294 (register_addr): Use the_low_target explicitly.
16295 (fetch_register): Likewise.
16296 (usr_fetch_inferior_registers): Likewise.
16297 (usr_store_inferior_registers): Likewise.
16298 * linux-arm-low.c (num_regs): Remove.
16299 (arm_num_regs): Define.
16300 (arm_regmap): Renamed from regmap, made static.
16301 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16302 made static.
16303 (arm_cannot_store_register): Renamed from cannot_store_register,
16304 made static.
16305 (the_low_target): New.
16306 * linux-i386-low.c (num_regs): Remove.
16307 (i386_num_regs): Define.
16308 (i386_regmap): Renamed from regmap, made static.
16309 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16310 made static.
16311 (i386_cannot_store_register): Renamed from cannot_store_register,
16312 made static.
16313 (the_low_target): New.
16314 * linux-ia64-low.c (num_regs): Remove.
16315 (ia64_num_regs): Define.
16316 (ia64_regmap): Renamed from regmap, made static.
16317 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16318 made static.
16319 (ia64_cannot_store_register): Renamed from cannot_store_register,
16320 made static.
16321 (the_low_target): New.
16322 * linux-m68k-low.c (num_regs): Remove.
16323 (m68k_num_regs): Define.
16324 (m68k_regmap): Renamed from regmap, made static.
16325 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16326 made static.
16327 (m68k_cannot_store_register): Renamed from cannot_store_register,
16328 made static.
16329 (the_low_target): New.
16330 * linux-mips-low.c (num_regs): Remove.
16331 (mips_num_regs): Define.
16332 (mips_regmap): Renamed from regmap, made static.
16333 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16334 made static.
16335 (mips_cannot_store_register): Renamed from cannot_store_register,
16336 made static.
16337 (the_low_target): New.
16338 * linux-ppc-low.c (num_regs): Remove.
16339 (ppc_num_regs): Define.
16340 (ppc_regmap): Renamed from regmap, made static.
16341 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16342 made static.
16343 (ppc_cannot_store_register): Renamed from cannot_store_register,
16344 made static.
16345 (the_low_target): New.
16346 * linux-s390-low.c (num_regs): Remove.
16347 (s390_num_regs): Define.
16348 (s390_regmap): Renamed from regmap, made static.
16349 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16350 made static.
16351 (s390_cannot_store_register): Renamed from cannot_store_register,
16352 made static.
16353 (the_low_target): New.
16354 * linux-sh-low.c (num_regs): Remove.
16355 (sh_num_regs): Define.
16356 (sh_regmap): Renamed from regmap, made static.
16357 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16358 made static.
16359 (sh_cannot_store_register): Renamed from cannot_store_register,
16360 made static.
16361 (the_low_target): New.
16362 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16363 (the_low_target): New.
16364
16365 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16366
16367 * Makefile.in: Add stamp-h target.
16368 * configure.in: Create stamp-h.
16369 * configure: Regenerated.
16370
16371 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16372
16373 * inferiors.c: New file.
16374 * target.c: New file.
16375 * target.h: New file.
16376 * Makefile.in: Add target.o and inferiors.o. Update
16377 dependencies.
16378 * linux-low.c (inferior_pid): New static variable,
16379 moved from server.c.
16380 (linux_create_inferior): Renamed from create_inferior.
16381 Call add_inferior. Return 0 on success instead of a PID.
16382 (linux_attach): Renamed from myattach.
16383 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16384 (linux_thread_alive): Renamed from mythread_alive.
16385 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16386 child dies.
16387 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16388 (regsets_store_inferior_registers): Correct error message.
16389 Add missing ``return 0''.
16390 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16391 (linux_store_registers): Renamed from store_inferior_registers.
16392 (linux_read_memory): Renamed from read_inferior_memory.
16393 (linux_write_memory): Renamed from write_inferior_memory.
16394 (linux_target_ops): New structure.
16395 (initialize_low): Call set_target_ops ().
16396 * remote-utils.c (unhexify): New function.
16397 (hexify): New function.
16398 (input_interrupt): Send signals to ``signal_pid''.
16399 * server.c (inferior_pid): Remove.
16400 (start_inferior): Update create_inferior call.
16401 (attach_inferior): Call add_inferior.
16402 (handle_query): New function.
16403 (main): Call handle_query for `q' packets.
16404 * server.h: Include "target.h". Remove obsolete prototypes.
16405 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16406
16407 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16408
16409 * Makefile.in: Add WARN_CFLAGS. Update configury
16410 dependencies.
16411 * configure.in: Check for <string.h>
16412 * configure: Regenerate.
16413 * config.in: Regenerate.
16414 * gdbreplay.c: Include needed system headers.
16415 (remote_open): Remove strchr prototype.
16416 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16417 * regcache.c (supply_register): Change buf argument to const void *.
16418 (supply_register_by_name): Likewise.
16419 (collect_register): Change buf argument to void *.
16420 (collect_register_by_name): Likewise.
16421 * regcache.h: Add missing prototypes.
16422 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16423 * server.c (handle_query): New function.
16424 (attached): New static variable, moved out of main.
16425 (main): Quiet longjmp clobber warnings.
16426 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16427 * utils.c (error): Remove NORETURN.
16428 (fatal): Likewise.
This page took 0.391599 seconds and 4 git commands to generate.