gdbserver/Windows: crash during connection establishment phase
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
2
3         PR server/23158:
4         * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5         * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6         Use it to set the expedite_regs field in the given tdesc.
7         * x86-tdesc.h: New file.
8         * linux-aarch64-tdesc.c (aarch64_linux_read_description):
9         Adjust following the addition of the new expedite_regs parameter
10         to init_target_desc.
11         * linux-tic6x-low.c (tic6x_read_description): Likewise.
12         * linux-x86-tdesc.c: #include "x86-tdesc.h".
13         (i386_linux_read_description, amd64_linux_read_description):
14         Adjust following the addition of the new expedite_regs parameter
15         to init_target_desc.
16         * lynx-i386-low.c: #include "x86-tdesc.h".
17         (lynx_i386_arch_setup): Adjust following the addition of the new
18         expedite_regs parameter to init_target_desc.
19         * nto-x86-low.c: #include "x86-tdesc.h".
20         (nto_x86_arch_setup): Adjust following the addition of the new
21         expedite_regs parameter to init_target_desc.
22         * win32-i386-low.c: #include "x86-tdesc.h".
23         (i386_arch_setup): Adjust following the addition of the new
24         expedite_regs parameter to init_target_desc.
25
26 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
27
28         PR server/23158:
29         * win32-low.c (win32_create_inferior): Add call to my_wait
30         setting last_status global.
31
32 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
33
34         PR server/23158:
35         * win32-low.c (create_process): Only call gdb_tilde_expand if
36         inferior_cwd is not NULL.
37
38 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
39
40         * i387-fp.c (i387_cache_to_xsave): Only write x87 control
41         registers to the cache if their values have changed.
42         (i387_xsave_to_cache): Provide default values for x87 control
43         registers when these features are available, but disabled.
44         * regcache.c (supply_register_by_name_zeroed): New function.
45         * regcache.h (supply_register_by_name_zeroed): Declare new
46         function.
47
48 2018-05-07  Tom Tromey  <tom@tromey.com>
49
50         * configure: Rebuild.
51
52 2018-05-04  Tom Tromey  <tom@tromey.com>
53
54         * configure: Rebuild.
55
56 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
57             Pedro Alves <palves@redhat.com>
58
59         * linux-aarch64-low.c (aarch64_stopped_data_address):
60         Likewise.
61
62 2018-04-27  Tom Tromey  <tom@tromey.com>
63
64         * configure: Rebuild.
65
66 2018-04-23  Tom Tromey  <tom@tromey.com>
67
68         * configure: Rebuild.
69
70 2018-04-19  Simon Marchi  <simon.marchi@ericsson.com>
71
72         * Makefile.in (depcomp): Add "..".
73         (all_deps_files): New and use it.
74
75 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
76
77         * configure.srv (aarch64*-*-linux*): Don't include xml.
78         (i[34567]86-*-cygwin*): Likewise.
79         (i[34567]86-*-linux*): Likewise.
80         (i[34567]86-*-lynxos*): Likewise.
81         (i[34567]86-*-mingw32ce*): Likewise.
82         (i[34567]86-*-mingw*): Likewise.
83         (i[34567]86-*-nto*): Likewise.
84         (tic6x-*-uclinux): Likewise.
85         (x86_64-*-linux*): Likewise.
86         (x86_64-*-mingw*): Likewise.
87         (x86_64-*-cygwin*): Likewise.
88
89 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
90
91         * tdesc.c: Remove xml parameter.
92
93 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
94
95         * server.c (get_features_xml): Remove cast.
96         * tdesc.c (void target_desc::accept): Fill in function.
97         (tdesc_get_features_xml): Remove old xml creation.
98         (print_xml_feature::visit_pre): Add xml vistor.
99         * tdesc.h (struct target_desc): Make xmltarget mutable.
100         (tdesc_get_features_xml): Remove declaration.
101
102 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
103
104         * tdesc.c (tdesc_architecture_name): Add new function.
105         (tdesc_osabi_name): Likewise.
106         (tdesc_get_features_xml): Use new functions.
107
108 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
109
110         * tdesc.c (tdesc_create_flags): Remove.
111         (tdesc_add_flag): Likewise.
112         (tdesc_named_type): Likewise.
113         (tdesc_create_union): Likewise.
114         (tdesc_create_struct): Likewise.
115         (tdesc_create_vector): Likewise.
116         (tdesc_add_bitfield): Likewise.
117         (tdesc_add_field): Likewise.
118         (tdesc_set_struct_size): Likewise.
119
120 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
121
122         * tdesc.c (~target_desc): Remove implictly deleted items.
123         (init_target_desc): Iterate all features.
124         (tdesc_get_features_xml): Use vector.
125         (tdesc_create_feature): Create feature.
126         * tdesc.h (tdesc_feature) Remove
127         (target_desc): Add features.
128
129 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
130
131         * Makefile.in: Add common/tdesc.c
132         * tdesc.c (init_target_desc): init all reg_defs from register
133         vector.
134         (tdesc_create_reg): Create tdesc_reg.
135         * tdesc.h (tdesc_feature): Add register vector.
136
137 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
138
139         * tdesc.h (struct target_desc) <features>: Change type to
140         std::vector<std::string>.
141         * tdesc.c (target_desc::~target_desc): Adjust to std::vector
142         changes.
143         (tdesc_get_features_xml): Likewise.
144         (tdesc_create_feature): Likewise.
145
146 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
147
148         * regcache.c (find_register_by_number): Return a ref.
149         (find_regno): Use references.
150         (register_size): Likewise.
151         (register_data): Likewise.
152         * tdesc.c (target_desc::~target_desc): Remove free calls.
153         (target_desc::operator==): Use std::vector compare.
154         (init_target_desc): Use reference.
155         (tdesc_create_reg): Use reg constructors.
156         * tdesc.h (struct target_desc): Replace pointer with object.
157
158 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
159
160         * regcache.c (find_register_by_number): Make static.
161         (find_regno): Use find_register_by_number
162         * regcache.h (struct reg): Remove declaration.
163
164 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
165
166         * tdesc.c (target_desc::~target_desc): Move to here.
167         (target_desc::operator==): Likewise.
168         * tdesc.h (target_desc::~target_desc): Move from here.
169         (target_desc::operator==): Likewise.
170
171 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
172
173         * linux-s390-low.c (s390_get_wordsize): Correct brace style.
174
175 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
176
177         * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
178         S390_TDESC_GS.
179         * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
180         (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
181         and init_registers_s390_gs_linux64.
182
183 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
184
185         * linux-s390-low.c (s390_fill_gs): Remove function.
186         (s390_fill_gsbc): Remove function.
187         (s390_regsets): Set fill functions for the guarded storage regsets
188         to NULL.
189
190 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
191
192         * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
193         the word size.  Add comment.
194         (s390_get_wordsize): New function.
195         (s390_arch_setup): No longer select a temporary tdesc to fetch the
196         pswm with it.  Instead, use s390_get_wordsize to determine the
197         word size first and derive the correct tdesc from that directly.
198
199 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
200
201         * Makefile.in: Include silent-rules.mk.
202         (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
203         (COMPILE): Add ECHO_CXX.
204         (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
205         (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
206         ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
207         (version-generated.c): Add ECHO_GEN.
208         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
209         (IPAGENT_COMPILE): Add ECHO_CXX.
210         (%-generated.c): Add ECHO_REGDAT.
211
212 2018-03-14  Tom Tromey  <tom@tromey.com>
213
214         PR cli/14977:
215         * ax.c (ax_printf): Special case for NULL.
216
217 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
218
219         * linux-low.c (linux_qxfer_libraries_svr4): Use
220         xml_escape_text_append.
221
222 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
223
224         * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
225
226 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
227
228         * server.c (handle_general_set): Remove unnecessary xstrdup.
229
230 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
231
232         * server.c (parse_debug_format_options): Adjust to
233         delim_string_to_char_ptr_vec changes.
234         * thread-db.c (thread_db_load_search): Adjust to
235         dirnames_to_char_ptr_vec changes.
236
237 2018-03-01  Markus Metzger  <markus.t.metzger@intel.com>
238
239         * target.h (target_enable_btrace, target_disable_btrace)
240         (target_read_btrace, target_read_btrace_conf): Turn macro into
241         inline function.  Throw error if target method is not defined.
242         * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
243         check for btrace target method.  Be prepared to handle exceptions
244         from btrace target methods.
245
246 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
247
248         * server.c (captured_main): Change order of error message printed
249         when the current working directory cannot be found.
250
251 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
252
253         * server.c: Include "filenames.h" and "pathstuff.h".
254         (program_name): Delete variable.
255         (program_path): New anonymous class.
256         (get_exec_wrapper): Use "program_path" instead of
257         "program_name".
258         (handle_v_run): Likewise.
259         (captured_main): Likewise.
260         (process_serial_event): Likewise.
261
262 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
263
264         * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
265         (OBJS): Add "pathstuff.o".
266         * server.c (current_directory): New global variable.
267         (captured_main): Initialize "current_directory".
268
269 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
270
271         * tdesc.c: Use common/tdesc.h.
272         * tdesc.h: Likewise.
273
274 2018-02-20  Alan Hayward  <alan.hayward@arm.com>
275             Simon Marchi  <simon.marchi@ericsson.com>
276
277         * Makefile.in: Switch order of make rules.
278
279 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
280
281         * Makefile.in: Add common directory in build.
282         * configure.ac: Add common reference.
283         * configure: Regenerate.
284
285 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
286
287         * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
288         * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
289         * spu-low.c (spu_target_ops): Likewise.
290         * win32-low.c (win32_target_ops): Likewise.
291         * server.c (supported_btrace_packets): Report packets unconditionally.
292         * target.h (target_ops) <supports_btrace>: Remove.
293         (target_supports_btrace): Remove.
294
295 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
296
297         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
298         (handle_btrace_disable): Change return type to void.  Use exceptions
299         to report errors.
300         (handle_btrace_general_set): Catch exception and copy message to
301         return message.
302
303 2018-02-08  Tom Tromey  <tom@tromey.com>
304
305         * linux-low.c (install_software_single_step_breakpoints): Use
306         make_scoped_restore.
307         * inferiors.c (make_cleanup_restore_current_thread): Remove.
308         (do_restore_current_thread_cleanup): Remove.
309         * gdbthread.h (make_cleanup_restore_current_thread): Don't
310         declare.
311
312 2018-02-08  Tom Tromey  <tom@tromey.com>
313
314         * mem-break.c (set_raw_breakpoint_at): Use
315         gdb::unique_xmalloc_ptr.
316
317 2018-01-30  Pedro Alves  <palves@redhat.com>
318
319         PR gdb/13211
320         * target.c (target_terminal::terminal_state): Rename to ...
321         (target_terminal::m_terminal_state): ... this.
322
323 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
324
325         * linux-low.c (handle_extended_wait): Surround call to
326         thread_db_notice_clone with #ifdef USE_THREAD_DB.
327
328 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
329
330         * linux-low.c (attach_proc_task_lwp_callback): Adjust to
331         linux_ptrace_attach_fail_reason_string now returning an
332         std::string.
333         (linux_attach): Likewise.
334         * thread-db.c (attach_thread): Likewise.
335
336 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
337
338         PR gdb/21559
339         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
340         checking for fs_base/gs_base fields in struct user_regs_struct.
341         * configure: Regenerate.
342
343 2018-01-16  Yao Qi  <yao.qi@linaro.org>
344
345         PR gdb/18749
346         * linux-low.c (fetch_register): Call supply_register instead of
347         error.
348
349 2018-01-08  Yao Qi  <yao.qi@linaro.org>
350             Simon Marchi  <simon.marchi@ericsson.com>
351
352         * Makefile.in (OBS): Remove selftest.o.
353         * configure.ac: Set srv_selftest_objs if $development is true.
354         (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
355         * configure: Re-generated.
356         * server.c (captured_main): Wrap variable selftest_filter with
357         GDB_SELF_TEST.
358
359 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
360
361         * server.c (parse_debug_format_options): Return std::string.
362         (handle_monitor_command, captured_main): Adjust.
363
364 2018-01-05  Pedro Alves  <palves@redhat.com>
365
366         PR gdb/18653
367         * server.c (captured_main): Pass quiet=false to
368         save_original_signals_state.
369
370 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
371
372         * gdbreplay.c (gdbreplay_version): Update copyright year in
373         version message.
374         * server.c (gdbserver_version): Likewise.
375
376 2017-12-08  Tom Tromey  <tom@tromey.com>
377
378         * ax.c (ax_printf): Update.
379
380 2017-12-07  Yao Qi  <yao.qi@linaro.org>
381
382         * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
383         aarch64_linux_read_description.
384         * linux-amd64-ipa.c (idx2mask): New array.
385         (get_ipa_tdesc): Move idx2mask out.
386         (initialize_low_tracepoint): Initialize target descriptions.
387         * linux-i386-ipa.c (idx2mask): New array.
388         (get_ipa_tdesc): Move idx2mask out.
389         (initialize_low_tracepoint): Initialize target descriptions.
390
391 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
392
393         * tdesc.c (struct tdesc_type): Change return type.
394         (tdesc_add_flag): Change parameter type.
395         (tdesc_add_bitfield): Likewise.
396         (tdesc_add_field): Likewise.
397         (tdesc_set_struct_size): Likewise.
398
399 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
400
401         * regcache.c (registers_to_string): Remove unused variable.
402
403 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
404
405         * inferiors.c (for_each_inferior_with_data): Remove.
406         * inferiors.h (for_each_inferior_with_data): Remove.
407         * server.c (handle_qxfer_threads_worker): Change parameter type.
408         (handle_qxfer_threads_proper): Use for_each_thread.
409
410 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
411
412         * inferiors.c (for_each_inferior): Remove.
413         (clear_inferiors): Use for_each_thread.
414         * inferiors.h (for_each_inferior): Remove.
415         * linux-low.c (linux_wait_for_event_filtered): Use
416         for_each_thread.
417         (linux_stabilize_threads): Likewise.
418         * regcache.c (regcache_release): Likewise.
419         * server.c (gdb_wants_all_threads_stopped): Likewise.
420         (clear_pending_status_callback): Remove.
421         (handle_status): Use for_each_thread.
422         (captured_main): Likewise.
423         * win32-low.c (child_init_thread_list): Likewise.
424         (win32_clear_inferiors): Likewise.
425         (fake_breakpoint_event): Likewise.
426
427 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
428
429         * inferiors.h (find_inferior): Remove.
430         * inferiors.c (find_inferior): Remove.
431
432 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
433
434         * linux-low.c (resume_status_pending_p): Update comment.
435         (need_step_over_p): Update comment.
436
437 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
438
439         * linux-low.c (proceed_one_lwp): Return void, change parameter
440         type.
441         (unsuspend_and_proceed_one_lwp): Likewise.
442         (proceed_all_lwps): Use for_each_thread.
443         (unstop_all_lwps): Likewise.
444
445 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
446
447         * linux-low.c (linux_resume_one_thread): Return void, take
448         parameter directly.
449         (linux_resume): Use for_each_thread.
450
451 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
452
453         * linux-low.c (send_sigstop_callback): Return void, change
454         parameter type.  Rename to...
455         (send_sigstop): ... this.
456         (suspend_and_send_sigstop_callback): Return void, change parameter
457         type.  Rename to...
458         (suspend_and_send_sigstop): ... this.
459         (stop_all_lwps): Use for_each_thread.
460
461 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
462
463         * linux-low.c (lwp_running): Return bool, remove unused
464         argument.
465         (linux_stabilize_threads): Use find_thread.
466
467 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
468
469         * linux-low.c (select_singlestep_lwp_callback): Remove.
470         (count_events_callback): Remove.
471         (select_event_lwp_callback): Remove.
472         (select_event_lwp): Use find_thread/for_each_thread.
473
474 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
475
476         * linux-low.c (not_stopped_callback): Return bool, take filter
477         argument directly.
478         (linux_wait_for_event_filtered): Use find_thread.
479         (linux_wait_1): Likewise.
480
481 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
482
483         * linux-low.c (same_lwp): Remove.
484         (find_lwp_pid): Use find_thread.
485
486 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
487
488         * linux-low.c (delete_lwp_callback): Remove.
489         (linux_mourn): Use for_each_thread.
490
491 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
492
493         * linux-low.c (linux_detach_lwp_callback): Return void, remove
494         args parameter, don't check for pid.
495         (linux_detach): Use for_each_thread.
496
497 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
498
499         * linux-low.c (struct counter): Remove.
500         (second_thread_of_pid_p): Remove.
501         (last_thread_of_process_p): Use find_thread.
502
503 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
504
505         * inferiors.c (find_inferior_in_random): Remove.
506         * inferiors.h (find_inferior_in_random): Remove.
507         * linux-low.c (status_pending_p_callback): Return bool, accept
508         parameter ptid directly.
509         (linux_wait_for_event_filtered): Use find_thread_in_random.
510         (linux_wait_1): Likewise.
511
512 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
513
514         * inferiors.c (find_inferior_id): Remove.
515         (find_thread_ptid): Move implemention from find_inferior_id to
516         here.
517         * inferiors.h (find_inferior_id): Remove.
518         * server.c (handle_status): Use find_thread_ptid.
519         (process_serial_event): Likewise.
520         * thread-db.c (find_one_thread): Likewise.
521         (thread_db_thread_handle): Likewise.
522         * win32-low.c (thread_rec): Likewise.
523         (child_delete_thread): Likewise.
524         (win32_thread_alive): Likewise.
525         (get_child_debug_event): Likewise.
526
527 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
528
529         * linux-mips-low.c (update_watch_registers_callback): Return
530         void, remove pid_p parameter, don't check for pid.
531         (mips_insert_point, mips_remove_point): Use for_each_thread.
532
533 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
534
535         * lynx.low (lynx_delete_thread_callback): Remove.
536         (lynx_mourn): Use for_each_thread.
537
538 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
539
540         * regcache.c (regcache_invalidate_one): Remove.
541         (regcache_invalidate_pid): use for_each_thread.
542
543 2017-11-26  Tom Tromey  <tom@tromey.com>
544
545         * linux-low.c (linux_create_inferior): Update.
546
547 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
548
549         * spu-low.c (spu_create_inferior): Fix typo in argument name.
550
551 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
552
553         * configure.srv: Add linux-aarch64-tdesc-selftest.o.
554         * linux-aarch64-low.c (initialize_low_arch): Call init func.
555         * linux-aarch64-tdesc-selftest.c: New file.
556         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
557
558 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
559
560         * configure.srv: Add new file.
561         * linux-aarch64-low.c (initialize_low_arch): Call init func.
562         * linux-aarch64-tdesc-selftest.c: New file.
563         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
564
565 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
566
567         * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
568         * linux-aarch64-low.c (initialize_low_arch): Remove init.
569         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
570
571 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
572
573         * configure.srv: Add new files.
574         * linux-aarch64-ipa.c (get_ipa_tdesc): Call
575         aarch64_linux_read_description.
576         * linux-aarch64-low.c (aarch64_linux_read_description):
577         Merge with aarch64_arch_setup.
578         (aarch64_arch_setup): Call aarch64_linux_read_description.
579         * linux-aarch64-tdesc.c: New file.
580         * linux-aarch64-tdesc.h: New file.
581
582 2017-11-24  Yao Qi  <yao.qi@linaro.org>
583
584         * configure.srv: Set $srv_regobj for tic6x-linux.
585         * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
586         (tic6x_read_description): Move some code to tic6x_arch_setup.
587         (tic6x_tdesc_test): New function.
588         (initialize_low_arch): Call selftests::register_test.
589
590 2017-11-22  Yao Qi  <yao.qi@linaro.org>
591
592         * remote-utils.c (prepare_resume_reply): Use memcpy.
593
594 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
595
596         * linux-low.c (kill_one_lwp_callback): Return void, take
597         argument directly, don't filter on pid.
598         (linux_kill): Use for_each_thread.
599
600 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
601
602         * linux-low.c (need_step_over_p): Return bool, remove dummy
603         argument.
604         (linux_resume, proceed_all_lwps): Use find_thread.
605
606 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
607
608         * linux-low.c (resume_status_pending_p): Return bool, remove
609         flag_p argument.
610         (linux_resume): Use find_thread.
611
612 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
613
614         * linux-low.c (struct thread_resume_array): Remove.
615         (linux_set_resume_request): Return void, take arguments
616         directly.
617         (linux_resume): Use for_each_thread.
618
619 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
620
621         * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
622         return bool, remove data argument.
623         (linux_stabilize_threads): Use find_thread.
624
625 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
626
627         * linux-low.c (unsuspend_one_lwp): Remove.
628         (unsuspend_all_lwps): Use for_each_thread, inline code from
629         unsuspend_one_lwp.
630
631 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
632
633         * gdbthread.h (find_thread): Add overload with ptid_t filter.
634         * linux-low.c (struct iterate_over_lwps_args): Remove.
635         (iterate_over_lwps_filter): Remove.
636         (iterate_over_lwps): Use find_thread.
637
638 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
639
640         * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
641         (linux_handle_new_gdb_connection): Use for_each_thread, inline
642         code from reset_lwp_ptrace_options_callback.
643
644 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
645
646         * linux-arm-low.c (struct update_registers_data): Remove.
647         (update_registers_callback): Return void, take arguments
648         directly, don't check thread's pid.
649         (arm_insert_point, arm_remove_point): Use for_each_thread.
650
651 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
652
653         * win32-low.c (continue_one_thread): Return void, take argument
654         directly.
655         (child_continue): Use for_each_thread.
656
657 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
658
659         * win32-i386-low.c (update_debug_registers_callback): Rename
660         to ...
661         (update_debug_registers): ... this, return void, remove pid_p arg.
662         (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
663
664 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
665
666         * inferiors.h (struct process_info): Add constructor, initialize
667         fields..
668         <syscalls_to_catch>: Change type to std::vector<int>.
669         * inferiors.c (add_process): Allocate process_info with new.
670         (remove_process): Free process_info with delete.
671         * linux-low.c (handle_extended_wait): Adjust.
672         (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
673         * server.c (handle_general_set): Adjust.
674
675 2017-11-16  Pedro Alves  <palves@redhat.com>
676
677         * remote-utils.c (remote_close): Block SIGIO signals instead of
678         uninstalling the SIGIO handler.
679
680 2017-11-16  Alan Hayward  <alan.hayward@arm.com>
681
682         * tdesc.c (tdesc_get_features_xml): Allow null osabi.
683
684 2017-11-16  Yao Qi  <yao.qi@linaro.org>
685
686         * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
687         (tic6x_store_gregset): Likewise.
688         (tic6x_usrregs_info): Move it up.
689
690 2017-11-15  Alan Hayward  <alan.hayward@arm.com>
691
692         * Makefile.in: Update arch rules.
693         * configure.srv: Explicitly mark arch/ files.
694
695 2017-11-13  Andreas Schwab  <schwab@suse.de>
696
697         * linux-m68k-low.c (m68k_supports_hardware_single_step): New
698         function.
699         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
700
701 2017-11-06  Pedro Alves  <palves@redhat.com>
702
703         * config.in, configure: Regenerate.
704
705 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
706
707         * target.c (struct thread_search): Remove.
708         (thread_search_callback): Remove.
709         (prepare_to_access_memory): Use for_each_thread instead of
710         find_inferior.  Inline code from thread_search_callback.
711
712 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
713
714         * server.c (struct visit_actioned_threads_data): Remove.
715         (visit_actioned_threads): Change prototype to take arguments
716         directly.
717         (resume): Use find_thread instead of find_inferior.
718
719 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
720
721         * server.c (queue_stop_reply_callback): Change prototype, return
722         void.
723         (find_status_pending_thread_callback): Remove.
724         (handle_status): Replace find_inferior with find_thread and
725         for_each_thread.
726
727 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
728
729         * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
730         with REGNO.
731         (aarch64_store_gregset): Likewise.
732         (aarch64_fill_fpregset): Likewise.
733         (aarch64_store_fpregset): Likewise.
734
735 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
736
737         * gdbthread.h (find_thread, for_each_thread): New functions.
738         * inferiors.c (thread_of_pid): Remove.
739         (find_any_thread_of_pid): Use find_thread.
740         * linux-low.c (num_lwps): Use for_each_thread.
741
742 2017-10-17  Yao Qi  <yao.qi@linaro.org>
743
744         * Makefile.in: Remove one rule.
745         * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
746
747 2017-10-17  Yao Qi  <yao.qi@linaro.org>
748
749         * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
750         Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
751
752 2017-10-17  Yao Qi  <yao.qi@linaro.org>
753
754         * configure.srv: Rename arm.o with arch/arm.o.
755
756 2017-10-17  Yao Qi  <yao.qi@linaro.org>
757
758         * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
759         (clean): Remove .o files in CONFIG_SRC_SUBDIR.
760         (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
761         (arch-i386.o, arch-amd64.o): Remove rules.
762         (arch/%.o): New rule.
763         Update POSTCOMPILE and COMPILE.pre.
764         * configure.ac: Invoke AC_CONFIG_COMMANDS.
765         * configure: Re-generated.
766         * configure.srv: Replace arch-i386.o with arch/i386.o.
767         Replace arch-amd64.o with arch/amd64.o.
768
769 2017-10-16  Yao Qi  <yao.qi@linaro.org>
770
771         * configure: Regenerated.
772
773 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
774
775         * inferiors.h: (struct inferior_list): Remove.
776         (struct inferior_list_entry); Remove.
777         (add_inferior_to_list, clear_inferior_list, one_inferior_p,
778         A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
779         get_first_inferior): Remove.
780         (for_each_inferior, for_each_inferior_with_data, find_inferior,
781         find_inferior_id, find_inferior_in_random): Change signature.
782         * inferiors.c (all_threads): Change type to
783         std::list<thread_info *>.
784         (get_thread): Remove macro.
785         (find_inferior, find_inferior_id): Change signature, implement
786         using find_thread.
787         (find_inferior_in_random): Change signature, implement using
788         find_thread_in_random.
789         (for_each_inferior, for_each_inferior_with_data): Change
790         signature, implement using for_each_thread.
791         (add_inferior_to_list, remove_inferior): Remove.
792         (add_thread, get_first_thread, thread_of_pid,
793         find_any_thread_of_pid, free_one_thread, remove_thread): Update.
794         (get_first_inferior, one_inferior_p, clear_inferior_list):
795         Remove.
796         (clear_inferiors, get_thread_process): Update.
797         * gdbthread.h: Include <list>.
798         (struct thread_info) <entry>: Remove field.
799         <id>: New field.
800         (all_threads): Change type to std::list<thread_info *>.
801         (get_first_inferior): Add doc.
802         (find_thread, for_each_thread, find_thread_in_random): New
803         functions.
804         (current_ptid, pid_of, ptid_of, lwpid_of): Update.
805         * linux-arm-low.c (update_registers_callback): Update.
806         * linux-low.c (second_thread_of_pid_p): Update.
807         (kill_one_lwp_callback, linux_detach_lwp_callback,
808         delete_lwp_callback, status_pending_p_callback, same_lwp,
809         find_lwp_pid, num_lwps, iterate_over_lwps_filter,
810         iterate_over_lwps, not_stopped_callback,
811         resume_stopped_resumed_lwps, count_events_callback,
812         select_singlestep_lwp_callback, select_event_lwp_callback,
813         unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
814         suspend_and_send_sigstop_callback, wait_for_sigstop,
815         stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
816         lwp_running, linux_set_resume_request, resume_status_pending_p,
817         need_step_over_p, start_step_over, linux_resume_one_thread,
818         proceed_one_lwp, unsuspend_and_proceed_one_lwp,
819         reset_lwp_ptrace_options_callback): Update.
820         * linux-mips-low.c (update_watch_registers_callback): Update.
821         * regcache.c (regcache_invalidate_one, regcache_invalidate):
822         Update.
823         (free_register_cache_thread_one): Remove.
824         (regcache_release): Update.
825         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
826         handle_qxfer_threads_worker): Update.
827         (handle_query): Update, use list iterator.
828         (visit_actioned_threads, handle_pending_status,
829         queue_stop_reply_callback, gdb_wants_all_threads_stopped,
830         clear_pending_status_callback, set_pending_status_callback,
831         find_status_pending_thread_callback, handle_status,
832         process_serial_event): Update.
833         * target.c (thread_search_callback): Update.
834         * thread-db.c (thread_db_get_tls_address): Update.
835         * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
836         Update.
837         * win32-i386-low.c (update_debug_registers_callback): Update.
838         * win32-low.c (delete_thread_info, child_delete_thread,
839         continue_one_thread, suspend_one_thread,
840         get_child_debug_event): Adjust.
841
842 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
843
844         * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
845         * inferiors.h: Include <list>.
846         (struct process_info) <entry>: Remove field.
847         <pid>: New field.
848         (pid_of): Change macro to function.
849         (ptid_of, lwpid_of): Remove macro.
850         (all_processes): Change type to std::list<process_info *>.
851         (ALL_PROCESSES): Remove macro.
852         (for_each_process, find_process): New function.
853         * inferiors.c (all_processes): Change type to
854         std::list<process_info *>.
855         (find_thread_process): Adjust.
856         (add_process): Likewise.
857         (remove_process): Likewise.
858         (find_process_pid): Likewise.
859         (get_first_process): Likewise.
860         (started_inferior_callback): Remove.
861         (have_started_inferiors_p): Adjust.
862         (attached_inferior_callback): Remove.
863         (have_attached_inferiors_p): Adjust.
864         * linux-low.c (check_zombie_leaders): Likewise.
865         * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
866         (x86_linux_update_xmltarget): Adjust.
867         * server.c (handle_query): Likewise.
868         (gdb_reattached_process): Remove.
869         (handle_status): Adjust.
870         (kill_inferior_callback): Likewise.
871         (detach_or_kill_inferior): Remove.
872         (print_started_pid): Likewise.
873         (print_attached_pid): Likewise.
874         (detach_or_kill_for_exit): Update.
875         (process_serial_event): Likewise.
876         * linux-arm-low.c (arm_new_fork): Likewise.
877
878 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
879
880         * dll.h: Include <list>.
881         (struct dll_info): Add constructor.
882         <entry>: Remove field.
883         (all_dlls): Change type to std::list<dll_info>.
884         * dll.c: Include <algorithm>.
885         (get_dll): Remove macro.
886         (all_dlls): Change type to std::list<dll_info *>.
887         (free_one_dll): Remove.
888         (match_dll): Likewise.
889         (loaded_dll): Adjust.
890         (unloaded_dll): Adjust to all_dlls type change, use
891         std::find_if.  Inline code from match_dll.
892         (clear_dlls): Adjust to all_dlls type change.
893         * server.c (emit_dll_description): Remove.
894         (handle_qxfer_libraries): Adjust to all_dlls type change,
895         integrate emit_dll_description's functionality.
896
897 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
898
899         * linux-low.h (struct linux_target_ops) <delete_process>: New
900         field.
901         * linux-low.c (linux_mourn): Call the_low_target.delete_process.
902         * linux-aarch64-low.c (aarch64_linux_delete_process): New.
903         (struct linux_target_ops): Add delete_process callback.
904         * linux-arm-low.c (arm_delete_process): New.
905         (struct linux_target_ops): Add delete_process callback.
906         * linux-bfin-low.c (struct linux_target_ops): Likewise.
907         * linux-crisv32-low.c (struct linux_target_ops): Likewise.
908         * linux-m32r-low.c (struct linux_target_ops): Likewise.
909         * linux-mips-low.c (mips_linux_delete_process): New.
910         (struct linux_target_ops): Add delete_process callback.
911         * linux-ppc-low.c (struct linux_target_ops): Likewise.
912         * linux-s390-low.c (struct linux_target_ops): Likewise.
913         * linux-sh-low.c (struct linux_target_ops): Likewise.
914         * linux-tic6x-low.c (struct linux_target_ops): Likewise.
915         * linux-tile-low.c (struct linux_target_ops): Likewise.
916         * linux-x86-low.c (x86_linux_delete_process): New.
917         (struct linux_target_ops): Add delete_process callback.
918         * linux-xtensa-low.c (struct linux_target_ops): Likewise.
919
920 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
921
922         * linux-aarch64-low.c (the_low_target): Add thread delete
923         callback.
924         * linux-arm-low.c (arm_delete_thread): New function.
925         (the_low_target): Add thread delete callback.
926         * linux-bfin-low.c (the_low_target): Likewise.
927         * linux-crisv32-low.c (the_low_target): Likewise.
928         * linux-low.c (delete_lwp): Invoke delete_thread callback if
929         set.
930         * linux-low.h (struct linux_target_ops) <delete_thread>: New
931         field.
932         * linux-m32r-low.c (the_low_target): Add thread delete callback.
933         * linux-mips-low.c (mips_linux_delete_thread): New function.
934         (the_low_target): Add thread delete callback.
935         * linux-ppc-low.c (the_low_target): Likewise.
936         * linux-s390-low.c (the_low_target): Likewise.
937         * linux-sh-low.c (the_low_target): Likewise.
938         * linux-tic6x-low.c (the_low_target): Likewise.
939         * linux-tile-low.c (the_low_target): Likewise.
940         * linux-x86-low.c (the_low_target): Likewise.
941         * linux-xtensa-low.c (the_low_target): Likewise.
942
943 2017-10-06  Yuanhui Zhang  <asmwarrior@gmail.com>
944
945         * win32-low.c: Include "common-inferior.h".
946
947 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
948
949         * inferiors.c (set_inferior_cwd): New function.
950         * server.c (handle_general_set): Handle QSetWorkingDir packet.
951         (handle_query): Inform that QSetWorkingDir is supported.
952         * win32-low.c (create_process): Pass the inferior's cwd to
953         CreateProcess.
954
955 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
956
957         * inferiors.c (current_inferior_cwd): New global variable.
958         (get_inferior_cwd): New function.
959         * inferiors.h (struct process_info) <cwd>: New field.
960
961 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
962
963         * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
964         (OBS): Add gdb_tilde_expand.o.
965
966 2017-10-02  Simon Marchi  <simon.marchi@ericsson.com>
967
968         * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
969         * nto-x86-low.c (nto_x86_arch_setup): Likewise.
970
971 2017-09-29  Pedro Alves  <palves@redhat.com>
972
973         * ax.c (gdb_parse_agent_expr): Constify.
974         * ax.h (gdb_parse_agent_expr): Constify.
975         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
976         Constify.
977         * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
978         * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
979         * remote-utils.h (read_ptid): Constify.
980         * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
981         (process_point_options, process_serial_event): Constify.
982         * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
983         (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
984         (cmd_qtbuffer): Constify.
985
986 2017-09-29  Pedro Alves  <palves@redhat.com>
987
988         * proc-service.c (ps_pdread): Return PS_ERR if reading memory
989         fails.
990
991 2017-09-29  Pedro Alves  <palves@redhat.com>
992
993         * linux-low.c (handle_extended_wait): Pass parent thread instead
994         of process to thread_db_notice_clone.
995         * linux-low.h (thread_db_notice_clone): Replace parent process
996         parameter with parent thread parameter.
997         * thread-db.c (find_one_thread): Add comment.
998         (thread_db_notice_clone): Replace parent process parameter with
999         parent thread parameter.  Temporarily switch to the parent thread.
1000
1001 2017-09-26  Sergio Durigan Junior  <sergiodj@redhat.com>
1002
1003         * gdbthread.h: Include "common-gdbthread.h".
1004         * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1005         "if" when validating the ptid.
1006         * remote-utils.c: Include "gdbthread.h".
1007         (prepare_resume_reply): Use "switch_to_thread".
1008         * target.c (done_accessing_memory): Likewise.
1009
1010 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1011
1012         * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1013         s390x-gs-linux64.o to srv_regobj.  Add s390-gs-linux64.xml,
1014         s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1015         srv_xmlfiles.  Add s390-gs-linux64-ipa.o and
1016         s390x-gs-linux64-ipa.o to ipa_obj.
1017         * linux-s390-low.c (HWCAP_S390_GS): New define.
1018         (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1019         New functions.
1020         (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1021         (s390_arch_setup): Check for guarded-storage support and choose
1022         appropriate tdesc.
1023         (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1024         init_registers_s390x_gs_linux64.
1025         * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1026         enum value.
1027         (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1028         (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1029
1030 2017-09-22  Simon Marchi  <simon.marchi@ericsson.com>
1031
1032         * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1033
1034 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1035
1036         * linux-low.h (struct lwp_info): Add new field, thread_handle.
1037         (thread_db_thread_handle): Declare.
1038         * linux-low.c (linux_target_ops): Initialize thread_handle.
1039         * server.c (handle_qxfer_threads_worker): Add support for
1040         "handle" attribute.
1041         * target.h (struct target_ops): Add new function pointer,
1042         thread_handle.
1043         (target_thread_handle): Define.
1044         * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1045         field in lwp.
1046         (thread_db_thread_handle): New function.
1047
1048 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1049
1050         * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1051         * linux-low.h (thread_db_notice_clone): Declare.
1052         * thread-db.c (thread_db_notice_clone): New function.
1053
1054 2017-09-21  Pedro Alves  <palves@redhat.com>
1055
1056         * server.c (gdb_read_memory, handle_status, process_serial_event)
1057         (handle_serial_event, handle_target_event): Adjust to
1058         set_desired_thread prototype change.
1059         * target.c (set_desired_thread): Remove 'use_general' parameter
1060         and adjust.
1061         * target.h (set_desired_thread): Remove 'use_general' parameter.
1062
1063 2017-09-20  Tom Tromey  <tom@tromey.com>
1064
1065         * target.c (target_terminal::terminal_state): Define.
1066         (target_terminal::init): Rename from target_terminal_init.
1067         (target_terminal::inferior): Rename from
1068         target_terminal_inferior.
1069         (target_terminal::ours): Rename from target_terminal_ours.
1070         (target_terminal::ours_for_output, target_terminal::info): New.
1071
1072 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1073
1074         * server.c (accumulate_file_name_length): Remove.
1075         (emit_dll_description): Adjust to std::string change.
1076         (handle_qxfer_libraries): Use std::string to hold document.
1077
1078 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1079
1080         * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1081         return type of xml_escape_text.
1082         * server.c (emit_dll_description): Likewise.
1083
1084 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1085
1086         * server.c (captured_main): Accept argument for --selftest.
1087         Update run_tests call.
1088         * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1089         when registering selftests.
1090
1091 2017-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>
1092
1093         * regcache.c (get_thread_regcache): Update code to use "std::vector"
1094         instead of "VEC" for "target_desc.reg_defs".
1095         (regcache_cpy): Likewise.
1096         (registers_to_string): Likewise.
1097         (registers_from_string): Likewise.
1098         (find_regno): Likewise.
1099         (supply_regblock): Likewise.
1100         (regcache_raw_read_unsigned): Likewise.
1101         * tdesc.c (init_target_desc): Likewise.
1102         (tdesc_create_reg): Likewise.
1103         * tdesc.h: Remove declaration of "tdesc_reg_p".  Include <vector>.
1104         (struct target_desc) <reg_defs>: Convert to "std::vector".
1105         (target_desc): Do not initialize "reg_defs".
1106         (~target_desc): Update code to use "std::vector" instead of "VEC"
1107         for "target_desc.reg_defs".
1108         (operator==): Likewise.
1109
1110 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1111
1112         * inferiors.h (thread_to_gdb_id): Remove.
1113         * inferiors.c (thread_to_gdb_id): Remove.
1114         * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1115         * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1116         lynx_store_registers, lynx_read_memory, lynx_write_memory):
1117         Likewise.
1118         * nto-low.c (nto_fetch_registers, nto_store_registers,
1119         nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1120
1121 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1122
1123         * inferiors.h (gdb_id_to_thread_id): Remove.
1124         * inferiors.c (gdb_id_to_thread_id): Remove.
1125         * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1126         removal.  Move pid declaration closer to where it's used.
1127
1128 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1129
1130         * server.c (handle_detach): New function.
1131         (process_serial_event): Move code out, call handle_detach.
1132
1133 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1134
1135         * server.c (require_running): Rename to ...
1136         (require_running_or_return): ... this ...
1137         (require_running_or_break): ... and this.
1138         (handle_query, process_serial_event): Adjust.
1139
1140 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1141
1142         * linux-low.c (linux_set_resume_request): Remove unused
1143         variables.
1144
1145 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1146
1147         * server.c (first_thread_of): Remove.
1148         (process_serial_event): Replace usage of first_thread_of with
1149         find_any_thread_of_pid.
1150         * tracepoint.c (same_process_p): Remove.
1151         (gdb_agent_about_to_close): Replace usage of same_process_p with
1152         find_any_thread_of_pid.
1153         * linux-x86-low.c (same_process_callback): Remove.
1154         (x86_arch_setup_process_callback): Replace usage of
1155         same_process_callback with find_any_thread_of_pid.
1156         * thread-db.c (any_thread_of): Remove.
1157         (switch_to_process): Replace usage of any_thread_of with
1158         find_any_thread_of_pid.
1159         * inferiors.c (thread_pid_matches_callback): Remove.
1160         (find_thread_process): Adjust to use find_any_thread_of_pid.
1161
1162 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1163
1164         * regcache.c (get_thread_regcache): Guard calls to "memset"
1165           with "!VEC_empty".
1166
1167 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1168
1169         * linux-low.c (handle_extended_wait): Use
1170         "allocate_target_description" instead of "XNEW".
1171         * linux-x86-low.c (initialize_low_arch): Likewise.
1172
1173 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1174
1175         * configure.srv (srv_i386_regobj): Remove.
1176         (srv_amd64_regobj): Remove.
1177         (srv_regobj): Set it to "" for x86 non-linux targets.
1178         * linux-x86-tdesc.c (i386_linux_read_description):
1179         * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1180         (init_registers_i386): Remove the declaration.
1181         (tdesc_i386): Remove the declaration.
1182         (lynx_i386_arch_setup): Call i386_create_target_description.
1183         * nto-x86-low.c: Likewise.
1184         * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1185         [!__x86_64__]: include arch/i386.h.
1186         (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1187
1188 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1189
1190         * configure.srv (srv_amd64_linux_xmlfiles): Remove
1191         i386/amd64-XXX-linux from it.
1192
1193 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1194
1195         * configure.srv: Empty srv_amd64_linux_regobj if $development is
1196         false.
1197         (ipa_amd64_linux_regobj): Remove.
1198         (ipa_x32_linux_regobj): Remove.
1199
1200 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1201
1202         * Makefile.in (arch-amd64.o): New rule.
1203         * configure.srv: Append arch-amd64.o.
1204         * linux-amd64-ipa.c: Include common/x86-xstate.h.
1205         (get_ipa_tdesc): Call amd64_linux_read_description.
1206         (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1207         and init_registers_amd64_XXX.
1208         * linux-x86-low.c (x86_linux_read_description): Call
1209         amd64_linux_read_description.
1210         (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1211         (initialize_low_arch): Don't call init_registers_x32_XXX and
1212         init_registers_amd64_XXX.
1213         * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1214         and tdesc_amd64_XXX.
1215         [__x86_64__] (amd64_tdesc_test): New function.
1216         (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1217         and init_registers_amd64_XXX.
1218         * linux-x86-tdesc.c: Include arch/amd64.h.
1219         (xcr0_to_tdesc_idx): New function.
1220         (i386_linux_read_description): New function.
1221         (amd64_get_ipa_tdesc_idx): New function.
1222         * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1223         (amd64_get_ipa_tdesc): Declare.
1224
1225 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1226
1227         * configure.srv (srv_i386_linux_xmlfiles): Remove
1228         i386/i386-XXX-linux.xml from it.
1229
1230 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1231
1232         * configure.srv: Set srv_i386_linux_regobj empty if $development
1233         is false.
1234         * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1235         initialize_low_tdesc.
1236         * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1237         with #if initialize_low_tdesc.
1238         * linux-x86-tdesc-selftest.c: New file.
1239         * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1240
1241 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1242
1243         * Makefile.in (arch-i386.o): New rule.
1244         * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1245         (x86_64-*-linux*): Likewise.
1246         * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1247         include arch/i386.h.
1248         (i386_linux_read_description): Remove code and call
1249         i386_create_target_description.
1250         * tdesc.c (allocate_target_description): New function.
1251         * tdesc.h (set_tdesc_architecture): Remove declaration.
1252         (set_tdesc_osabi): Likewise.
1253
1254 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1255
1256         * linux-x86-tdesc.c: Don't include <inttypes.h>.
1257         (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1258         set_tdesc_architecture and set_tdesc_osabi.  Remove code setting
1259         .xmltarget.
1260         * server.c (get_features_xml): Call tdesc_get_features_xml.
1261         * tdesc.c (set_tdesc_architecture): New function.
1262         (set_tdesc_osabi): New function.
1263         (tdesc_get_features_xml): New function.
1264         (tdesc_create_feature): Add an argument.
1265         * tdesc.h (struct target_desc) <features>: New field.
1266         <arch, osabi>: New field.
1267         (~target_desc): xfree features, arch, and osabi.
1268         (target_desc::oerator==): Don't compare .xmltarget.
1269         [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1270         (set_tdesc_osabi): Likewise.
1271         (tdesc_get_features_xml): Likewise.
1272
1273 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1274
1275         * linux-x86-tdesc.c: Include selftest.h.
1276         (i386_tdesc_test): New function.
1277         (initialize_low_tdesc): Call selftests::register_test.
1278         * tdesc.h: Include regdef.h.
1279         (target_desc): Override operator == and !=.
1280
1281 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1282
1283         * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1284         (ipa_obj): Likewise.
1285         * linux-i386-ipa.c: Include common/x86-xstate.h
1286         (get_ipa_tdesc): Call i386_linux_read_description.
1287         (initialize_low_tracepoint): Don't call  init_registers_XXX
1288         functions, call initialize_low_tdesc instead.
1289         * linux-x86-low.c (x86_linux_read_description): Call
1290         i386_linux_read_description.
1291         (initialize_low_arch): Don't call init_registers_i386_XXX
1292         functions, call initialize_low_tdesc.
1293         * linux-x86-tdesc.c: New file.
1294         * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1295         (i386_get_ipa_tdesc_idx): Declare.
1296         (i386_get_ipa_tdesc): Declare.
1297         (initialize_low_tdesc): Declare.
1298
1299 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1300
1301         * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1302         instead of 0.
1303
1304 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1305
1306         * Makefile.in (IPA_OBJS): Add vec-ipa.o
1307         * regcache.c (get_thread_regcache): Use VEC_length.
1308         (init_register_cache): Likewise.
1309         (regcache_cpy): Likewise.
1310         (registers_to_string): Iterate reg_defs via VEC_iterate.
1311         (find_regno): Likewise.
1312         (find_register_by_number): Use VEC_index.
1313         (register_size): Call find_register_by_number.
1314         (register_data): Call find_register_by_number.
1315         (supply_regblock): Use VEC_length.
1316         (regcache_raw_read_unsigned): Likewise.
1317         * tdesc.c (init_target_desc): Iterate reg_defs via
1318         VEC_iterate.
1319         (default_description): Update initializer.
1320         (copy_target_description): Don't update field num_registers.
1321         * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1322         <num_registers>: Remove.
1323
1324 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1325
1326         * Makefile.in (.SECONDARY): Define target.
1327
1328 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1329
1330         * linux-low.c (linux_wait_1): Adjust.
1331         * server.c (queue_stop_reply_callback): Adjust.
1332
1333 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1334
1335         * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1336         QEnvironmentUnset and QEnvironmentReset packets.
1337         (handle_query): Inform remote that QEnvironmentHexEncoded,
1338         QEnvironmentUnset and QEnvironmentReset are supported.
1339
1340 2017-08-25  Simon Marchi  <simon.marchi@ericsson.com>
1341
1342         * inferiors.h (inferior_target_data): Rename to ...
1343         (thread_target_data): ... this.
1344         (inferior_regcache_data): Rename to ...
1345         (thread_regcache_data): ... this.
1346         (set_inferior_regcache_data): Rename to ...
1347         (set_thread_regcache_data): ... this.
1348         * inferiors.c (inferior_target_data): Rename to ...
1349         (thread_target_data): ... this.
1350         (inferior_regcache_data): Rename to ...
1351         (thread_regcache_data): ... this.
1352         (set_inferior_regcache_data): Rename to ...
1353         (set_thread_regcache_data): ... this.
1354         (free_one_thread): Update.
1355         * linux-low.h (get_thread_lwp): Update.
1356         * regcache.c (get_thread_regcache): Update.
1357         (regcache_invalidate_thread): Update.
1358         (free_register_cache_thread): Update.
1359         * win32-i386-low.c (update_debug_registers_callback): Update.
1360         (win32_get_current_dr): Update.
1361         * win32-low.c (thread_rec): Update.
1362         (delete_thread_info): Update.
1363         (continue_one_thread): Update.
1364         (suspend_one_thread): Update.
1365
1366 2017-08-24  Simon Marchi  <simon.marchi@ericsson.com>
1367
1368         * inferiors.c (set_inferior_target_data): Remove.
1369         * inferiors.h (set_inferior_target_data): Remove.
1370
1371 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1372
1373         * Makefile.in (OBS): Add selftest.o.
1374         * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1375         * configure, config.in: Re-generated.
1376         * server.c: Include common/sefltest.h.
1377         (captured_main): Handle option --selftest.
1378
1379 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1380
1381         * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1382         i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1383         i386-avx-mpx.o and i386-mmx.o.
1384         (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1385         amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1386         (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1387         i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1388         i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1389         (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1390         i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1391         i386/amd64-avx-mpx.xml.
1392
1393 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1394
1395         * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1396         and x32-avx-avx512.o.
1397         (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1398         i386/x32-avx-avx512.xml.
1399
1400 2017-07-26  Simon Marchi  <simon.marchi@ericsson.com>
1401
1402         * tracepoint.h (enum class fast_tpoint_collect_result): New
1403         enumeration.
1404         (fast_tracepoint_collecting): Change return type to
1405         fast_tpoint_collect_result.
1406         * tracepoint.c (fast_tracepoint_collecting): Likewise.
1407         * linux-low.h: Include tracepoint.h.
1408         (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1409         fast_tpoint_collect_result.
1410         * linux-low.c (handle_tracepoints): Adjust.
1411         (linux_fast_tracepoint_collecting): Change return type to
1412         fast_tpoint_collect_result.
1413         (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1414         linux_wait_1, stuck_in_jump_pad_callback,
1415         lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1416         proceed_one_lwp): Adjust to type change.
1417
1418 2017-07-10  Yao Qi  <yao.qi@linaro.org>
1419
1420         * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1421
1422 2017-06-29  Yao Qi  <yao.qi@linaro.org>
1423
1424         * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1425         Remove.
1426         [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1427
1428 2017-06-20  Simon Marchi  <simon.marchi@ericsson.com>
1429
1430         * Makefile.in (IPA_OBJS): Sort and format one item per line.
1431
1432 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1433
1434         * linux-low.c (linux_create_inferior): Adjust code to access the
1435         environment information via 'gdb_environ' class.
1436         * lynx-low.c (lynx_create_inferior): Likewise.
1437         * server.c (our_environ): Make it an instance of 'gdb_environ'.
1438         (get_environ): Return a pointer to 'our_environ'.
1439         (captured_main): Initialize 'our_environ'.
1440         * server.h (get_environ): Adjust prototype.
1441         * spu-low.c (spu_create_inferior): Adjust code to access the
1442         environment information via 'gdb_environ' class.
1443
1444 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1445
1446         * linux-low.c (linux_read_memory, linux_write_memory): Remove
1447         usage of "register" keyword.
1448
1449 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1450
1451         * configure: Re-generate.
1452
1453 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1454
1455         * configure: Re-generate.
1456
1457 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1458
1459         * Makefile.in (COMPILE.pre): Add "-x c++".
1460
1461 2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>
1462
1463         * fork-child.c: Conditionally include <signal.h>.
1464
1465 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1466
1467         * server.c (handle_general_set): Handle new packet
1468         "QStartupWithShell".
1469         (handle_query): Add "QStartupWithShell" to the list of supported
1470         packets.
1471         (gdbserver_usage): Add help text explaining the
1472         new "--startup-with-shell" and "--no-startup-with-shell" CLI
1473         options.
1474         (captured_main): Recognize and act upon the presence of the new
1475         CLI options.
1476
1477 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1478             Pedro Alves  <palves@redhat.com>
1479
1480         * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1481         * configure: Regenerate.
1482         * configure.srv (srv_linux_obj): Add "fork-child.o" and
1483         "fork-inferior.o".
1484         (i[34567]86-*-lynxos*): Likewise.
1485         (spu*-*-*): Likewise.
1486         * fork-child.c: New file.
1487         * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1488         and "environ.h".
1489         (linux_ptrace_fun): New function.
1490         (linux_create_inferior): Adjust function prototype to reflect
1491         change on "target.h".  Adjust function code to use
1492         "fork_inferior".
1493         (linux_request_interrupt): Delete "signal_pid".
1494         * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1495         (lynx_ptrace_fun): New function.
1496         (lynx_create_inferior): Adjust function prototype to reflect
1497         change on "target.h".  Adjust function code to use
1498         "fork_inferior".
1499         * nto-low.c (nto_create_inferior): Adjust function prototype and
1500         code to reflect change on "target.h".  Update comments.
1501         * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1502         "common-terminal.h" and "environ.h".
1503         (terminal_fd): Moved to fork-child.c.
1504         (old_foreground_pgrp): Likewise.
1505         (restore_old_foreground_pgrp): Likewise.
1506         (last_status): Make it global.
1507         (last_ptid): Likewise.
1508         (our_environ): New variable.
1509         (startup_with_shell): Likewise.
1510         (program_name): Likewise.
1511         (program_argv): Rename to...
1512         (program_args): ...this.
1513         (wrapper_argv): New variable.
1514         (start_inferior): Delete function.
1515         (get_exec_wrapper): New function.
1516         (get_exec_file): Likewise.
1517         (get_environ): Likewise.
1518         (prefork_hook): Likewise.
1519         (post_fork_inferior): Likewise.
1520         (postfork_hook): Likewise.
1521         (postfork_child_hook): Likewise.
1522         (handle_v_run): Update code to deal with arguments coming from the
1523         remote host.  Update calls from "start_inferior" to
1524         "create_inferior".
1525         (captured_main): Likewise.  Initialize environment variable.  Call
1526         "have_job_control".
1527         * server.h (post_fork_inferior): New prototype.
1528         (get_environ): Likewise.
1529         (last_status): Declare.
1530         (last_ptid): Likewise.
1531         (signal_pid): Likewise.
1532         * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1533         (spu_ptrace_fun): New function.
1534         (spu_create_inferior): Adjust function prototype to reflect change
1535         on "target.h".  Adjust function code to use "fork_inferior".
1536         * target.c (target_terminal_init): New function.
1537         (target_terminal_inferior): Likewise.
1538         (target_terminal_ours): Likewise.
1539         * target.h: Include <vector>.
1540         (struct target_ops) <create_inferior>: Update prototype.
1541         (create_inferior): Update macro.
1542         * utils.c (gdb_flush_out_err): New function.
1543         * win32-low.c (win32_create_inferior): Adjust function prototype
1544         and code to reflect change on "target.h".
1545
1546 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1547
1548         * inferiors.c (switch_to_thread): New function.
1549
1550 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1551
1552         * Makefile.in (SFILE): Add "common/job-control.c".
1553         (OBS): Add "job-control.o".
1554
1555 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1556
1557         * Makefile: Remove "@host_makefile_frag@".
1558
1559 2017-05-05  Pedro Alves  <palves@redhat.com>
1560
1561         * configure: Regenerate.
1562
1563 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1564
1565         * configure: Regenerate.
1566
1567 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1568
1569         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1570         software_single_step change of return type to
1571         std::vector<CORE_ADDR>.
1572         * linux-low.c (install_software_single_step_breakpoints):
1573         Likewise.
1574         * linux-low.h (install_software_single_step_breakpoints):
1575         Likewise.
1576
1577 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1578
1579         * remote-utils.c: Include "gdb_termios.h" instead of
1580         "terminal.h".
1581         * terminal.h: Delete file.
1582
1583 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1584
1585         * server.c: Include <vector>.
1586         <program_argv, wrapper_argv>: Convert to std::vector.
1587         (start_inferior): Rewrite function to use C++.
1588         (handle_v_run): Likewise.  Update code that calculates the argv
1589         based on the vRun packet; use C++.
1590         (captured_main): Likewise.
1591
1592 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
1593
1594         * server.c (handle_v_cont): Initialize thread_resume::thread
1595         with null_ptid.
1596
1597 2017-04-05  Pedro Alves  <palves@redhat.com>
1598
1599         * configure: Regenerate.
1600
1601 2017-04-05  Pedro Alves  <palves@redhat.com>
1602
1603         * gdbreplay.c (sync_error): Constify.
1604         * linux-x86-low.c (push_opcode): Constify.
1605
1606 2017-04-05  Pedro Alves  <palves@redhat.com>
1607
1608         * win32-low.c (get_child_debug_event)
1609         <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1610         Report TARGET_WAITKIND_SPURIOUS instead.
1611
1612 2017-04-05  Pedro Alves  <palves@redhat.com>
1613
1614         * remote-utils.c (remote_prepare, remote_open): Constify.
1615         * remote-utils.h (remote_prepare, remote_open): Constify.
1616         * server.c (captured_main): Constify 'port' handling.
1617
1618 2017-04-04  Simon Marchi  <simon.marchi@ericsson.com>
1619
1620         * Makefile.in (clean): Clear .deps.
1621
1622 2017-03-31  Simon Marchi  <simon.marchi@polymtl.ca>
1623
1624         * .gitignore: Remove generated files, replace with wildcard.
1625         * (clean): Replace removal of generated files with wildcard.
1626         (version.c): Replace with...
1627         (version-generated.c): ...this.
1628         (xml-builtin.c): Replace with...
1629         (xml-builtin-generated.c): ...this.
1630         (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1631         (%.c: *regformats*): Replace with...
1632         (%-generated.c: *regformats*): ...this.
1633
1634 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1635
1636         * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1637         (xtensa_fill_gregset): Call collect_register_by_name for
1638         threadptr register.
1639         (xtensa_store_gregset): Call supply_register_by_name for
1640         threadptr register.
1641
1642 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
1643
1644         * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1645         for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1646         (xtensa_store_gregset): Call supply_register for all registers in
1647         a0_regnum..a0_regnum + C0_NREGS range.
1648
1649 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1650
1651         * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1652         (ax-ipa.o: ax.c): Remove.
1653         (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1654         (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1655         (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1656         (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1657         (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1658
1659 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1660
1661         * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1662         (print-utils-ipa.o: ../common/print-utils.c): Remove.
1663         (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1664         (errors-ipa.o: ../common/errors.c): Remove.
1665         (format-ipa.o: ../common/format.c): Remove.
1666         (common-utils-ipa.o: ../common/common-utils.c): Remove.
1667
1668 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1669
1670         * Makefile.in (%-ipa.o: %.c): New rule.
1671         (tracepoint-ipa.o: tracepoint.c): Remove.
1672         (utils-ipa.o: utils.c): Remove.
1673         (remote-utils-ipa.o: remote-utils.c): Remove.
1674         (regcache-ipa.o: regcache.c): Remove.
1675         (i386-linux-ipa.o: i386-linux.c): Remove.
1676         (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1677         (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1678         (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1679         (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1680         (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1681         (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1682         (amd64-linux-ipa.o: amd64-linux.c): Remove.
1683         (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1684         (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1685         (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1686         (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1687         (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1688         (aarch64-ipa.o: aarch64.c): Remove.
1689         (s390-linux32-ipa.o: s390-linux32.c): Remove.
1690         (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1691         (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1692         (s390-linux64-ipa.o: s390-linux64.c): Remove.
1693         (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1694         (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1695         (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1696         (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1697         (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1698         (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1699         (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1700         (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1701         (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1702         (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1703         (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1704         (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1705         (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1706         (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1707         (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1708         (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1709         (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1710         (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1711         (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1712         (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1713         (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1714         (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1715         (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1716         (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1717         (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1718         (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1719         (tdesc-ipa.o: tdesc.c): Remove.
1720         (x32-linux-ipa.o: x32-linux.c): Remove.
1721         (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1722         (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1723
1724 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1725
1726         * Makefile.in (%.o: ../arch/%.c): New rule.
1727         (arm.o: ../arch/arm.c): Remove.
1728         (arm-linux.o: ../arch/arm-linux.c): Remove.
1729         (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1730         (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1731
1732 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1733
1734         * Makefile.in (%.o: ../nat/%.c): New rule.
1735         (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1736         (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1737         (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1738         (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1739         (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1740         (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1741         (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1742         (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1743         (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1744         (linux-personality.o: ../nat/linux-personality.c): Remove.
1745         (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1746         (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1747         (x86-linux.o: ../nat/x86-linux.c): Remove.
1748         (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1749         (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1750
1751 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1752
1753         * Makefile.in (%.o: ../common/%.c): New rule.
1754         (signals.o: ../common/signals.c): Remove.
1755         (print-utils.o: ../common/print-utils.c): Remove.
1756         (rsp-low.o: ../common/rsp-low.c): Remove.
1757         (common-utils.o: ../common/common-utils.c): Remove.
1758         (posix-strerror.o: ../common/posix-strerror.c): Remove.
1759         (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1760         (vec.o: ../common/vec.c): Remove.
1761         (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1762         (xml-utils.o: ../common/xml-utils.c): Remove.
1763         (ptid.o: ../common/ptid.c): Remove.
1764         (buffer.o: ../common/buffer.c): Remove.
1765         (format.o: ../common/format.c): Remove.
1766         (filestuff.o: ../common/filestuff.c): Remove.
1767         (agent.o: ../common/agent.c): Remove.
1768         (errors.o: ../common/errors.c): Remove.
1769         (environ.o: ../common/environ.c): Remove.
1770         (common-debug.o: ../common/common-debug.c): Remove.
1771         (cleanups.o: ../common/cleanups.c): Remove.
1772         (common-exceptions.o: ../common/common-exceptions.c): Remove.
1773         (fileio.o: ../common/fileio.c): Remove.
1774         (common-regcache.o: ../common/common-regcache.c): Remove.
1775         (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1776         (new-op.o: ../common/new-op.c): Remove.
1777         (btrace-common.o: ../common/btrace-common.c): Remove.
1778
1779 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1780
1781         * Makefile.in (%.o: ../target/%.c): New rule.
1782         (waitstatus.o: ../target/waitstatus.c): Remove.
1783
1784 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
1785
1786         * Makefile.in
1787         (%.c: ../regformats/%.dat,
1788         (%.c: ../regformats/arm/%.dat,
1789         (%.c: ../regformats/i386/%.dat,
1790         (%.c: ../regformats/rs6000/%.dat): New rules.
1791         (aarch64.c): Remove.
1792         (reg-arm.c): Remove.
1793         (arm-with-iwmmxt.c): Remove.
1794         (arm-with-vfpv2.c): Remove.
1795         (arm-with-vfpv3.c): Remove.
1796         (arm-with-neon.c): Remove.
1797         (reg-bfin.c): Remove.
1798         (reg-cris.c): Remove.
1799         (reg-crisv32.c): Remove.
1800         (i386.c): Remove.
1801         (i386-linux.c): Remove.
1802         (i386-avx.c): Remove.
1803         (i386-avx-linux.c): Remove.
1804         (i386-avx-avx512.c): Remove.
1805         (i386-avx-avx512-linux.c): Remove.
1806         (i386-mpx.c): Remove.
1807         (i386-mpx-linux.c): Remove.
1808         (i386-avx-mpx-avx512-pku.c): Remove.
1809         (i386-avx-mpx-avx512-pku-linux.c): Remove.
1810         (i386-avx-mpx.c): Remove.
1811         (i386-avx-mpx-linux.c): Remove.
1812         (i386-mmx.c): Remove.
1813         (i386-mmx-linux.c): Remove.
1814         (reg-ia64.c): Remove.
1815         (reg-m32r.c): Remove.
1816         (reg-m68k.c): Remove.
1817         (reg-cf.c): Remove.
1818         (mips-linux.c): Remove.
1819         (mips-dsp-linux.c): Remove.
1820         (mips64-linux.c): Remove.
1821         (mips64-dsp-linux.c): Remove.
1822         (nios2-linux.c): Remove.
1823         (powerpc-32.c): Remove.
1824         (powerpc-32l.c): Remove.
1825         (powerpc-altivec32l.c): Remove.
1826         (powerpc-cell32l.c): Remove.
1827         (powerpc-vsx32l.c): Remove.
1828         (powerpc-isa205-32l.c): Remove.
1829         (powerpc-isa205-altivec32l.c): Remove.
1830         (powerpc-isa205-vsx32l.c): Remove.
1831         (powerpc-e500l.c): Remove.
1832         (powerpc-64l.c): Remove.
1833         (powerpc-altivec64l.c): Remove.
1834         (powerpc-cell64l.c): Remove.
1835         (powerpc-vsx64l.c): Remove.
1836         (powerpc-isa205-64l.c): Remove.
1837         (powerpc-isa205-altivec64l.c): Remove.
1838         (powerpc-isa205-vsx64l.c): Remove.
1839         (s390-linux32.c): Remove.
1840         (s390-linux32v1.c): Remove.
1841         (s390-linux32v2.c): Remove.
1842         (s390-linux64.c): Remove.
1843         (s390-linux64v1.c): Remove.
1844         (s390-linux64v2.c): Remove.
1845         (s390-te-linux64.c): Remove.
1846         (s390-vx-linux64.c): Remove.
1847         (s390-tevx-linux64.c): Remove.
1848         (s390x-linux64.c): Remove.
1849         (s390x-linux64v1.c): Remove.
1850         (s390x-linux64v2.c): Remove.
1851         (s390x-te-linux64.c): Remove.
1852         (s390x-vx-linux64.c): Remove.
1853         (s390x-tevx-linux64.c): Remove.
1854         (tic6x-c64xp-linux.c): Remove.
1855         (tic6x-c64x-linux.c): Remove.
1856         (tic6x-c62x-linux.c): Remove.
1857         (reg-sh.c): Remove.
1858         (reg-sparc64.c): Remove.
1859         (reg-spu.c): Remove.
1860         (amd64.c): Remove.
1861         (amd64-linux.c): Remove.
1862         (amd64-avx.c): Remove.
1863         (amd64-avx-linux.c): Remove.
1864         (amd64-avx-avx512.c): Remove.
1865         (amd64-avx-avx512-linux.c): Remove.
1866         (amd64-mpx.c): Remove.
1867         (amd64-mpx-linux.c): Remove.
1868         (amd64-avx-mpx-avx512-pku.c): Remove.
1869         (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1870         (amd64-avx-mpx.c): Remove.
1871         (amd64-avx-mpx-linux.c): Remove.
1872         (x32.c): Remove.
1873         (x32-linux.c): Remove.
1874         (x32-avx.c): Remove.
1875         (x32-avx-linux.c): Remove.
1876         (x32-avx-avx512.c): Remove.
1877         (x32-avx-avx512-linux.c): Remove.
1878         (reg-xtensa.c): Remove.
1879         (reg-tilegx.c): Remove.
1880         (reg-tilegx32.c): Remove.
1881
1882 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1883
1884         * Makefile.in (SFILES): Add "common/environ.c".
1885         (OBJS): Add "common/environ.h".
1886
1887 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1888
1889         * configure.ac: Check if the fs_base and gs_base members of
1890         `struct user_regs_struct' exist.
1891         * config.in: Regenerated.
1892         * configure: Likewise.
1893
1894 2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1895
1896         * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1897         target_read_memory.
1898         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1899         (get_next_pcs_syscall_next_pc): Likewise.
1900
1901 2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
1902
1903         * win32-i386-low.c: Fix incorrect reference to a couple source files.
1904         * nto-x86-low.c: Likewise.
1905
1906 2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
1907
1908         * Makefile.in: Include disable-implicit-rules.mk.
1909
1910 2016-11-23  Pedro Alves  <palves@redhat.com>
1911
1912         * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1913         (debug_vprintf): Use std::chrono::steady_clock instead of
1914         gettimeofday.  Use '.' instead of ':'.
1915         * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1916         (get_timestamp): Use std::chrono::steady_clock instead of
1917         gettimeofday.
1918
1919 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1920
1921         * Makefile.in: Fix whitespace formatting.
1922
1923 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1924
1925         * Makefile.in (SFILES, OBS): Flatten list and order
1926         alphabetically.
1927
1928 2016-11-23  Pedro Alves  <palves@redhat.com>
1929
1930         * event-loop.c (handle_file_event): Use warning.
1931         * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1932         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1933         Use warning.
1934
1935 2016-11-23  Pedro Alves  <palves@redhat.com>
1936
1937         * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1938         output.
1939         * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1940         * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1941         debug_printf and debug_flush for debug output.
1942         * server.c (handle_general_set): Likewise.
1943         * thread-db.c (try_thread_db_load): Use debug_printf for debug
1944         output.
1945
1946 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1947
1948         * Makefile.in (.c.o): Replace rule with ...
1949         (%.o: %.c): ... this one.
1950
1951 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1952
1953         * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1954         prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
1955         make.
1956         * configure.ac: Remove checks for the make program.
1957         * configure: Re-generate.
1958
1959 2016-10-28  Pedro Alves  <palves@redhat.com>
1960
1961         * Makefile.in (CXX_DIALECT): Get from configure.
1962         (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1963         * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1964         * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1965         * config.in: Regenerate.
1966         * configure: Regenerate.
1967
1968 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1969
1970         * linux-low.c (linux_supports_range_stepping): Return true if
1971         can_software_single_step return true.
1972
1973 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1974
1975         * inferiors.c (find_inferior_in_random): New function.
1976         * inferiors.h (find_inferior_in_random): Declare.
1977         * linux-low.c (linux_wait_for_event_filtered): Call
1978         find_inferior_in_random instead of find_inferior.
1979
1980 2016-10-27  Yao Qi  <yao.qi@linaro.org>
1981
1982         * linux-low.c (linux_wait_1): If single-step breakpoints are
1983         inserted, remove them.
1984
1985 2016-10-26  Pedro Alves  <palves@redhat.com>
1986
1987         * linux-low.c (handle_extended_wait): Link parent/child fork
1988         threads.
1989         (linux_wait_1): Unlink them.
1990         (linux_set_resume_request): Ignore resume requests for
1991         already-resumed and unhandled fork child threads.
1992         * linux-low.h (struct lwp_info) <fork_relative>: New field.
1993         * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1994         New functions.
1995         (handle_v_requests) <vCont>: Don't call require_running.
1996         * server.h (in_queued_stop_replies): New declaration.
1997
1998 2016-10-24  Yao Qi  <yao.qi@linaro.org>
1999
2000         PR server/20733
2001         * linux-aarch64-low.c (append_insns): Cast the return value to
2002         'uint32_t *'.
2003
2004 2016-10-10  Yao Qi  <yao.qi@linaro.org>
2005
2006         * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2007
2008 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2009
2010         * target.c (target_supports_multi_process): New function, moved
2011         from...
2012         * target.h (target_supports_multi_process): ... here.  Remove
2013         macro.
2014
2015 2016-10-05  Tom Tromey  <tom@tromey.com>
2016
2017         PR remote/20655:
2018         * tracepoint.c (handle_tracepoint_bkpts): Check
2019         ipa_error_tracepoint, not ipa_stopping_tracepoint.
2020
2021 2016-10-05  Yao Qi  <yao.qi@linaro.org>
2022
2023         * configure.srv: Update the path of arm-*.xml files.
2024
2025 2016-10-05  Terry Guo  <terry.guo@arm.com>
2026             Yao Qi  <yao.qi@linaro.org>
2027
2028         * Makefile.in: Adjust the path of rules.
2029         * configure.srv: Update the path of xml files.
2030         * regformats/arm-with-iwmmxt.dat: Regenerated.
2031         * regformats/arm-with-neon.dat: Likewise.
2032         * regformats/arm-with-vfpv2.dat: Likewise.
2033         * regformats/arm-with-vfpv3.dat Likewise.
2034
2035 2016-09-30  Yao Qi  <yao.qi@linaro.org>
2036
2037         PR gdbserver/20627
2038         * target.c (target_stop_and_wait): Don't call
2039         target_continue_no_signal, use resume_stop instead.
2040
2041 2016-09-26  Yao Qi  <yao.qi@linaro.org>
2042
2043         * linux-low.c (linux_wait_1): Call debug_exit.
2044
2045 2016-09-23  Pedro Alves  <palves@redhat.com>
2046
2047         * Makefile.in (SFILES): Add common/new-op.c.
2048         (OBS): Add common/new-op.o.
2049         (new-op.o): New rule.
2050
2051 2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2052
2053         * .gitinore: Ignore more files.
2054
2055 2016-09-21  Yao Qi  <yao.qi@linaro.org>
2056
2057         * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2058         23.
2059
2060 2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
2061
2062         * server.c (start_inferior): Call target_mourn_inferior instead of
2063         mourn_inferior; pass ptid_t argument to it.
2064         (resume): Likewise.
2065         (handle_target_event): Likewise.
2066         * target.c (target_mourn_inferior): New function.
2067         * target.h (mourn_inferior): Delete macro.
2068
2069 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2070
2071         * linux-low.c (lwp_is_stepping): New function.
2072
2073 2016-09-06  Carl Love  <cel@us.ibm.com>
2074
2075         * server.c (start_inferior):  Fixed comment, requested comment change
2076         didn't get updated correctly.  Removed reference to ptrace () call as
2077         it is only true on Linux systems.
2078
2079 2016-09-06  Carl Love  <cel@us.ibm.com>
2080
2081         * server.c (start_inferior):  Do not call
2082         function target_post_create_inferior () if the
2083         inferior process has already exited.
2084
2085 2016-09-05  Pedro Alves  <palves@redhat.com>
2086
2087         * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2088         (COMPILE.pre, CC_LD): Use CXX directly.
2089         (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2090         * acinclude.m4: Don't include build-with-cxx.m4.
2091         * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2092         * configure: Regenerate.
2093
2094 2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
2095
2096         PR gdb/19495
2097         * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2098         call writing data to own_buf.
2099
2100 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2101
2102         * target.c (mywait): Call target_wait instead of
2103         the_target->wait.
2104         (target_wait): New function.
2105
2106 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2107
2108         * server.c (start_inferior): New variable 'ptid'.  Replace calls
2109         to the_target->resume by target_continue{,_no_signal}, depending
2110         on the case.
2111         * target.c (target_stop_and_wait): Call target_continue_no_signal
2112         instead of the_target->resume.
2113         (target_continue): New function.
2114
2115 2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2116
2117         * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2118
2119 2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2120
2121         PR server/20491
2122         * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2123         ps_prochandle.
2124         * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2125         * linux-arm-low.c (ps_get_thread_area): Likewise.
2126         * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2127         * linux-m68k-low.c (ps_get_thread_area): Likewise.
2128         * linux-mips-low.c (ps_get_thread_area): Likewise.
2129         * linux-nios2-low.c (ps_get_thread_area): Likewise.
2130         * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2131         * linux-x86-low.c (ps_get_thread_area): Likewise.
2132         * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2133
2134 2016-08-19  Pedro Alves  <palves@redhat.com>
2135
2136         * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2137
2138 2016-08-19  Pedro Alves  <palves@redhat.com>
2139
2140         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2141         comment.  Use memcpy instead of casting through unsigned long.
2142
2143 2016-08-19  Pedro Alves  <palves@redhat.com>
2144
2145         * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2146         allocating around 0x80000000.
2147
2148 2016-08-19  Pedro Alves  <palves@redhat.com>
2149
2150         PR gdb/20415
2151         * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2152         (x32-avx512-linux-ipa.o): New rules.
2153         * configure.ac (x86_64-*-linux*): New x32 check.
2154         * configure.srv (ipa_x32_linux_regobj): New.
2155         (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2156         * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2157         descriptions.
2158         (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2159         descriptions.
2160         * configure: Regenerate.
2161
2162 2016-08-09  Pedro Alves  <palves@redhat.com>
2163
2164         PR gdb/18653
2165         * Makefile.in (OBS): Add signals-state-save-restore.o.
2166         (signals-state-save-restore.o): New rule.
2167         * config.in: Regenerate.
2168         * configure: Regenerate.
2169         * linux-low.c: Include "signals-state-save-restore.h".
2170         (linux_create_inferior): Call
2171         restore_original_signals_state.
2172         * server.c: Include "dispositions-save-restore.h".
2173         (captured_main): Call save_original_signals_state.
2174
2175 2016-08-05  Pedro Alves  <palves@redhat.com>
2176
2177         * configure: Regenerate.
2178
2179 2016-08-04  Yao Qi  <yao.qi@linaro.org>
2180
2181         * linux-low.c (regsets_fetch_inferior_registers): Check
2182         errno is ESRCH or not.
2183
2184 2016-08-02  Yao Qi  <yao.qi@linaro.org>
2185
2186         * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2187         <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2188         (thread_db_load_search): Update.
2189         (try_thread_db_load_1): Don't look for td_ta_event_addr,
2190         td_ta_set_event and td_ta_event_getmsg.
2191
2192 2016-07-26  Pedro Alves  <palves@redhat.com>
2193
2194         PR server/20414
2195         * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2196         of unsigned long for 64-bit registers and use uint32_t instead of
2197         unsigned int for 32-bit registers.
2198
2199 2016-07-26  Pedro Alves  <palves@redhat.com>
2200
2201         * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2202         to 'ptrace'.
2203
2204 2016-07-21  Tom Tromey  <tom@tromey.com>
2205
2206         * configure: Rebuild.
2207
2208 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2209
2210         * mem-break.c (find_gdb_breakpoint): Cast bp to
2211         'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2212
2213 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2214
2215         * server.c (handle_v_requests): Support s and S actions
2216         if target_supports_software_single_step return true.
2217
2218 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2219
2220         * linux-low.c (resume_stopped_resumed_lwps): If resume request
2221         is resume_step, call maybe_hw_step.
2222         (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2223         and unstop them.
2224         (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2225         breakpoints or not.
2226         (proceed_one_lwp): If resume request is resume_step, install
2227         reinsert breakpoints and call maybe_hw_step.
2228
2229 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2230
2231         * linux-low.c (proceed_one_lwp): Declare.
2232         (linux_resume_one_thread): Remove local variable 'step'.
2233         Lift code enqueue signal.  Call proceed_one_lwp instead of
2234         linux_resume_one_lwp.
2235
2236 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2237
2238         * linux-low.c (linux_resume_one_thread): Call
2239         enqueue_pending_signal.
2240
2241 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2242
2243         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2244         * inferiors.c (do_restore_current_thread_cleanup): New function.
2245         (make_cleanup_restore_current_thread): Likewise.
2246         * linux-low.c (install_software_single_step_breakpoints): Call
2247         make_cleanup_restore_current_thread.  Switch current_thread to
2248         thread.
2249
2250 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2251
2252         * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2253         (set_reinsert_breakpoint): New parameter ptid.  Callers updated.
2254         (clone_one_breakpoint): Likewise.
2255         (delete_reinsert_breakpoints): Change parameter to thread.
2256         Callers updated.
2257         (has_reinsert_breakpoints): Likewise.
2258         (uninsert_reinsert_breakpoints): Likewise.
2259         (reinsert_reinsert_breakpoints): Likewise.
2260         * mem-break.h (set_reinsert_breakpoint): Update declaration.
2261         (delete_reinsert_breakpoints): Likewise.
2262         (reinsert_reinsert_breakpoints): Likewise.
2263         (uninsert_reinsert_breakpoints): Likewise.
2264         (has_reinsert_breakpoints): Likewise.
2265
2266 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2267
2268         * inferiors.c (get_thread_process): Make parameter const.
2269         * inferiors.h (get_thread_process): Update declaration.
2270         * mem-break.c (clone_all_breakpoints): Remove all parameters.
2271         Add new parameters child_thread and parent_thread.  Callers
2272         updated.
2273         * mem-break.h (clone_all_breakpoints): Update declaration.
2274
2275 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2276
2277         * mem-break.c (struct breakpoint) <cond_list>: Remove.
2278         <command_list, handler>: Remove.
2279         (struct gdb_breakpoint): New.
2280         (struct other_breakpoint): New.
2281         (struct reinsert_breakpoint): New.
2282         (is_gdb_breakpoint): New function.
2283         (any_persistent_commands): Update command_list if
2284         is_gdb_breakpoint returns true.
2285         (set_breakpoint): Create breakpoints according to their types.
2286         (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2287         (set_gdb_breakpoint_1): Likewise.
2288         (set_gdb_breakpoint): Likewise.
2289         (clear_breakpoint_conditions): Change parameter type to
2290         'struct gdb_breakpoint *'.
2291         (clear_breakpoint_commands): Likewise.
2292         (clear_breakpoint_conditions_and_commands): Likewise.
2293         (add_condition_to_breakpoint): Likewise.
2294         (add_breakpoint_condition): Likewise.
2295         (add_commands_to_breakpoint): Likewise.
2296         (check_breakpoints): Check other_breakpoint.
2297         (clone_one_breakpoint): Clone breakpopint according to its type.
2298         * mem-break.h (struct gdb_breakpoint): Declare.
2299         (set_gdb_breakpoint): Update declaration.
2300         (clear_breakpoint_conditions_and_commands): Likewise.
2301         (add_breakpoint_condition): Likewise.
2302         (add_breakpoint_commands): Likewise.
2303         * server.c (process_point_options): Change parameter type to
2304         'struct gdb_breakpoint *'.
2305
2306 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2307
2308         * mem-break.c (set_breakpoint_at): Rename it to ...
2309         (set_breakpoint_type_at): ... it.
2310         (set_breakpoint_at): Call set_breakpoint_type_at.
2311         (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2312         * mem-break.h (set_breakpoint_at): Update comments.
2313
2314 2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
2315
2316         * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2317         to buf parameter.
2318         (nios2_store_gregset): Likewise.
2319
2320 2016-07-01  Pedro Alves  <palves@redhat.com>
2321             Antoine Tremblay  <antoine.tremblay@ericsson.com>
2322
2323         * linux-low.c: Change interface to take the target lwp_info
2324         pointer directly and return void.  Handle detaching from a zombie
2325         thread.
2326         (linux_detach_lwp_callback): New function.
2327         (linux_detach): Detach from the leader thread after detaching from
2328         the clone threads.
2329
2330 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2331
2332         * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2333         for variable new_offset.
2334         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2335         (aarch64_ftrace_insn_reloc_cb): Likewise.
2336         (aarch64_ftrace_insn_reloc_tb): Likewise.
2337         (aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
2338         PRIx64 instead of PRIx32.
2339
2340 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2341
2342         * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2343         (the_low_target): Install arm_get_syscall_trapinfo.
2344
2345 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2346
2347         * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2348         function.
2349         (the_low_target): Install aarch64_get_syscall_trapinfo.
2350
2351 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2352
2353         * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2354         Callers updated.
2355         * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2356         Remove parameter sysno.
2357         * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2358         sysret.
2359
2360 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2361
2362         * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2363         (s390_emit_ne_goto): Likewise.
2364         (s390_emit_lt_goto): Likewise.
2365         (s390_emit_le_goto): Likewise.
2366         (s390_emit_gt_goto): Likewise.
2367         (s390_emit_ge_goto): Likewise.
2368         (s390x_emit_eq_goto): Likewise.
2369         (s390x_emit_ne_goto): Likewise.
2370         (s390x_emit_lt_goto): Likewise.
2371         (s390x_emit_le_goto): Likewise.
2372         (s390x_emit_gt_goto): Likewise.
2373         (s390x_emit_ge_goto): Likewise.
2374         (s390_emit_ops_impl): Mark variable static.
2375         (s390x_emit_ops): Likewise.
2376
2377 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2378
2379         * linux-low.c (handle_extended_wait): Call
2380         uninsert_reinsert_breakpoints for the parent process.  Remove
2381         reinsert breakpoints from the child process.  Reinsert them to
2382         the parent process when vfork is done.
2383         * mem-break.c (uninsert_reinsert_breakpoints): New function.
2384         (reinsert_reinsert_breakpoints): New function.
2385         * mem-break.h (uninsert_reinsert_breakpoints): Declare
2386         (reinsert_reinsert_breakpoints): Declare.
2387
2388 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2389
2390         * linux-low.c (handle_extended_wait): If the parent is doing
2391         step-over, remove the reinsert breakpoints from the forked child.
2392
2393 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2394
2395         * linux-low.c (unsuspend_all_lwps): Declare.
2396         (linux_low_filter_event): If thread exited, call finish_step_over.
2397         If step-over is finished, unsuspend other threads.
2398
2399 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2400
2401         * linux-low.c (linux_resume_one_lwp_throw): Assert
2402         has_reinsert_breakpoints returns false.
2403         * mem-break.c (delete_disabled_breakpoints): Assert
2404         bp type isn't reinsert_breakpoint.
2405
2406 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2407
2408         * linux-low.c (maybe_hw_step): New function.
2409         (linux_resume_one_lwp_throw): Call maybe_hw_step.
2410         (finish_step_over): Switch current_thread to lwp temporarily,
2411         and assert has_reinsert_breakpoints returns true.
2412         (proceed_one_lwp): Call maybe_hw_step.
2413         * mem-break.c (has_reinsert_breakpoints): New function.
2414         * mem-break.h (has_reinsert_breakpoints): Declare.
2415
2416 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
2417
2418         * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2419
2420 2016-05-17  Yao Qi  <yao.qi@linaro.org>
2421
2422         * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2423         instead of find_inferior.
2424
2425 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2426
2427         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2428         Initialize res to zero.
2429
2430 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2431
2432         * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2433         to uint32_t.
2434
2435 2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2436
2437         * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2438         used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2439         (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2440
2441 2016-04-28  Par Olsson  <par.olsson@windriver.com>
2442             Simon Marchi  <simon.marchi@ericsson.com>
2443
2444         * tracepoint.c (write_inferior_int8): New function.
2445         (cmd_qtenable_disable): Write enable flag using
2446         write_inferior_int8.
2447
2448 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2449
2450         * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2451         (need_step_over_p): Return zero if the LWP has pending signals
2452         can be delivered on software single step target.
2453
2454 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2455
2456         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2457         return instead of error.
2458
2459 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2460
2461         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2462         to 23.
2463
2464 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2465
2466         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2467         signal when stepping over breakpoint with software single
2468         step.
2469
2470 2016-04-21  Pedro Alves  <palves@redhat.com>
2471
2472         * linux-s390-low.c (s390_collect_ptrace_register)
2473         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2474         add casts.
2475         (s390_check_regset): Use void * instead of gdb_byte *.
2476
2477 2016-04-20  Pedro Alves  <palves@redhat.com>
2478
2479         * configure: Renegerate.
2480
2481 2016-04-20  Yao Qi  <yao.qi@linaro.org>
2482
2483         * linux-aarch32-low.c: Include "arch/arm-linux.h".
2484         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2485         number 16.
2486         (arm_store_gregset): Likewise.
2487
2488 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2489
2490         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2491         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2492         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2493         (amd64-avx-mpx-linux.c): New rules.
2494         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2495         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2496         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2497         (srv_amd64_regobj): Add amd64-avx-mpx.o.
2498         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2499         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2500         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2501         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2502         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2503         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2504         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2505         * linux-x86-low.c (x86_linux_read_description): Add case for
2506         X86_XSTATE_AVX_MPX_MASK.
2507         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2508         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2509         init_registers_i386_avx_mpx_linux.
2510         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2511         (initialize_low_tracepoint): Call
2512         init_registers_i386_avx_mpx_linux.
2513         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
2514         (initialize_low_tracepoint): Call
2515         init_registers_amd64_avx_mpx_linux.
2516         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2517         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2518         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2519         declarations.
2520
2521 2016-04-18  Pedro Alves  <palves@redhat.com>
2522
2523         * configure: Regenerate.
2524
2525 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2526
2527         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2528         (aarch64_emit_sub): Likewise.
2529
2530 2016-04-12  Pedro Alves  <palves@redhat.com>
2531
2532         * utils.c (prepare_to_throw_exception): Delete.
2533
2534 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
2535
2536         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2537
2538 2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2539
2540         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2541
2542 2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2543
2544         * linux-aarch64-ipa.c: Add <elf.h> include.
2545         * linux-ppc-ipa.c: Add <elf.h> include.
2546         * linux-s390-ipa.c: Add <elf.h> include.
2547
2548 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2549
2550         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2551         (get_raw_reg_ptr): Likewise.
2552         (get_trace_state_variable_value_ptr): Likewise.
2553         (set_trace_state_variable_value_ptr): Likewise.
2554         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2555         char *.
2556
2557 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
2558             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2559
2560         PR/17221
2561         * linux-ppc-low.c (emit_insns): New function.
2562         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2563         (ppc_emit_prologue): New function.
2564         (ppc_emit_epilogue): New function.
2565         (ppc_emit_add): New function.
2566         (ppc_emit_sub): New function.
2567         (ppc_emit_mul): New function.
2568         (ppc_emit_lsh): New function.
2569         (ppc_emit_rsh_signed): New function.
2570         (ppc_emit_rsh_unsigned): New function.
2571         (ppc_emit_ext): New function.
2572         (ppc_emit_zero_ext): New function.
2573         (ppc_emit_log_not): New function.
2574         (ppc_emit_bit_and): New function.
2575         (ppc_emit_bit_or): New function.
2576         (ppc_emit_bit_xor): New function.
2577         (ppc_emit_bit_not): New function.
2578         (ppc_emit_equal): New function.
2579         (ppc_emit_less_signed): New function.
2580         (ppc_emit_less_unsigned): New function.
2581         (ppc_emit_ref): New function.
2582         (ppc_emit_const): New function.
2583         (ppc_emit_reg): New function.
2584         (ppc_emit_pop): New function.
2585         (ppc_emit_stack_flush): New function.
2586         (ppc_emit_swap): New function.
2587         (ppc_emit_stack_adjust): New function.
2588         (ppc_emit_call): New function.
2589         (ppc_emit_int_call_1): New function.
2590         (ppc_emit_void_call_2): New function.
2591         (ppc_emit_if_goto): New function.
2592         (ppc_emit_goto): New function.
2593         (ppc_emit_eq_goto): New function.
2594         (ppc_emit_ne_goto): New function.
2595         (ppc_emit_lt_goto): New function.
2596         (ppc_emit_le_goto): New function.
2597         (ppc_emit_gt_goto): New function.
2598         (ppc_emit_ge_goto): New function.
2599         (ppc_write_goto_address): New function.
2600         (ppc_emit_ops_impl): New static variable.
2601         (ppc64v1_emit_prologue): New function.
2602         (ppc64v2_emit_prologue): New function.
2603         (ppc64_emit_epilogue): New function.
2604         (ppc64_emit_add): New function.
2605         (ppc64_emit_sub): New function.
2606         (ppc64_emit_mul): New function.
2607         (ppc64_emit_lsh): New function.
2608         (ppc64_emit_rsh_signed): New function.
2609         (ppc64_emit_rsh_unsigned): New function.
2610         (ppc64_emit_ext): New function.
2611         (ppc64_emit_zero_ext): New function.
2612         (ppc64_emit_log_not): New function.
2613         (ppc64_emit_bit_and): New function.
2614         (ppc64_emit_bit_or): New function.
2615         (ppc64_emit_bit_xor): New function.
2616         (ppc64_emit_bit_not): New function.
2617         (ppc64_emit_equal): New function.
2618         (ppc64_emit_less_signed): New function.
2619         (ppc64_emit_less_unsigned): New function.
2620         (ppc64_emit_ref): New function.
2621         (ppc64_emit_const): New function.
2622         (ppc64v1_emit_reg): New function.
2623         (ppc64v2_emit_reg): New function.
2624         (ppc64_emit_pop): New function.
2625         (ppc64_emit_stack_flush): New function.
2626         (ppc64_emit_swap): New function.
2627         (ppc64v1_emit_call): New function.
2628         (ppc64v2_emit_call): New function.
2629         (ppc64v1_emit_int_call_1): New function.
2630         (ppc64v2_emit_int_call_1): New function.
2631         (ppc64v1_emit_void_call_2): New function.
2632         (ppc64v2_emit_void_call_2): New function.
2633         (ppc64_emit_if_goto): New function.
2634         (ppc64_emit_eq_goto): New function.
2635         (ppc64_emit_ne_goto): New function.
2636         (ppc64_emit_lt_goto): New function.
2637         (ppc64_emit_le_goto): New function.
2638         (ppc64_emit_gt_goto): New function.
2639         (ppc64_emit_ge_goto): New function.
2640         (ppc64v1_emit_ops_impl): New static variable.
2641         (ppc64v2_emit_ops_impl): New static variable.
2642         (ppc_emit_ops): New function.
2643         (linux_low_target): Wire in ppc_emit_ops.
2644
2645 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
2646             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2647
2648         PR/17221
2649         * Makefile.in: Add powerpc-*-ipa.o
2650         * configure.srv: Add ipa_obj for powerpc*-linux.
2651         * linux-ppc-ipa.c: New file.
2652         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2653         includes.
2654         (PPC_FIELD): New macro.
2655         (PPC_SEXT): New macro.
2656         (PPC_OP6): New macro.
2657         (PPC_BO): New macro.
2658         (PPC_LI): New macro.
2659         (PPC_BD): New macro.
2660         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2661         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2662         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2663         (ppc_get_thread_area): New function.
2664         (is_elfv2_inferior): New function.
2665         (gen_ds_form): New function.
2666         (GEN_STD): New macro.
2667         (GEN_STDU): New macro.
2668         (GEN_LD): New macro.
2669         (GEN_LDU): New macro.
2670         (gen_d_form): New function.
2671         (GEN_ADDI): New macro.
2672         (GEN_ADDIS): New macro.
2673         (GEN_LI): New macro.
2674         (GEN_LIS): New macro.
2675         (GEN_ORI): New macro.
2676         (GEN_ORIS): New macro.
2677         (GEN_LWZ): New macro.
2678         (GEN_STW): New macro.
2679         (GEN_STWU): New macro.
2680         (gen_xfx_form): New function.
2681         (GEN_MFSPR): New macro.
2682         (GEN_MTSPR): New macro.
2683         (GEN_MFCR): New macro.
2684         (GEN_MTCR): New macro.
2685         (GEN_SYNC): New macro.
2686         (GEN_LWSYNC): New macro.
2687         (gen_x_form): New function.
2688         (GEN_OR): New macro.
2689         (GEN_MR): New macro.
2690         (GEN_LWARX): New macro.
2691         (GEN_STWCX): New macro.
2692         (GEN_CMPW): New macro.
2693         (gen_md_form): New function.
2694         (GEN_RLDICL): New macro.
2695         (GEN_RLDICR): New macro.
2696         (gen_i_form): New function.
2697         (GEN_B): New macro.
2698         (GEN_BL): New macro.
2699         (gen_b_form): New function.
2700         (GEN_BNE): New macro.
2701         (GEN_LOAD): New macro.
2702         (GEN_STORE): New macro.
2703         (gen_limm): New function.
2704         (gen_atomic_xchg): New function.
2705         (gen_call): New function.
2706         (ppc_relocate_instruction): New function.
2707         (ppc_install_fast_tracepoint_jump_pad): New function.
2708         (ppc_get_min_fast_tracepoint_insn_len): New function.
2709         (ppc_get_ipa_tdesc_idx): New function.
2710         (the_low_target): Wire in the new functions.
2711         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2712         tdescs.
2713         * linux-ppc-tdesc.h: New file.
2714
2715 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2716
2717         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2718         (alloc_jump_pad_buffer): New function.
2719         * linux-amd64-ipa.c: Add <sys/mman.h> include.
2720         (alloc_jump_pad_buffer): New function.
2721         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2722         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2723         (alloc_jump_pad_buffer): New function.
2724         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2725         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2726         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2727         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2728
2729 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2730
2731         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2732         * linux-amd64-ipa.c: Likewise.
2733         * linux-i386-ipa.c: Likewise.
2734         * linux-s390-ipa.c: Likewise.
2735         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2736         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2737         set_trace_state_variable_value_ptr.
2738         (struct ipa_sym_addresses): Likewise.
2739         (symbol_list): Likewise.
2740         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2741         accessing gdb_collect directly.
2742         (gdb_collect_ptr_type): New typedef.
2743         (get_raw_reg_ptr_type): New typedef.
2744         (get_trace_state_variable_value_ptr_type): New typedef.
2745         (set_trace_state_variable_value_ptr_type): New typedef.
2746         (gdb_collect_ptr): New global.
2747         (get_raw_reg_ptr): New global.
2748         (get_trace_state_variable_value_ptr): New global.
2749         (set_trace_state_variable_value_ptr): New global.
2750         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2751         accessing get_raw_reg directly.
2752         (get_get_tsv_func_addr): Likewise for
2753         get_trace_state_variable_value_ptr.
2754         (get_set_tsv_func_addr): Likewise for
2755         set_trace_state_variable_value_ptr.
2756         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2757
2758 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
2759
2760         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2761
2762 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2763
2764         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2765         packets.
2766         (relocate_instruction): Remove own_buf.
2767         * server.c (own_buf): Make global.
2768         (handle_v_requests): Make global.
2769         * server.h (own_buf): New declaration.
2770         (handle_v_requests): New prototype.
2771
2772 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2773
2774         PR 18377
2775         * linux-s390-low.c (add_insns): New function.
2776         (s390_emit_prologue): New function.
2777         (s390_emit_epilogue): New function.
2778         (s390_emit_add): New function.
2779         (s390_emit_sub): New function.
2780         (s390_emit_mul): New function.
2781         (s390_emit_lsh): New function.
2782         (s390_emit_rsh_signed): New function.
2783         (s390_emit_rsh_unsigned): New function.
2784         (s390_emit_ext): New function.
2785         (s390_emit_log_not): New function.
2786         (s390_emit_bit_and): New function.
2787         (s390_emit_bit_or): New function.
2788         (s390_emit_bit_xor): New function.
2789         (s390_emit_bit_not): New function.
2790         (s390_emit_equal): New function.
2791         (s390_emit_less_signed): New function.
2792         (s390_emit_less_unsigned): New function.
2793         (s390_emit_ref): New function.
2794         (s390_emit_if_goto): New function.
2795         (s390_emit_goto): New function.
2796         (s390_write_goto_address): New function.
2797         (s390_emit_litpool): New function.
2798         (s390_emit_const): New function.
2799         (s390_emit_call): New function.
2800         (s390_emit_reg): New function.
2801         (s390_emit_pop): New function.
2802         (s390_emit_stack_flush): New function.
2803         (s390_emit_zero_ext): New function.
2804         (s390_emit_swap): New function.
2805         (s390_emit_stack_adjust): New function.
2806         (s390_emit_set_r2): New function.
2807         (s390_emit_int_call_1): New function.
2808         (s390_emit_void_call_2): New function.
2809         (s390_emit_eq_goto): New function.
2810         (s390_emit_ne_goto): New function.
2811         (s390_emit_lt_goto): New function.
2812         (s390_emit_le_goto): New function.
2813         (s390_emit_gt_goto): New function.
2814         (s390_emit_ge_goto): New function.
2815         (s390x_emit_prologue): New function.
2816         (s390x_emit_epilogue): New function.
2817         (s390x_emit_add): New function.
2818         (s390x_emit_sub): New function.
2819         (s390x_emit_mul): New function.
2820         (s390x_emit_lsh): New function.
2821         (s390x_emit_rsh_signed): New function.
2822         (s390x_emit_rsh_unsigned): New function.
2823         (s390x_emit_ext): New function.
2824         (s390x_emit_log_not): New function.
2825         (s390x_emit_bit_and): New function.
2826         (s390x_emit_bit_or): New function.
2827         (s390x_emit_bit_xor): New function.
2828         (s390x_emit_bit_not): New function.
2829         (s390x_emit_equal): New function.
2830         (s390x_emit_less_signed): New function.
2831         (s390x_emit_less_unsigned): New function.
2832         (s390x_emit_ref): New function.
2833         (s390x_emit_if_goto): New function.
2834         (s390x_emit_const): New function.
2835         (s390x_emit_call): New function.
2836         (s390x_emit_reg): New function.
2837         (s390x_emit_pop): New function.
2838         (s390x_emit_stack_flush): New function.
2839         (s390x_emit_zero_ext): New function.
2840         (s390x_emit_swap): New function.
2841         (s390x_emit_stack_adjust): New function.
2842         (s390x_emit_int_call_1): New function.
2843         (s390x_emit_void_call_2): New function.
2844         (s390x_emit_eq_goto): New function.
2845         (s390x_emit_ne_goto): New function.
2846         (s390x_emit_lt_goto): New function.
2847         (s390x_emit_le_goto): New function.
2848         (s390x_emit_gt_goto): New function.
2849         (s390x_emit_ge_goto): New function.
2850         (s390_emit_ops): New function.
2851         (struct linux_target_ops): Fill in emit_ops hook.
2852
2853 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2854
2855         PR 18377
2856         * Makefile.in: Add s390 IPA files.
2857         * configure.srv: Build IPA for s390.
2858         * linux-s390-ipa.c: New file.
2859         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2860         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2861         (tdesc_s390_linux32): Likewise.
2862         (init_registers_s390_linux32v1): Likewise.
2863         (tdesc_s390_linux32v1): Likewise.
2864         (init_registers_s390_linux32v2): Likewise.
2865         (tdesc_s390_linux32v2): Likewise.
2866         (init_registers_s390_linux64): Likewise.
2867         (tdesc_s390_linux64): Likewise.
2868         (init_registers_s390_linux64v1): Likewise.
2869         (tdesc_s390_linux64v1): Likewise.
2870         (init_registers_s390_linux64v2): Likewise.
2871         (tdesc_s390_linux64v2): Likewise.
2872         (init_registers_s390_te_linux64): Likewise.
2873         (tdesc_s390_te_linux64): Likewise.
2874         (init_registers_s390_vx_linux64): Likewise.
2875         (tdesc_s390_vx_linux64): Likewise.
2876         (init_registers_s390_tevx_linux64): Likewise.
2877         (tdesc_s390_tevx_linux64): Likewise.
2878         (init_registers_s390x_linux64): Likewise.
2879         (tdesc_s390x_linux64): Likewise.
2880         (init_registers_s390x_linux64v1): Likewise.
2881         (tdesc_s390x_linux64v1): Likewise.
2882         (init_registers_s390x_linux64v2): Likewise.
2883         (tdesc_s390x_linux64v2): Likewise.
2884         (init_registers_s390x_te_linux64): Likewise.
2885         (tdesc_s390x_te_linux64): Likewise.
2886         (init_registers_s390x_vx_linux64): Likewise.
2887         (tdesc_s390x_vx_linux64): Likewise.
2888         (init_registers_s390x_tevx_linux64): Likewise.
2889         (tdesc_s390x_tevx_linux64): Likewise.
2890         (have_hwcap_s390_vx): New static variable.
2891         (s390_arch_setup): Fill have_hwcap_s390_vx.
2892         (s390_get_thread_area): New function.
2893         (s390_ft_entry_gpr_esa): New const.
2894         (s390_ft_entry_gpr_zarch): New const.
2895         (s390_ft_entry_misc): New const.
2896         (s390_ft_entry_fr): New const.
2897         (s390_ft_entry_vr): New const.
2898         (s390_ft_main_31): New const.
2899         (s390_ft_main_64): New const.
2900         (s390_ft_exit_fr): New const.
2901         (s390_ft_exit_vr): New const.
2902         (s390_ft_exit_misc): New const.
2903         (s390_ft_exit_gpr_esa): New const.
2904         (s390_ft_exit_gpr_zarch): New const.
2905         (append_insns): New function.
2906         (s390_relocate_instruction): New function.
2907         (s390_install_fast_tracepoint_jump_pad): New function.
2908         (s390_get_min_fast_tracepoint_insn_len): New function.
2909         (s390_get_ipa_tdesc_idx): New function.
2910         (struct linux_target_ops): Wire in the above functions.
2911         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2912         * linux-s390-tdesc.h: New file.
2913
2914 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2915
2916         * linux-s390-low.c (s390_supports_tracepoints): New function.
2917         (struct linux_target_ops): Fill supports_tracepoints hook.
2918
2919 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2920
2921         * linux-low.c (lwp_signal_can_be_delivered): New function.
2922         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2923
2924 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2925
2926         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2927         0 if signal is enqueued.  Remove 'signal' from one debugging
2928         message.  Move one debugging message to some lines below.
2929         Remove code setting 'signal' to 0.
2930
2931 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2932
2933         * linux-low.c (linux_low_filter_event): Remove redundant
2934         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2935
2936 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2937
2938         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2939         (struct linux_target_ops): Wire in the above.
2940
2941 2016-03-03  Yao Qi  <yao.qi@linaro.org>
2942
2943         * linux-low.c: Update comments to start_step_over.
2944
2945 2016-03-03  Yao Qi  <yao.qi@linaro.org>
2946
2947         PR server/19736
2948         * linux-low.c (handle_extended_wait): Set child suspended
2949         if event_lwp->bp_reinsert isn't zero.
2950
2951 2016-03-02  Yao Qi  <yao.qi@linaro.org>
2952
2953         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2954         enqueue_pending_signal.
2955
2956 2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2957
2958         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2959         is actually loaded.
2960
2961 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2962
2963         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2964         (s390_regmap_3264) [!__s390x__]: New global.
2965         (s390_collect_ptrace_register): Skip map entries containing -1.
2966         (s390_supply_ptrace_register): Ditto.
2967         (s390_fill_gprs_high): New function.
2968         (s390_store_gprs_high): New function.
2969         (s390_regsets): Add NT_S390_HIGH_GPRS.
2970         (s390_get_hwcap): Enable on 31-bit.
2971         (have_hwcap_s390_high_gprs): Enable on 31-bit.
2972         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2973         Detect NT_S390_HIGH_GPRS.
2974         (s390_usrregs_info_3264): Enable on 31-bit.
2975         (s390_regs_info): Enable regs_info_3264 on 31-bit.
2976         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2977
2978 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2979
2980         PR gdb/13808
2981         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2982         * configure.srv: Ditto.
2983         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2984         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2985         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2986         (init_registers_amd64_linux): Remove prototype.
2987         (tdesc_amd64_linux): Remove declaration.
2988         (get_ipa_tdesc): New function.
2989         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2990         initialize remaining tdescs.
2991         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2992         (init_registers_i386_linux): Remove prototype.
2993         (tdesc_i386_linux): Remove declaration.
2994         (get_ipa_tdesc): New function.
2995         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2996         initialize remaining tdescs.
2997         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2998         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2999         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3000         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3001         (x86_get_ipa_tdesc_idx): New function.
3002         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3003         * linux-x86-tdesc.h: New file.
3004         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3005         (target_get_ipa_tdesc_idx): New macro.
3006         * tracepoint.c (ipa_tdesc_idx): New macro.
3007         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3008         (symbol_list): Add ipa_tdesc_idx.
3009         (cmd_qtstart): Write ipa_tdesc_idx in the target.
3010         (ipa_tdesc): Remove.
3011         (ipa_tdesc_idx): New variable.
3012         (get_context_regcache): Use get_ipa_tdesc.
3013         (gdb_collect): Ditto.
3014         (gdb_probe): Ditto.
3015         * tracepoint.h (get_ipa_tdesc): New prototype.
3016         (ipa_tdesc): Remove.
3017
3018 2016-02-24  Pedro Alves  <palves@redhat.com>
3019
3020         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3021         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
3022         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3023         Factor out common code between the USE_SIGTRAP_SIGINFO and
3024         !USE_SIGTRAP_SIGINFO blocks.
3025         (linux_low_filter_event): Call save_stop_reason instead of
3026         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3027         Update comments.
3028         (linux_wait_1): Update comments.
3029
3030 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
3031
3032         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3033         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3034         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3035         ppc_insert_point, ppc_remove_point.
3036
3037 2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3038
3039         * linux-s390-low.c (s390_supports_z_point_type): New function.
3040         (struct linux_target_ops): Wire s390_supports_z_point_type in.
3041
3042 2016-02-16  Yao Qi  <yao.qi@linaro.org>
3043
3044         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3045         PC.  Get pc from regcache_read_pc.
3046
3047 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3048
3049         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3050         or linux_get_pc_32bit.
3051         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3052
3053 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3054
3055         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3056         arm_linux_get_next_pcs_fixup.
3057
3058 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3059
3060         * tracepoint.c (x_tracepoint_action_download): Change
3061         write_inferior_data_ptr to write_inferior_data_pointer.
3062         (cmd_qtstart): Likewise.
3063         (write_inferior_data_ptr): Remove.
3064         (download_agent_expr): Change write_inferior_data_ptr to
3065         write_inferior_data_pointer.
3066         (download_tracepoint_1): Likewise.
3067         (download_tracepoint): Likewise.
3068         (download_trace_state_variables): Likewise.
3069
3070 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
3071             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3072
3073         * tracepoint.c (struct tracepoint_action_ops): Remove.
3074         (struct tracepoint_action): Remove ops.
3075         (m_tracepoint_action_download, r_tracepoint_action_download)
3076         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3077         size and offset accordingly.
3078         (m_tracepoint_action_ops, r_tracepoint_action_ops)
3079         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3080         (tracepoint_action_send, tracepoint_action_download): New functions.
3081         Helpers for trace action handlers.
3082         (add_tracepoint_action): Remove setup actions ops.
3083         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3084
3085 2016-02-10  Yao Qi  <yao.qi@linaro.org>
3086
3087         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3088
3089 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3090
3091         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3092         to AC_OUTPUT.
3093         * configure: Regenerate.
3094
3095 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3096
3097         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3098         void * to gdb_byte *.
3099         * linux-low.c (siginfo_fixup): Likewise.
3100         (linux_xfer_siginfo): Likewise.
3101         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3102         Likewise.
3103         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3104
3105 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3106
3107         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3108         to srv_tgtobj.
3109         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3110         to srv_tgtobj.
3111         * linux-x86-low.c [__x86_64__]: Include
3112         "nat/amd64-linux-siginfo.h".
3113         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3114         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3115         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3116         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3117         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3118         (cpt_si_fd, si_timerid, si_overrun): Move from
3119         nat/amd64-linux-siginfo.c.
3120         * Makefile.in (amd64-linux-siginfo.o:): New rule.
3121
3122 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
3123
3124         * server.c (skip_to_semicolon):  Remove.
3125         (process_point_options): Use strchrnul instead of
3126         skip_to_semicolon.
3127
3128 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3129
3130         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3131         * linux-low.c (install_software_single_step_breakpoints): Don't
3132         call regcache_read_pc.
3133         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3134         argument pc.
3135
3136 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3137
3138         * linux-low.c (install_software_single_step_breakpoints): Call
3139         regcache_read_pc instead of get_pc.
3140
3141 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3142
3143         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3144         (unblock_async_io): Rename to ...
3145         (block_unblock_async_io): ... it.  New function.
3146         (enable_async_io): Don't install SIGIO handler.  Unblock it
3147         instead.
3148         (disable_async_io): Don't ignore SIGIO.  Block it instead.
3149         (initialize_async_io): Install SIGIO handler.  Don't call
3150         unblock_async_io.
3151
3152 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3153
3154         * remote-utils.c (getpkt): If the buffer isn't empty, and the
3155         first character is '\003', call *the_target->request_interrupt.
3156
3157 2016-01-25  Yao Qi  <yao.qi@linaro.org>
3158
3159         * remote-utils.c (new_thread_notify): Remove.
3160         (dead_thread_notify): Likewise.
3161         * remote-utils.h (new_thread_notify): Remove declaration.
3162         (dead_thread_notify): Likewise.
3163
3164 2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3165
3166         * gdb.trace/pending.exp: Fix expected message on continue.
3167
3168 2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3169
3170         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3171         it works properly on big-endian machines where sizeof (CORE_ADDR)
3172         != sizeof (void *).
3173
3174 2016-01-21  Pedro Alves  <palves@redhat.com>
3175
3176         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3177         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3178         * configure: Regenerate.
3179
3180 2016-01-21  Yao Qi  <yao.qi@linaro.org>
3181
3182         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3183         is_thumb and set it according to CPSR saved on the stack.
3184         (get_next_pcs_syscall_next_pc): Pass is_thumb to
3185         arm_sigreturn_next_pc.
3186
3187 2016-01-18  Yao Qi  <yao.qi@linaro.org>
3188
3189         * linux-low.c (linux_set_pc_64bit): New function.
3190         (linux_get_pc_64bit): New function.
3191         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3192         Declare.
3193         * linux-sparc-low.c (debug_threads): Remove declaration.
3194         (sparc_get_pc): Remove.
3195         (the_low_target): Use linux_get_pc_64bit instead of
3196         sparc_get_pc.
3197         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3198         (the_low_target): Use linux_get_pc_64bit and
3199         linux_set_pc_64bit.
3200
3201 2016-01-18  Yao Qi  <yao.qi@linaro.org>
3202
3203         * linux-arm-low.c (debug_threads): Remove declaration.
3204         (arm_get_pc, arm_set_pc): Remove.
3205         (the_low_target): Use linux_get_pc_32bit and
3206         linux_set_pc_32bit.
3207         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3208         (the_low_target): Use linux_get_pc_32bit and
3209         linux_set_pc_32bit.
3210         * linux-cris-low.c (debug_threads): Remove declaration.
3211         (cris_get_pc, cris_set_pc,): Remove.
3212         (the_low_target): Use linux_get_pc_32bit and
3213         linux_set_pc_32bit.
3214         * linux-crisv32-low.c (debug_threads): Remove declaration.
3215         (cris_get_pc, cris_set_pc): Remove.
3216         (the_low_target): Use linux_get_pc_32bit and
3217         linux_set_pc_32bit.
3218         * linux-low.c: Include inttypes.h.
3219         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3220         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3221         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3222         (the_low_target): Use linux_get_pc_32bit and
3223         linux_set_pc_32bit.
3224         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3225         (the_low_target): Use linux_get_pc_32bit and
3226         linux_set_pc_32bit.
3227         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3228         (the_low_target): Use linux_get_pc_32bit and
3229         linux_set_pc_32bit.
3230         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3231         (the_low_target): Use linux_get_pc_32bit and
3232         linux_set_pc_32bit.
3233         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3234         (the_low_target): Use linux_get_pc_32bit and
3235         linux_set_pc_32bit.
3236
3237 2016-01-18  Gary Benson  <gbenson@redhat.com>
3238
3239         * configure.ac (AC_FUNC_FORK): New check.
3240         * config.in: Regenerate.
3241         * configure: Likewise.
3242
3243 2016-01-14  Yao Qi  <yao.qi@linaro.org>
3244
3245         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3246         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3247         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3248         arm_get_next_pcs_ctor.
3249
3250 2016-01-12  Josh Stone  <jistone@redhat.com>
3251             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3252
3253         * inferiors.h: Include "gdb_vecs.h".
3254         (struct process_info): Add syscalls_to_catch.
3255         * inferiors.c (remove_process): Free syscalls_to_catch.
3256         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3257         syscall_return stops.
3258         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3259         * server.c (handle_general_set): Handle QCatchSyscalls.
3260         (handle_query): Report support for QCatchSyscalls.
3261         * target.h (struct target_ops): Add supports_catch_syscall.
3262         (target_supports_catch_syscall): New macro.
3263         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3264         (struct lwp_info): Add syscall_state.
3265         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3266         Maintain syscall_state and syscalls_to_catch across exec.
3267         (get_syscall_trapinfo): New function, proxy to the_low_target.
3268         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3269         (linux_low_filter_event): Toggle syscall_state entry/return for
3270         syscall traps, and set it ignored for all others.
3271         (gdb_catching_syscalls_p): New function.
3272         (gdb_catch_this_syscall_p): New function.
3273         (linux_wait_1): Handle SYSCALL_SIGTRAP.
3274         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3275         (linux_supports_catch_syscall): New function.
3276         (linux_target_ops): Install it.
3277         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3278         (the_low_target): Install it.
3279
3280 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3281
3282         * acinclude.m4: Include new ../warning.m4 file.
3283         * configure: Regenerated.
3284         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3285
3286 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3287
3288         * ax.c (is_goto_target): Mark static.
3289         * linux-low.c (register_addr): Likewise.
3290         (linux_fetch_registers, linux_store_registers): Likewise.
3291         * mem-break.c (any_persistent_commands): Fix old prototype.
3292         (add_commands_to_breakpoint): Mark static.
3293         * regcache.c (find_register_by_name): Delete unused func.
3294         * remote-utils.c (hex_or_minus_one): Mark static.
3295         * server.c (monitor_show_help): Mark static.
3296         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3297         handle_v_requests): Likewise.
3298
3299 2016-01-12  Pedro Alves  <palves@redhat.com>
3300
3301         Remove use of the registered trademark symbol throughout.
3302
3303 2016-01-08  Yao Qi  <yao.qi@linaro.org>
3304
3305         * remote-utils.c (getpkt): If c is '\003', call target hook
3306         request_interrupt.
3307
3308 2016-01-06  Yao Qi  <yao.qi@linaro.org>
3309
3310         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3311         linux-aarch32-low.c.
3312         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3313         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3314         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3315         (thumb2_breakpoint): Declare.
3316         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3317         linux-aarch32-low.h.
3318         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3319         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3320         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3321
3322 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
3323
3324         * gdbreplay.c (gdbreplay_version): Change copyright year in
3325         version message.
3326         * server.c (gdbserver_version): Likewise.
3327
3328 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
3329
3330         * server.c (crc32_table): Delete.
3331         (crc32): Use libiberty's xcrc32 function.
3332
3333 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3334
3335         * lynx-low.c (lynx_delete_thread_callback): New function.
3336         (lynx_mourn): Properly delete our process and all of its
3337         threads.  Remove call to clear_inferiors.
3338
3339 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3340
3341         * target.c (thread_search_callback): Add check that
3342         the thread_stopped target callback is not NULL before
3343         calling it.
3344
3345 2015-12-21  Yao Qi  <yao.qi@linaro.org>
3346
3347         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3348         arm breakpoint.
3349
3350 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3351
3352         * server.c (handle_query): Call target_supports_software_single_step.
3353
3354 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3355
3356         * linux-low.c (single_step): New function.
3357         (linux_resume_one_lwp_throw): Call single_step.
3358         (start_step_over): Likewise.
3359
3360 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3361
3362         * Makefile.in (SFILES): Append arch/arm-linux.c,
3363         arch/arm-get-next-pcs.c.
3364         (arm-linux.o): New rule.
3365         (arm-get-next-pcs.o): New rule.
3366         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3367         arm-linux.o.
3368         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
3369         to linux-aarch32-low.c.
3370         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3371         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3372         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3373         (thumb2_breakpoint_len): Likewise.
3374         (arm_is_thumb_mode): Make non-static.
3375         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
3376         from linux-aarch32-low.c.
3377         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3378         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3379         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3380         (thumb2_breakpoint_len): Likewise.
3381         (arm_is_thumb_mode): New declaration.
3382         * linux-arm-low.c: Include arch/arm-linux.h
3383         aarch/arm-get-next-pcs.h, sys/syscall.h.
3384         (get_next_pcs_ops): New struct.
3385         (get_next_pcs_addr_bits_remove): New function.
3386         (get_next_pcs_is_thumb): New function.
3387         (get_next_pcs_read_memory_unsigned_integer): Likewise.
3388         (arm_sigreturn_next_pc): Likewise.
3389         (get_next_pcs_syscall_next_pc): Likewise.
3390         (arm_gdbserver_get_next_pcs): Likewise.
3391         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3392         Initialize.
3393         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3394         * server.h: Include gdb_vecs.h.
3395
3396 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3397
3398         * Makefile.in (SFILES): Append common/common-regcache.c.
3399         (OBS): Append common-regcache.o.
3400         (common-regcache.o): New rule.
3401         * regcache.c (init_register_cache): Initialize cache to
3402         REG_UNAVAILABLE.
3403         (regcache_raw_read_unsigned): New function.
3404         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3405         register_status enum.
3406
3407 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3408
3409         * linux-aarch64-low.c (the_low_targets): Rename
3410         breakpoint_reinsert_addr to get_next_pcs.
3411         * linux-arm-low.c (the_low_targets): Likewise.
3412         * linux-bfin-low.c (the_low_targets): Likewise.
3413         * linux-cris-low.c (the_low_targets): Likewise.
3414         * linux-crisv32-low.c (the_low_targets): Likewise.
3415         * linux-low.c (can_software_single_step): Likewise.
3416         (install_software_single_step_breakpoints): New function.
3417         (start_step_over): Use install_software_single_step_breakpoints.
3418         * linux-low.h: New CORE_ADDR vector.
3419         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3420         get_next_pcs.
3421         * linux-mips-low.c (the_low_targets): Likewise.
3422         * linux-nios2-low.c (the_low_targets): Likewise.
3423         * linux-sparc-low.c (the_low_targets): Likewise.
3424
3425 2015-12-17  Pedro Alves  <palves@redhat.com>
3426
3427         * linux-low.c (linux_kill_one_lwp): Remove references to
3428         LinuxThreads.
3429         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
3430         to 'kill'.
3431         (linux_init_signals): Delete.
3432         (initialize_low): Adjust.
3433         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3434
3435 2015-12-16  Pedro Alves  <palves@redhat.com>
3436
3437         * configure.ac (compiler warning flags): When testing a
3438         -Wno-foo option, check whether -Wfoo works instead.
3439         * configure: Regenerate.
3440
3441 2015-12-11  Don Breazeal  <donb@codesourcery.com>
3442
3443         * server.c (process_serial_event): Don't exit from gdbserver
3444         in remote mode if there are still active inferiors.
3445
3446 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3447
3448         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3449         arm_breakpoint_at if the process is 32-bit.
3450
3451 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3452
3453         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3454         arm breakpoint.
3455
3456 2015-12-07  Yao Qi  <yao.qi@linaro.org>
3457
3458         * configure.srv: Append arm.o to srv_tgtobj for
3459         aarch64*-*-linux* target.
3460         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
3461         from linux-arm-low.c.
3462         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3463         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3464         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3465         (thumb2_breakpoint_len): Likewise.
3466         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3467         (arm_breakpoint_kinds): Likewise.
3468         (arm_breakpoint_kind_from_pc): Likewise.
3469         (arm_sw_breakpoint_from_kind): Likewise.
3470         (arm_breakpoint_kind_from_current_state): Likewise.
3471         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3472         (arm_sw_breakpoint_from_kind): Declare.
3473         (arm_breakpoint_kind_from_current_state): Declare.
3474         (arm_breakpoint_at): Declare.
3475         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3476         arm_sw_breakpoint_from_kind if process is 32-bit.
3477         (aarch64_breakpoint_kind_from_pc): New function.
3478         (aarch64_breakpoint_kind_from_current_state): New function.
3479         (the_low_target): Initialize fields breakpoint_kind_from_pc
3480         and breakpoint_kind_from_current_state.
3481         * linux-arm-low.c (arm_breakpoint_kinds): Move to
3482         linux-aarch32-low.c.
3483         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3484         (arm_breakpoint, arm_breakpoint_len): Likewise.
3485         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3486         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3487         (arm_is_thumb_mode): Likewise.
3488         (arm_breakpoint_at): Likewise.
3489         (arm_breakpoint_kind_from_pc): Likewise.
3490         (arm_sw_breakpoint_from_kind): Likewise.
3491         (arm_breakpoint_kind_from_current_state): Likewise.
3492
3493         Revert:
3494         2015-08-04  Yao Qi  <yao.qi@linaro.org>
3495
3496         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3497         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3498         * server.c (extended_protocol): Remove "static".
3499         * server.h (extended_protocol): Declare it.
3500
3501 2015-12-04  Josh Stone  <jistone@redhat.com>
3502
3503         * target.h (struct target_ops) <arch_setup>: Rename to ...
3504         (struct target_ops) <post_create_inferior>: ... this.
3505         (target_arch_setup): Rename to ...
3506         (target_post_create_inferior): ... this, calling post_create_inferior.
3507         * server.c (start_inferior): Update target_arch_setup calls to
3508         target_post_create_inferior.
3509         * linux-low.c (linux_low_ptrace_options): Forward declare.
3510         (linux_arch_setup): Update its comment for general use.
3511         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3512         (struct linux_target_ops): Use linux_post_create_inferior.
3513         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3514         to post_create_inferior.
3515         * nto-low.c (struct nto_target_ops): Likewise.
3516         * spu-low.c (struct spu_target_ops): Likewise.
3517         * win32-low.c (struct win32_target_ops): Likewise.
3518
3519 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3520
3521         * linux-arm-low.c: Remove duplicate arch/arm.h include.
3522
3523 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3524
3525         * linux-arm-low.c (arm_reinsert_addr): Remove function.
3526         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3527         * linux-cris-low.c (cris_reinsert_addr> Remove function.
3528         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3529         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3530         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3531         * linux-mips-low.c (mips_reinsert_addr): Remove function.
3532         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3533         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3534         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3535         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3536         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3537
3538 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3539
3540         * linux-low.c (linux_look_up_symbols): Don't call
3541         linux_supports_traceclone.
3542         * linux-low.h (thread_db_init): Remove use_events argument.
3543         * thread-db.c (thread_db_use_event): Remove global variable.
3544         (struct thread_db) <td_thr_event_enable_p>: Remove field.
3545         (struct thread_db) <td_create_bp>: Remove field.
3546         (thread_db_create_event): Remove function.
3547         (thread_db_enable_reporting): Likewise.
3548         (find_one_thread): Don't check for thread_db_use_events.
3549         (attach_thread): Likewise.
3550         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3551         (try_thread_db_load_1): Don't check for thread_db_use_events.
3552         (thread_db_init): Remove use_events argument and thread events
3553         handling.
3554         (remove_thread_event_breakpoints): Remove function.
3555         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3556
3557 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3558
3559         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3560         New function.
3561         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3562         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3563         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3564         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3565         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3566         Initialize.
3567         * linux-crisv32-low.c (cris_supports_hardware_single_step):
3568         New function.
3569         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3570         * linux-low.c (can_hardware_single_step): Use
3571         supports_hardware_single_step.
3572         (can_software_single_step): New function.
3573         (start_step_over): Call can_software_single_step.
3574         (linux_supports_hardware_single_step): New function.
3575         (struct target_ops) <supports_software_single_step>: Initialize.
3576         * linux-low.h (struct linux_target_ops)
3577         <supports_hardware_single_step>: Initialize.
3578         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3579         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3580         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3581         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3582         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3583         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3584         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3585         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3586         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3587         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3588         Initialize.
3589         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3590         (struct linux_target_ops) <tile_supports_hardware_single_step>:
3591         Initialize.
3592         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3593         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3594         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3595         New function.
3596         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3597         * target.h (struct target_ops): <supports_software_single_step>:
3598         New field.
3599         (target_supports_software_single_step): New macro.
3600
3601 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3602
3603         * linux-low.c (linux_wait_1): Fix pc advance condition.
3604         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3605         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3606
3607 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3608
3609         * linux-arm-low.c (arm_is_thumb_mode): New function.
3610         (arm_breakpoint_at): Use arm_is_thumb_mode.
3611         (arm_breakpoint_kind_from_current_state): New function.
3612         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3613         Initialize.
3614         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3615         (linux_breakpoint_kind_from_current_state): New function.
3616         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3617         * linux-low.h (struct linux_target_ops)
3618         <breakpoint_kind_from_current_state>: New field.
3619         * target.h (struct target_ops): Likewise.
3620         (target_breakpoint_kind_from_current_state): New macro.
3621
3622 2015-11-30  Pedro Alves  <palves@redhat.com>
3623
3624         * linux-low.c (linux_resume): Wake up the event loop before
3625         returning.
3626
3627 2015-11-30  Pedro Alves  <palves@redhat.com>
3628
3629         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3630         check.
3631         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3632         to -1.
3633         * target.c (struct thread_search): New structure.
3634         (thread_search_callback): New function.
3635         (prev_general_thread): New global.
3636         (prepare_to_access_memory, done_accessing_memory): New functions.
3637         * target.h (prepare_to_access_memory, done_accessing_memory):
3638         Replace macros with function declarations.
3639
3640 2015-11-30  Pedro Alves  <palves@redhat.com>
3641
3642         PR 14618
3643         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3644         report TARGET_WAITKIND_NO_RESUMED.
3645         * remote-utils.c (prepare_resume_reply): Handle
3646         TARGET_WAITKIND_NO_RESUMED.
3647         * server.c (report_no_resumed): New global.
3648         (handle_query) <qSupported>: Handle "no-resumed+".  Report
3649         "no-resumed+" support.
3650         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3651         return error if the client doesn't support no-resumed events.
3652         (push_stop_notification): New function.
3653         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
3654         events if the client supports them.
3655
3656 2015-11-30  Pedro Alves  <palves@redhat.com>
3657
3658         * linux-low.c (thread_still_has_status_pending_p): Don't check
3659         vCont;t here.
3660         (lwp_resumed): New function.
3661         (status_pending_p_callback): Return early if the LWP is not
3662         supposed to be resumed.
3663
3664 2015-11-30  Pedro Alves  <palves@redhat.com>
3665
3666         * linux-low.c (handle_extended_wait): Assert that the LWP's
3667         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
3668         thread create events, leave the new child's status pending.
3669         (linux_low_filter_event): If GDB wants to hear about thread exit
3670         events, leave the LWP marked dead and don't delete it.
3671         (linux_wait_for_event_filtered): Don't check for thread exit.
3672         (filter_exit_event): New function.
3673         (linux_wait_1): Use it, when returning an exit event.
3674         (linux_resume_one_lwp_throw): Assert that the LWP's
3675         waitstatus is TARGET_WAITKIND_IGNORE.
3676         * remote-utils.c (prepare_resume_reply): Handle
3677         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3678         * server.c (report_thread_events): New global.
3679         (handle_general_set): Handle QThreadEvents.
3680         (handle_query) <qSupported>: Handle and report QThreadEvents+;
3681         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3682         TARGET_WAITKIND_THREAD_EXITED.
3683         * server.h (report_thread_events): Declare.
3684
3685 2015-11-30  Pedro Alves  <palves@redhat.com>
3686
3687         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3688         the thread's last_resume_kind was resume_stop.
3689
3690 2015-11-30  Pedro Alves  <palves@redhat.com>
3691
3692         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3693         before returning.
3694
3695 2015-11-30  Pedro Alves  <palves@redhat.com>
3696
3697         * server.c (handle_v_requests): Handle vCtrlC.
3698
3699 2015-11-30  Pedro Alves  <palves@redhat.com>
3700
3701         * gdbthread.h (find_any_thread_of_pid): Declare.
3702         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3703         functions.
3704         * server.c (handle_query): If current_thread is NULL, look for
3705         another thread of the selected process.
3706
3707 2015-11-26  Daniel Colascione  <dancol@dancol.org>
3708             Simon Marchi  <simon.marchi@ericsson.com>
3709
3710         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3711         * server.c (handle_qxfer_threads_worker): Refactor to include thread
3712         name in reply.
3713         * target.h (struct target_ops) <thread_name>: New field.
3714         (target_thread_name): New macro.
3715
3716 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
3717
3718         * regcache.h (regcache_invalidate_pid): Add declaration.
3719         * regcache.c (regcache_invalidate_pid): New function, extracted
3720         from regcache_invalidate.
3721         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3722         Add trivial documentation comment.
3723         * lynx-low.c: Use regcache_invalidate_pid instead of
3724         regcache_invalidate.
3725
3726 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
3727
3728         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3729         and Elf64_auxv_t if the target is Android.
3730
3731 2015-11-22  Doug Evans  <xdje42@gmail.com>
3732
3733         * target.h: #include <sys/types.h>.
3734
3735 2015-11-19  Pedro Alves  <palves@redhat.com>
3736
3737         * linux-low.c (linux_process_qsupported): Change prototype.
3738         Adjust.
3739         * linux-low.h (struct linux_target_ops) <process_qsupported>:
3740         Change prototype.
3741         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3742         and adjust to loop over all features.
3743         * server.c (handle_query) <qSupported>: Adjust to call
3744         target_process_qsupported once, passing it a vector of unprocessed
3745         features.
3746         * target.h (struct target_ops) <process_qsupported>: Change
3747         prototype.
3748         (target_process_qsupported): Adjust.
3749
3750 2015-11-19  Pedro Alves  <palves@redhat.com>
3751
3752         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3753         mode.
3754         * configure: Regenerate.
3755
3756 2015-11-19  Pedro Alves  <palves@redhat.com>
3757
3758         * configure: Regenerate.
3759
3760 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3761
3762         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3763         type to uint32_t.
3764
3765 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3766
3767         * linux-aarch64-low.c (enum aarch64_operand_type): New.
3768         (struct aarch64_operand): Move enum out.
3769
3770 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3771
3772         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3773         struct user_fpsimd_state *.
3774         (aarch64_store_fpregset): Likewise.
3775
3776 2015-11-19  Yao Qi  <yao.qi@linaro.org>
3777
3778         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3779         struct user_pt_regs *.
3780         (aarch64_store_gregset): Likewise.
3781
3782 2015-11-18  Pedro Alves  <palves@redhat.com>
3783
3784         * Makefile.in (all_object_files): Add $IPA_OBJS.
3785
3786 2015-11-17  Pedro Alves  <palves@redhat.com>
3787
3788         * win32-low.c (win32_resume): Use gdb_signal_from_host,
3789         GDB_SIGNAL_0 and gdb_signal_to_string.
3790
3791 2015-11-17  Pedro Alves  <palves@redhat.com>
3792
3793         * win32-low.c (handle_output_debug_string): Remove parameter.
3794         (win32_kill): Remove our_status local and adjust call to
3795         handle_output_debug_string.
3796         (get_child_debug_event): Adjust call to
3797         handle_output_debug_string.
3798
3799 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3800
3801         * linux-mips-low.c (mips_fill_gregset): Add cast.
3802         (mips_store_gregset): Likewise.
3803         (mips_fill_fpregset): Likewise.
3804         (mips_store_fpregset): Likewise.
3805
3806 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3807
3808         * linux-mips-low.c (mips_add_watchpoint): Rename private to
3809         priv.
3810
3811 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3812
3813         * linux-mips-low.c (mips_linux_new_thread): Change type of
3814         watch_type to enum target_hw_bp_type.
3815
3816 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3817
3818                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3819                 Change return type to arm_hwbp_type.
3820
3821 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3822
3823         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3824         (arm_store_gregset): Likewise.
3825         * linux-arm-low.c (arm_get_hwcap): Likewise.
3826         (arm_read_description): Likewise.
3827
3828 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3829
3830         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3831
3832 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3833
3834         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3835         (ppc_fill_vsxregset): Likewise.
3836         (ppc_store_vsxregset): Likewise.
3837         (ppc_fill_vrregset): Likewise.
3838         (ppc_store_vrregset): Likewise.
3839         (ppc_fill_evrregset): Likewise.
3840         (ppc_store_evrregset): Likewise.
3841
3842 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
3843
3844         * linux-ppc-low.c (ppc_usrregs_info): Remove
3845         forward-declaration.
3846         (ppc_arch_setup): Move lower in file.
3847
3848 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3849
3850         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3851         (ps_pdwrite): Likewise.
3852
3853 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3854
3855         * linux-arm-low.c (arm_new_thread): Move pointer dereference
3856         to after assert checks.
3857
3858 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3859
3860         * proc-service.c (ps_pdread): Add/adjust casts.
3861         (ps_pdwrite): Add/adjust casts.
3862
3863 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
3864
3865         * server.c (handle_search_memory_1): Cast return value of
3866         memmem.
3867
3868 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
3869
3870         * server.c (write_qxfer_response): Change type of data to
3871         gdb_byte *.
3872
3873 2015-10-29  Pedro Alves  <palves@redhat.com>
3874
3875         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3876
3877 2015-10-29  Pedro Alves  <palves@redhat.com>
3878
3879         * tracepoint.c (clear_installed_tracepoints): Add casts.
3880
3881 2015-10-29  Pedro Alves  <palves@redhat.com>
3882
3883         * server.c (handle_v_cont, process_serial_event): Add enum
3884         gdb_signal casts to signal parsing code.
3885
3886 2015-10-29  Pedro Alves  <palves@redhat.com>
3887
3888         * linux-low.h (NULL_REGSET): Define.
3889         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3890         * linux-arm-low.c (arm_regsets): Likewise.
3891         * linux-crisv32-low.c (cris_regsets): Likewise.
3892         * linux-m68k-low.c (m68k_regsets): Likewise.
3893         * linux-mips-low.c (mips_regsets): Likewise.
3894         * linux-nios2-low.c (nios2_regsets): Likewise.
3895         * linux-ppc-low.c (ppc_regsets): Likewise.
3896         * linux-s390-low.c (s390_regsets): Likewise.
3897         * linux-sh-low.c (sh_regsets): Likewise.
3898         * linux-sparc-low.c (sparc_regsets): Likewise.
3899         * linux-tic6x-low.c (tic6x_regsets): Likewise.
3900         * linux-tile-low.c (tile_regsets): Likewise.
3901         * linux-x86-low.c (x86_regsets): Likewise.
3902         * linux-xtensa-low.c (xtensa_regsets): Likewise.
3903
3904 2015-10-29  Pedro Alves  <palves@redhat.com>
3905
3906         * linux-low.h (NULL_REGSET): Define.
3907         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3908         * linux-arm-low.c (arm_regsets): Likewise.
3909         * linux-crisv32-low.c (cris_regsets): Likewise.
3910         * linux-m68k-low.c (m68k_regsets): Likewise.
3911         * linux-mips-low.c (mips_regsets): Likewise.
3912         * linux-nios2-low.c (nios2_regsets): Likewise.
3913         * linux-ppc-low.c (ppc_regsets): Likewise.
3914         * linux-s390-low.c (s390_regsets): Likewise.
3915         * linux-sh-low.c (sh_regsets): Likewise.
3916         * linux-sparc-low.c (sparc_regsets): Likewise.
3917         * linux-tic6x-low.c (tic6x_regsets): Likewise.
3918         * linux-tile-low.c (tile_regsets): Likewise.
3919         * linux-x86-low.c (x86_regsets): Likewise.
3920         * linux-xtensa-low.c (xtensa_regsets): Likewise.
3921
3922 2015-10-26  Doug Evans  <dje@google.com>
3923
3924         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3925
3926 2015-10-26  Doug Evans  <dje@google.com>
3927
3928         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3929
3930 2015-10-26  Doug Evans  <dje@google.com>
3931
3932         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3933         for debug_printf.
3934         (attach_thread, find_new_threads_callback): Ditto.
3935
3936 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3937
3938         * mem-break.h (set_breakpoint_data): Remove.
3939
3940 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3941
3942         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3943         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3944         (initialize_low): Remove set_breakpoint_data call.
3945         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3946         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3947         (initialize_low): Remove set_breakpoint_data call.
3948         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3949         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3950         (initialize_low): Remove set_breakpoint_data call.
3951
3952 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3953
3954         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3955         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3956         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3957         * target.h (target_breakpoint_kind_from_pc): New macro.
3958
3959 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3960
3961         * linux-low.c (default_breakpoint_kind_from_pc): New function.
3962         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3963         the default breakpoint kind.
3964
3965 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3966
3967         * linux-arm-low.c (arm_supports_z_point_type): Add software
3968         breakpoint support.
3969
3970 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3971
3972         * linux-arm-low.c: Refactor breakpoint definitions.
3973         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3974         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3975
3976 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3977
3978         * Makefile.in: Add arm.c/o.
3979         * configure.srv: Likewise.
3980         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3981         (arm_breakpoint_kind_from_pc): New function.
3982         (arm_sw_breakpoint_from_kind): Return proper kind.
3983         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3984
3985 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3986
3987         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3988         removal.
3989         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3990         (struct raw_breakpoint) <size>: Remove.
3991         (struct raw_breakpoint) <kind>: Add.
3992         (bp_size): New function.
3993         (bp_opcode): Likewise.
3994         (find_raw_breakpoint_at): Adjust for kind.
3995         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3996         (remove_memory_breakpoint): Adjust for kind call bp_size.
3997         (set_raw_breakpoint_at): Adjust for kind.
3998         (set_breakpoint): Likewise.
3999         (set_breakpoint_at): Call breakpoint_kind_from_pc.
4000         (delete_raw_breakpoint): Adjust for kind.
4001         (delete_breakpoint): Likewise.
4002         (find_gdb_breakpoint): Likewise.
4003         (set_gdb_breakpoint_1): Likewise.
4004         (set_gdb_breakpoint): Likewise.
4005         (delete_gdb_breakpoint_1): Likewise.
4006         (delete_gdb_breakpoint): Likewise.
4007         (uninsert_raw_breakpoint): Likewise.
4008         (reinsert_raw_breakpoint): Likewise.
4009         (set_breakpoint_data): Remove.
4010         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4011         (check_mem_read): Adjust for kind call bp_size.
4012         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4013         (clone_one_breakpoint): Adjust for kind.
4014         * mem-break.h (set_gdb_breakpoint): Likewise.
4015         (delete_gdb_breakpoint): Likewise.
4016         * server.c (process_serial_event): Likewise.
4017
4018 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4019
4020         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4021         (struct linux_target_ops) <breakpoint>: Remove.
4022         (struct linux_target_ops) <breakpoint_len>: Remove.
4023         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4024         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4025         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4026         (arm_sw_breakpoint_from_kind): New function.
4027         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4028         (struct linux_target_ops) <breakpoint>: Remove.
4029         (struct linux_target_ops) <breakpoint_len>: Remove.
4030         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4031         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4032         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4033         (struct linux_target_ops) <breakpoint>: Remove.
4034         (struct linux_target_ops) <breakpoint_len>: Remove.
4035         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4036         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4037         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4038         (struct linux_target_ops) <breakpoint>: Remove.
4039         (struct linux_target_ops) <breakpoint_len>: Remove.
4040         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4041         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4042         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4043         and sw_breakpoint_from_kind to increment the pc.
4044         (linux_breakpoint_kind_from_pc): New function.
4045         (linux_sw_breakpoint_from_kind): New function.
4046         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4047         (initialize_low): Call breakpoint_kind_from_pc and
4048         sw_breakpoint_from_kind to replace breakpoint_data/len.
4049         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4050         New field.
4051         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4052         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4053         (struct linux_target_ops) <breakpoint>: Remove.
4054         (struct linux_target_ops) <breakpoint_len>: Remove.
4055         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4056         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4057         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4058         (struct linux_target_ops) <breakpoint>: Remove.
4059         (struct linux_target_ops) <breakpoint_len>: Remove.
4060         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4061         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4062         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4063         (struct linux_target_ops) <breakpoint>: Remove.
4064         (struct linux_target_ops) <breakpoint_len>: Remove.
4065         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4066         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4067         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4068         (struct linux_target_ops) <breakpoint>: Remove.
4069         (struct linux_target_ops) <breakpoint_len>: Remove.
4070         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4071         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4072         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4073         (struct linux_target_ops) <breakpoint>: Remove.
4074         (struct linux_target_ops) <breakpoint_len>: Remove.
4075         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4076         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4077         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4078         (struct linux_target_ops) <breakpoint>: Remove.
4079         (struct linux_target_ops) <breakpoint_len>: Remove.
4080         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4081         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4082         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4083         (struct linux_target_ops) <breakpoint>: Remove.
4084         (struct linux_target_ops) <breakpoint_len>: Remove.
4085         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4086         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4087         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4088         (struct linux_target_ops) <breakpoint>: Remove.
4089         (struct linux_target_ops) <breakpoint_len>: Remove.
4090         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4091         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4092         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4093         (struct linux_target_ops) <breakpoint>: Remove.
4094         (struct linux_target_ops) <breakpoint_len>: Remove.
4095         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4096         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4097         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4098         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4099         (struct linux_target_ops) <breakpoint>: Remove.
4100         (struct linux_target_ops) <breakpoint_len>: Remove.
4101         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4102         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4103         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4104         (struct linux_target_ops) <breakpoint>: Remove.
4105         (struct linux_target_ops) <breakpoint_len>: Remove.
4106         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4107         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4108
4109 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4110
4111         * linux-cris-low.c (cris_get_pc): Remove void arg.
4112
4113 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4114
4115         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4116         variable name.
4117
4118 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4119
4120         * inferiors.c (thread_pid_matches_callback): New function.
4121         (find_thread_process): New function.
4122         (remove_thread): Reset current_thread.
4123         (remove_process): Assert threads have been removed first.
4124
4125 2015-10-15  Yao Qi  <yao.qi@linaro.org>
4126
4127         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4128         if it is 3.
4129         (aarch64_remove_point): Likewise.
4130         * regcache.c (regcache_register_size): New function.
4131
4132 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4133
4134         * linux-aarch64-low.c: Update all callers as emit_load_store
4135         is renamed to aarch64_emit_load_store.
4136
4137 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4138
4139         * linux-aarch64-low.c: Update all callers of function renaming
4140         from emit_insn to aarch64_emit_insn.
4141
4142 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4143
4144         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4145         arch/aarch64-insn.h.
4146         (struct aarch64_memory_operand): Likewise.
4147         (ENCODE): Likewise.
4148         (emit_insn): Move to arch/aarch64-insn.c.
4149         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4150         (emit_load_store): Move to arch/aarch64-insn.c.
4151         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4152         (can_encode_int32): Remove.
4153
4154 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4155
4156         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4157         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4158         (aarch64_relocate_instruction): Likewise.
4159         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4160         (struct aarch64_insn_visitor): Likewise.
4161
4162 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4163
4164         * linux-aarch64-low.c (struct aarch64_insn_data): New.
4165         (struct aarch64_insn_visitor): New.
4166         (struct aarch64_insn_relocation_data): New.
4167         (aarch64_ftrace_insn_reloc_b): New function.
4168         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4169         (aarch64_ftrace_insn_reloc_cb): Likewise.
4170         (aarch64_ftrace_insn_reloc_tb): Likewise.
4171         (aarch64_ftrace_insn_reloc_adr): Likewise.
4172         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4173         (aarch64_ftrace_insn_reloc_others): Likewise.
4174         (visitor): New.
4175         (aarch64_relocate_instruction): Use visitor.
4176
4177 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4178
4179         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4180         int.  Add argument buf.
4181         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4182         aarch64_relocate_instruction.
4183
4184 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4185
4186         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4187         argument insn.  Remove local variable insn.  Don't call
4188         target_read_uint32.
4189         (aarch64_install_fast_tracepoint_jump_pad): Call
4190         target_read_uint32.
4191
4192 2015-09-30  Yao Qi  <yao.qi@linaro.org>
4193
4194         * linux-aarch64-low.c (emit_movk): Shorten a long line.
4195         (emit_load_store_pair): Likewise.
4196
4197 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
4198
4199         * dll.c (match_dll): Add cast(s).
4200         (unloaded_dll): Likewise.
4201         * linux-low.c (second_thread_of_pid_p): Likewise.
4202         (delete_lwp_callback): Likewise.
4203         (count_events_callback): Likewise.
4204         (select_event_lwp_callback): Likewise.
4205         (linux_set_resume_request): Likewise.
4206         * server.c (accumulate_file_name_length): Likewise.
4207         (emit_dll_description): Likewise.
4208         (handle_qxfer_threads_worker): Likewise.
4209         (visit_actioned_threads): Likewise.
4210         * thread-db.c (any_thread_of): Likewise.
4211         * tracepoint.c (same_process_p): Likewise.
4212         (match_blocktype): Likewise.
4213         (build_traceframe_info_xml): Likewise.
4214
4215 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
4216
4217         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4218         assignment.
4219         (gdb_unparse_agent_expr): Likewise.
4220         * hostio.c (require_data): Likewise.
4221         (handle_pread): Likewise.
4222         * linux-low.c (disable_regset): Likewise.
4223         (fetch_register): Likewise.
4224         (store_register): Likewise.
4225         (get_dynamic): Likewise.
4226         (linux_qxfer_libraries_svr4): Likewise.
4227         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4228         (set_fast_tracepoint_jump): Likewise.
4229         (uninsert_fast_tracepoint_jumps_at): Likewise.
4230         (reinsert_fast_tracepoint_jumps_at): Likewise.
4231         (validate_inserted_breakpoint): Likewise.
4232         (clone_agent_expr): Likewise.
4233         * regcache.c (init_register_cache): Likewise.
4234         * remote-utils.c (putpkt_binary_1): Likewise.
4235         (decode_M_packet): Likewise.
4236         (decode_X_packet): Likewise.
4237         (look_up_one_symbol): Likewise.
4238         (relocate_instruction): Likewise.
4239         (monitor_output): Likewise.
4240         * server.c (handle_search_memory): Likewise.
4241         (handle_qxfer_exec_file): Likewise.
4242         (handle_qxfer_libraries): Likewise.
4243         (handle_qxfer): Likewise.
4244         (handle_query): Likewise.
4245         (handle_v_cont): Likewise.
4246         (handle_v_run): Likewise.
4247         (captured_main): Likewise.
4248         * target.c (write_inferior_memory): Likewise.
4249         * thread-db.c (try_thread_db_load_from_dir): Likewise.
4250         * tracepoint.c (init_trace_buffer): Likewise.
4251         (add_tracepoint_action): Likewise.
4252         (add_traceframe): Likewise.
4253         (add_traceframe_block): Likewise.
4254         (cmd_qtdpsrc): Likewise.
4255         (cmd_qtdv): Likewise.
4256         (cmd_qtstatus): Likewise.
4257         (response_source): Likewise.
4258         (response_tsv): Likewise.
4259         (cmd_qtnotes): Likewise.
4260         (gdb_collect): Likewise.
4261         (initialize_tracepoint): Likewise.
4262
4263 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4264
4265         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4266         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4267         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4268         <NOP>: New.
4269         (enum aarch64_condition_codes): New enum.
4270         (w0): New static global.
4271         (fp): Likewise.
4272         (lr): Likewise.
4273         (struct aarch64_memory_operand) <type>: New
4274         MEMORY_OPERAND_POSTINDEX type.
4275         (postindex_memory_operand): New helper function.
4276         (emit_ret): New function.
4277         (emit_load_store_pair): New function, factored out of emit_stp
4278         with support for MEMORY_OPERAND_POSTINDEX.
4279         (emit_stp): Rewrite using emit_load_store_pair.
4280         (emit_ldp): New function.
4281         (emit_load_store): Likewise.
4282         (emit_ldr): Mention post-index instruction in comment.
4283         (emit_ldrh): New function.
4284         (emit_ldrb): New function.
4285         (emit_ldrsw): Mention post-index instruction in comment.
4286         (emit_str): Likewise.
4287         (emit_subs): New function.
4288         (emit_cmp): Likewise.
4289         (emit_and): Likewise.
4290         (emit_orr): Likewise.
4291         (emit_orn): Likewise.
4292         (emit_eor): Likewise.
4293         (emit_mvn): Likewise.
4294         (emit_lslv): Likewise.
4295         (emit_lsrv): Likewise.
4296         (emit_asrv): Likewise.
4297         (emit_mul): Likewise.
4298         (emit_sbfm): Likewise.
4299         (emit_sbfx): Likewise.
4300         (emit_ubfm): Likewise.
4301         (emit_ubfx): Likewise.
4302         (emit_csinc): Likewise.
4303         (emit_cset): Likewise.
4304         (emit_nop): Likewise.
4305         (emit_ops_insns): New helper function.
4306         (emit_pop): Likewise.
4307         (emit_push): Likewise.
4308         (aarch64_emit_prologue): New function.
4309         (aarch64_emit_epilogue): Likewise.
4310         (aarch64_emit_add): Likewise.
4311         (aarch64_emit_sub): Likewise.
4312         (aarch64_emit_mul): Likewise.
4313         (aarch64_emit_lsh): Likewise.
4314         (aarch64_emit_rsh_signed): Likewise.
4315         (aarch64_emit_rsh_unsigned): Likewise.
4316         (aarch64_emit_ext): Likewise.
4317         (aarch64_emit_log_not): Likewise.
4318         (aarch64_emit_bit_and): Likewise.
4319         (aarch64_emit_bit_or): Likewise.
4320         (aarch64_emit_bit_xor): Likewise.
4321         (aarch64_emit_bit_not): Likewise.
4322         (aarch64_emit_equal): Likewise.
4323         (aarch64_emit_less_signed): Likewise.
4324         (aarch64_emit_less_unsigned): Likewise.
4325         (aarch64_emit_ref): Likewise.
4326         (aarch64_emit_if_goto): Likewise.
4327         (aarch64_emit_goto): Likewise.
4328         (aarch64_write_goto_address): Likewise.
4329         (aarch64_emit_const): Likewise.
4330         (aarch64_emit_call): Likewise.
4331         (aarch64_emit_reg): Likewise.
4332         (aarch64_emit_pop): Likewise.
4333         (aarch64_emit_stack_flush): Likewise.
4334         (aarch64_emit_zero_ext): Likewise.
4335         (aarch64_emit_swap): Likewise.
4336         (aarch64_emit_stack_adjust): Likewise.
4337         (aarch64_emit_int_call_1): Likewise.
4338         (aarch64_emit_void_call_2): Likewise.
4339         (aarch64_emit_eq_goto): Likewise.
4340         (aarch64_emit_ne_goto): Likewise.
4341         (aarch64_emit_lt_goto): Likewise.
4342         (aarch64_emit_le_goto): Likewise.
4343         (aarch64_emit_gt_goto): Likewise.
4344         (aarch64_emit_ge_got): Likewise.
4345         (aarch64_emit_ops_impl): New static global variable.
4346         (aarch64_emit_ops): New target function, return
4347         &aarch64_emit_ops_impl.
4348         (struct linux_target_ops): Install it.
4349
4350 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4351
4352         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4353         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4354         aarch64-ipa.o.
4355         * linux-aarch64-ipa.c: New file.
4356         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4357         and endian.h.
4358         (aarch64_get_thread_area): New target method.
4359         (extract_signed_bitfield): New helper function.
4360         (aarch64_decode_ldr_literal): New function.
4361         (enum aarch64_opcodes): New enum.
4362         (struct aarch64_register): New struct.
4363         (struct aarch64_operand): New struct.
4364         (x0): New static global.
4365         (x1): Likewise.
4366         (x2): Likewise.
4367         (x3): Likewise.
4368         (x4): Likewise.
4369         (w2): Likewise.
4370         (ip0): Likewise.
4371         (sp): Likewise.
4372         (xzr): Likewise.
4373         (aarch64_register): New helper function.
4374         (register_operand): Likewise.
4375         (immediate_operand): Likewise.
4376         (struct aarch64_memory_operand): New struct.
4377         (offset_memory_operand): New helper function.
4378         (preindex_memory_operand): Likewise.
4379         (enum aarch64_system_control_registers): New enum.
4380         (ENCODE): New macro.
4381         (emit_insn): New helper function.
4382         (emit_b): New function.
4383         (emit_bcond): Likewise.
4384         (emit_cb): Likewise.
4385         (emit_tb): Likewise.
4386         (emit_blr): Likewise.
4387         (emit_stp): Likewise.
4388         (emit_ldp_q_offset): Likewise.
4389         (emit_stp_q_offset): Likewise.
4390         (emit_load_store): Likewise.
4391         (emit_ldr): Likewise.
4392         (emit_ldrsw): Likewise.
4393         (emit_str): Likewise.
4394         (emit_ldaxr): Likewise.
4395         (emit_stxr): Likewise.
4396         (emit_stlr): Likewise.
4397         (emit_data_processing_reg): Likewise.
4398         (emit_data_processing): Likewise.
4399         (emit_add): Likewise.
4400         (emit_sub): Likewise.
4401         (emit_mov): Likewise.
4402         (emit_movk): Likewise.
4403         (emit_mov_addr): Likewise.
4404         (emit_mrs): Likewise.
4405         (emit_msr): Likewise.
4406         (emit_sevl): Likewise.
4407         (emit_wfe): Likewise.
4408         (append_insns): Likewise.
4409         (can_encode_int32_in): New helper function.
4410         (aarch64_relocate_instruction): New function.
4411         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4412         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4413         (struct linux_target_ops): Install aarch64_get_thread_area,
4414         aarch64_install_fast_tracepoint_jump_pad and
4415         aarch64_get_min_fast_tracepoint_insn_len.
4416
4417 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4418
4419         * Makefile.in (aarch64-insn.o): New rule.
4420         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4421
4422 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4423
4424         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4425
4426 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4427
4428         * tracepoint.c (max_jump_pad_size): Remove.
4429
4430 2015-09-18  Yao Qi  <yao.qi@linaro.org>
4431
4432         * linux-aarch64-low.c: Don't include sys/uio.h.
4433         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4434
4435 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
4436
4437         * tracepoint.c (eval_result_type): Change prototype.
4438         (condition_true_at_tracepoint): Fix argument to compiled_cond.
4439
4440 2015-09-15  Pedro Alves  <palves@redhat.com>
4441
4442         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4443         Check whether to report exec events instead of checking whether
4444         multiprocess is enabled.
4445
4446 2015-09-15  Pedro Alves  <palves@redhat.com>
4447
4448         PR remote/18965
4449         * remote-utils.c (prepare_resume_reply): Merge
4450         TARGET_WAITKIND_VFORK_DONE switch case with the
4451         TARGET_WAITKIND_FORKED case.
4452
4453 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4454
4455         * server.c (handle_query): Check string comparison using
4456         "else if" instead of "if".
4457
4458 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4459
4460         * server.c (vCont_supported): New global variable.
4461         (handle_query): Set vCont_supported to 1 if "vContSupported+"
4462         matches.  Append ";vContSupported+" to own_buf.
4463         (handle_v_requests): Append ";s;S" to own_buf if target supports
4464         hardware single step or vCont_supported is false.
4465         (capture_main): Set vCont_supported to zero.
4466
4467 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4468
4469         * linux-low.c (linux_supports_conditional_breakpoints): Rename
4470         it to ...
4471         (linux_supports_hardware_single_step): ... New function.
4472         (linux_target_ops): Update.
4473         * lynx-low.c (lynx_target_ops): Set field
4474         supports_hardware_single_step to target_can_do_hardware_single_step.
4475         * nto-low.c (nto_target_ops): Likewise.
4476         * spu-low.c (spu_target_ops): Likewise.
4477         * win32-low.c (win32_target_ops): Likewise.
4478         * target.c (target_can_do_hardware_single_step): New function.
4479         * target.h (struct target_ops) <supports_conditional_breakpoints>:
4480         Remove.  <supports_hardware_single_step>: New field.
4481         (target_supports_conditional_breakpoints): Remove.
4482         (target_supports_hardware_single_step): New macro.
4483         (target_can_do_hardware_single_step): Declare.
4484         * server.c (handle_query): Use target_supports_hardware_single_step
4485         instead of target_supports_conditional_breakpoints.
4486
4487 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4488
4489         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4490         function.
4491         (struct linux_target_ops the_low_target): Install
4492         aarch64_linux_siginfo_fixup.
4493
4494 2015-09-11  Don Breazeal  <donb@codesourcery.com>
4495             Luis Machado  <lgustavo@codesourcery.com>
4496
4497         * linux-low.c (linux_mourn): Static declaration.
4498         (linux_arch_setup): Move in front of
4499         handle_extended_wait.
4500         (linux_arch_setup_thread): New function.
4501         (handle_extended_wait): Handle exec events.  Call
4502         linux_arch_setup_thread.  Make event_lwp argument a
4503         pointer-to-a-pointer.
4504         (check_zombie_leaders): Do not check stopped threads.
4505         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4506         (linux_low_filter_event): Add lwp and thread for exec'ing
4507         non-leader thread if leader thread has been deleted.
4508         Refactor code into linux_arch_setup_thread and call it.
4509         Pass child lwp pointer by reference to handle_extended_wait.
4510         (linux_wait_for_event_filtered): Update comment.
4511         (linux_wait_1): Prevent clobbering exec event status.
4512         (linux_supports_exec_events): New function.
4513         (linux_target_ops) <supports_exec_events>: Initialize new member.
4514         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4515         new member.
4516         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4517         * server.c (report_exec_events): New global variable.
4518         (handle_query): Handle qSupported query for exec-events feature.
4519         (captured_main): Initialize report_exec_events.
4520         * server.h (report_exec_events): Declare new global variable.
4521         * target.h (struct target_ops) <supports_exec_events>: New
4522         member.
4523         (target_supports_exec_events): New macro.
4524         * win32-low.c (win32_target_ops) <supports_exec_events>:
4525         Initialize new member.
4526
4527 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
4528
4529         * linux-low.c (linux_low_enable_btrace): Remove.
4530         (linux_target_ops): Replace linux_low_enable_btrace with
4531         linux_enable_btrace.
4532
4533 2015-09-03  Yao Qi  <yao.qi@linaro.org>
4534
4535         * linux-aarch64-low.c (aarch64_insert_point): Call
4536         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4537         returns true.
4538
4539 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4540
4541         * linux-low.c (check_stopped_by_breakpoint): Use
4542         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4543
4544 2015-08-27  Pedro Alves  <palves@redhat.com>
4545
4546         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4547
4548 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
4549
4550         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4551         the XNEW-family equivalent.
4552         (compile_bytecodes): Likewise.
4553         * dll.c (loaded_dll): Likewise.
4554         * event-loop.c (append_callback_event): Likewise.
4555         (create_file_handler): Likewise.
4556         (create_file_event): Likewise.
4557         * hostio.c (handle_open): Likewise.
4558         * inferiors.c (add_thread): Likewise.
4559         (add_process): Likewise.
4560         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4561         * linux-arm-low.c (arm_new_process): Likewise.
4562         (arm_new_thread): Likewise.
4563         * linux-low.c (add_to_pid_list): Likewise.
4564         (linux_add_process): Likewise.
4565         (handle_extended_wait): Likewise.
4566         (add_lwp): Likewise.
4567         (enqueue_one_deferred_signal): Likewise.
4568         (enqueue_pending_signal): Likewise.
4569         (linux_resume_one_lwp_throw): Likewise.
4570         (linux_resume_one_thread): Likewise.
4571         (linux_read_memory): Likewise.
4572         (linux_write_memory): Likewise.
4573         * linux-mips-low.c (mips_linux_new_process): Likewise.
4574         (mips_linux_new_thread): Likewise.
4575         (mips_add_watchpoint): Likewise.
4576         * linux-x86-low.c (initialize_low_arch): Likewise.
4577         * lynx-low.c (lynx_add_process): Likewise.
4578         * mem-break.c (set_raw_breakpoint_at): Likewise.
4579         (set_breakpoint): Likewise.
4580         (add_condition_to_breakpoint): Likewise.
4581         (add_commands_to_breakpoint): Likewise.
4582         (clone_agent_expr): Likewise.
4583         (clone_one_breakpoint): Likewise.
4584         * regcache.c (new_register_cache): Likewise.
4585         * remote-utils.c (look_up_one_symbol): Likewise.
4586         * server.c (queue_stop_reply): Likewise.
4587         (start_inferior): Likewise.
4588         (queue_stop_reply_callback): Likewise.
4589         (handle_target_event): Likewise.
4590         * spu-low.c (fetch_ppc_memory): Likewise.
4591         (store_ppc_memory): Likewise.
4592         * target.c (set_target_ops): Likewise.
4593         * thread-db.c (thread_db_load_search): Likewise.
4594         (try_thread_db_load_1): Likewise.
4595         * tracepoint.c (add_tracepoint): Likewise.
4596         (add_tracepoint_action): Likewise.
4597         (create_trace_state_variable): Likewise.
4598         (cmd_qtdpsrc): Likewise.
4599         (cmd_qtro): Likewise.
4600         (add_while_stepping_state): Likewise.
4601         * win32-low.c (child_add_thread): Likewise.
4602         (get_image_name): Likewise.
4603
4604 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4605
4606         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4607
4608 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4609
4610         * Makefile.in (aarch64-linux.o): New rule.
4611         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4612         srv_tgtobj.
4613         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4614         (aarch64_init_debug_reg_state): Make it extern.
4615         (aarch64_linux_prepare_to_resume): Remove.
4616
4617 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4618
4619         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4620         lwp_arch_private_info and ptid_of_lwp.
4621
4622 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4623
4624         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4625         Find proc_info by find_process_pid.  All callers updated.
4626
4627 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4628
4629         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4630         Remove.
4631         (debug_reg_change_callback): Remove.
4632         (aarch64_notify_debug_reg_change): Remove.
4633
4634 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4635
4636         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4637         Call current_lwp_ptid.
4638
4639 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4640
4641         * linux-aarch64-low.c (debug_reg_change_callback): Use
4642         debug_printf.
4643
4644 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4645
4646         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4647
4648 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4649
4650         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4651
4652 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4653
4654         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4655         the code.
4656
4657 2015-08-25  Yao Qi  <yao.qi@linaro.org>
4658
4659         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4660         Remove.
4661         (debug_reg_change_callback): Remove argument entry and add argument
4662         lwp.  Remove local variable thread.  Don't print thread id in the
4663         debugging output.  Don't check whether pid of thread equals to pid.
4664         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
4665         iterate_over_lwps instead find_inferior.
4666
4667 2015-08-24  Pedro Alves  <palves@redhat.com>
4668
4669         * inferiors.c (get_first_process): New function.
4670         * inferiors.h (get_first_process): New declaration.
4671         * remote-utils.c (read_ptid): Default to the first process in the
4672         list, instead of to the current thread's process.
4673
4674 2015-08-24  Pedro Alves  <palves@redhat.com>
4675
4676         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4677         * event-loop.c: Likewise.
4678         * remote-utils.c: Likewise.
4679         * tracepoint.c: Likewise.
4680
4681 2015-08-24  Pedro Alves  <palves@redhat.com>
4682
4683         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4684         ptid_get_lwp.
4685
4686 2015-08-21  Pedro Alves  <palves@redhat.com>
4687
4688         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4689         instead of literal 1.
4690
4691 2015-08-21  Pedro Alves  <palves@redhat.com>
4692
4693         * tdesc.c (default_description): Explicitly zero-initialize.
4694
4695 2015-08-21  Pedro Alves  <palves@redhat.com>
4696
4697         PR gdb/18749
4698         * inferiors.c (remove_thread): Discard any pending stop reply for
4699         this thread.
4700         * server.c (remove_all_on_match_pid): Rename to ...
4701         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
4702         instead of a pid.
4703         (discard_queued_stop_replies): Change parameter to a ptid.  Now
4704         extern.
4705         (handle_v_kill, kill_inferior_callback, captured_main)
4706         (process_serial_event): Adjust.
4707         * server.h (discard_queued_stop_replies): Declare.
4708
4709 2015-08-21  Pedro Alves  <palves@redhat.com>
4710
4711         * linux-low.c (wait_for_sigstop): Always switch to no thread
4712         selected if the previously current thread dies.
4713         * lynx-low.c (lynx_request_interrupt): Use the first thread's
4714         process instead of the current thread's.
4715         * remote-utils.c (input_interrupt): Don't check if there's no
4716         current thread.
4717         * server.c (gdb_read_memory, gdb_write_memory): If setting the
4718         current thread to the general thread fails, error out.
4719         (handle_qxfer_auxv, handle_qxfer_libraries)
4720         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4721         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4722         (handle_query): Check if there's a thread selected instead of
4723         checking whether there's any thread in the thread list.
4724         (handle_qxfer_threads, handle_qxfer_btrace)
4725         (handle_qxfer_btrace_conf): Don't error out early if there's no
4726         thread in the thread list.
4727         (handle_v_cont, myresume): Don't set the current thread to the
4728         continue thread.
4729         (process_serial_event) <Hg handling>: Also set thread_id if the
4730         previous general thread is still alive.
4731         (process_serial_event) <g/G handling>: If setting the current
4732         thread to the general thread fails, error out.
4733         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4734         thread's lwp instead of the current thread's.
4735         * target.c (set_desired_thread): If the desired thread was not
4736         found, leave the current thread pointing to NULL.  Return an int
4737         (boolean) indicating success.
4738         * target.h (set_desired_thread): Change return type to int.
4739
4740 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
4741
4742         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4743         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4744         #includes.
4745         (ps_get_thread_area): New function.
4746
4747 2015-08-19  Gary Benson  <gbenson@redhat.com>
4748
4749         * hostio.c (handle_pread): Do not attempt to read more data
4750         than hostio_reply_with_data can fit in a packet.
4751
4752 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
4753
4754         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4755
4756 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
4757
4758         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4759
4760 2015-08-06  Pedro Alves  <palves@redhat.com>
4761
4762         * tracepoint.c (expr_eval_result): Now an int.
4763
4764 2015-08-06  Pedro Alves  <palves@redhat.com>
4765
4766         * gdbthread.h (struct regcache): Forward declare.
4767         (struct thread_info) <regcache_data>: Now a struct regcache
4768         pointer.
4769         * inferiors.c (inferior_regcache_data)
4770         (set_inferior_regcache_data): Now work with struct regcache
4771         pointers.
4772         * inferiors.h (struct regcache): Forward declare.
4773         (inferior_regcache_data, set_inferior_regcache_data): Now work
4774         with struct regcache pointers.
4775         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4776         (free_register_cache_thread): Remove struct regcache pointer
4777         casts.
4778
4779 2015-08-06  Pedro Alves  <palves@redhat.com>
4780
4781         * server.c (captured_main): On error, print the exception message
4782         to stderr, and if run_once is set, throw a quit.
4783
4784 2015-08-06  Pedro Alves  <palves@redhat.com>
4785
4786         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4787         the current thread.
4788
4789 2015-08-06  Pedro Alves  <palves@redhat.com>
4790
4791         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4792         reading beyond the passed in buffer length.
4793
4794 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
4795
4796         * tracepoint.c (symbol_list) <required>: Remove.
4797
4798 2015-08-06  Pedro Alves  <palves@redhat.com>
4799
4800         * linux-low.c (handle_extended_wait): Set the fork child's suspend
4801         count if stopping and suspending threads.
4802         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4803         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4804         (linux_detach): Complete an ongoing step-over.
4805         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
4806         throughout.
4807         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4808         (linux_wait_1): If passing a signal to the inferior after
4809         finishing a step-over, unsuspend and re-resume all lwps.  If we
4810         see a single-step event but the thread should be continuing, don't
4811         pass the trap to gdb.
4812         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4813         internal_error instead of gdb_assert.
4814         (enqueue_pending_signal): New function.
4815         (check_ptrace_stopped_lwp_gone): Add debug output.
4816         (start_step_over): Use internal_error instead of gdb_assert.
4817         (complete_ongoing_step_over): New function.
4818         (linux_resume_one_thread): Don't resume a suspended thread.
4819         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4820         it stepping.
4821
4822 2015-08-06  Pedro Alves  <palves@redhat.com>
4823
4824         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4825         (linux_thread_alive): Use lwp_is_marked_dead.
4826         (extended_event_reported): Delete.
4827         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4828         instead of extended_event_reported.
4829         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
4830         as well.
4831         (lwp_is_marked_dead): New function.
4832         (lwp_running): Use lwp_is_marked_dead.
4833         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4834         comment.
4835
4836 2015-08-06  Pedro Alves  <palves@redhat.com>
4837
4838         * linux-low.c (linux_wait_1): Move fork event output out of the
4839         !report_to_gdb check.  Pass event_child->waitstatus to
4840         target_waitstatus_to_string instead of ourstatus.
4841
4842 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4843
4844         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4845         if current_thread is 32 bit.
4846
4847 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4848
4849         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4850         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4851         * server.c (extended_protocol): Remove "static".
4852         * server.h (extended_protocol): Declare it.
4853
4854 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4855
4856         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4857         both aarch64 and aarch32.
4858         (aarch64_set_pc): Likewise.
4859
4860 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4861
4862         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4863         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4864         arm-with-neon.xml to srv_xmlfiles.
4865         * linux-aarch64-low.c: Include linux-aarch32-low.h.
4866         (is_64bit_tdesc): New function.
4867         (aarch64_linux_read_description): New function.
4868         (aarch64_arch_setup): Call aarch64_linux_read_description.
4869         (regs_info): Rename to regs_info_aarch64.
4870         (aarch64_regs_info): Return right regs_info.
4871         (initialize_low_arch): Call initialize_low_arch_aarch32.
4872
4873 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4874
4875         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4876         * linux-aarch32-low.c: New file.
4877         * linux-aarch32-low.h: New file.
4878         * linux-arm-low.c (arm_fill_gregset): Move it to
4879         linux-aarch32-low.c.
4880         (arm_store_gregset): Likewise.
4881         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4882         (arm_store_vfpregset): Call arm_store_vfpregset_num.
4883         (arm_arch_setup): Check if PTRACE_GETREGSET works.
4884         (regs_info): Rename to regs_info_arm.
4885         (arm_regs_info): Return regs_info_aarch32 if
4886         have_ptrace_getregset is 1 and target description is
4887         arm_with_neon or arm_with_vfpv3.
4888         (initialize_low_arch): Don't call init_registers_arm_with_neon.
4889         Call initialize_low_arch_aarch32 instead.
4890
4891 2015-08-04  Yao Qi  <yao.qi@linaro.org>
4892
4893         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4894         * linux-low.c: ... here.
4895         * linux-low.h (have_ptrace_getregset): Declare it.
4896
4897 2015-08-04  Pedro Alves  <palves@redhat.com>
4898
4899         * thread-db.c (struct thread_db): Use new typedefs.
4900         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4901         CHK calls.
4902         (disable_thread_event_reporting): Cast result of dlsym to
4903         destination function pointer type.
4904         (thread_db_mourn): Use td_ta_delete_ftype.
4905
4906 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
4907
4908         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4909         arch variant.
4910         (CDX_BREAKPOINT): Define for R2.
4911         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4912         (the_low_target): Add comments.
4913
4914 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4915
4916         * linux-arm-low.c (arm_hwcap): Remove it.
4917         (arm_read_description): New local variable arm_hwcap.  Don't
4918         set arm_hwcap to zero.
4919
4920 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4921
4922         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4923         Use regcache->tdesc instead.
4924         (arm_store_wmmxregset): Likewise.
4925         (arm_fill_vfpregset): Likewise.
4926         (arm_store_vfpregset): Likewise.
4927
4928 2015-07-30  Yao Qi  <yao.qi@linaro.org>
4929
4930         * linux-arm-low.c: Include arch/arm.h.
4931         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4932         (arm_store_gregset): Likewise.
4933
4934 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
4935
4936         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4937         ptrace's 4th parameter.
4938
4939 2015-07-27  Yao Qi  <yao.qi@linaro.org>
4940
4941         * configure.srv (case aarch64*-*-linux*): Don't set
4942         srv_linux_usrregs.
4943
4944 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
4945
4946         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4947         sys/ptrace.h.
4948         * linux-arm-low.c: Likewise.
4949         * linux-cris-low.c: Likewise.
4950         * linux-crisv32-low.c: Likewise.
4951         * linux-low.c: Likewise.
4952         * linux-m68k-low.c: Likewise.
4953         * linux-mips-low.c: Likewise.
4954         * linux-nios2-low.c: Likewise.
4955         * linux-s390-low.c: Likewise.
4956         * linux-sparc-low.c: Likewise.
4957         * linux-tic6x-low.c: Likewise.
4958         * linux-tile-low.c: Likewise.
4959         * linux-x86-low.c: Likewise.
4960
4961 2015-07-24  Pedro Alves  <palves@redhat.com>
4962
4963         * config.in: Regenerate.
4964         * configure: Regenerate.
4965
4966 2015-07-24  Pedro Alves  <palves@redhat.com>
4967
4968         * acinclude.m4: Include ../ptrace.m4.
4969         * configure.ac: Call GDB_AC_PTRACE.
4970         * config.in, configure: Regenerate.
4971
4972 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4973
4974         * linux-low.c (linux_create_inferior): Remove setting to
4975         proc->priv->new_inferior.
4976         (linux_attach): Likewise.
4977         (linux_low_filter_event): Likewise.
4978         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4979
4980 2015-07-24  Yao Qi  <yao.qi@linaro.org>
4981
4982         * linux-low.c (linux_arch_setup): New function.
4983         (linux_low_filter_event): If proc->tdesc is NULL and
4984         proc->attached is true, call the_low_target.arch_setup.
4985         Otherwise, keep status pending, and return.
4986         (linux_resume_one_lwp_throw): Don't call get_pc if
4987         thread->while_stepping isn't NULL.  Don't call
4988         get_thread_regcache if proc->tdesc is NULL.
4989         (need_step_over_p): Return 0 if proc->tdesc is NULL.
4990         (linux_target_ops): Install arch_setup.
4991         * server.c (start_inferior): Call the_target->arch_setup.
4992         * target.h (struct target_ops) <arch_setup>: New field.
4993         (target_arch_setup): New marco.
4994         * lynx-low.c (lynx_target_ops): Update.
4995         * nto-low.c (nto_target_ops): Update.
4996         * spu-low.c (spu_target_ops): Update.
4997         * win32-low.c (win32_target_ops): Update.
4998
4999 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5000
5001         * linux-low.c (linux_add_process): Don't set
5002         proc->priv->new_inferior.
5003         (linux_create_inferior): Set proc->priv->new_inferior to 1.
5004         (linux_attach): Likewise.
5005
5006 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5007
5008         * server.c (start_inferior): Code refactor.
5009
5010 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5011
5012         * server.c (process_serial_event): Set general_thread.
5013
5014 2015-07-21  Yao Qi  <yao.qi@linaro.org>
5015
5016         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5017         aarch64_linux_get_debug_reg_capacity.
5018
5019 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5020
5021         * Makefile.in (aarch64-linux-hw-point.o): New rule.
5022         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5023         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5024         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5025         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5026         (AARCH64_HWP_ALIGNMENT): Likewise.
5027         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5028         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5029         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5030         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5031         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5032         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5033         (struct aarch64_debug_reg_state): Likewise.
5034         (struct arch_lwp_info): Likewise.
5035         (aarch64_align_watchpoint): Likewise.
5036         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5037         (aarch64_watchpoint_length): Likewise.
5038         (aarch64_point_encode_ctrl_reg): Likewise
5039         (aarch64_point_is_aligned): Likewise.
5040         (aarch64_align_watchpoint): Likewise.
5041         (aarch64_linux_set_debug_regs):
5042         (aarch64_dr_state_insert_one_point): Likewise.
5043         (aarch64_dr_state_remove_one_point): Likewise.
5044         (aarch64_handle_breakpoint): Likewise.
5045         (aarch64_handle_aligned_watchpoint): Likewise.
5046         (aarch64_handle_unaligned_watchpoint): Likewise.
5047         (aarch64_handle_watchpoint): Likewise.
5048
5049 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5050
5051         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5052         and don't aarch64_get_debug_reg_state.  All callers update.
5053         (aarch64_handle_aligned_watchpoint): Likewise.
5054         (aarch64_handle_unaligned_watchpoint): Likewise.
5055         (aarch64_handle_watchpoint): Likewise.
5056         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5057         (aarch64_remove_point): Likewise.
5058
5059 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5060
5061         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5062         debug_printf.
5063         (aarch64_handle_unaligned_watchpoint): Likewise.
5064
5065 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5066
5067         Revert the previous 3 commits:
5068         Move gdb_regex* to common/
5069         Move linux_find_memory_regions_full & co.
5070         gdbserver build-id attribute generator
5071
5072 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5073             Jan Kratochvil  <jan.kratochvil@redhat.com>
5074
5075         gdbserver build-id attribute generator.
5076         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5077         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5078         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5079         (find_phdr): New.
5080         (get_dynamic): Use find_pdhr to traverse program headers.
5081         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5082         (compare_mapping_entry_range, struct find_memory_region_callback_data)
5083         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5084         (get_hex_build_id): New.
5085         (linux_qxfer_libraries_svr4): Add optional build-id attribute
5086         to reply XML document.
5087
5088 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5089             Jan Kratochvil  <jan.kratochvil@redhat.com>
5090
5091         * target.c: Include target/target-utils.h and fcntl.h.
5092         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5093         (target_fileio_read_stralloc): New functions.
5094
5095 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5096
5097         * Makefile.in (OBS): Add gdb_regex.o.
5098         (gdb_regex.o): New.
5099         * config.in: Rebuilt.
5100         * configure: Rebuilt.
5101
5102 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5103             Jan Kratochvil  <jan.kratochvil@redhat.com>
5104
5105         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5106         * Makefile.in (OBS): Add target-utils.o.
5107         (linux-maps.o, target-utils.o): New.
5108         * configure.srv (srv_linux_obj): Add linux-maps.o.
5109
5110 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
5111
5112         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5113         function, return 1.
5114         (the_low_target): Install it.
5115
5116 2015-07-14  Pedro Alves  <palves@redhat.com>
5117
5118         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5119         Instead, ignore ECHILD, and throw an error for other errnos.
5120
5121 2015-07-10  Pedro Alves  <palves@redhat.com>
5122
5123         * event-loop.c (struct callback_event) <data>: Change type to
5124         gdb_client_data instance instead of gdb_client_data pointer.
5125         (append_callback_event): Adjust.
5126
5127 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
5128
5129         * linux-aarch64-low.c: Add comments for each linux_target_ops
5130         method.  Remove comments already covered in target_ops and
5131         linux_target_ops definitions.
5132         (the_low_target): Add comments for each unimplemented method.
5133
5134 2015-07-09  Yao Qi  <yao.qi@linaro.org>
5135
5136         * linux-aarch64-low.c (aarch64_regmap): Remove.
5137         (aarch64_usrregs_info): Remove.
5138         (regs_info): Set field usrregs to NULL.
5139
5140 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
5141
5142         * linux-low.c: Include "rsp-low.h"
5143         (linux_low_encode_pt_config, linux_low_encode_raw): New.
5144         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5145         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5146         (handle_btrace_enable_pt): New.
5147         (handle_btrace_general_set): Support "pt".
5148         (handle_btrace_conf_general_set): Support "pt:size".
5149
5150 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
5151
5152         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5153         Z_PACKET_SW_BP.
5154
5155 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
5156
5157         * linux-aarch64-low.c: Remove comment about endianness.
5158         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
5159         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
5160         memcmp.
5161
5162 2015-06-24  Gary Benson  <gbenson@redhat.com>
5163
5164         * linux-i386-ipa.c (stdint.h): Do not include.
5165         * lynx-i386-low.c (stdint.h): Likewise.
5166         * lynx-ppc-low.c (stdint.h): Likewise.
5167         * mem-break.c (stdint.h): Likewise.
5168         * thread-db.c (stdint.h): Likewise.
5169         * tracepoint.c (stdint.h): Likewise.
5170         * win32-low.c (stdint.h): Likewise.
5171
5172 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
5173
5174         * server.c (write_qxfer_response): Update call to
5175         remote_escape_output.
5176
5177 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
5178             Jan Kratochvil  <jan.kratochvil@redhat.com>
5179
5180         Merge multiple hex conversions.
5181         * gdbreplay.c (tohex): Rename to 'fromhex'.
5182         (logchar): Use fromhex.
5183
5184 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
5185
5186         * server.c (handle_qxfer_libraries): Set `version' attribute for
5187         <library-list>.
5188
5189 2015-06-10  Gary Benson  <gbenson@redhat.com>
5190
5191         * target.h (struct target_ops) <multifs_open>: New field.
5192         <multifs_unlink>: Likewise.
5193         <multifs_readlink>: Likewise.
5194         * linux-low.c (nat/linux-namespaces.h): New include.
5195         (linux_target_ops): Initialize the_target->multifs_open,
5196         the_target->multifs_unlink and the_target->multifs_readlink.
5197         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5198         * hostio.c (hostio_fs_pid): New static variable.
5199         (hostio_handle_new_gdb_connection): New function.
5200         (handle_setfs): Likewise.
5201         (handle_open): Use the_target->multifs_open as appropriate.
5202         (handle_unlink): Use the_target->multifs_unlink as appropriate.
5203         (handle_readlink): Use the_target->multifs_readlink as
5204         appropriate.
5205         (handle_vFile): Handle vFile:setfs packets.
5206         * server.c (handle_query): Call hostio_handle_new_gdb_connection
5207         after target_handle_new_gdb_connection.
5208
5209 2015-06-10  Gary Benson  <gbenson@redhat.com>
5210
5211         * configure.ac (AC_CHECK_FUNCS): Add setns.
5212         * config.in: Regenerate.
5213         * configure: Likewise.
5214         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5215         (linux-namespaces.o): New rule.
5216         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5217
5218 2015-06-09  Gary Benson <gbenson@redhat.com>
5219
5220         * hostio.c (handle_open): Process mode argument with
5221         fileio_to_host_mode.
5222
5223 2015-06-01  Yao Qi  <yao.qi@linaro.org>
5224
5225         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5226         * linux-x86-low.c: Likewise.
5227
5228 2015-05-28  Don Breazeal  <donb@codesourcery.com>
5229
5230         * linux-low.c (handle_extended_wait): Initialize
5231         thread_info.last_resume_kind for new fork children.
5232
5233 2015-05-15  Pedro Alves  <palves@redhat.com>
5234
5235         * target.h (target_handle_new_gdb_connection): Rewrite using if
5236         wrapped in do/while.
5237
5238 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
5239
5240         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5241         * configure, config.in: Regenerate.
5242         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5243         Declare typedef.
5244
5245 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5246
5247         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5248         PTRACE_EVENT_VFORK_DONE.
5249         (linux_low_ptrace_options, extended_event_reported): Add vfork
5250         events.
5251         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5252         and "vforkdone" for RSP 'T' Stop Reply Packet.
5253         * server.h (report_vfork_events): Declare
5254         global variable.
5255
5256 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5257
5258         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5259         (the_low_target) <new_fork>: Initialize new member.
5260         * linux-arm-low.c (arm_new_fork): New function.
5261         (the_low_target) <new_fork>: Initialize new member.
5262         * linux-low.c (handle_extended_wait): Call new target function
5263         new_fork.
5264         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5265         * linux-mips-low.c (mips_add_watchpoint): New function
5266         extracted from mips_insert_point.
5267         (the_low_target) <new_fork>: Initialize new member.
5268         (mips_linux_new_fork): New function.
5269         (mips_insert_point): Call mips_add_watchpoint.
5270         * linux-x86-low.c (x86_linux_new_fork): New function.
5271         (the_low_target) <new_fork>: Initialize new member.
5272
5273 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5274
5275         * linux-low.c (handle_extended_wait): Implement return value,
5276         rename argument 'event_child' to 'event_lwp', handle
5277         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5278         (linux_low_ptrace_options): New function.
5279         (linux_low_filter_event): Call linux_low_ptrace_options,
5280         use different argument fo linux_enable_event_reporting,
5281         use return value from handle_extended_wait.
5282         (extended_event_reported): New function.
5283         (linux_wait_1): Call extended_event_reported and set
5284         status to report fork events.
5285         (linux_write_memory): Add pid to debug message.
5286         (reset_lwp_ptrace_options_callback): New function.
5287         (linux_handle_new_gdb_connection): New function.
5288         (linux_target_ops): Initialize new structure member.
5289         * linux-low.h (struct lwp_info) <waitstatus>: New member.
5290         * lynx-low.c: Initialize new structure member.
5291         * remote-utils.c (prepare_resume_reply): Implement stop reason
5292         "fork" for "T" stop message.
5293         * server.c (handle_query): Call handle_new_gdb_connection.
5294         * server.h (report_fork_events): Declare global flag.
5295         * target.h (struct target_ops) <handle_new_gdb_connection>:
5296         New member.
5297         (target_handle_new_gdb_connection): New macro.
5298         * win32-low.c: Initialize new structure member.
5299
5300 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5301
5302         * mem-break.c (APPEND_TO_LIST): Define macro.
5303         (clone_agent_expr): New function.
5304         (clone_one_breakpoint): New function.
5305         (clone_all_breakpoints): New function.
5306         * mem-break.h: Declare new functions.
5307
5308 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5309
5310         * linux-low.c (linux_supports_fork_events): New function.
5311         (linux_supports_vfork_events): New function.
5312         (linux_target_ops): Initialize new structure members.
5313         (initialize_low): Call linux_check_ptrace_features.
5314         * lynx-low.c (lynx_target_ops): Initialize new structure
5315         members.
5316         * server.c (report_fork_events, report_vfork_events):
5317         New global flags.
5318         (handle_query): Add new features to qSupported packet and
5319         response.
5320         (captured_main): Initialize new global variables.
5321         * target.h (struct target_ops) <supports_fork_events>:
5322         New member.
5323         <supports_vfork_events>: New member.
5324         (target_supports_fork_events): New macro.
5325         (target_supports_vfork_events): New macro.
5326         * win32-low.c (win32_target_ops): Initialize new structure
5327         members.
5328
5329 2015-05-12  Gary Benson <gbenson@redhat.com>
5330
5331         * server.c (handle_qxfer_exec_file): Use current process
5332         if annex is empty.
5333
5334 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
5335
5336         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
5337         Remove HAVE_PTRACE_GETREGS conditionals.
5338         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5339         instead of PTRACE_GETREGS and PTRACE_SETREGS.
5340
5341 2015-05-08  Yao Qi  <yao.qi@linaro.org>
5342
5343         * linux-low.c (linux_supports_conditional_breakpoints): New
5344         function.
5345         (linux_target_ops): Install new target method.
5346         * lynx-low.c (lynx_target_ops): Install NULL hook for
5347         supports_conditional_breakpoints.
5348         * nto-low.c (nto_target_ops): Likewise.
5349         * spu-low.c (spu_target_ops): Likewise.
5350         * win32-low.c (win32_target_ops): Likewise.
5351         * server.c (handle_query): Check
5352         target_supports_conditional_breakpoints.
5353         * target.h (struct target_ops) <supports_conditional_breakpoints>:
5354         New field.
5355         (target_supports_conditional_breakpoints): New macro.
5356
5357 2015-05-06  Pedro Alves  <palves@redhat.com>
5358
5359         PR server/18081
5360         * server.c (start_inferior): If the process exits, mourn it.
5361
5362 2015-04-21  Gary Benson <gbenson@redhat.com>
5363
5364         * hostio.c (fileio_open_flags_to_host): Factored out to
5365         fileio_to_host_openflags in common/fileio.c.  Single use
5366         updated.
5367
5368 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5369
5370         * linux-xtensa-low.c (xtensa_fill_gregset)
5371         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5372         XCHAL_HAVE_LOOP.
5373
5374 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5375
5376         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5377         (regs_info): Replace usrregs pointer with NULL.
5378
5379 2015-04-17  Gary Benson  <gbenson@redhat.com>
5380
5381         * target.h (struct target_ops) <pid_to_exec_file>: New field.
5382         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5383         * server.c (handle_qxfer_exec_file): New function.
5384         (qxfer_packets): Add exec-file entry.
5385         (handle_query): Report qXfer:exec-file:read as supported packet.
5386
5387 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
5388
5389         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5390
5391 2015-04-09  Gary Benson <gbenson@redhat.com>
5392
5393         * hostio-errno.c (errno_to_fileio_error): Remove function.
5394         Update caller to use remote_fileio_to_fio_error.
5395
5396 2015-04-09  Yao Qi  <yao.qi@linaro.org>
5397
5398         * linux-low.c (linux_insert_point): Call
5399         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5400         (linux_remove_point): Call remove_memory_breakpoint if type is
5401         raw_bkpt_type_sw.
5402         * linux-x86-low.c (x86_insert_point): Don't call
5403         insert_memory_breakpoint.
5404         (x86_remove_point): Don't call remove_memory_breakpoint.
5405
5406 2015-04-01  Pedro Alves  <palves@redhat.com>
5407             Cleber Rosa  <crosa@redhat.com>
5408
5409         * server.c (gdbserver_usage): Reorganize and extend the usage
5410         message.
5411
5412 2015-03-24  Pedro Alves  <palves@redhat.com>
5413
5414         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5415         output.  Also dump TRAP_TRACE.
5416         (linux_low_filter_event): In debug output, distinguish a
5417         resume_stop SIGSTOP from a delayed SIGSTOP.
5418
5419 2015-03-24  Gary Benson  <gbenson@redhat.com>
5420
5421         * linux-x86-low.c (x86_linux_new_thread): Moved to
5422         nat/x86-linux.c.
5423         (x86_linux_prepare_to_resume): Likewise.
5424
5425 2015-03-24  Gary Benson  <gbenson@redhat.com>
5426
5427         * Makefile.in (x86-linux-dregs.o): New rule.
5428         * configure.srv: Add x86-linux-dregs.o to relevant targets.
5429         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5430         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5431         (x86_linux_dr_get): Likewise.
5432         (x86_linux_dr_set): Likewise.
5433         (update_debug_registers_callback): Likewise.
5434         (x86_linux_dr_set_addr): Likewise.
5435         (x86_linux_dr_get_addr): Likewise.
5436         (x86_linux_dr_set_control): Likewise.
5437         (x86_linux_dr_get_control): Likewise.
5438         (x86_linux_dr_get_status): Likewise.
5439         (x86_linux_update_debug_registers): Likewise.
5440
5441 2015-03-24  Gary Benson  <gbenson@redhat.com>
5442
5443         * linux-x86-low.c (x86_linux_update_debug_registers):
5444         New function, factored out from...
5445         (x86_linux_prepare_to_resume): ...this.
5446
5447 2015-03-24  Gary Benson  <gbenson@redhat.com>
5448
5449         * linux-x86-low.c (x86_linux_dr_get): Update comments.
5450         (x86_linux_dr_set): Likewise.
5451         (update_debug_registers_callback): Likewise.
5452         (x86_linux_dr_set_addr): Likewise.
5453         (x86_linux_dr_get_addr): Likewise.
5454         (x86_linux_dr_set_control): Likewise.
5455         (x86_linux_dr_get_control): Likewise.
5456         (x86_linux_dr_get_status): Likewise.
5457         (x86_linux_prepare_to_resume): Likewise.
5458
5459 2015-03-24  Gary Benson  <gbenson@redhat.com>
5460
5461         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5462         Use perror_with_name.  Pass string through gettext.
5463         (x86_linux_dr_set): Likewise.
5464
5465 2015-03-24  Gary Benson  <gbenson@redhat.com>
5466
5467         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5468         (x86_linux_dr_set_addr): ...this.
5469         (x86_dr_low_get_addr): Rename to...
5470         (x86_linux_dr_get_addr): ...this.
5471         (x86_dr_low_set_control): Rename to...
5472         (x86_linux_dr_set_control): ...this.
5473         (x86_dr_low_get_control): Rename to...
5474         (x86_linux_dr_get_control): ...this.
5475         (x86_dr_low_get_status): Rename to...
5476         (x86_linux_dr_get_status): ...this.
5477         (x86_dr_low): Update with new function names.
5478
5479 2015-03-24  Gary Benson  <gbenson@redhat.com>
5480
5481         * Makefile.in (x86-linux.o): New rule.
5482         * configure.srv: Add x86-linux.o to relevant targets.
5483         * linux-low.c (lwp_set_arch_private_info): New function.
5484         (lwp_arch_private_info): Likewise.
5485         * linux-x86-low.c: Include nat/x86-linux.h.
5486         (arch_lwp_info): Removed structure.
5487         (update_debug_registers_callback):
5488         Use lwp_set_debug_registers_changed.
5489         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5490         and lwp_set_debug_registers_changed.
5491         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5492
5493 2015-03-24  Gary Benson  <gbenson@redhat.com>
5494
5495         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5496         * linux-arm-low.c (arm_new_thread): Likewise.
5497         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5498         * linux-mips-low.c (mips_linux_new_thread): Likewise.
5499         * linux-x86-low.c (x86_linux_new_thread): Likewise.
5500         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5501
5502 2015-03-24  Gary Benson  <gbenson@redhat.com>
5503
5504         * linux-low.c (ptid_of_lwp): New function.
5505         (lwp_is_stopped): Likewise.
5506         (lwp_stop_reason): Likewise.
5507         * linux-x86-low.c (update_debug_registers_callback):
5508         Use lwp_is_stopped.
5509         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5510         lwp_stop_reason.
5511
5512 2015-03-24  Gary Benson  <gbenson@redhat.com>
5513
5514         * linux-low.h (linux_stop_lwp): Remove declaration.
5515
5516 2015-03-24  Gary Benson  <gbenson@redhat.com>
5517
5518         * linux-low.h: Include nat/linux-nat.h.
5519         * linux-low.c (iterate_over_lwps_args): New structure.
5520         (iterate_over_lwps_filter): New function.
5521         (iterate_over_lwps): Likewise.
5522         * linux-x86-low.c (update_debug_registers_callback):
5523         Update signature to what iterate_over_lwps expects.
5524         Remove PID check that iterate_over_lwps now performs.
5525         (x86_dr_low_set_addr): Use iterate_over_lwps.
5526         (x86_dr_low_set_control): Likewise.
5527
5528 2015-03-24  Gary Benson  <gbenson@redhat.com>
5529
5530         * linux-x86-low.c (x86_debug_reg_state): New function.
5531         (x86_linux_prepare_to_resume): Use the above.
5532
5533 2015-03-24  Gary Benson  <gbenson@redhat.com>
5534
5535         * linux-low.c (current_lwp_ptid): New function.
5536         * linux-x86-low.c: Include nat/linux-nat.h.
5537         (x86_dr_low_get_addr): Use current_lwp_ptid.
5538         (x86_dr_low_get_control): Likewise.
5539         (x86_dr_low_get_status): Likewise.
5540
5541 2015-03-20  Pedro Alves  <palves@redhat.com>
5542
5543         * tracepoint.c (cmd_qtstatus): Make "str" const.
5544
5545 2015-03-20  Pedro Alves  <palves@redhat.com>
5546
5547         * server.c (handle_general_set): Make "req_str" const.
5548
5549 2015-03-19  Pedro Alves  <palves@redhat.com>
5550
5551         * linux-low.c (linux_resume_one_lwp): Rename to ...
5552         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
5553         instead call perror_with_name.
5554         (check_ptrace_stopped_lwp_gone): New function.
5555         (linux_resume_one_lwp): Reimplement as wrapper around
5556         linux_resume_one_lwp_throw that swallows errors if the LWP is
5557         gone.
5558
5559 2015-03-19  Pedro Alves  <palves@redhat.com>
5560
5561         * linux-low.c (count_events_callback, select_event_lwp_callback):
5562         No longer check whether the thread has resume_stop as last resume
5563         kind.
5564
5565 2015-03-19 Pedro Alves  <palves@redhat.com>
5566
5567         * linux-low.c (count_events_callback, select_event_lwp_callback):
5568         Use the lwp's status_pending_p field, not the thread's.
5569
5570 2015-03-19  Pedro Alves  <palves@redhat.com>
5571
5572         * linux-low.c (select_event_lwp_callback): Update comments to
5573         no longer mention SIGTRAP.
5574
5575 2015-03-18  Gary Benson  <gbenson@redhat.com>
5576
5577         * server.c (handle_query): Do not report vFile:fstat as supported.
5578
5579 2015-03-11  Gary Benson  <gbenson@redhat.com>
5580
5581         * hostio.c (sys/types.h): New include.
5582         (sys/stat.h): Likewise.
5583         (common-remote-fileio.h): Likewise.
5584         (handle_fstat): New function.
5585         (handle_vFile): Handle vFile:fstat packets.
5586
5587 2015-03-11  Gary Benson  <gbenson@redhat.com>
5588
5589         * configure.ac (AC_CHECK_MEMBERS): Add checks for
5590         struct stat.st_blocks and struct stat.st_blksize.
5591         * configure: Regenerate.
5592         * config.in: Likewise.
5593         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5594         (OBS): Add common-remote-fileio.o.
5595         (common-remote-fileio.o): New rule.
5596
5597 2015-03-09  Pedro Alves  <palves@redhat.com>
5598
5599         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5600         'struct sockaddr' pointer in 'accept' call.
5601
5602 2015-03-09  Pedro Alves  <palves@redhat.com>
5603
5604         Revert:
5605         2015-03-07  Pedro Alves  <palves@redhat.com>
5606         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5607         or <winsock2.h> here.  Instead include "gdb_socket.h".
5608         (remote_open): Use union gdb_sockaddr_u.
5609         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5610         or <winsock2.h> here.  Instead include "gdb_socket.h".
5611         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5612         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5613         or <sys/un.h>.
5614         (init_named_socket, gdb_agent_helper_thread): Use union
5615         gdb_sockaddr_u.
5616
5617 2015-03-07  Pedro Alves  <palves@redhat.com>
5618
5619         * configure.ac (build_warnings): Move
5620         -Wdeclaration-after-statement to the C-specific set.
5621         * configure: Regenerate.
5622
5623 2015-03-07  Pedro Alves  <palves@redhat.com>
5624
5625         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5626         or <winsock2.h> here.  Instead include "gdb_socket.h".
5627         (remote_open): Use union gdb_sockaddr_u.
5628         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5629         or <winsock2.h> here.  Instead include "gdb_socket.h".
5630         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5631         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5632         or <sys/un.h>.
5633         (init_named_socket, gdb_agent_helper_thread): Use union
5634         gdb_sockaddr_u.
5635
5636 2015-03-07  Pedro Alves  <palves@redhat.com>
5637
5638         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5639         instead.
5640
5641 2015-03-06  Yao Qi  <yao.qi@linaro.org>
5642
5643         * linux-aarch64-low.c (aarch64_insert_point): Use
5644         show_debug_regs as a boolean.
5645         (aarch64_remove_point): Likewise.
5646
5647 2015-03-05  Pedro Alves  <palves@redhat.com>
5648
5649         * lynx-low.c (lynx_target_ops): Install NULL hooks for
5650         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5651         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5652         * nto-low.c (nto_target_ops): Likewise.
5653         * spu-low.c (spu_target_ops): Likewise.
5654         * win32-low.c (win32_target_ops): Likewise.
5655
5656 2015-03-04  Pedro Alves  <palves@redhat.com>
5657
5658         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5659         Decide whether a breakpoint triggered based on the SIGTRAP's
5660         siginfo.si_code.
5661         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5662         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5663         (linux_low_filter_event): Check for breakpoints before checking
5664         watchpoints.
5665         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5666         siginfo.si_code.
5667         (linux_stopped_by_sw_breakpoint)
5668         (linux_supports_stopped_by_sw_breakpoint)
5669         (linux_stopped_by_hw_breakpoint)
5670         (linux_supports_stopped_by_hw_breakpoint): New functions.
5671         (linux_target_ops): Install new target methods.
5672
5673 2015-03-04  Pedro Alves  <palves@redhat.com>
5674
5675         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5676         * server.c (swbreak_feature, hwbreak_feature): New globals.
5677         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5678         (captured_main): Clear swbreak_feature and hwbreak_feature.
5679         * server.h (swbreak_feature, hwbreak_feature): Declare.
5680         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5681         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5682         supports_stopped_by_hw_breakpoint>: New fields.
5683         (target_supports_stopped_by_sw_breakpoint)
5684         (target_stopped_by_sw_breakpoint)
5685         (target_supports_stopped_by_hw_breakpoint)
5686         (target_stopped_by_hw_breakpoint): Declare.
5687
5688 2015-03-04  Pedro Alves  <palves@redhat.com>
5689
5690         enum lwp_stop_reason -> enum target_stop_reason
5691         * linux-low.c (check_stopped_by_breakpoint): Adjust.
5692         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5693         (linux_wait_1, stuck_in_jump_pad_callback)
5694         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5695         (linux_stopped_by_watchpoint):
5696         * linux-low.h (enum lwp_stop_reason): Delete.
5697         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5698         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5699
5700 2015-03-04  Yao Qi  <yao.qi@linaro.org>
5701
5702         * Makefile.in (SFILES): Add linux-aarch64-low.c.
5703
5704 2015-03-03  Gary Benson  <gbenson@redhat.com>
5705
5706         * hostio.c (handle_vFile): Fix prefix lengths.
5707
5708 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
5709
5710         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5711         ptr_bits.
5712
5713 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5714
5715         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5716         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5717         (clean): Add "rm -f" for above C files.
5718         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5719         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5720         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5721         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5722         * linux-s390-low.c (HWCAP_S390_VX): New macro.
5723         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5724         (init_registers_s390x_vx_linux64)
5725         (init_registers_s390x_tevx_linux64)
5726         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5727         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5728         declarations.
5729         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5730         (s390_store_vxrs_high): New functions.
5731         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5732         NT_S390_VXRS_HIGH.
5733         (s390_arch_setup): Add logic for selecting one of the new target
5734         descriptions.  Activate the new vector regsets if applicable.
5735         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5736         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5737         and init_registers_s390x_tevx_linux64.
5738
5739 2015-03-01  Pedro Alves  <palves@redhat.com>
5740
5741         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5742         parameter.
5743
5744 2015-02-27  Pedro Alves  <palves@redhat.com>
5745
5746         * linux-x86-low.c (u_debugreg_offset): New function.
5747         (x86_linux_dr_get, x86_linux_dr_set): Use it.
5748
5749 2015-02-27  Pedro Alves  <palves@redhat.com>
5750
5751         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5752         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5753         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5754         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5755         (ps_lsetfpregs, ps_getpid)
5756         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5757         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5758         (ps_lsetxregs, ps_plog): Declare.
5759
5760 2015-02-27  Pedro Alves  <palves@redhat.com>
5761
5762         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5763         IP_AGENT_EXPORT_FUNC.
5764         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5765         IP_AGENT_EXPORT_FUNC.
5766         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5767         (IP_AGENT_EXPORT): Delete.
5768         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5769         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5770         (gdb_trampoline_buffer_error, collecting, gdb_collect)
5771         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5772         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5773         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5774         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5775         (traceframe_read_count, traceframe_write_count)
5776         (traceframes_created, trace_state_variables, get_raw_reg)
5777         (get_trace_state_variable_value, set_trace_state_variable_value)
5778         (ust_loaded, helper_thread_id, cmd_buf): Use
5779         IPA_SYM_EXPORTED_NAME.
5780         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5781         (tracepoints) Use IP_AGENT_EXPORT_VAR.
5782         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5783         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5784         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5785         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5786         EXTERN_C_PUSH/EXTERN_C_POP.
5787         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5788         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5789         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5790         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5791         (traceframe_write_count, traceframe_read_count)
5792         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5793         (about_to_request_buffer_space, get_trace_state_variable_value)
5794         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5795         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5796         EXTERN_C_PUSH/EXTERN_C_POP.
5797         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5798         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5799         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5800         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5801         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5802         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5803         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5804         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5805         Define.
5806         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5807         (IP_AGENT_EXPORT_VAR_DECL): Define.
5808         (tracing): Declare.
5809         (gdb_agent_get_raw_reg): Declare.
5810
5811 2015-02-27  Tom Tromey  <tromey@redhat.com>
5812             Pedro Alves  <palves@redhat.com>
5813
5814         Rename symbols whose names are reserved C++ keywords throughout.
5815
5816 2015-02-27  Pedro Alves  <palves@redhat.com>
5817
5818         * Makefile.in (COMPILER): New, get it from autoconf.
5819         (CXX): Get from autoconf instead.
5820         (COMPILE.pre): Use COMPILER.
5821         (CC-LD): Rename to ...
5822         (CC_LD): ... this.  Use COMPILER.
5823         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5824         (CXX_FOR_TARGET): Default to g++ instead of gcc.
5825         * acinclude.m4: Include build-with-cxx.m4.
5826         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5827         Disable -Werror by default if building in C++ mode.
5828         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5829         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5830         the C++ compiler.  Save/restore CXXFLAGS too.
5831         * configure: Regenerate.
5832
5833 2015-02-27  Pedro Alves  <palves@redhat.com>
5834
5835         * acinclude.m4: Include libiberty.m4.
5836         * configure.ac: Call libiberty_INIT.
5837         * config.in, configure: Regenerate.
5838
5839 2015-02-26  Pedro Alves  <palves@redhat.com>
5840
5841         * linux-low.c (linux_wait_1): When incrementing the PC past a
5842         program breakpoint always use the_low_target.breakpoint_len as
5843         increment, rather than the maximum between that and
5844         the_low_target.decr_pc_after_break.
5845
5846 2015-02-23  Pedro Alves  <palves@redhat.com>
5847
5848         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5849         thread was doing a step-over; always adjust the PC if
5850         we stepped over a permanent breakpoint.
5851         (linux_wait_1): If we stepped over breakpoint that was on top of a
5852         permanent breakpoint, manually advance the PC past it.
5853
5854 2015-02-23  Pedro Alves  <palves@redhat.com>
5855
5856         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5857         modes.
5858         (x86_fill_gregset, x86_store_gregset): Use it when handling
5859         $orig_eax.
5860
5861 2015-02-20  Pedro Alves  <palves@redhat.com>
5862
5863         * thread-db.c: Include "nat/linux-procfs.h".
5864         (thread_db_init): Skip listing new threads if the kernel supports
5865         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5866
5867 2015-02-20  Pedro Alves  <palves@redhat.com>
5868
5869         * linux-low.c (status_pending_p_callback): Use ptid_match.
5870
5871 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
5872
5873         PR breakpoints/16812
5874         * linux-low.c (wstatus_maybe_breakpoint): Remove.
5875         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5876         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5877
5878 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
5879
5880         PR breakpoints/15956
5881         * tracepoint.c (cmd_qtinit): Add check for current_thread.
5882
5883 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5884
5885         * linux-low.c (linux_low_btrace_conf): Print size.
5886         * server.c (handle_btrace_conf_general_set): New.
5887         (hanle_general_set): Call handle_btrace_conf_general_set.
5888         (handle_query): Report Qbtrace-conf:bts:size as supported.
5889
5890 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5891
5892         * linux-low.c (linux_low_enable_btrace): Update parameters.
5893         (linux_low_btrace_conf): New.
5894         (linux_target_ops)<to_btrace_conf>: Initialize.
5895         * server.c (current_btrace_conf): New.
5896         (handle_btrace_enable): Rename to ...
5897         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
5898         to target_enable_btrace.  Update comment.  Update users.
5899         (handle_qxfer_btrace_conf): New.
5900         (qxfer_packets): Add btrace-conf entry.
5901         (handle_query): Report qXfer:btrace-conf:read as supported packet.
5902         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5903         (target_ops)<read_btrace_conf>: New.
5904         (target_enable_btrace): Update parameters.
5905         (target_read_btrace_conf): New.
5906
5907 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5908
5909         * server.c (handle_btrace_general_set): Remove call to
5910         target_supports_btrace.
5911         (supported_btrace_packets): New.
5912         (handle_query): Call supported_btrace_packets.
5913         * target.h: include btrace-common.h.
5914         (btrace_target_info): Removed.
5915         (supports_btrace, target_supports_btrace): Update parameters.
5916
5917 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
5918
5919         * Makefile.in (SFILES): Add common/btrace-common.c.
5920         (OBS): Add common/btrace-common.o.
5921         (btrace-common.o): Add build rules.
5922         * linux-low: Include btrace-common.h.
5923         (linux_low_read_btrace): Use struct btrace_data.  Call
5924         btrace_data_init and btrace_data_fini.
5925
5926 2015-02-06  Pedro Alves  <palves@redhat.com>
5927
5928         * thread-db.c (find_new_threads_callback): Add debug output.
5929
5930 2015-02-04  Pedro Alves  <palves@redhat.com>
5931
5932         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5933         (resume_stopped_resumed_lwps): New function.
5934         (linux_wait_for_event_filtered): Use it.
5935
5936 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5937
5938         * Makefile.in (SFILES): Add linux-personality.c.
5939         (linux-personality.o): New rule.
5940         * configure.srv (srv_linux_obj): Add linux-personality.o to the
5941         list of objects to be built.
5942         * linux-low.c: Include nat/linux-personality.h.
5943         (linux_create_inferior): Remove code to disable address space
5944         randomization (moved to ../nat/linux-personality.c).  Create
5945         cleanup to disable address space randomization.
5946
5947 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5948
5949         * Makefile.in (posix-strerror.o): New rule.
5950         (mingw-strerror.o): Likewise.
5951         * configure: Regenerated.
5952         * configure.ac: Source file ../common/common.host.  Initialize new
5953         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
5954
5955 2015-01-14  Yao Qi  <yao@codesourcery.com>
5956
5957         * Makefile.in (SFILES): Add nat/ppc-linux.c.
5958         (ppc-linux.o): New rule.
5959         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5960         * configure.ac: AC_CHECK_FUNCS(getauxval).
5961         * config.in: Re-generated.
5962         * configure: Re-generated.
5963         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5964         ppc64_64bit_inferior_p
5965
5966 2015-01-14  Yao Qi  <yao@codesourcery.com>
5967
5968         * linux-ppc-low.c: Include "nat/ppc-linux.h".
5969          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5970         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
5971         (PT_ORIG_R3, PT_TRAP): Likewise.
5972         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5973         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5974         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5975
5976 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
5977
5978         * i387-fp.c (i387_cache_to_xsave): In look over
5979         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5980         zmmh_low_space field by use of zmmh_high_space.
5981
5982 2015-01-09  Pedro Alves  <palves@redhat.com>
5983
5984         * linux-low.c (step_over_bkpt): Move higher up in the file.
5985         (handle_extended_wait): Don't store the stop_pc here.
5986         (get_stop_pc): Adjust comments and rename to ...
5987         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
5988         stopped for a software breakpoint or hardware breakpoint.
5989         (thread_still_has_status_pending_p): New function.
5990         (status_pending_p_callback): Use
5991         thread_still_has_status_pending_p.  If the event is no longer
5992         interesting, resume the LWP.
5993         (handle_tracepoints): Add assert.
5994         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5995         (wstatus_maybe_breakpoint): New function.
5996         (cancel_breakpoint): Delete function.
5997         (check_stopped_by_watchpoint): New function, factored out from
5998         linux_low_filter_event.
5999         (lp_status_maybe_breakpoint): Delete function.
6000         (linux_low_filter_event): Remove filter_ptid argument.
6001         Leave thread group exits pending here.  Store the LWP's stop PC.
6002         Always leave events pending.
6003         (linux_wait_for_event_filtered): Pull all events out of the
6004         kernel, and leave them all pending.
6005         (count_events_callback, select_event_lwp_callback): Consider all
6006         events.
6007         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6008         (select_event_lwp): Only give preference to the stepping LWP in
6009         all-stop mode.  Adjust comments.
6010         (ignore_event): New function.
6011         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
6012         references to cancel_breakpoints.  Adjust to renames.  Also give
6013         equal priority to all LWPs that have had events in non-stop mode.
6014         If reporting a software breakpoint event, unadjust the LWP's PC.
6015         (linux_wait): If linux_wait_1 returned an ignored event, retry.
6016         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6017         Adjust.
6018         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
6019         (resume_status_pending_p): Use thread_still_has_status_pending_p.
6020         (linux_stopped_by_watchpoint): Adjust.
6021         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6022         * linux-low.h (enum lwp_stop_reason): New.
6023         (struct lwp_info) <stop_pc>: Adjust comment.
6024         <stopped_by_watchpoint>: Delete field.
6025         <stop_reason>: New field.
6026         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6027         * mem-break.c (software_breakpoint_inserted_here)
6028         (hardware_breakpoint_inserted_here): New function.
6029         * mem-break.h (software_breakpoint_inserted_here)
6030         (hardware_breakpoint_inserted_here): Declare.
6031         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6032         (cancel_breakpoints): Delete.
6033         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6034         (upload_fast_traceframes): Remove references to
6035         cancel_breakpoints.
6036
6037 2015-01-09  Pedro Alves  <palves@redhat.com>
6038
6039         * thread-db.c (find_new_threads_callback): Ignore thread if the
6040         kernel thread ID is -1.
6041
6042 2015-01-09  Pedro Alves  <palves@redhat.com>
6043
6044         * linux-low.c (linux_attach_fail_reason_string): Move to
6045         nat/linux-ptrace.c, and rename.
6046         (linux_attach_lwp): Update comment.
6047         (attach_proc_task_lwp_callback): New function.
6048         (linux_attach): Adjust to rename and use
6049         linux_proc_attach_tgid_threads.
6050         (linux_attach_fail_reason_string): Delete declaration.
6051
6052 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
6053
6054         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6055         * server.c (gdbserver_version): Likewise.
6056
6057 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
6058
6059         * remote-utils.c: Include ctype.h.
6060         (input_interrupt): Explicitly handle the case when the char
6061         received is the NUL byte.  Improve the printing of non-ASCII
6062         characters.
6063
6064 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
6065
6066         * linux-low.c (linux_low_filter_event): Update call to
6067         linux_enable_event_reporting following the addition of
6068         a new parameter to that function.
6069
6070 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
6071
6072         PR server/17457
6073         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6074         (AARCH64_FPCR_REGNO): Likewise.
6075         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6076         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6077         (aarch64_store_fpregset): Likewise.
6078
6079 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
6080
6081         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6082         Remove FIXME comment about assumption about N.
6083
6084 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
6085
6086         * configure.ac: If large-file support is disabled in GDBserver,
6087         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6088         * configure: Regenerate.
6089
6090 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6091
6092         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6093         warning upon ENODATA from ptrace.
6094         * linux-s390-low.c (s390_store_tdb): New.
6095         (s390_regsets): Add regset for NT_S390_TDB.
6096
6097 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6098
6099         * linux-low.c (regsets_store_inferior_registers): Skip regsets
6100         without a fill_function.
6101         * linux-s390-low.c (s390_fill_last_break): Remove.
6102         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6103         (s390_arch_setup): Use regset's size instead of fill_function for
6104         loop end condition.
6105
6106 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6107
6108         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6109         the regset's store function when ptrace returned an error.
6110         * regcache.c (get_thread_regcache): Invalidate register cache
6111         before fetching inferior's registers.
6112
6113 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6114
6115         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6116         while-loop as for-loop.
6117         (regsets_store_inferior_registers): Likewise.
6118
6119 2014-11-28  Yao Qi  <yao@codesourcery.com>
6120
6121         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6122         * config.in, configure: Re-generate.
6123         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6124         is defined.
6125
6126 2014-11-21  Yao Qi  <yao@codesourcery.com>
6127
6128         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6129         (AC_CHECK_HEADERS): Remove malloc.h.
6130         * configure: Re-generated.
6131         * config.in: Re-generated.
6132         * server.h: Don't include alloca.h and malloc.h.
6133         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6134         Don't include malloc.h.
6135
6136 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
6137
6138         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6139         corresponding ERRNO check in same block.
6140
6141 2014-11-12  Pedro Alves  <palves@redhat.com>
6142
6143         * server.c (cont_thread): Update comment.
6144         (start_inferior, attach_inferior): No longer clear cont_thread.
6145         (handle_v_cont): No longer set cont_thread.
6146         (captured_main): Clear cont_thread each time a GDB connects.
6147
6148 2014-11-12  Pedro Alves  <palves@redhat.com>
6149
6150         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6151         thread, and don't resume all threads if the Hc thread has exited.
6152
6153 2014-11-12  Pedro Alves  <palves@redhat.com>
6154
6155         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6156         the process group instead of to a specific LWP.
6157
6158 2014-10-15  Pedro Alves  <palves@redhat.com>
6159
6160         PR server/17487
6161         * win32-arm-low.c (arm_set_thread_context): Remove current_event
6162         parameter.
6163         (arm_set_thread_context): Delete.
6164         (the_low_target): Adjust.
6165         * win32-i386-low.c (debug_registers_changed)
6166         (debug_registers_used): Delete.
6167         (update_debug_registers_callback): New function.
6168         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6169         needing to update their debug registers.
6170         (win32_get_current_dr): New function.
6171         (x86_dr_low_get_addr, x86_dr_low_get_control)
6172         (x86_dr_low_get_status): Fetch the debug register from the thread
6173         record's context.
6174         (i386_initial_stuff): Adjust.
6175         (i386_get_thread_context): Remove current_event parameter.  Don't
6176         clear debug_registers_changed nor copy DR values to
6177         debug_reg_state.
6178         (i386_set_thread_context): Delete.
6179         (i386_prepare_to_resume): New function.
6180         (i386_thread_added): Mark the thread as needing to update irs
6181         debug registers.
6182         (the_low_target): Remove i386_set_thread_context and install
6183         i386_prepare_to_resume.
6184         * win32-low.c (win32_get_thread_context): Adjust.
6185         (win32_set_thread_context): Use SetThreadContext
6186         directly.
6187         (win32_prepare_to_resume): New function.
6188         (win32_require_context): New function, factored out from ...
6189         (thread_rec): ... this.
6190         (continue_one_thread): Call win32_prepare_to_resume on each thread
6191         we're about to continue.
6192         (win32_resume): Call win32_prepare_to_resume on the event thread.
6193         * win32-low.h (struct win32_thread_info)
6194         <debug_registers_changed>: New field.
6195         (struct win32_target_ops): Change prototype of set_thread_context,
6196         delete set_thread_context and add prepare_to_resume.
6197         (win32_require_context): New declaration.
6198
6199 2014-10-08  Gary Benson  <gbenson@redhat.com>
6200
6201         * server.h: Do not include common-exceptions.h.
6202
6203 2014-10-08  Gary Benson  <gbenson@redhat.com>
6204
6205         * server.h: Do not include cleanups.h.
6206
6207 2014-09-30  James Hogan  <james.hogan@imgtec.com>
6208
6209         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6210         mips64-dsp-linux.c.
6211
6212 2014-09-23  Yao Qi  <yao@codesourcery.com>
6213
6214         * linux-low.c (lp_status_maybe_breakpoint): New function.
6215         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6216         (count_events_callback): Likewise.
6217         (select_event_lwp_callback): Likewise.
6218         (cancel_breakpoints_callback): Likewise.
6219
6220 2014-09-19  Don Breazeal  <donb@codesourcery.com>
6221
6222         * linux-low.c (handle_extended_wait): Call
6223         linux_ptrace_get_extended_event.
6224         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6225         linux_is_extended_waitstatus.
6226
6227 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
6228
6229         * Makefile.in (CPPFLAGS): Define.
6230         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6231         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6232
6233 2014-09-16  Gary Benson  <gbenson@redhat.com>
6234
6235         * inferiors.h (current_inferior): Renamed as...
6236         (current_thread): New variable.  All uses updated.
6237         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6238         (maybe_move_out_of_jump_pad): Likewise.
6239         (cancel_breakpoint): Likewise.
6240         (linux_low_filter_event): Likewise.
6241         (wait_for_sigstop): Likewise.
6242         (linux_resume_one_lwp): Likewise.
6243         (need_step_over_p): Likewise.
6244         (start_step_over): Likewise.
6245         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6246         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6247         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6248         and save_inferior as saved_thread.
6249         * regcache.c (get_thread_regcache): Renamed saved_inferior as
6250         saved_thread.
6251         (regcache_invalidate_thread): Likewise.
6252         * remote-utils.c (prepare_resume_reply): Likewise.
6253         * thread-db.c (thread_db_get_tls_address): Likewise.
6254         (disable_thread_event_reporting): Likewise.
6255         (remove_thread_event_breakpoints): Likewise.
6256         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6257         as saved_thread.
6258         * target.h (set_desired_inferior): Renamed as...
6259         (set_desired_thread): New declaration.  All uses updated.
6260         * server.c (myresume): Updated comment to reference thread instead
6261         of inferior.
6262         (handle_serial_event): Likewise.
6263         (handle_target_event): Likewise.
6264
6265 2014-09-12  Tom Tromey  <tromey@redhat.com>
6266             Gary Benson  <gbenson@redhat.com>
6267
6268         * regcache.h: Include common-regcache.h.
6269         (regcache_read_pc): Don't declare.
6270         * regcache.c (get_thread_regcache_for_ptid): New function.
6271
6272 2014-09-11  Tom Tromey  <tromey@redhat.com>
6273             Gary Benson  <gbenson@redhat.com>
6274
6275         * symbol.c: New file.
6276         * Makefile.in (SFILES): Add symbol.c.
6277         (OBS): Add symbol.o.
6278
6279 2014-09-11  Gary Benson  <gbenson@redhat.com>
6280
6281         * target.c (target_stop_ptid, target_continue_ptid): New
6282         functions.
6283
6284 2014-09-11  Tom Tromey  <tromey@redhat.com>
6285             Gary Benson  <gbenson@redhat.com>
6286
6287         * target.h: Include target/target.h.
6288         * target.c (target_read_memory, target_read_uint32)
6289         (target_write_memory): New functions.
6290
6291 2014-09-11  Gary Benson  <gbenson@redhat.com>
6292
6293         * server.h (debug_hw_points): Don't declare.
6294         * server.c (debug_hw_points): Don't define.  Replace all uses
6295         with show_debug_regs.
6296         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
6297         all uses with show_debug_regs.
6298
6299 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
6300
6301         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6302         endianness into account.
6303         (ppc_supply_ptrace_register): Likewise.
6304
6305 2014-09-03  James Hogan  <james.hogan@imgtec.com>
6306
6307         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6308         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6309
6310 2014-09-03  Gary Benson  <gbenson@redhat.com>
6311
6312         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6313         ALL_DEBUG_ADDRESS_REGISTERS.
6314
6315 2014-09-02  Gary Benson  <gbenson@redhat.com>
6316
6317         * i386-low.h: Renamed as...
6318         * x86-low.h: New file.  All type, function and variable name
6319         prefixes changed from "i386_" to "x86_".  All references updated.
6320         * i386-low.c: Renamed as...
6321         * x86-low.c: New file.  All type, function and variable name
6322         prefixes changed from "i386_" to "x86_".  All references updated.
6323
6324 2014-09-02  Gary Benson  <gbenson@redhat.com>
6325
6326         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6327         (x86_linux_new_thread): Likewise.
6328
6329 2014-08-29  Gary Benson  <gbenson@redhat.com>
6330
6331         * server.h (setjmp.h): Do not include.
6332         (toplevel): Do not declare.
6333         (common-exceptions.h): Include.
6334         (cleanups.h): Likewise.
6335         * server.c (toplevel): Do not define.
6336         (exit_code): New static global.
6337         (detach_or_kill_for_exit_cleanup): New function.
6338         (main): New function.  Original main renamed to...
6339         (captured_main): New function.
6340         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6341
6342 2014-08-29  Gary Benson  <gbenson@redhat.com>
6343
6344         * Makefile.in (SFILES): Add common/common-exceptions.c.
6345         (OBS): Add common-exceptions.o.
6346         (common-exceptions.o): New rule.
6347         * utils.c (prepare_to_throw_exception): New function.
6348
6349 2014-08-29  Gary Benson  <gbenson@redhat.com>
6350
6351         * config.in: Regenerate.
6352         * configure: Likewise.
6353
6354 2014-08-29  Gary Benson  <gbenson@redhat.com>
6355
6356         * Makefile.in (SFILES): Add common/cleanups.c.
6357         (OBS): cleanups.o.
6358         (cleanups.o): New rule.
6359
6360 2014-08-29  Gary Benson  <gbenson@redhat.com>
6361
6362         * utils.c (internal_vwarning): New function.
6363
6364 2014-08-28  Gary Benson  <gbenson@redhat.com>
6365
6366         * utils.h (fatal): Remove declaration.
6367         * utils.c (fatal): Remove function.
6368
6369 2014-08-28  Gary Benson  <gbenson@redhat.com>
6370
6371         * tracepoint.c (gdb_agent_init): Replace fatal with
6372         perror_with_name.
6373         (initialize_tracepoint): Likewise.
6374
6375 2014-08-28  Gary Benson  <gbenson@redhat.com>
6376
6377         * remote-utils.c (remote_prepare): Replace fatal with error.
6378
6379 2014-08-28  Gary Benson  <gbenson@redhat.com>
6380
6381         * linux-low.c (linux_async): Replace fatal with warning.
6382         Tidy up and return.
6383         (linux_start_non_stop): Return -1 if linux_async failed.
6384
6385 2014-08-28  Gary Benson  <gbenson@redhat.com>
6386
6387         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6388         gdb_assert.
6389         (i386_dr_low_get_addr): Remove vague comment.
6390         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6391         gdb_assert.
6392
6393 2014-08-28  Gary Benson  <gbenson@redhat.com>
6394
6395         * inferiors.c (get_thread_process): Replace check with gdb_assert.
6396         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6397         internal_error.
6398         (linux_resume_one_lwp): Likewise.
6399         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6400         gdb_assert.
6401         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6402         with internal_error.
6403         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6404         (init_register_cache): Replace fatal with gdb_assert_not_reached.
6405         (find_register_by_name): Replace fatal with internal_error.
6406         (find_regno): Likewise.
6407         * tdesc.c (init_target_desc): Replace check with gdb_assert.
6408         * thread-db.c (thread_db_create_event): Likewise.
6409         (thread_db_load_search): Likewise.
6410         (try_thread_db_load_1): Likewise.
6411         * tracepoint.c (get_jump_space_head): Replace fatal with
6412         internal_error.
6413         (claim_trampoline_space): Likewise.
6414         (have_fast_tracepoint_trampoline_buffer): Likewise.
6415         (cmd_qtstart): Likewise.
6416         (stop_tracing): Likewise.
6417         (fast_tracepoint_collecting): Likewise.
6418         (target_malloc): Likewise.
6419         (download_tracepoint): Likewise.
6420         (download_trace_state_variables): Replace check with gdb_assert.
6421         (upload_fast_traceframes): Replace fatal with internal_error.
6422
6423 2014-08-19  Tom Tromey  <tromey@redhat.com>
6424             Gary Benson  <gbenson@redhat.com>
6425
6426         * Makefile.in (SFILES): Add common/common-debug.c.
6427         (OBS): Add common-debug.o.
6428         (common-debug.o): New rule.
6429         * debug.h (debug_printf): Don't declare.
6430         * debug.c (debug_printf): Renamed and rewritten as...
6431         (debug_vprintf): New function.
6432
6433 2014-08-19  Gary Benson  <gbenson@redhat.com>
6434
6435         * utils.h: Do not include print-utils.h.
6436
6437 2014-08-19  Tom Tromey  <tromey@redhat.com>
6438             Gary Benson  <gbenson@redhat.com>
6439
6440         * server.h: Add static assertion.
6441         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6442
6443 2014-08-19  Tom Tromey  <tromey@redhat.com>
6444             Gary Benson  <gbenson@redhat.com>
6445
6446         * Makefile.in (SFILES): Add common/errors.c.
6447         (OBS): Add errors.o.
6448         (IPA_OBS): Add errors-ipa.o.
6449         (errors.o): New rule.
6450         (errors-ipa.o): Likewise.
6451         * utils.h (perror_with_name, error, warning): Don't declare.
6452         * utils.c (warning): Renamed and rewritten as...
6453         (vwarning): New function.
6454         (error): Renamed and rewritten as...
6455         (verror): New function.
6456         (internal_error): Renamed and rewritten as...
6457         (internal_verror): New function.
6458
6459 2014-08-07  Gary Benson  <gbenson@redhat.com>
6460
6461         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6462         * configure: Regenerate.
6463         * config.in: Likewise.
6464         * server.h: Do not include errno.h.
6465         * event-loop.c: Likewise.
6466         * hostio-errno.c: Likewise.
6467         * linux-low.c: Likewise.
6468         * remote-utils.c: Likewise.
6469         * spu-low.c: Likewise.
6470         * utils.c: Likewise.
6471         * gdbreplay.c: Unconditionally include errno.h.
6472
6473 2014-08-07  Gary Benson  <gbenson@redhat.com>
6474
6475         * server.h: Do not include string.h.
6476         * event-loop.c: Likewise.
6477         * linux-low.c: Likewise.
6478         * regcache.c: Likewise.
6479         * remote-utils.c: Likewise.
6480         * spu-low.c: Likewise.
6481         * utils.c: Likewise.
6482
6483 2014-08-07  Gary Benson  <gbenson@redhat.com>
6484
6485         * server.h: Do not include gdb_assert.h.
6486
6487 2014-08-07  Gary Benson  <gbenson@redhat.com>
6488
6489         * server.h: Do not include common-utils.h.
6490
6491 2014-08-07  Gary Benson  <gbenson@redhat.com>
6492
6493         * server.h: Do not include ptid.h.
6494         * notif.h: Likewise.
6495
6496 2014-08-07  Gary Benson  <gbenson@redhat.com>
6497
6498         * server.h: Do not include gdb_locale.h.
6499
6500 2014-08-07  Gary Benson  <gbenson@redhat.com>
6501
6502         * server.h: Do not include gdb/signals.h.
6503         * win32-low.c: Likewise.
6504
6505 2014-08-07  Gary Benson  <gbenson@redhat.com>
6506
6507         * server.h: Do not include pathmax.h.
6508
6509 2014-08-07  Gary Benson  <gbenson@redhat.com>
6510
6511         * server.h: Do not include libiberty.h.
6512         * linux-bfin-low.c: Likewise.
6513
6514 2014-08-07  Gary Benson  <gbenson@redhat.com>
6515
6516         * server.h: Do not include ansidecl.h.
6517
6518 2014-08-07  Gary Benson  <gbenson@redhat.com>
6519
6520         * linux-x86-low.c: Do not include stddef.h.
6521         * lynx-ppc-low.c: Likewise.
6522         * tracepoint.c: Likewise.
6523
6524 2014-08-07  Gary Benson  <gbenson@redhat.com>
6525
6526         * server.h: Do not include stdarg.h.
6527         * nto-low.c: Likewise.
6528
6529 2014-08-07  Gary Benson  <gbenson@redhat.com>
6530
6531         * server.h: Do not include stdlib.h.
6532         * inferiors.c: Likewise.
6533         * linux-low.c: Likewise.
6534         * regcache.c: Likewise.
6535         * spu-low.c: Likewise.
6536         * tracepoint.c: Likewise.
6537         * utils.c: Likewise.
6538
6539 2014-08-07  Gary Benson  <gbenson@redhat.com>
6540
6541         * server.h: Do not include stdio.h.
6542         * linux-low.c: Likewise.
6543         * remote-utils.c: Likewise.
6544         * spu-low.c: Likewise.
6545         * utils.c: Likewise.
6546         * wincecompat.c: Likewise.
6547
6548 2014-08-06  Gary Benson  <gbenson@redhat.com>
6549
6550         * regcache.c (init_register_cache): Move conditionals inside if.
6551
6552 2014-08-06  Gary Benson  <gbenson@redhat.com>
6553
6554         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6555
6556 2014-07-31  Gary Benson  <gbenson@redhat.com>
6557
6558         * ax.h: Do not include server.h.
6559         * gdbthread.h: Likewise.
6560         * lynx-low.h: Likewise.
6561         * notif.h: Likewise.
6562
6563 2014-07-30  Gary Benson  <gbenson@redhat.com>
6564
6565         * server.h: Include common-defs.h.
6566         Do not include config.h or build-gnulib-gdbserver/config.h.
6567
6568 2014-07-30  Gary Benson  <gbenson@redhat.com>
6569
6570         * hostio-errno.c: Move server.h to top of includes list.
6571         * inferiors.c: Likewise.
6572         * linux-x86-low.c: Likewise.
6573         * notif.c: Include server.h.
6574
6575 2014-07-24  Tom Tromey  <tromey@redhat.com>
6576             Gary Benson  <gbenson@redhat.com>
6577
6578         * server.h (CORE_ADDR): Now unsigned.
6579
6580 2014-07-16  Pedro Alves  <palves@redhat.com>
6581
6582         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6583
6584 2014-07-15  Pedro Alves  <palves@redhat.com>
6585
6586         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6587         copy.
6588
6589 2014-07-11  Pedro Alves  <palves@redhat.com>
6590
6591         * linux-low.c (kill_wait_lwp): New function, based on
6592         kill_one_lwp_callback, but use my_waitpid directly.
6593         (kill_one_lwp_callback, linux_kill): Use it.
6594
6595 2014-06-23  Pedro Alves  <palves@redhat.com>
6596
6597         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6598         before setting DR0..DR3.
6599
6600 2014-06-20  Gary Benson  <gbenson@redhat.com>
6601
6602         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6603         * configure: Regenerated.
6604         * config.in: Likewise.
6605
6606 2014-06-20  Gary Benson  <gbenson@redhat.com>
6607
6608         * Makefile.in (SFILES): Update locations for files moved
6609         from common to nat.
6610         (object file files): Reordered.
6611
6612 2014-06-20  Gary Benson  <gbenson@redhat.com>
6613
6614         * i386-low.h (i386_dr_low_can_set_addr): Removed.
6615         (i386_dr_low_set_addr): Likewise.
6616         (i386_dr_low_get_addr): Likewise.
6617         (i386_dr_low_can_set_control): Likewise.
6618         (i386_dr_low_set_control): Likewise.
6619         (i386_dr_low_get_control): Likewise.
6620         (i386_dr_low_get_status): Likewise.
6621         (i386_get_debug_register_length): Likewise.
6622         * linux-x86-low.c (i386_dr_low_set_addr):
6623         Changed signature.  Made static.
6624         (i386_dr_low_get_addr): Likewise.
6625         (i386_dr_low_set_control): Likewise.
6626         (i386_dr_low_get_control): Likewise.
6627         (i386_dr_low_get_status): Likewise.
6628         (i386_dr_low): New global variable.
6629         * win32-i386-low.c (i386_dr_low_set_addr):
6630         Changed signature.  Made static.
6631         (i386_dr_low_get_addr): Likewise.
6632         (i386_dr_low_set_control): Likewise.
6633         (i386_dr_low_get_control): Likewise.
6634         (i386_dr_low_get_status): Likewise.
6635         (i386_dr_low): New global variable.
6636
6637 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6638
6639         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6640         * Makefile.in (AR, AR_FLAGS): Define.
6641         * configure: Regenerate.
6642
6643 2014-06-19  Gary Benson  <gbenson@redhat.com>
6644
6645         * Makefile.in (i386-dregs.o): New rule.
6646         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6647         * i386-low.c (target.h): Remove include.
6648         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6649         (DR_CONTROL_SHIFT): Likewise.
6650         (DR_CONTROL_SIZE): Likewise.
6651         (DR_RW_EXECUTE): Likewise.
6652         (DR_RW_WRITE): Likewise.
6653         (DR_RW_READ): Likewise.
6654         (DR_RW_IORW): Likewise.
6655         (DR_LEN_1): Likewise.
6656         (DR_LEN_2): Likewise.
6657         (DR_LEN_4): Likewise.
6658         (DR_LEN_8): Likewise.
6659         (DR_LOCAL_ENABLE_SHIFT): Likewise.
6660         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6661         (DR_ENABLE_SIZE): Likewise.
6662         (DR_LOCAL_SLOWDOWN): Likewise.
6663         (DR_GLOBAL_SLOWDOWN): Likewise.
6664         (DR_CONTROL_RESERVED): Likewise.
6665         (I386_DR_CONTROL_MASK): Likewise.
6666         (I386_DR_VACANT): Likewise.
6667         (I386_DR_LOCAL_ENABLE): Likewise.
6668         (I386_DR_GLOBAL_ENABLE): Likewise.
6669         (I386_DR_DISABLE): Likewise.
6670         (I386_DR_SET_RW_LEN): Likewise.
6671         (I386_DR_GET_RW_LEN): Likewise.
6672         (I386_DR_WATCH_HIT): Likewise.
6673         (i386_wp_op_t): Likewise.
6674         (i386_show_dr): Likewise.
6675         (i386_length_and_rw_bits): Likewise.
6676         (i386_insert_aligned_watchpoint): Likewise.
6677         (i386_remove_aligned_watchpoint): Likewise.
6678         (i386_handle_nonaligned_watchpoint): Likewise.
6679         i386_update_inferior_debug_regs(): Likewise.
6680         (i386_dr_insert_watchpoint): Likewise.
6681         (i386_dr_remove_watchpoint): Likewise.
6682         (i386_dr_region_ok_for_watchpoint): Likewise.
6683         (i386_dr_stopped_data_address): Likewise.
6684         (i386_dr_stopped_by_watchpoint): Likewise.
6685
6686 2014-06-19  Gary Benson  <gbenson@redhat.com>
6687
6688         * i386-low.c (i386_dr_show): Renamed to
6689         i386_show_dr and made static.  All uses updated.
6690         (i386_dr_length_and_rw_bits): Renamed to
6691         i386_length_and_rw_bits and made static.
6692         All uses updated.
6693         (i386_dr_insert_aligned_watchpoint): Renamed to
6694         i386_insert_aligned_watchpoint and made static.
6695         All uses updated.
6696         (i386_dr_remove_aligned_watchpoint): Renamed to
6697         i386_remove_aligned_watchpoint and made static.
6698         All uses updated.
6699         (i386_dr_update_inferior_debug_regs): Renamed to
6700         i386_update_inferior_debug_regs and made static.
6701         All uses updated.
6702
6703 2014-06-18  Gary Benson  <gbenson@redhat.com>
6704
6705         * i386-low.h (i386_dr_low_can_set_addr): New macro.
6706         (i386_dr_low_can_set_control): Likewise.
6707         (i386_get_debug_register_length): Likewise.
6708         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6709         (i386_dr_low_can_set_control): Likewise.
6710         (i386_get_debug_register_length): Likewise.
6711
6712 2014-06-17  Gary Benson  <gbenson@redhat.com>
6713
6714         * i386-low.h (i386-dregs.h): New include.
6715         (DR_FIRSTADDR): Now in i386-dregs.h.
6716         (DR_LASTADDR): Likewise.
6717         (DR_NADDR): Likewise.
6718         (DR_STATUS): Likewise.
6719         (DR_CONTROL): Likewise.
6720         (i386_debug_reg_state): Likewise.
6721         (i386_dr_insert_watchpoint): Likewise.
6722         (i386_dr_remove_watchpoint): Likewise.
6723         (i386_dr_region_ok_for_watchpoint): Likewise.
6724         (i386_dr_stopped_data_address): Likewise.
6725         (i386_dr_stopped_by_watchpoint): Likewise.
6726         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6727
6728 2014-06-18  Gary Benson  <gbenson@redhat.com>
6729
6730         * i386-low.h (i386_low_insert_watchpoint): Renamed to
6731         i386_dr_insert_watchpoint.
6732         (i386_low_remove_watchpoint): Renamed to
6733         i386_dr_remove_watchpoint.
6734         (i386_low_region_ok_for_watchpoint): Renamed to
6735         i386_dr_region_ok_for_watchpoint.
6736         (i386_low_stopped_data_address): Renamed to
6737         i386_dr_stopped_data_address.
6738         (i386_low_stopped_by_watchpoint): Renamed to
6739         i386_dr_stopped_by_watchpoint.
6740         * i386-low.c (i386_show_dr): Renamed to
6741         i386_dr_show and made nonstatic.  All uses updated.
6742         (i386_length_and_rw_bits): Renamed to
6743         i386_dr_length_and_rw_bits and made nonstatic.
6744         All uses updated.
6745         (i386_insert_aligned_watchpoint): Renamed to
6746         i386_dr_insert_aligned_watchpoint and made nonstatic.
6747         All uses updated.
6748         (i386_remove_aligned_watchpoint): Renamed to
6749         i386_dr_remove_aligned_watchpoint and made nonstatic.
6750         All uses updated.
6751         (i386_update_inferior_debug_regs): Renamed to
6752         i386_dr_update_inferior_debug_regs and made nonstatic.
6753         All uses updated.
6754         (i386_low_insert_watchpoint): Renamed to
6755         i386_dr_insert_watchpoint.  All uses updated.
6756         (i386_low_remove_watchpoint): Renamed to
6757         i386_dr_remove_watchpoint.  All uses updated.
6758         (i386_low_region_ok_for_watchpoint): Renamed to
6759         i386_dr_region_ok_for_watchpoint.  All uses updated.
6760         (i386_low_stopped_data_address): Renamed to
6761         i386_dr_stopped_data_address.  All uses updated.
6762         (i386_low_stopped_by_watchpoint): Renamed to
6763         i386_dr_stopped_by_watchpoint.  All uses updated.
6764
6765 2014-06-18  Gary Benson  <gbenson@redhat.com>
6766
6767         * i386-low.c (i386_dr_low_can_set_addr): New macro.
6768         (i386_dr_low_can_set_control): Likewise.
6769         (i386_insert_aligned_watchpoint): New check.
6770
6771 2014-06-18  Gary Benson  <gbenson@redhat.com>
6772
6773         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6774         Renamed to state.
6775
6776 2014-06-18  Gary Benson  <gbenson@redhat.com>
6777
6778         * i386-low.c (i386_length_and_rw_bits): Use internal_error
6779         instead of fatal and error.
6780         (i386_handle_nonaligned_watchpoint): Likewise.
6781
6782 2014-06-18  Gary Benson  <gbenson@redhat.com>
6783
6784         * i386-low.c (i386_get_debug_register_length): New macro.
6785         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
6786         (i386_show_dr): Use debug_printf instead of fprintf.  Use
6787         phex to format values.
6788
6789 2014-06-18  Gary Benson  <gbenson@redhat.com>
6790
6791         * i386-low.h: Comment changes.
6792         * i386-low.c: Likewise.
6793
6794 2014-06-18  Gary Benson  <gbenson@redhat.com>
6795
6796         * i386-low.c: Whitespace changes.
6797
6798 2014-06-12  Tom Tromey  <tromey@redhat.com>
6799
6800         * utils.c (freeargv): Remove.
6801
6802 2014-06-12  Tom Tromey  <tromey@redhat.com>
6803
6804         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6805         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6806         (parse_debug_format_options): Likewise.
6807         (gdbserver_usage): Likewise.
6808         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6809         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6810         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6811         against libiberty.
6812         ($(LIBGNU)): Depend on libiberty.
6813         (all-lib): Recurse into all subdirs.
6814         (install-only): Invoke "install" target in subdirs.
6815         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6816         targets.
6817         * configure: Rebuild.
6818         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
6819         for vasprintf, vsnprintf, or gettimeofday.
6820         * configure.srv: Don't add safe-ctype.o or lbasename.o to
6821         srv_tgtobj.
6822
6823 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
6824
6825         * development.sh: Delete.
6826         * Makefile.in (config.status): Adjust dependency on development.sh.
6827         * configure.ac: Adjust development.sh source call.
6828         * configure: Regenerate.
6829
6830 2014-06-02  Pedro Alves  <palves@redhat.com>
6831
6832         * ax.c (gdb_free_agent_expr): New function.
6833         * ax.h (gdb_free_agent_expr): New declaration.
6834         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6835         list.
6836         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6837         static.
6838         (clear_breakpoint_conditions_and_commands): New function.
6839         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6840         (clear_breakpoint_conditions_and_commands): New declaration.
6841
6842 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6843
6844         * linux-aarch64-low.c (asm/ptrace.h): Include.
6845
6846 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
6847
6848         Fix TLS access for -static -pthread.
6849         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6850         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6851         (thread_db_load_search, try_thread_db_load_1): Initialize it.
6852
6853 2014-05-20  Pedro Alves  <palves@redhat.com>
6854
6855         * linux-aarch64-low.c (aarch64_insert_point)
6856         (aarch64_remove_point): No longer check whether the type is
6857         supported here.  Adjust to new interface.
6858         (the_low_target): Install aarch64_supports_z_point_type as
6859         supports_z_point_type method.
6860         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6861         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6862         instead of a Z packet char.  Adjust.
6863         (arm_supports_z_point_type): New function.
6864         (arm_insert_point, arm_remove_point): Adjust to new interface.
6865         (the_low_target): Install arm_supports_z_point_type.
6866         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6867         (cris_insert_point, cris_remove_point): Adjust to new interface.
6868         Don't check whether the type is supported here.
6869         (the_low_target): Install cris_supports_z_point_type.
6870         * linux-low.c (linux_supports_z_point_type): New function.
6871         (linux_insert_point, linux_remove_point): Adjust to new interface.
6872         * linux-low.h (struct linux_target_ops) <insert_point,
6873         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
6874         raw_breakpoint pointer parameter.
6875         <supports_z_point_type>: New method.
6876         * linux-mips-low.c (mips_supports_z_point_type): New function.
6877         (mips_insert_point, mips_remove_point): Adjust to new interface.
6878         Use mips_supports_z_point_type.
6879         (the_low_target): Install mips_supports_z_point_type.
6880         * linux-ppc-low.c (the_low_target): Install NULL as
6881         supports_z_point_type method.
6882         * linux-s390-low.c (the_low_target): Install NULL as
6883         supports_z_point_type method.
6884         * linux-sparc-low.c (the_low_target): Install NULL as
6885         supports_z_point_type method.
6886         * linux-x86-low.c (x86_supports_z_point_type): New function.
6887         (x86_insert_point): Adjust to new insert_point interface.  Use
6888         insert_memory_breakpoint.  Adjust to new
6889         i386_low_insert_watchpoint interface.
6890         (x86_remove_point): Adjust to remove_point interface.  Use
6891         remove_memory_breakpoint.  Adjust to new
6892         i386_low_remove_watchpoint interface.
6893         (the_low_target): Install x86_supports_z_point_type.
6894         * lynx-low.c (lynx_target_ops): Install NULL as
6895         supports_z_point_type callback.
6896         * nto-low.c (nto_supports_z_point_type): New.
6897         (nto_insert_point, nto_remove_point): Adjust to new interface.
6898         (nto_target_ops): Install nto_supports_z_point_type.
6899         * mem-break.c: Adjust intro comment.
6900         (struct raw_breakpoint) <raw_type, size>: New fields.
6901         <inserted>: Update comment.
6902         <shlib_disabled>: Delete field.
6903         (enum bkpt_type) <gdb_breakpoint>: Delete value.
6904         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6905         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6906         (raw_bkpt_type_to_target_hw_bp_type): New function.
6907         (find_enabled_raw_code_breakpoint_at): New function.
6908         (find_raw_breakpoint_at): New type and size parameters.  Use them.
6909         (insert_memory_breakpoint): New function, based off
6910         set_raw_breakpoint_at.
6911         (remove_memory_breakpoint): New function.
6912         (set_raw_breakpoint_at): Reimplement.
6913         (set_breakpoint): New, based on set_breakpoint_at.
6914         (set_breakpoint_at): Reimplement.
6915         (delete_raw_breakpoint): Go through the_target->remove_point
6916         instead of assuming memory breakpoints.
6917         (find_gdb_breakpoint_at): Delete.
6918         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6919         (find_gdb_breakpoint): New function.
6920         (set_gdb_breakpoint_at): Delete.
6921         (z_type_supported): New function.
6922         (set_gdb_breakpoint_1): New function, loosely based off
6923         set_gdb_breakpoint_at.
6924         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6925         (delete_gdb_breakpoint_at): Delete.
6926         (delete_gdb_breakpoint_1): New function, loosely based off
6927         delete_gdb_breakpoint_at.
6928         (delete_gdb_breakpoint): New function.
6929         (clear_gdb_breakpoint_conditions): Rename to ...
6930         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
6931         breakpoint.
6932         (add_condition_to_breakpoint): Make static.
6933         (add_breakpoint_condition): Take a struct breakpoint pointer
6934         instead of an address.  Adjust.
6935         (gdb_condition_true_at_breakpoint): Rename to ...
6936         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6937         z_type parameter.
6938         (gdb_condition_true_at_breakpoint): Reimplement.
6939         (add_breakpoint_commands): Take a struct breakpoint pointer
6940         instead of an address.  Adjust.
6941         (gdb_no_commands_at_breakpoint): Rename to ...
6942         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
6943         parameter.  Return true if no breakpoint was found.  Change debug
6944         output.
6945         (gdb_no_commands_at_breakpoint): Reimplement.
6946         (run_breakpoint_commands): Rename to ...
6947         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
6948         and change return type to boolean.
6949         (run_breakpoint_commands): New function.
6950         (gdb_breakpoint_here): Also check for Z1 breakpoints.
6951         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6952         breakpoint.  Go through the_target->remove_point instead of
6953         assuming memory breakpoint.
6954         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6955         software and hardware breakpoints.
6956         (reinsert_raw_breakpoint): Go through the_target->insert_point
6957         instead of assuming memory breakpoint.
6958         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6959         software and hardware breakpoints.
6960         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6961         Check both software and hardware breakpoints.
6962         (validate_inserted_breakpoint): Assert the breakpoint is a
6963         software breakpoint.  Set the inserted flag to -1 instead of
6964         setting shlib_disabled.
6965         (delete_disabled_breakpoints): Adjust.
6966         (validate_breakpoints): Only validate software breakpoints.
6967         Adjust to inserted flag change.
6968         (check_mem_read, check_mem_write): Skip breakpoint types other
6969         than software breakpoints.  Adjust to inserted flag change.
6970         * mem-break.h (enum raw_bkpt_type): New enum.
6971         (raw_breakpoint, struct process_info): Forward declare.
6972         (Z_packet_to_target_hw_bp_type): Delete declaration.
6973         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6974         (set_gdb_breakpoint, delete_gdb_breakpoint)
6975         (clear_breakpoint_conditions): New declarations.
6976         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6977         (breakpoint_inserted_here): Update comment.
6978         (add_breakpoint_condition, add_breakpoint_commands): Replace
6979         address parameter with a breakpoint pointer parameter.
6980         (gdb_breakpoint_here): Update comment.
6981         (delete_gdb_breakpoint_at): Delete.
6982         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6983         * server.c (process_point_options): Take a struct breakpoint
6984         pointer instead of an address.  Adjust.
6985         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6986         delete_gdb_breakpoint.
6987         * spu-low.c (spu_target_ops): Install NULL as
6988         supports_z_point_type method.
6989         * target.h: Include mem-break.h.
6990         (struct target_ops) <prepare_to_access_memory>: Update comment.
6991         <supports_z_point_type>: New field.
6992         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6993         instead of a char.  Also take a raw breakpoint pointer.
6994         * win32-arm-low.c (the_low_target): Install NULL as
6995         supports_z_point_type.
6996         * win32-i386-low.c (i386_supports_z_point_type): New function.
6997         (i386_insert_point, i386_remove_point): Adjust to new interface.
6998         (the_low_target): Install i386_supports_z_point_type.
6999         * win32-low.c (win32_supports_z_point_type): New function.
7000         (win32_insert_point, win32_remove_point): Adjust to new interface.
7001         (win32_target_ops): Install win32_supports_z_point_type.
7002         * win32-low.h (struct win32_target_ops):
7003         <supports_z_point_type>: New method.
7004         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7005         instead of a char.  Also take a raw breakpoint pointer.
7006
7007 2014-05-20  Pedro Alves  <palves@redhat.com>
7008
7009         * mem-break.h: Include break-common.h.
7010         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7011         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7012         (Z_packet_to_target_hw_bp_type): New declaration.
7013         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7014         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7015         (Z_PACKET_ACCESS_WP): Delete macros.
7016         (Z_packet_to_hw_type): Delete function.
7017         * i386-low.h: Don't include break-common.h here.
7018         (Z_packet_to_hw_type): Delete declaration.
7019         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7020         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7021         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7022         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7023         * linux-aarch64-low.c: Don't include break-common.h here.
7024         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7025         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7026         (Z_packet_to_target_hw_bp_type): Delete function.
7027         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7028         function.
7029         (mips_insert_point, mips_remove_point): Use
7030         Z_packet_to_target_hw_bp_type.
7031
7032 2014-05-20  Pedro Alves  <palves@redhat.com>
7033
7034         * linux-aarch64-low.c: Include break-common.h.
7035         (enum target_point_type): Delete.
7036         (Z_packet_to_point_type): Rename to ...
7037         (Z_packet_to_target_hw_bp_type): ... this, and return a
7038         target_hw_bp_type instead.
7039         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7040         instead of an enum target_point_type.
7041         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
7042         breakpoint type.
7043         (aarch64_dr_state_insert_one_point)
7044         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7045         (aarch64_handle_aligned_watchpoint)
7046         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7047         Take an enum target_hw_bp_type instead of an enum
7048         target_point_type.
7049         (aarch64_supports_z_point_type): New function.
7050         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
7051         use Z_packet_to_target_hw_bp_type.
7052
7053 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
7054
7055         * configure.ac: Only use -Werror by default when DEVELOPMENT
7056         is true.
7057         * configure: Regenerate.
7058
7059 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
7060
7061         Fix gdbserver qGetTLSAddr for x86_64 -m32.
7062         * linux-x86-low.c (X86_64_USER_REGS): New.
7063         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7064
7065 2014-04-28  Yao Qi  <yao@codesourcery.com>
7066
7067         * Makefile.in (i386-avx512.c): Fix the typo of generated file
7068         name.
7069
7070 2014-04-25  Pedro Alves  <palves@redhat.com>
7071
7072         PR server/16255
7073         * linux-low.c (linux_attach_fail_reason_string): New function.
7074         (linux_attach_lwp): Delete.
7075         (linux_attach_lwp_1): Rename to ...
7076         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
7077         argument.  Remove "initial" parameter.  Return int instead of
7078         void.  Don't error or warn here.
7079         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
7080         failure to attach to the tgid.  Call warning when failing to
7081         attach to an lwp.
7082         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7083         argument.  Remove "initial" parameter.  Return int instead of
7084         void.  Don't error or warn here.
7085         (linux_attach_fail_reason_string): New declaration.
7086         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7087         interface change.  Use linux_attach_fail_reason_string.
7088
7089 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
7090             Walfred Tedeschi  <walfred.tedeschi@intel.com>
7091
7092         * Makefile.in: Added rules to handle new files
7093         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7094         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7095         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7096         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7097         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7098         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7099         x32-avx512-linux.o.
7100         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7101         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7102         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7103         i386/x32-avx512.xml.
7104         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7105         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7106         i386/x32-avx512-linux.xml.
7107         * i387-fp.c (num_avx512_k_registers): New constant for number
7108         of K registers.
7109         (num_avx512_zmmh_low_registers): New constant for number of
7110         lower ZMM registers (0-15).
7111         (num_avx512_zmmh_high_registers): New constant for number of
7112         higher ZMM registers (16-31).
7113         (num_avx512_ymmh_registers): New contant for number of higher
7114         YMM registers (ymm16-31 added by avx521 on x86_64).
7115         (num_avx512_xmm_registers): New constant for number of higher
7116         XMM registers (xmm16-31 added by AVX512 on x86_64).
7117         (struct i387_xsave): Add space for AVX512 registers.
7118         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7119         Add code to handle AVX512 registers.
7120         (i387_xsave_to_cache): Add code to handle AVX512 registers.
7121         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7122         prototypei from generated file.
7123         (tdesc_amd64_avx512_linux): Likewise.
7124         (init_registers_x32_avx512_linux): Likewise.
7125         (tdesc_x32_avx512_linux): Likewise.
7126         (init_registers_i386_avx512_linux): Likewise.
7127         (tdesc_i386_avx512_linux): Likewise.
7128         (x86_64_regmap): Add AVX512 registers.
7129         (x86_linux_read_description): Add code to handle AVX512 XSTATE
7130         mask.
7131         (initialize_low_arch): Add code to initialize AVX512 registers.
7132
7133 2014-04-23  Pedro Alves  <palves@redhat.com>
7134
7135         * mem-break.c (find_gdb_breakpoint_at): Make static.
7136         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7137
7138 2014-04-23  Pedro Alves  <palves@redhat.com>
7139
7140         * i386-low.c: Don't include break-common.h here.
7141         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7142         prototype to take target_hw_bp_type as argument instead of a Z
7143         packet char.
7144         * i386-low.h: Include break-common.h here.
7145         (Z_packet_to_hw_type): Declare.
7146         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7147         prototypes.
7148         * linux-x86-low.c (x86_insert_point): Convert the packet number to
7149         a target_hw_bp_type before calling i386_low_insert_watchpoint.
7150         (x86_remove_point): Convert the packet number to a
7151         target_hw_bp_type before calling i386_low_remove_watchpoint.
7152         * win32-i386-low.c (i386_insert_point): Convert the packet number
7153         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7154         (i386_remove_point): Convert the packet number to a
7155         target_hw_bp_type before calling i386_low_remove_watchpoint.
7156
7157 2014-04-23  Pedro Alves  <palves@redhat.com>
7158
7159         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7160
7161 2014-04-10  Pedro Alves  <palves@redhat.com>
7162
7163         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7164         Check if the condition or command is NULL before checking if the
7165         breakpoint is known.  On success, return true.
7166         * mem-break.h (add_breakpoint_condition): Document return.
7167         (add_breakpoint_commands): Add describing comment.
7168         * server.c (skip_to_semicolon): New function.
7169         (process_point_options): Use it.
7170
7171 2014-04-09  Pedro Alves  <palves@redhat.com>
7172
7173         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7174         to lwpid_of.
7175
7176 2014-02-27  Pedro Alves  <palves@redhat.com>
7177
7178         PR 12702
7179         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7180         macros.
7181         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7182         output.
7183         (last_thread_of_process_p): Take a PID argument instead of a
7184         thread pointer.
7185         (linux_wait_for_lwp): Delete.
7186         (num_lwps, check_zombie_leaders, not_stopped_callback): New
7187         functions.
7188         (linux_low_filter_event): New function, party factored out from
7189         linux_wait_for_event.
7190         (linux_wait_for_event): Rename to ...
7191         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
7192         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
7193         sigsuspend.  Check for zombie leaders.
7194         (linux_wait_for_event): Reimplement as wrapper around
7195         linux_wait_for_event_filtered.
7196         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
7197         a normal or signal exit is seen, it's the whole process exiting.
7198         (wait_for_sigstop): No longer a for_each_inferior callback.
7199         Rewrite on top of linux_wait_for_event_filtered.
7200         (stop_all_lwps): Call wait_for_sigstop directly.
7201         * server.c (resume, handle_target_event): Handle
7202         TARGET_WAITKIND_NO_RESUMED.
7203
7204 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7205
7206         * win32-low.c (psapi_get_dll_name,
7207         * win32_CreateToolhelp32Snapshot): Delete.
7208         (win32_CreateToolhelp32Snapshot, win32_Module32First)
7209         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7210         Delete.
7211         (handle_load_dll): Add function description.
7212         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7213
7214 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7215
7216         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7217         Add comment.
7218         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7219         base address when calling win32_add_one_solib.
7220         (handle_load_dll): Delete local variable load_addr.
7221         Remove 0x1000 offset applied to DLL base address when calling
7222         win32_add_one_solib.
7223         (handle_unload_dll): Add comment.
7224
7225 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7226
7227         * win32-low.c (win32_add_all_dlls): Renames
7228         win32_ensure_ntdll_loaded.  Rewrite function documentation.
7229         Adjust implementation to always load all DLLs.
7230         Add 0x1000 offset to DLL base address when calling
7231         win32_add_one_solib.
7232         (child_initialization_done): New static global.
7233         (do_initial_child_stuff): Set child_initialization_done to
7234         zero during child initialization, and 1 after.  Replace call
7235         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7236         Add comment.
7237         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7238         (handle_unload_dll): Add function documentation.
7239         (get_child_debug_event): Ignore load and unload DLL events
7240         during child initialization.
7241
7242 2014-02-20  Doug Evans  <dje@google.com>
7243
7244         Remove global all_lwps.
7245         * inferiors.h (ptid_of): Move here from linux-low.h.
7246         (pid_of, lwpid_of): Ditto.
7247         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7248         parameter is a struct thread_info * now.
7249         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7250         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
7251         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7252         directly.
7253         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7254         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7255         * linux-arm-low.c (update_registers_callback): Update, "entry"
7256         parameter is a struct thread_info * now.
7257         Fetch lwpid from current_inferior directly.
7258         (arm_insert_point): Pass &all_threads to find_inferior instead of
7259         &all_lwps.
7260         (arm_remove_point): Ditto.
7261         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7262         (arm_prepare_to_resume): Fetch pid from thread.
7263         (arm_read_description): Fetch lwpid from current_inferior directly.
7264         * linux-low.c (all_lwps): Delete.
7265         (delete_lwp): Delete call to remove_inferior.
7266         (handle_extended_wait): Fetch lwpid from thread.
7267         (add_lwp): Don't set lwp->entry.id.  Remove call to
7268         add_inferior_to_list.
7269         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7270         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7271         (kill_one_lwp_callback): Ditto.
7272         (linux_kill): Don't dereference NULL pointer.
7273         Fetch ptid,lwpid from thread.
7274         (get_detach_signal): Fetch ptid from thread.
7275         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7276         Simplify call to regcache_invalidate_thread.
7277         (delete_lwp_callback): Update, "entry" parameter is a
7278         struct thread_info * now.  Fetch pid from thread.
7279         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7280         (status_pending_p_callback): Update, "entry" parameter is a
7281         struct thread_info * now.  Fetch ptid from thread.
7282         (find_lwp_pid): Update, "entry" parameter is a
7283         struct thread_info * now.
7284         (linux_wait_for_lwp): Fetch pid from thread.
7285         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7286         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7287         (enqueue_one_deferred_signal): Fetch lwpid from thread.
7288         (dequeue_one_deferred_signal): Ditto.
7289         (cancel_breakpoint): Fetch ptid from current_inferior.
7290         (linux_wait_for_event): Pass &all_threads to find_inferior,
7291         not &all_lwps.  Fetch ptid, lwpid from thread.
7292         (count_events_callback): Update, "entry" parameter is a
7293         struct thread_info * now.
7294         (select_singlestep_lwp_callback): Ditto.
7295         (select_event_lwp_callback): Ditto.
7296         (cancel_breakpoints_callback): Ditto.
7297         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7298         not &all_lwps.
7299         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
7300         (unsuspend_one_lwp): Update, "entry" parameter is a
7301         struct thread_info * now.
7302         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7303         not &all_lwps.
7304         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
7305         Fetch lwpid from thread, not lwp.
7306         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7307         Pass &all_threads to find_inferior, not &all_lwps.
7308         (send_sigstop): Fetch lwpid from thread, not lwp.
7309         (send_sigstop_callback): Update, "entry" parameter is a
7310         struct thread_info * now.
7311         (suspend_and_send_sigstop_callback): Ditto.
7312         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
7313         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7314         struct thread_info * now.
7315         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
7316         from thread, lwp.
7317         (lwp_running): Update, "entry" parameter is a
7318         struct thread_info * now.
7319         (stop_all_lwps): Fetch ptid from thread.
7320         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7321         (linux_resume_one_lwp): Fetch lwpid from thread.
7322         (linux_set_resume_request): Update, "entry" parameter is a
7323         struct thread_info * now.  Fetch pid, lwpid from thread.
7324         (resume_status_pending_p): Update, "entry" parameter is a
7325         struct thread_info * now.
7326         (need_step_over_p): Ditto.  Fetch lwpid from thread.
7327         (start_step_over): Fetch lwpid from thread.
7328         (linux_resume_one_thread): Update, "entry" parameter is a
7329         struct thread_info * now.  Fetch lwpid from thread.
7330         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7331         (proceed_one_lwp): Update, "entry" parameter is a
7332         struct thread_info * now.  Fetch lwpid from thread.
7333         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7334         struct thread_info * now.
7335         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7336         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
7337         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7338         directly.
7339         (regsets_store_inferior_registers): Ditto.
7340         (fetch_register, store_register): Ditto.
7341         (linux_read_memory, linux_write_memory): Ditto.
7342         (linux_request_interrupt): Ditto.
7343         (linux_read_auxv): Ditto.
7344         (linux_xfer_siginfo): Ditto.
7345         (linux_qxfer_spu): Ditto.
7346         (linux_qxfer_libraries_svr4): Ditto.
7347         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7348         moved to inferiors.h.
7349         (get_lwp): Delete.
7350         (get_thread_lwp): Update.
7351         (struct lwp_info): Delete member "entry".  Simplify comment for
7352         member "thread".
7353         (all_lwps): Delete.
7354         * linux-mips-low.c (mips_read_description): Fetch lwpid from
7355         current_inferior directly.
7356         (update_watch_registers_callback): Update, "entry" parameter is a
7357         struct thread_info * now.  Fetch pid from thread.
7358         (mips_linux_prepare_to_resume): Fetch ptid from thread.
7359         (mips_insert_point): Fetch lwpid from current_inferior.
7360         Pass &all_threads to find_inferior, not &all_lwps.
7361         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7362         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7363         directly.
7364         (mips_stopped_data_address): Ditto.
7365         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7366         directly.
7367         * linux-tile-low.c (tile_arch_setup): Ditto.
7368         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7369         (update_debug_registers_callback): Update, "entry" parameter is a
7370         struct thread_info * now.  Fetch pid from thread.
7371         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7372         Pass &all_threads to find_inferior, not &all_lwps.
7373         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7374         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7375         Pass &all_threads to find_inferior, not &all_lwps.
7376         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7377         (i386_dr_low_get_status): Ditto.
7378         (x86_linux_prepare_to_resume): Fetch ptid from thread.
7379         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7380         (x86_linux_read_description): Ditto.
7381         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7382
7383 2014-02-20  Doug Evans  <dje@google.com>
7384
7385         * inferiors.c (get_first_inferior): Fix buglet.
7386
7387 2014-02-19  Doug Evans  <dje@google.com>
7388
7389         * gdbthread.h (add_thread): Change result type to struct thread_info *.
7390         * inferiors.c (add_thread): Change result type to struct thread_info *.
7391         All callers updated.
7392         (add_lwp): Call add_thread here instead of in callers.
7393         All callers updated.
7394         * linux-low.h (get_lwp_thread): Rewrite.
7395         (struct lwp_info): New member "thread".
7396
7397 2014-02-19  Doug Evans  <dje@google.com>
7398
7399         * linux-low.c (add_lwp): Change result to struct lwp_info *.
7400         All callers updated.
7401
7402 2014-02-19  Doug Evans  <dje@google.com>
7403
7404         * inferiors.c (add_thread): Fix whitespace.
7405
7406 2014-02-19  Doug Evans  <dje@google.com>
7407
7408         * dll.c (clear_dlls): Replace accessing list implemention details
7409         with API function.
7410         * gdbthread.h (get_first_thread): Declare.
7411         * inferiors.c (for_each_inferior_with_data): New function.
7412         (get_first_thread): New function.
7413         (find_thread_ptid): Simplify.
7414         (get_first_inferior): New function.
7415         (clear_list): Delete.
7416         (one_inferior_p): New function.
7417         (clear_inferior_list): New function.
7418         (clear_inferiors): Update.
7419         * inferiors.h (for_each_inferior_with_data): Declare.
7420         (clear_inferior_list): Declare.
7421         (one_inferior_p): Declare.
7422         (get_first_inferior): Declare.
7423         * linux-low.c (linux_wait_for_event): Replace accessing list
7424         implemention details with API function.
7425         * server.c (target_running): Ditto.
7426         (accumulate_file_name_length): New function.
7427         (emit_dll_description): New function.
7428         (handle_qxfer_libraries): Replace accessing list implemention
7429         details with API function.
7430         (handle_qxfer_threads_worker): New function.
7431         (handle_qxfer_threads_proper): Replace accessing list implemention
7432         details with API function.
7433         (handle_query): Ditto.
7434         (visit_actioned_threads_callback_ftype): New typedef.
7435         (visit_actioned_threads_data): New struct.
7436         (visit_actioned_threads): Rewrite to be find_inferior callback.
7437         (resume): Call find_inferior.
7438         (handle_status): Replace accessing list implemention
7439         details with API function.
7440         (process_serial_event): Replace accessing list implemention details
7441         with API function.
7442         * target.c (set_desired_inferior): Replace accessing list implemention
7443         details with API function.
7444         * tracepoint.c (same_process_p): New function.
7445         (gdb_agent_about_to_close): Replace accessing list implemention
7446         details with API function.
7447         * win32-low.c (child_delete_thread): Replace accessing list
7448         implemention details with API function.
7449         (match_dll_by_basename): New function.
7450         (dll_is_loaded_by_basename): New function.
7451         (win32_ensure_ntdll_loaded): Replace accessing list implemention
7452         details call to dll_is_loaded_by_basename.
7453
7454 2014-02-19  Doug Evans  <dje@google.com>
7455
7456         * dll.h (struct dll_info): Add comment.
7457         * gdbthread.h (struct thread_info): Add comment.
7458         (current_ptid): Simplify.
7459         * inferiors.c (add_process): Update.
7460         (remove_process): Update.
7461         * inferiors.h (struct process_info): Rename member "head" to "entry".
7462         * linux-low.c (delete_lwp): Update.
7463         (add_lwp): Update.
7464         (last_thread_of_process_p): Update.
7465         (kill_one_lwp_callback, linux_kill): Update.
7466         (status_pending_p_callback): Update.
7467         (wait_for_sigstop): Update.  Simplify read of ptid.
7468         (start_step_over): Update.
7469         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7470         (get_lwp_thread): Update.
7471         (struct lwp_info): Rename member "head" to "entry".
7472         * regcache.h (inferior_list_entry): Delete.
7473         * server.c (kill_inferior_callback): Update.
7474         (detach_or_kill_inferior_callback): Update.
7475         (print_started_pid): Update.
7476         (print_attached_pid): Update.
7477         (process_serial_event): Simplify read of ptid.
7478         * thread-db.c (thread_db_create_event): Update.
7479         (thread_db_get_tls_address): Update.
7480         * win32-low.c (current_inferior_ptid): Simplify.
7481
7482 2014-02-19  Tom Tromey  <tromey@redhat.com>
7483
7484         * target.h (struct target_ops) <supports_btrace>: Add target_ops
7485         argument.
7486         (target_supports_btrace): Update.
7487
7488 2014-02-14  Yao Qi  <yao@codesourcery.com>
7489
7490         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7491         (rsp-low-ipa.o): New target.
7492
7493 2014-02-12  Tom Tromey  <tromey@redhat.com>
7494
7495         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7496         convert_ascii_to_int.
7497         * regcache.c (registers_to_string): Likewise.
7498         * remote-utils.c (decode_M_packet): Likewise.
7499         * server.c (process_serial_event): Likewise.
7500
7501 2014-02-12  Tom Tromey  <tromey@redhat.com>
7502
7503         * server.c (handle_query, handle_v_run): Use hex2bin, not
7504         unhexify.
7505         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7506
7507 2014-02-12  Tom Tromey  <tromey@redhat.com>
7508
7509         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7510         convert_int_to_ascii.
7511         * regcache.c (registers_to_string, collect_register_as_string):
7512         Likewise.
7513         * remote-utils.c (look_up_one_symbol, relocate_instruction):
7514         Likewise.
7515         * server.c (process_serial_event): Likewise.
7516         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7517         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7518
7519 2014-02-12  Tom Tromey  <tromey@redhat.com>
7520
7521         * remote-utils.c (look_up_one_symbol, monitor_output): Use
7522         bin2hex, not hexify.
7523         * tracepoint.c (cmd_qtstatus): Likewise.
7524
7525 2014-02-12  Tom Tromey  <tromey@redhat.com>
7526
7527         * remote-utils.c (monitor_output): Pass explicit length to
7528         hexify.
7529
7530 2014-02-12  Tom Tromey  <tromey@redhat.com>
7531
7532         * tracepoint.c: Include rsp-low.h.
7533         * server.c: Include rsp-low.h.
7534         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7535         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7536         declare.
7537         * remote-utils.c: Include rsp-low.h.
7538         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7539         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7540         (convert_int_to_ascii, convert_ascii_to_int): Move to
7541         common/rsp-low.c.
7542         * regcache.c: Include rsp-low.h.
7543         * ax.c: Include rsp-low.h.
7544         * Makefile.in (SFILES): Add common/rsp-low.c.
7545         (OBS): Add rsp-low.o.
7546         (rsp-low.o): New target.
7547
7548 2014-02-12  Tom Tromey  <tromey@redhat.com>
7549
7550         * utils.h (pulongest, plongest, phex_nz): Don't declare.
7551         Include print-utils.h.
7552         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7553         (plongest, thirty_two, phex_nz): Remove.
7554         * Makefile.in (SFILES): Add common/print-utils.c.
7555         (OBS): Add print-utils.o.
7556         (print-utils-ipa.o): New target.
7557         (print-utils.o): New target.
7558         (IPA_OBJS): Add print-utils-ipa.o.
7559
7560 2014-02-06  Tom Tromey  <tromey@redhat.com>
7561
7562         * Makefile.in (SFILES): Fix indentation.
7563
7564 2014-02-05  Doug Evans  <dje@google.com>
7565
7566         * linux-low.c (linux_wait_for_event): Improve comment.
7567         (linux_wait_1): Keep current_inferior in sync with event_child.
7568
7569 2014-01-22  Doug Evans  <dje@google.com>
7570
7571         * gdbthread.h (gdb_id_to_thread): Delete, unused.
7572
7573 2014-01-22  Doug Evans  <dje@google.com>
7574
7575         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7576         * configure: Regenerate.
7577         * config.in: Regenerate.
7578         * Makefile.in (SFILES): Add debug.c.
7579         (OBS): Add debug.o.
7580         * debug.c: New file.
7581         * debug.h: New file.
7582         * linux-aarch64-low.c (*): Update all debugging printfs to use
7583         debug_printf instead of fprintf.
7584         * linux-arm-low.c (*): Ditto.
7585         * linux-cris-low.c (*): Ditto.
7586         * linux-crisv32-low.c (*): Ditto.
7587         * linux-m32r-low.c (*): Ditto.
7588         * linux-sparc-low.c (*): Ditto.
7589         * linux-x86.c (*): Ditto.
7590         * linux-low.c (*): Ditto.
7591         (linux_wait_1): Add calls to debug_enter, debug_exit.
7592         (linux_wait): Remove redundant debugging printf.
7593         (stop_all_lwps): Add calls to debug_enter, debug_exit.
7594         (linux_resume, unstop_all_lwps): Ditto.
7595         * mem-break.c (*): Update all debugging printfs to use
7596         debug_printf instead of fprintf.
7597         * remote-utils.c (*): Ditto.
7598         * thread-db.c (*): Ditto.
7599         * server.c #include <ctype.h>, "gdb_vecs.h".
7600         (debug_threads): Moved to debug.c.
7601         (*): Update all debugging printfs to use debug_printf instead of
7602         fprintf.
7603         (start_inferior): Replace call to fflush with call to debug_flush.
7604         (monitor_show_help): Mention set debug-format.
7605         (parse_debug_format_options): New function.
7606         (handle_monitor_command): Handle "monitor set debug-format".
7607         (gdbserver_usage): Mention --debug-format.
7608         (main): Parse --debug-format.
7609         * server.h (debug_threads): Declaration moved to debug.h.
7610         #include "debug.h".
7611         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7612         trace_debug_1 that uses debug_printf.
7613         (tracepoint_look_up_symbols): Update all debugging printfs to use
7614         debug_printf instead of fprintf.
7615
7616 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
7617
7618         * linux-xtensa-low.c: Include asm/ptrace.h instead of
7619         sys/ptrace.h.
7620
7621 2014-01-17  Pedro Alves  <palves@redhat.com>
7622
7623         PR build/16445
7624         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7625         defined after including gdb_proc_service.h.
7626
7627 2014-01-16  Doug Evans  <dje@google.com>
7628
7629         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7630         (match_dll): Use it.
7631
7632 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
7633
7634         * target.h (target_ops) <read_btrace>: Change parameters and
7635         return type to allow error reporting.
7636         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
7637         trace reading errors on.
7638         * linux-low.c (linux_low_read_btrace): Pass trace reading
7639         errors on.
7640         (linux_low_disable_btrace): New.
7641
7642 2014-01-15  Doug Evans  <dje@google.com>
7643
7644         * inferiors.c (thread_id_to_gdb_id): Delete.
7645         * inferiors.h (thread_id_to_gdb_id): Delete.
7646
7647 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
7648
7649         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7650         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
7651         versions.
7652
7653 2014-01-08  Pedro Alves  <palves@redhat.com>
7654
7655         * server.c (handle_status): Don't discard previous queued stop
7656         replies or thread's pending status here.
7657         (main) <disconnection>: Do it here instead.
7658
7659 2014-01-08  Pedro Alves  <palves@redhat.com>
7660
7661         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7662         * server.c (visit_actioned_threads, handle_pending_status): New
7663         function.
7664         (handle_v_cont): Factor out parts to ...
7665         (resume): ... this new function.  If in all-stop, and a thread
7666         being resumed has a pending status, report it without actually
7667         resuming.
7668         (myresume): Adjust to use the new 'resume' function.
7669         (clear_pending_status_callback, set_pending_status_callback)
7670         (find_status_pending_thread_callback): New functions.
7671         (handle_status): Handle the case of multiple threads having
7672         interesting statuses to report.  Report threads' real last signal
7673         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
7674         with an interesting thread to report the status for, instead of
7675         always reporting the status of the first thread.
7676
7677 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
7678
7679         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7680         * gdbreplay.c (gdbreplay_version): Likewise.
7681
7682 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
7683
7684         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7685         iov.iov_len with the real length in use.
7686
7687 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
7688
7689         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7690         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7691         for all targets that use win32-low.c.
7692         * win32-low.c (win32_ensure_ntdll_loaded): New function.
7693         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7694
7695 2013-12-13  Pedro Alves  <palves@redhat.com>
7696
7697         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7698         if equal to TARGET_WAITKIND_LOADED.
7699         * win32-low.c (cached_status): New static global.
7700         (win32_wait): Add declaration.
7701         (do_initial_child_stuff): Flush all initial pending debug events
7702         up to the initial breakpoint.
7703         (win32_wait): If CACHED_STATUS was set, return that instead
7704         of doing a real wait.  Remove the code resuming the execution
7705         of the inferior after receiving a TARGET_WAITKIND_LOADED event
7706         during the initial phase.  Also remove the code changing
7707         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7708         TARGET_WAITKIND_STOPPED.
7709
7710 2013-12-11  Yao Qi  <yao@codesourcery.com>
7711
7712         * notif.c (handle_notif_ack): Return 0 if no notification
7713         matches.
7714
7715 2013-11-20  Doug Evans  <dje@google.com>
7716
7717         * linux-low.c (linux_set_resume_request): Fix comment.
7718
7719 2013-11-20  Doug Evans  <dje@google.com>
7720
7721         * linux-low.c (resume_status_pending_p): Tweak comment.
7722
7723 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7724
7725         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7726         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7727         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7728         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7729         (srv_amd64_regobj): Add amd64-mpx.o.
7730         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7731         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7732         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7733         * i387-fp.c (num_pl_bnd_register) Added constant.
7734         (num_pl_bnd_cfg_registers) Added constant.
7735         (struct i387_xsave) Added reserved area and MPX fields.
7736         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7737         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7738         function.
7739         (tdesc_i386_mpx_linux): Add MPX amd64 target.
7740         (init_registers_amd64_mpx_linux): Declare new function.
7741         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7742         (x86_64_regmap): Add MPX registers.
7743         (x86_linux_read_description): Add MPX case.
7744         (initialize_low_arch): Initialize MPX targets.
7745
7746 2013-11-18  Tom Tromey  <tromey@redhat.com>
7747
7748         * configure: Rebuild.
7749         * configure.ac: Don't check for stdlib.h.
7750         * gdbreplay.c: Unconditionally include stdlib.h.
7751
7752 2013-11-18  Tom Tromey  <tromey@redhat.com>
7753
7754         * config.in: Rebuild.
7755         * configure: Rebuild.
7756         * configure.ac: Don't use AC_HEADER_DIRENT.
7757
7758 2013-11-18  Tom Tromey  <tromey@redhat.com>
7759
7760         * server.h: Don't check HAVE_STRING_H.
7761         * gdbreplay.c: Don't check HAVE_STRING_H.
7762         * configure: Rebuild.
7763
7764 2013-11-18  Tom Tromey  <tromey@redhat.com>
7765
7766         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7767         LIBGNU.
7768
7769 2013-11-08  Tom Tromey  <tromey@redhat.com>
7770
7771         * configure, config.in: Rebuild.
7772         * configure.ac: Remove unused configury.
7773
7774 2013-11-08  Tom Tromey  <tromey@redhat.com>
7775
7776         * acinclude.m4: Include common.m4, codeset.m4.
7777         * configure, config.in: Rebuild.
7778         * configure.ac: Use GDB_AC_COMMON.
7779
7780 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7781
7782         * linux-s390-low.c (HWCAP_S390_TE): New define.
7783         (s390_arch_setup): Consider the TE field in the HWCAP for
7784         determining 'have_regset_tdb'.
7785
7786 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
7787
7788         PR gdb/16014
7789         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7790         call to sizeof.
7791
7792 2013-10-02  Pedro Alves  <palves@redhat.com>
7793
7794         * server.c (process_serial_event): Don't output "GDBserver
7795         exiting" if GDB is connected through stdio.
7796         * target.c (mywait): Likewise, be silent if GDB is connected
7797         through stdio.
7798
7799 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
7800
7801         * lynx-low.c (lynx_add_threads_after_attach): New function.
7802         (lynx_attach): Remove call to add_thread.  Add call to
7803         lynx_add_threads_after_attach instead.
7804
7805 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
7806
7807         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7808         * config.in, configure: Regenerated.
7809
7810 2013-09-18  Yao Qi  <yao@codesourcery.com>
7811
7812         PR server/15959
7813         * server.c (start_inferior): Clear 'resume_info'.
7814
7815 2013-09-16  Jiong Wang  <jiwang@tilera.com>
7816
7817         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7818         for each register.
7819
7820 2013-09-16  Jiong Wang  <jiwang@tilera.com>
7821
7822         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7823         linux-tile-low.o to srv_tgtobj.
7824
7825 2013-09-16  Will Newton  <will.newton@linaro.org>
7826
7827         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7828         out regs.
7829
7830 2013-09-06  Pedro Alves  <palves@redhat.com>
7831
7832         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7833         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7834         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7835         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7836         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7837         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7838
7839 2013-09-06  Pedro Alves  <palves@redhat.com>
7840
7841         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7842         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7843
7844 2013-09-06  Pedro Alves  <palves@redhat.com>
7845
7846         * linux-amd64-ipa.c: Include tracepoint.h.
7847         * linux-i386-ipa.c: Include tracepoint.h.
7848
7849 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
7850
7851         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7852         (ps_get_thread_area): New function.
7853
7854 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
7855
7856         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7857         (initialize_low_arch): Call init_registers_crisv32 rather than
7858         init_register_crisv32.
7859
7860 2013-09-05  Pedro Alves  <palves@redhat.com>
7861
7862         * server.h (handle_vFile, hostio_last_error_from_errno): Move
7863         to ...
7864         * hostio.h: ... this new file.
7865         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7866         win32-low.c: Include hostio.h.
7867
7868 2013-09-05  Pedro Alves  <palves@redhat.com>
7869
7870         * server.h (gdb_client_data, handler_func, callback_handler_func)
7871         (delete_file_handler, add_file_handler, append_callback_event)
7872         (delete_callback_event, start_event_loop, initialize_event_loop):
7873         Move to event-loop.h and include it.
7874         * event-loop.h: New file.
7875
7876 2013-09-05  Pedro Alves  <palves@redhat.com>
7877
7878         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7879         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7880         (loaded_dll, unloaded_dll): Move to ...
7881         * dll.h: ... this new file.
7882         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7883
7884 2013-09-05  Pedro Alves  <palves@redhat.com>
7885
7886         * server.h (current_process, get_thread_process, all_processes)
7887         (add_inferior_to_list, for_each_inferior, current_inferior)
7888         (remove_inferior, add_process, remove_process, find_process_pid)
7889         (have_started_inferiors_p, have_attached_inferiors_p)
7890         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7891         (clear_inferiors, find_inferior, find_inferior_id)
7892         (inferior_target_data, set_inferior_target_data)
7893         (inferior_regcache_data, set_inferior_regcache_data): Move to
7894         inferiors.h, and include it.
7895         * inferiors.h: New file.
7896
7897 2013-09-05  Pedro Alves  <palves@redhat.com>
7898
7899         * server.h (struct emit_ops, current_insn_ptr, emit_error):
7900         Move ...
7901         * ax.h: ... here.
7902
7903 2013-09-05  Pedro Alves  <palves@redhat.com>
7904
7905         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7906         tracepoint.h.
7907         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7908         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7909         (handle_tracepoint_general_set, handle_tracepoint_query)
7910         (tracepoint_finished_step, tracepoint_was_hit)
7911         (release_while_stepping_state_list, current_traceframe)
7912         (in_readonly_region, traceframe_read_mem)
7913         (fetch_traceframe_registers, traceframe_read_sdata)
7914         (traceframe_read_info, struct fast_tpoint_collect_status)
7915         (fast_tracepoint_collecting, force_unlock_trace_buffer)
7916         (handle_tracepoit_bkpts, initialize_low_tracepoint)
7917         (supply_fast_tracepoint_registers)
7918         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7919         (ipa_tdesc, claim_trampoline_space)
7920         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7921         (agent_mem_read, agent_get_trace_state_variable_value)
7922         (agent_set_trace_state_variable_value, agent_tsv_read)
7923         (agent_mem_read_string, get_raw_reg_func_addr)
7924         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7925         * tracepoint.h: ... this new file.
7926
7927 2013-09-05  Pedro Alves  <palves@redhat.com>
7928
7929         * server.h (perror_with_name, error, fatal, warning, paddress)
7930         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7931         include it.
7932         * utils.h: New file.
7933
7934 2013-09-05  Pedro Alves  <palves@redhat.com>
7935
7936         * server.h (remote_debug, noack_mode, transport_is_reliable)
7937         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7938         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7939         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7940         (write_enn, initialize_async_io, enable_async_io)
7941         (disable_async_io, check_remote_input_interrupt_request)
7942         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7943         (dead_thread_notify, prepare_resume_reply)
7944         (decode_address_to_semicolon, decode_address, decode_m_packet)
7945         (decode_M_packet, decode_X_packet, decode_xfer_write)
7946         (decode_search_memory_packet, unhexify, hexify)
7947         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7948         (look_up_one_symbol, relocate_instruction)
7949         (monitor_output): Move to remote-utils.h, and include it.
7950         * remote-utils.h: New file.
7951
7952 2013-09-05  Pedro Alves  <palves@redhat.com>
7953
7954         * server.h (_): Delete.
7955
7956 2013-09-02  Pedro Alves  <palves@redhat.com>
7957
7958         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7959         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7960         allocated.
7961         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7962
7963 2013-09-02  Pierre Muller  <muller@sourceware.org>
7964
7965         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7966         or WriteProcessMemory complete successfully and handle
7967         ERROR_PARTIAL_COPY error.
7968
7969 2013-09-02  Pedro Alves  <palves@redhat.com>
7970
7971         * server.c (gdb_read_memory): Return -1 on traceframe memory read
7972         error instead of EIO.
7973
7974 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7975
7976         PR server/15604
7977         * linux-low.c: Include filestuff.h.
7978         (linux_create_inferior) <pid == 0>: Call close_most_fds.
7979         * lynx-low.c: Include filestuff.h.
7980         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7981         * server.c: Include filestuff.h.
7982         (main): Call notice_open_fds.
7983         * spu-low.c: Include filestuff.h.
7984         (spu_create_inferior) <pid == 0>: Call close_most_fds.
7985
7986 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
7987
7988         * Makefile.in: Explain why ../target and ../nat are not
7989         listed as include file search paths.
7990         (linux-waitpid.o): New object file rule.
7991         * configure.srv (srv_native_linux_obj): New variable.
7992         Replace all occurrences of linux native object files with
7993         $srv_native_linux_obj.
7994         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7995         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7996         (linux_enable_event_reporting): Remove declaration.
7997         (my_waitpid): Moved to common/linux-waitpid.c.
7998         (linux_wait_for_event): Pass ptid when calling
7999         linux_enable_event_reporting.
8000         (linux_supports_tracefork_flag): Remove.
8001         (linux_enable_event_reporting): Likewise.
8002         (linux_tracefork_grandchild): Remove.
8003         (STACK_SIZE): Moved to common/linux-ptrace.c.
8004         (linux_tracefork_child): Remove.
8005         (linux_test_for_tracefork): Remove.
8006         (linux_look_up_symbols): Call linux_supports_traceclone.
8007         (initialize_low): Remove call to linux_test_for_tracefork.
8008         * linux-low.h (PTRACE_TYPE_ARG3): Move to
8009         common/linux-ptrace.h.
8010         (PTRACE_TYPE_ARG4): Likewise.
8011         Include linux-ptrace.h.
8012
8013 2013-08-21  Pedro Alves  <palves@redhat.com>
8014
8015         * config.in: Renegerate.
8016
8017 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
8018
8019         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8020         (SFILES): Remove $(srcdir)/common/target-common.c and
8021         add $(srcdir)/target/waitstatus.c.
8022         (OBS): Remove target-common.o and add waitstatus.o.
8023         (server_h): Remove $(srcdir)/../common/target-common.h and
8024         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8025         and $(srcdir)/../target/waitstatus.h.
8026         (target-common.o): Remove.
8027         (waitstatus.o): New target object file.
8028         * target.h: Do not include target-common.h and
8029         include target/resume.h, target/wait.h and
8030         target/waitstatus.h.
8031
8032 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
8033
8034         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8035         to PTRACE_TYPE_ARG3.
8036         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8037         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8038         PTRACE_TYPE_ARG4.
8039         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8040         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8041
8042 2013-07-27  Jie Zhang  <jie@codesourcery.com>
8043             Daniel Jacobowitz  <dan@codesourcery.com>
8044             Yao Qi  <yao@codesourcery.com>
8045
8046         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8047         (mips-linux-watch.o): New rule.
8048         (mips_linux_watch_h): New variable.
8049         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8050         srv_tgtobj.
8051         * linux-mips-low.c: Include mips-linux-watch.h.
8052         (struct arch_process_info, struct arch_lwp_info): New.
8053         (update_watch_registers_callback): New function.
8054         (mips_linux_new_process, mips_linux_new_thread) New functions.
8055         (mips_linux_prepare_to_resume, mips_insert_point): New
8056         functions.
8057         (mips_remove_point, mips_stopped_by_watchpoint): New
8058         functions.
8059         (rsp_bp_type_to_target_hw_bp_type): New function.
8060         (mips_stopped_data_address): New function.
8061         (the_low_target): Add watchpoint support functions.
8062
8063 2013-07-27  Yao Qi  <yao@codesourcery.com>
8064
8065         * i386-low.c: Include break-common.h.
8066         (enum target_hw_bp_type): Remove.
8067
8068 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
8069
8070         * Makefile.in (SFILES): /common/target-common.c.
8071         (OBS): Add target-common.o.
8072         (server_h): Add $(srcdir)/../common/target-common.h.
8073         (target-common.o): New target.
8074         * server.c (queue_stop_reply_callback): Free
8075         status string after use.
8076         * target.c (target_waitstatus_to_string): Remove.
8077         * target.h: Include target-common.h.
8078         (resume_kind): Likewise.
8079         (target_waitkind): Likewise.
8080         (target_waitstatus): Likewise.
8081         (TARGET_WNOHANG): Likewise.
8082
8083 2013-07-04  Yao Qi  <yao@codesourcery.com>
8084
8085         * Makefile.in (host_alias): Use @host_noncanonical@.
8086         (target_alias): Use @target_noncanonical@.
8087         * configure.ac: Use ACX_NONCANONICAL_TARGET and
8088         ACX_NONCANONICAL_HOST.
8089         * configure: Regenerated.
8090
8091         Revert:
8092         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8093
8094         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8095         * configure: Rebuild.
8096         * Makefile.in (version_host, version_target): Get from configure.
8097         (version.c): Use $(version_host) and $(version_target).
8098
8099 2013-07-03  Pedro Alves  <palves@redhat.com>
8100
8101         * Makefile.in (config.status): Depend on development.sh.
8102         * acinclude.m4: Include libmcheck.m4.
8103         * configure: Regenerate.
8104
8105 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8106
8107         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8108         attribute inside the parentheses.
8109         (winapi_DebugSetProcessKillOnExit): Ditto.
8110         (winapi_DebugBreakProcess): Ditto.
8111         (winapi_GenerateConsoleCtrlEvent): Ditto.
8112
8113 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8114
8115         * notif.h (notif_event): Add a dummy member to avoid compiler
8116         errors.
8117
8118 2013-07-01  Pedro Alves  <palves@redhat.com>
8119
8120         * hostio.c (HOSTIO_PATH_MAX): Define.
8121         (require_filename, handle_open, handle_unlink, handle_readlink):
8122         Use it.
8123
8124 2013-07-01  Pedro Alves  <palves@redhat.com>
8125
8126         * server.h: Include "pathmax.h".
8127         * linux-low.c: Don't include sys/param.h.
8128         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8129         MAXPATHLEN.
8130         * win32-low.c: Don't include sys/param.h.
8131         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8132
8133 2013-07-01  Pedro Alves  <palves@redhat.com>
8134
8135         * event-loop.c: Don't check HAVE_UNISTD_H before including
8136         <unistd.h>.
8137         * gdbreplay.c: Likewise.
8138         * remote-utils.c: Likewise.
8139         * server.c: Likewise.
8140         * configure.ac: Don't check for unistd.h.
8141         * configure: Regenerate.
8142
8143 2013-06-28  Tom Tromey  <tromey@redhat.com>
8144
8145         * Makefile.in (version.c): Use version.in, not
8146         common/version.in.
8147
8148 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8149
8150         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8151         * configure: Rebuild.
8152         * Makefile.in (version_host, version_target): Get from configure.
8153         (version.c): Use $(version_host) and $(version_target).
8154
8155 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
8156
8157         Fix trace-status to output user name without trailing colon.
8158         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8159
8160 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
8161
8162         Fix trace-status to output proper start-time and stop-time.
8163         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8164         output start time and stop time in hex as gdb expects.
8165
8166 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
8167
8168         * tracepoint.c (build_traceframe_info_xml): Output trace state
8169         variables present in the trace buffer.
8170
8171 2013-06-24  Tom Tromey  <tromey@redhat.com>
8172
8173         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8174         create-version.sh.
8175         (version.o): Remove.
8176         * gdbreplay.c: Include version.h.
8177         (version, host_name): Don't declare.
8178         * server.h: Include version.h.
8179         (version, host_name): Don't declare.
8180
8181 2013-06-12  Pedro Alves  <palves@redhat.com>
8182
8183         * linux-x86-low.c (linux_is_elf64): Delete global.
8184         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8185         with local linux_pid_exe_is_elf_64_file use.
8186
8187 2013-06-11  Pedro Alves  <palves@redhat.com>
8188
8189         * linux-low.c (regset_disabled, disable_regset): New functions.
8190         (regsets_fetch_inferior_registers)
8191         (regsets_store_inferior_registers): Use them.
8192         (initialize_regsets_info); Don't allocate the disabled_regsets
8193         array here.
8194         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8195         comment.
8196
8197 2013-06-11  Pedro Alves  <palves@redhat.com>
8198
8199         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8200         xmalloc.
8201
8202 2013-06-11  Pedro Alves  <palves@redhat.com>
8203
8204         * linux-x86-low.c (initialize_low_arch): Call
8205         init_registers_x32_avx_linux.
8206
8207 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
8208
8209         Fix compatibility with Android Bionic.
8210         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8211         it is not empty.
8212
8213 2013-06-07  Pedro Alves  <palves@redhat.com>
8214
8215         PR server/14823
8216         * Makefile.in (OBS): Add tdesc.o.
8217         (IPA_OBJS): Add tdesc-ipa.o.
8218         (tdesc-ipa.o): New rule.
8219         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8220         interface.
8221         * linux-low.c (new_inferior): Delete.
8222         (disabled_regsets, num_regsets): Delete.
8223         (linux_add_process): Adjust to set the new per-process
8224         new_inferior flag.
8225         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8226         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
8227         was a stop.  When calling arch_setup, switch the current inferior
8228         to the thread that got an event.
8229         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8230         (regsets_fetch_inferior_registers)
8231         (regsets_store_inferior_registers): New regsets_info parameter.
8232         Adjust to use it.
8233         (linux_register_in_regsets): New regs_info parameter.  Adjust to
8234         use it.
8235         (register_addr, fetch_register, store_register): New usrregs_info
8236         parameter.  Adjust to use it.
8237         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8238         parameter regs_info.  Adjust to use it.
8239         (linux_fetch_registers): Get the current inferior's regs_info, and
8240         adjust to use it.
8241         (linux_store_registers): Ditto.
8242         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8243         (initialize_low): Don't initialize the target_regsets here.  Call
8244         initialize_low_arch.
8245         * linux-low.h (target_regsets): Delete declaration.
8246         (struct regsets_info): New.
8247         (struct usrregs_info): New.
8248         (struct regs_info): New.
8249         (struct process_info_private) <new_inferior>: New field.
8250         (struct linux_target_ops): Delete the num_regs, regmap, and
8251         regset_bitmap fields.  New field regs_info.
8252         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8253         * i387-fp.c (num_xmm_registers): Delete.
8254         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8255         calls to new interface.
8256         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8257         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8258         Infer the number of xmm registers from the regcache's target
8259         description.
8260         * i387-fp.h (num_xmm_registers): Delete.
8261         * inferiors.c (add_thread): Don't install the thread's regcache
8262         here.
8263         * proc-service.c (gregset_info): Fetch the current inferior's
8264         regs_info.  Adjust to use it.
8265         * regcache.c: Include tdesc.h.
8266         (register_bytes, reg_defs, num_registers)
8267         (gdbserver_expedite_regs): Delete.
8268         (get_thread_regcache): If the thread doesn't have a regcache yet,
8269         create one, instead of aborting gdbserver.
8270         (regcache_invalidate_one): Rename to ...
8271         (regcache_invalidate_thread): ... this.
8272         (regcache_invalidate_one): New.
8273         (regcache_invalidate): Only invalidate registers of the current
8274         process.
8275         (init_register_cache): Add target_desc parameter, and use it.
8276         (new_register_cache): Ditto.  Assert the target description has a
8277         non zero registers_size.
8278         (regcache_cpy): Add assertions.  Adjust.
8279         (realloc_register_cache, set_register_cache): Delete.
8280         (registers_to_string, registers_from_string): Adjust.
8281         (find_register_by_name, find_regno, find_register_by_number)
8282         (register_cache_size): Add target_desc parameter, and use it.
8283         (free_register_cache_thread, free_register_cache_thread_one)
8284         (regcache_release, register_cache_size): New.
8285         (register_size): Add target_desc parameter, and use it.
8286         (register_data, supply_register, supply_register_zeroed)
8287         (supply_regblock, supply_register_by_name, collect_register)
8288         (collect_register_as_string, collect_register_by_name): Adjust.
8289         * regcache.h (struct target_desc): Forward declare.
8290         (struct regcache) <tdesc>: New field.
8291         (init_register_cache, new_register_cache): Add target_desc
8292         parameter.
8293         (regcache_invalidate_thread): Declare.
8294         (regcache_invalidate_one): Delete declaration.
8295         (regcache_release): Declare.
8296         (find_register_by_number, register_cache_size, register_size)
8297         (find_regno): Add target_desc parameter.
8298         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8299         declarations.
8300         * remote-utils.c: Include tdesc.h.
8301         (outreg, prepare_resume_reply): Adjust.
8302         * server.c: Include tdesc.h.
8303         (gdbserver_xmltarget): Delete declaration.
8304         (get_features_xml, process_serial_event): Adjust.
8305         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8306         declare.
8307         (struct process_info) <tdesc>: New field.
8308         (ipa_tdesc): Declare.
8309         * tdesc.c: New file.
8310         * tdesc.h: New file.
8311         * tracepoint.c: Include tdesc.h.
8312         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8313         (get_context_regcache): Adjust to pass ipa_tdesc down.
8314         (do_action_at_tracepoint): Adjust to get the register cache size
8315         from the context regcache's description.
8316         (traceframe_walk_blocks): Adjust to get the register cache size
8317         from the current trace frame's description.
8318         (traceframe_get_pc): Adjust to get current trace frame's
8319         description and pass it down.
8320         (gdb_collect): Adjust to get the register cache size from the
8321         IPA's description.
8322         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8323         (gdbserver_xmltarget): Delete.
8324         (initialize_low_tracepoint): Set the ipa's target description.
8325         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8326         (initialize_low_tracepoint): Set the ipa's target description.
8327         * linux-x86-low.c: Include tdesc.h.
8328         [__x86_64__] (is_64bit_tdesc): New.
8329         (ps_get_thread_area, x86_get_thread_area): Use it.
8330         (i386_cannot_store_register): Rename to ...
8331         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
8332         (i386_cannot_fetch_register): Rename to ...
8333         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
8334         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8335         to new interface.
8336         (target_regsets): Rename to ...
8337         (x86_regsets): ... this.
8338         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8339         interface.
8340         (x86_siginfo_fixup): Use is_64bit_tdesc.
8341         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8342         (tdesc_x32_avx_linux, tdesc_x32_linux)
8343         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8344         Declare.
8345         (x86_linux_update_xmltarget): Delete.
8346         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8347         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8348         (AMD64_LINUX_USER64_CS): New.
8349         (x86_linux_read_description): New, based on
8350         x86_linux_update_xmltarget.
8351         (same_process_callback): New.
8352         (x86_arch_setup_process_callback): New.
8353         (x86_linux_update_xmltarget): New.
8354         (x86_regsets_info): New.
8355         (amd64_linux_regs_info): New.
8356         (i386_linux_usrregs_info): New.
8357         (i386_linux_regs_info): New.
8358         (x86_linux_regs_info): New.
8359         (x86_arch_setup): Reimplement.
8360         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8361         (x86_emit_ops): Ditto.
8362         (the_low_target): Adjust.  Install x86_linux_regs_info,
8363         x86_cannot_fetch_register, and x86_cannot_store_register.
8364         (initialize_low_arch): New.
8365         * linux-ia64-low.c (tdesc_ia64): Declare.
8366         (ia64_fetch_register): Adjust.
8367         (ia64_usrregs_info, regs_info): New globals.
8368         (ia64_regs_info): New function.
8369         (the_low_target): Adjust.
8370         (initialize_low_arch): New function.
8371         * linux-sparc-low.c (tdesc_sparc64): Declare.
8372         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8373         Adjust.
8374         (sparc_arch_setup): New function.
8375         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8376         (the_low_target): Adjust.
8377         (initialize_low_arch): New function.
8378         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8379         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8380         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8381         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8382         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8383         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8384         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8385         (tdesc_powerpc_isa205_vsx64l): Declare.
8386         (ppc_cannot_store_register, ppc_collect_ptrace_register)
8387         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8388         (ppc_set_pc, ppc_get_hwcap): Adjust.
8389         (ppc_usrregs_info): Forward declare.
8390         (!__powerpc64__) ppc_regmap_adjusted: New global.
8391         (ppc_arch_setup): Adjust to the current process'es target
8392         description.
8393         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8394         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8395         (ppc_store_evrregset): Adjust.
8396         (target_regsets): Rename to ...
8397         (ppc_regsets): ... this, and make static.
8398         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8399         (ppc_regs_info): New function.
8400         (the_low_target): Adjust.
8401         (initialize_low_arch): New function.
8402         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8403         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8404         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8405         (tdesc_s390x_linux64v2): Declare.
8406         (s390_collect_ptrace_register, s390_supply_ptrace_register)
8407         (s390_fill_gregset, s390_store_last_break): Adjust.
8408         (target_regsets): Rename to ...
8409         (s390_regsets): ... this, and make static.
8410         (s390_get_pc, s390_set_pc): Adjust.
8411         (s390_get_hwcap): New target_desc parameter, and use it.
8412         [__s390x__] (have_hwcap_s390_high_gprs): New global.
8413         (s390_arch_setup): Adjust to set the current process'es target
8414         description.  Don't adjust the regmap.
8415         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8416         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8417         (regs_info_3264): New globals.
8418         (s390_regs_info): New function.
8419         (the_low_target): Adjust.
8420         (initialize_low_arch): New function.
8421         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8422         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8423         [__mips64] (init_registers_mips_linux)
8424         (init_registers_mips_dsp_linux): Delete defines.
8425         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8426         (have_dsp): New global.
8427         (mips_read_description): New, based on mips_arch_setup.
8428         (mips_arch_setup): Reimplement.
8429         (get_usrregs_info): New function.
8430         (mips_cannot_fetch_register, mips_cannot_store_register)
8431         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8432         (mips_fill_fpregset, mips_store_fpregset): Adjust.
8433         (target_regsets): Rename to ...
8434         (mips_regsets): ... this, and make static.
8435         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8436         (dsp_regs_info, regs_info): New globals.
8437         (mips_regs_info): New function.
8438         (the_low_target): Adjust.
8439         (initialize_low_arch): New function.
8440         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8441         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8442         Declare.
8443         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8444         (arm_read_description): New, with bits factored from
8445         arm_arch_setup.
8446         (arm_arch_setup): Reimplement.
8447         (target_regsets): Rename to ...
8448         (arm_regsets): ... this, and make static.
8449         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8450         (arm_regs_info): New function.
8451         (the_low_target): Adjust.
8452         (initialize_low_arch): New function.
8453         * linux-m68k-low.c (tdesc_m68k): Declare.
8454         (target_regsets): Rename to ...
8455         (m68k_regsets): ... this, and make static.
8456         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8457         (m68k_regs_info): New function.
8458         (m68k_arch_setup): New function.
8459         (the_low_target): Adjust.
8460         (initialize_low_arch): New function.
8461         * linux-sh-low.c (tdesc_sharch): Declare.
8462         (target_regsets): Rename to ...
8463         (sh_regsets): ... this, and make static.
8464         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8465         (sh_regs_info, sh_arch_setup): New functions.
8466         (the_low_target): Adjust.
8467         (initialize_low_arch): New function.
8468         * linux-bfin-low.c (tdesc_bfin): Declare.
8469         (bfin_arch_setup): New function.
8470         (bfin_usrregs_info, regs_info): New globals.
8471         (bfin_regs_info): New function.
8472         (the_low_target): Adjust.
8473         (initialize_low_arch): New function.
8474         * linux-cris-low.c (tdesc_cris): Declare.
8475         (cris_arch_setup): New function.
8476         (cris_usrregs_info, regs_info): New globals.
8477         (cris_regs_info): New function.
8478         (the_low_target): Adjust.
8479         (initialize_low_arch): New function.
8480         * linux-cris-low.c (tdesc_crisv32): Declare.
8481         (cris_arch_setup): New function.
8482         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8483         (cris_regs_info): New function.
8484         (the_low_target): Adjust.
8485         (initialize_low_arch): New function.
8486         * linux-m32r-low.c (tdesc_m32r): Declare.
8487         (m32r_arch_setup): New function.
8488         (m32r_usrregs_info, regs_info): New globals.
8489         (m32r_regs_info): Adjust.
8490         (initialize_low_arch): New function.
8491         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8492         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8493         (tic6x_usrregs_info): Forward declare.
8494         (tic6x_read_description): New function, based on ...
8495         (tic6x_arch_setup): ... this.  Reimplement.
8496         (target_regsets): Rename to ...
8497         (tic6x_regsets): ... this, and make static.
8498         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8499         (tic6x_regs_info): New function.
8500         (the_low_target): Adjust.
8501         (initialize_low_arch): New function.
8502         * linux-xtensa-low.c (tdesc_xtensa): Declare.
8503         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8504         (target_regsets): Rename to ...
8505         (xtensa_regsets): ... this, and make static.
8506         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8507         globals.
8508         (xtensa_arch_setup, xtensa_regs_info): New functions.
8509         (the_low_target): Adjust.
8510         (initialize_low_arch): New function.
8511         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8512         (nios2_arch_setup): Set the current process'es tdesc.
8513         (target_regsets): Rename to ...
8514         (nios2_regsets): ... this.
8515         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8516         (nios2_regs_info): New function.
8517         (the_low_target): Adjust.
8518         (initialize_low_arch): New function.
8519         * linux-aarch64-low.c (tdesc_aarch64): Declare.
8520         (aarch64_arch_setup): Set the current process'es tdesc.
8521         (target_regsets): Rename to ...
8522         (aarch64_regsets): ... this.
8523         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8524         (aarch64_regs_info): New function.
8525         (the_low_target): Adjust.
8526         (initialize_low_arch): New function.
8527         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8528         globals.
8529         (target_regsets): Rename to ...
8530         (tile_regsets): ... this.
8531         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8532         (tile_regs_info): New function.
8533         (tile_arch_setup): Set the current process'es tdesc.
8534         (the_low_target): Adjust.
8535         (initialize_low_arch): New function.
8536         * spu-low.c (tdesc_spu): Declare.
8537         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8538         * win32-arm-low.c (tdesc_arm): Declare.
8539         (arm_arch_setup): New function.
8540         (the_low_target): Install arm_arch_setup instead of
8541         init_registers_arm.
8542         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8543         (init_windows_x86): Rename to ...
8544         (i386_arch_setup): ... this.  Set `win32_tdesc'.
8545         (the_low_target): Adjust.
8546         * win32-low.c (win32_tdesc): New global.
8547         (child_add_thread): Don't create the thread cache here.
8548         (do_initial_child_stuff): Set the new process'es tdesc.
8549         * win32-low.h (struct target_desc): Forward declare.
8550         (win32_tdesc): Declare.
8551         * lynx-i386-low.c (tdesc_i386): Declare global.
8552         (lynx_i386_arch_setup): Set `lynx_tdesc'.
8553         * lynx-low.c (lynx_tdesc): New global.
8554         (lynx_add_process): Set the new process'es tdesc.
8555         * lynx-low.h (struct target_desc): Forward declare.
8556         (lynx_tdesc): Declare global.
8557         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8558         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8559         * nto-low.c (nto_tdesc): New global.
8560         (do_attach): Set the new process'es tdesc.
8561         * nto-low.h (struct target_desc): Forward declare.
8562         (nto_tdesc): Declare.
8563         * nto-x86-low.c (tdesc_i386): Declare.
8564         (nto_x86_arch_setup): Set `nto_tdesc'.
8565
8566 2013-06-04  Gary Benson  <gbenson@redhat.com>
8567
8568         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8569         to qSupported response when appropriate.
8570         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8571         with nonzero-length annex.
8572         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8573         arguments supplied in annex.
8574
8575 2013-05-31  Doug Evans  <dje@google.com>
8576
8577         PR server/15594
8578         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8579         64 bits in 64-cross-32 environment.
8580
8581 2013-05-28  Pedro Alves  <palves@redhat.com>
8582
8583         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8584         (aarch64-without-fpu.c): Delete rule.
8585         * configure.srv (aarch64*-*-linux*): Remove references to
8586         aarch64-without-fpu.o and aarch64-without-fpu.xml.
8587         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8588         declaration.
8589
8590 2013-05-24  Pedro Alves  <palves@redhat.com>
8591
8592         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8593         instead of strchr/decode_address.  Error if the range isn't split
8594         with a ','.  Don't assume there's be a ':' in the action.
8595
8596 2013-05-23  Yao Qi  <yao@codesourcery.com>
8597             Pedro Alves  <palves@redhat.com>
8598
8599         * linux-low.c (lwp_in_step_range): New function.
8600         (linux_wait_1): If the thread was range stepping and stopped
8601         outside the stepping range, report the stop to GDB.  Otherwise,
8602         continue stepping.  Add range stepping debug output.
8603         (linux_set_resume_request): Copy the step range from the resume
8604         request to the lwp.
8605         (linux_supports_range_stepping): New.
8606         (linux_target_ops) <supports_range_stepping>: Set to
8607         linux_supports_range_stepping.
8608         * linux-low.h (struct linux_target_ops)
8609         <supports_range_stepping>: New field.
8610         (struct lwp_info) <step_range_start, step_range_end>: New fields.
8611         * linux-x86-low.c (x86_supports_range_stepping): New.
8612         (the_low_target) <supports_range_stepping>: Set to
8613         x86_supports_range_stepping.
8614         * server.c (handle_v_cont): Handle 'r' action.
8615         (handle_v_requests): Append ";r" if the target supports range
8616         stepping.
8617         * target.h (struct thread_resume) <step_range_start,
8618         step_range_end>: New fields.
8619         (struct target_ops) <supports_range_stepping>:
8620         New field.
8621         (target_supports_range_stepping): New macro.
8622
8623 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
8624
8625         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8626         confusion in comment.
8627
8628 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
8629
8630         * lynx-low.c (struct process_info_private): New type.
8631         (lynx_add_process): New function.
8632         (lynx_create_inferior, lynx_attach): Replace calls to
8633         add_process by calls to lynx_add_process.
8634         (lynx_resume): If PTID is null, then try using
8635         current_process()->private->last_wait_event_ptid.
8636         Add comments.
8637         (lynx_clear_inferiors): Delete.  The contents of that function
8638         has been inlined in lynx_mourn;
8639         (lynx_wait_1): Save the ptid in the process's private data.
8640         (lynx_mourn): Free the process' private data.  Replace call
8641         to lynx_clear_inferiors by call to clear_inferiors.
8642
8643 2013-05-17  Yao Qi  <yao@codesourcery.com>
8644
8645         * i386-low.c (i386_length_and_rw_bits): Move the comment to
8646         the right place.
8647
8648 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
8649
8650         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8651         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
8652         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8653         PT_TEXT_END_ADDR guards.  Update comments.
8654         (linux_target_op) <read_offsets>: Conditionally define to
8655         linux_read_offsets if the target is UCLIBC and if it defines
8656         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8657
8658 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
8659             Andrew Jenner  <andrew@codesourcery.com>
8660
8661         * Makefile.in (SFILES): Add linux-nios2-low.c.
8662         (clean): Add action to delete nios2-linux.c.
8663         (nios2-linux.c): New rule.
8664         * configure.srv: Add nios2*-*-linux*.
8665         * linux-nios2-low.c: New.
8666
8667 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
8668
8669         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8670
8671 2013-04-25  Hui Zhu  <hui@codesourcery.com>
8672
8673         PR gdb/15186
8674         * ax.c (ax_printf): Add fflush.
8675
8676 2013-04-22  Tom Tromey  <tromey@redhat.com>
8677
8678         * Makefile.in (SFILES): Add filestuff.c.
8679         (OBS): Add filestuff.o.
8680         (filestuff.o): New target.
8681         * config.in, configure: Rebuild.
8682         * configure.ac: Check for fdwalk, pipe2.
8683
8684 2013-04-17  Pedro Alves  <palves@redhat.com>
8685
8686         * configure.ac (USE_THREAD_DB): Delete variable.
8687         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8688         Don't AC_SUBST USE_THREAD_DB.
8689         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8690         * config.in, configure: Regenerate.
8691
8692 2013-04-16  Pedro Alves  <palves@redhat.com>
8693
8694         * linux-low.h (struct lwp_info) <thread_known>: Move under
8695         the USE_THREAD_DB #ifdef.
8696
8697 2013-04-16  Pedro Alves  <palves@redhat.com>
8698
8699         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8700         (linux-low.o): Delete rule.
8701         * linux-low.h: Always include "gdb_thread_db.h" instead of
8702         conditionally including thread_db.h.
8703         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8704         HAVE_THREAD_DB_H.
8705
8706 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
8707
8708         * Makefile.in (install-only): Fix make install regression.
8709
8710 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
8711
8712         Convert man pages to texinfo, new gdbinit.5 texinfo page.
8713         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8714         installation.
8715         * gdbserver.1: Remove.
8716
8717 2013-03-22  Pedro Alves  <palves@redhat.com>
8718
8719         * linux-low.c (handle_extended_wait): Don't call
8720         linux_enable_event_reporting.
8721
8722 2013-03-15  Tony Theodore  <tonyt@logyst.com>
8723
8724         PR build/9098:
8725         * Makefile.in (SHELL): Use @SHELL@.
8726
8727 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8728
8729         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8730         compiler warning.
8731
8732 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
8733
8734         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8735         Remove extraneous NULL element.
8736
8737 2013-03-13  Yao Qi  <yao@codesourcery.com>
8738
8739         * tracepoint.c (traceframe_read_tsv): Look for the last matched
8740         'V' block in trace frame.
8741
8742 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8743
8744         * target.h (struct target_ops): Add btrace ops.
8745         (target_supports_btrace): New macro.
8746         (target_enable_btrace): New macro.
8747         (target_disable_btrace): New macro.
8748         (target_read_btrace): New macro.
8749         * gdbthread.h (struct thread_info): Add btrace field.
8750         * server.c: Include btrace-common.h.
8751         (handle_btrace_general_set): New function.
8752         (handle_btrace_enable): New function.
8753         (handle_btrace_disable): New function.
8754         (handle_general_set): Call handle_btrace_general_set.
8755         (handle_qxfer_btrace): New function.
8756         (struct qxfer qxfer_packets[]): Add btrace entry.
8757         * inferiors.c (remove_thread): Disable btrace.
8758         * linux-low: Include linux-btrace.h.
8759         (linux_low_enable_btrace): New function.
8760         (linux_low_read_btrace): New function.
8761         (linux_target_ops): Add btrace ops.
8762         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8763         Add srv_linux_btrace=yes.
8764         (x86_64-*-linux*): Add linux-btrace.o.
8765         Add srv_linux_btrace=yes.
8766         * configure.ac: Define HAVE_LINUX_BTRACE.
8767         * config.in: Regenerated.
8768         * configure: Regenerated.
8769
8770 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8771
8772         * server.c (handle_qxfer): Preserve error message if -3 is
8773         returned.
8774         (qxfer): Document the -3 return value.
8775
8776 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
8777
8778         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8779         (linux_btrace_h): New variable.
8780         (linux-btrace.o): New rule.
8781
8782 2013-03-08  Stan Shebs  <stan@codesourcery.com>
8783             Hafiz Abid Qadeer  <abidh@codesourcery.com>
8784
8785         * tracepoint.c (trace_buffer_size): New global.
8786         (DEFAULT_TRACE_BUFFER_SIZE): New define.
8787         (init_trace_buffer): Change to one-argument function. Allocate
8788         trace buffer memory.
8789         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8790         handle QTBuffer:size packet.
8791         (cmd_bigqtbuffer_size): New function.
8792         (initialize_tracepoint): Call init_trace_buffer with
8793         DEFAULT_TRACE_BUFFER_SIZE.
8794         * server.c (handle_query): Add QTBuffer:size in the
8795         supported packets.
8796
8797 2013-03-07  Yao Qi  <yao@codesourcery.com>
8798
8799         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8800         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8801         of -1.
8802         (cmd_qtsp): Adjust condition.  Do post increment.
8803         Set cur_action and cur_step_action back to 0.
8804
8805 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
8806
8807         PR server/15236
8808         * linux-low.c (linux_write_memory): Return early success if LEN is
8809         zero.
8810
8811 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
8812
8813         * configure.srv: Add x86_64-*-cygwin* as target.
8814
8815 2013-02-28  Tom Tromey  <tromey@redhat.com>
8816
8817         * configure.ac: Invoke AC_SYS_LARGEFILE.
8818         * configure, config.in: Rebuild.
8819
8820 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
8821
8822         * win32-low.c: Throughout, fix format strings and casts of
8823         printf-like functions to avoid type related warnings on all
8824         platforms.
8825         (get_child_debug_event): Print dwDebugEventCode as hex since
8826         that's how it's usually documented.
8827
8828 2013-02-28  Yao Qi  <yao@codesourcery.com>
8829
8830         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8831         pulongest.
8832
8833 2013-02-27  Jiong Wang  <jiwang@tilera.com>
8834
8835         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8836         (reg-tilegx32.c): New rule.
8837         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8838         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
8839         different register info initializer according to elf class.
8840         (init_registers_tilgx32): New function.  The tilegx32 register info
8841         initializer.
8842         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8843         (tile_store_gregset): Likewise.
8844
8845 2013-02-27  Yao Qi  <yao@codesourcery.com>
8846
8847         * server.c (process_point_options): Print debug message when
8848         debug_threads is true.
8849
8850 2013-02-26  Yao Qi  <yao@codesourcery.com>
8851
8852         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8853
8854 2013-02-19  Pedro Alves  <palves@redhat.com>
8855             Kai Tietz <ktietz@redhat.com>
8856
8857         PR gdb/15161
8858
8859         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8860         instead of strtoul to extract address from packet.
8861         (process_serial_event) <'z'>: Likewise.
8862
8863 2013-02-18  Yao Qi  <yao@codesourcery.com>
8864
8865         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8866
8867 2013-02-14  Pedro Alves  <palves@redhat.com>
8868
8869         Plug memory leak.
8870
8871         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8872         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8873
8874 2013-02-14  Pedro Alves  <palves@redhat.com>
8875
8876         * tracepoint.c (cmd_qtdpsrc): Use savestring.
8877
8878 2013-02-14  Pedro Alves  <palves@redhat.com>
8879
8880         * tracepoint.c (save_string): Delete.
8881         (add_tracepoint_action): Use savestring instead of save_string.
8882
8883 2013-02-12  Pedro Alves  <palves@redhat.com>
8884
8885         * linux-xtensa-low.c: Ditto.
8886         * xtensa-xtregs.c: Ditto.
8887
8888 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
8889
8890         * thread-db.c (thread_db_get_tls_address): NULL pointer check
8891         thread_db.
8892
8893 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8894
8895         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8896         aarch64_num_wp_regs and aarch64_num_bp_regs to
8897         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8898
8899 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8900
8901         * linux-aarch64-low.c (ps_get_thread_area): Replace
8902         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8903
8904 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
8905             Marcus Shawcroft  <marcus.shawcroft@arm.com>
8906             Nigel Stephens  <nigel.stephens@arm.com>
8907             Yufeng Zhang  <yufeng.zhang@arm.com>
8908
8909         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8910         (aarch64.c, aarch64-without-fpu.c): New targets.
8911         * configure.srv (aarch64*-*-linux*): New.
8912         * linux-aarch64-low.c: New file.
8913
8914 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
8915
8916         * linux-low.c (handle_extended_wait, linux_create_inferior)
8917         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8918         (dequeue_one_deferred_signal, linux_resume_one_thread)
8919         (fetch_register, linux_write_memory, linux_enable_event_reporting)
8920         (linux_tracefork_grandchild, linux_test_for_tracefork)
8921         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8922         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8923         where the argument is 0.
8924
8925 2013-01-25  Yao Qi  <yao@codesourcery.com>
8926
8927         * event-loop.c: Include "queue.h".
8928         (gdb_event_p): New typedef.
8929         (struct gdb_event) <next_event>: Remove.
8930         (event_queue): Change to QUEUE(gdb_event_p).
8931         (async_queue_event): Remove.
8932         (gdb_event_xfree): New.
8933         (initialize_event_loop): New.
8934         (process_event): Use API from QUEUE.
8935         (wait_for_event): Likewise.
8936         * server.c (main): Call initialize_event_loop.
8937         * server.h (initialize_event_loop): Declare.
8938
8939 2013-01-18  Yao Qi  <yao@codesourcery.com>
8940
8941         * ax.h (struct eval_agent_expr_context): New.
8942         (gdb_eval_agent_expr): Update declaration.
8943         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8944         TFRAME.  Add new argument CTX.
8945         * server.h (struct eval_agent_expr_context): Declare.
8946         (agent_mem_read, agent_tsv_read): Update declaration.
8947         (agent_mem_read_string): Likewise.
8948         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8949         (add_traceframe_block): Add new argument TPOINT.
8950         Increase TPOINT->traceframe_usage.
8951         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8952         eval_tracepoint_agent_expr.
8953         (condition_true_at_tracepoint): Likewise.
8954         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
8955         (agent_mem_read_string, agent_tsv_read): Likewise.
8956
8957 2013-01-16  Yao Qi  <yao@codesourcery.com>
8958
8959         * linux-low.c (linux_resume_one_lwp): Don't check
8960         'lwp->bp_reinsert != 0'.
8961
8962 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8963             Pedro Alves  <palves@redhat.com>
8964
8965         * lynx-low.c (ptrace_request_to_str): Define a temporary
8966         macro and use it to simplify this function's implementation.
8967
8968 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8969
8970         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8971         sets errno.
8972
8973 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8974
8975         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8976
8977 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8978
8979         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8980
8981 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8982
8983         * lynx-low.c (lynx_resume): Use the resume_info parameter
8984         to determine the ptid for the lynx_ptrace call, unless
8985         it is equal to minus_one_ptid, in which case we use the
8986         ptid of the current_inferior.
8987         (lynx_wait_1): After having received a thread create/exit
8988         event, resume the inferior's execution using the signaling
8989         thread's ptid, rather than the old ptid.
8990
8991 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
8992
8993         * lynx-low.c (lynx_resume): Delete variable ret.
8994
8995 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
8996
8997         * gdbreplay.c (gdbreplay_version): Update copyright year.
8998         * server.c (gdbserver_version): Likewise.
8999
9000 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9001
9002         * lynx-low.c (lynx_wait_1): Add debug trace before adding
9003         new thread.
9004
9005 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9006
9007         * lynx-low.c (ptrace_request_to_str): Add handling for
9008         PTRACE_GETTRACESIG.
9009
9010 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9011
9012         * lynx-low.c (lynx_attach): Delete variable new_process.
9013
9014 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9015
9016         * lynx-low.c (lynx_create_inferior): Delete variable
9017         new_process.
9018
9019 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9020
9021         * lynx-low.c (ptrace_request_to_str): Do not handle
9022         PTRACE_GETTHREADLIST if this macro does not exist.
9023
9024 2012-12-15  Yao Qi  <yao@codesourcery.com>
9025
9026         * Makefile.in (OBS): Add notif.o.
9027         * notif.c, notif.h: New.
9028         * server.c: Include "notif.h".
9029         (struct vstop_notif) <next>: Remove.
9030         <base>: New field.
9031         (queue_stop_reply): Update.
9032         (push_event, send_next_stop_reply): Remove.
9033         (discard_queued_stop_replies): Update.
9034         (notif_stop): New variable.
9035         (handle_v_stopped): Remove.
9036         (handle_v_requests): Don't call handle_v_stopped.  Call
9037         handle_ack_notif instead.
9038         (queue_stop_reply_callback): Call notif_event_enque instead
9039         of queue_stop_reply.
9040         (handle_status): Don't call send_next_stop_reply, call
9041         notif_write_event instead.
9042         (kill_inferior_callback): Likewise.
9043         (detach_or_kill_inferior_callback): Likewise.
9044         (main): Call initialize_notif.
9045         (process_serial_event): Call QUEUE_is_empty.
9046         (handle_target_event): Call notif_push instead of push event.
9047         * server.h (push_event): Remove declaration.
9048
9049 2012-12-10  Tom Tromey  <tromey@redhat.com>
9050
9051         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9052         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9053         macros.
9054         (.c.o): Rewrite.
9055         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9056         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9057         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9058         (amd64-linux-ipa.o, ax.o): Rewrite.
9059         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9060         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9061         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9062         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9063         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9064         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9065         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9066         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9067         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9068         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9069         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9070         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9071         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9072         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9073         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9074         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9075         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9076         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9077         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9078         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9079         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9080         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9081         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9082         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9083         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9084         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9085         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9086         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9087         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9088         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9089         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9090         (reg-tilegx.o): Remove.
9091         (all_object_files): New macro.
9092         Include .deps files.
9093         * aclocal.m4, configure: Rebuild.
9094         * acinclude.m4: Include depstand.m4, lead-dot.m4.
9095         * configure.ac: Invoke ZW_CREATE_DEPDIR,
9096         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
9097
9098 2012-12-05  Tom Tromey  <tromey@redhat.com>
9099
9100         PR gdb/14917:
9101         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9102
9103 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
9104
9105         * configure.ac: Check for linux/perf_event.h.
9106         * config.in: Regenerated.
9107         * configure: Regenerated.
9108
9109 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
9110
9111         * hostio.c (handle_readlink): Decrease buffer size
9112         parameter passed to readlink by one byte.
9113
9114 2012-11-26  Yao Qi  <yao@codesourcery.com>
9115
9116         * configure.ac (build_warnings): Append '-Wempty-body'.
9117         * configure: Regenerated.
9118         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9119         body.
9120
9121 2012-11-15  Pierre Muller  <muller@sourceware.org>
9122
9123         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9124         * config.in: Regenerate.
9125         * configure: Regenerate.
9126         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9127         Use "gdb_wait.h" header instead of <sys/wait.h> header.
9128         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9129         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9130         header.
9131         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
9132         instead of <sys/wait.h> header.
9133         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9134
9135 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
9136
9137         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9138         (various make rules): Remove -DGDBSERVER
9139
9140 2012-11-09  Yao Qi  <yao@codesourcery.com>
9141
9142         * spu-low.c (current_ptid): Move it to ..
9143         * gdbthread.h: ... here.  New.
9144         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9145         * server.c (myresume, process_serial_event): Likewise.
9146         * thread-db.c (thread_db_find_new_threads): Likewise.
9147         * tracepoint.c (run_inferior_command): Likewise.
9148
9149 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
9150
9151         * server.c (handle_search_memory_1): Include access length in
9152         warning message.
9153
9154 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
9155
9156         * linux-crisv32-low.c: Fix compile errors.
9157
9158 2012-09-04  Yao Qi  <yao@codesourcery.com>
9159
9160         * tracepoint.c (cmd_qtsv): Adjust debug message.
9161         Don't check CUR_TPOINT.
9162
9163 2012-08-28  Yao Qi  <yao@codesourcery.com>
9164
9165         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9166         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9167         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9168         Remove declarations of xmalloc, xreallloc, xstrdup and
9169         freeargv.
9170         * Makefile.in (libiberty_h): New.
9171         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9172         (linux-bfin-low.o): Append dependency 'libiberty.h'.
9173
9174 2012-08-23  Yao Qi  <yao@codesourcery.com>
9175
9176         * server.h: Remove declaration of 'xsnprintf'.
9177
9178 2012-08-22  Keith Seitz  <keiths@redhat.com>
9179
9180         * server.h: Include build-gnulib-gbserver/config.h.
9181         * gdbreplay.c: Likewise.
9182
9183 2012-08-08  Doug Evans  <dje@google.com>
9184
9185         * Makefile.in (SFILES): Add gdb_vecs.c.
9186         (OBS): Add gdb_vecs.o.
9187         (gdb_vecs_h, host_defs_h): New variables.
9188         (thread-db.o): Add $(gdb_vecs_h) dependency.
9189         (gdb_vecs.o): New rule.
9190         * thread-db.c: #include "gdb_vecs.h".
9191         (thread_db_load_search): Use a vector to iterate over path elements.
9192         Handle text appearing after "$pdir".
9193
9194         * configure.ac: Add check for strstr.
9195         * config.in: Regenerate.
9196         * configure: Regenerate.
9197
9198 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
9199
9200         * hostio.c (handle_pread): If pread fails, fall back to attempting
9201         lseek/read.
9202         (handle_pwrite): Likewise for pwrite.
9203
9204 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
9205
9206         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9207         between unsupported TYPE and unimplementable ADDR/LEN combination.
9208         (arm_insert_point): Act on new return value.
9209
9210 2012-07-31  Pedro Alves  <palves@redhat.com>
9211
9212         * server.c (process_point_options): Only skip tokens if we find
9213         one that is unrecognized.  Don't treat 'X' specially while
9214         skipping unrecognized tokens.
9215
9216 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
9217
9218         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9219         to 4-byte-align HW breakpoint addresses for Thumb.
9220
9221 2012-07-27  Yao Qi  <yao@codesourcery.com>
9222
9223         PR remote/14161.
9224
9225         * server.h: Declare gdb_agent_about_to_close.
9226         * target.c (kill_inferior): Include "agent.h".
9227         New.  Send command 'kill'.
9228         * target.h (kill_inferior): Removed macro.
9229         * tracepoint.c (gdb_agent_about_to_close): New.
9230         (gdb_agent_helper_thread): Handle command 'close'.
9231         Wait endlessly until the inferior stops.
9232         Install gdb_agent_remove_socket to atexit hook.
9233         (agent_socket_name): New static variable.
9234         (gdb_agent_socket_init): Replace local variable 'name' with
9235         'agent_socket_name'.
9236         (gdb_agent_remove_socket): New.
9237
9238 2012-07-27  Yao Qi  <yao@codesourcery.com>
9239
9240         * server.c (process_point_options): Stop at 'X' when parsing.
9241
9242 2012-07-19  Michael Eager  <eager@eagercon.com>
9243
9244         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9245         to hw_execute.
9246         * linux-x86-low.c (x86_insert_point, x86_remove_point):
9247         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9248         hardware breakpoint.
9249
9250 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9251
9252         * gdbserver/linux-low.c (initialize_low): Call
9253         linux_ptrace_init_warnings.
9254
9255 2012-07-02  Doug Evans  <dje@google.com>
9256
9257         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9258         pointer to int.
9259
9260 2012-07-02  Stan Shebs  <stan@codesourcery.com>
9261
9262         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9263         (ax.o): Add it to build rule.
9264         (ax-ipa.o): Ditto.
9265         (OBS): Add format.o.
9266         (IPA_OBS): Add format.o.
9267         * server.c (handle_query): Claim support for breakpoint commands.
9268         (process_point_options): Add command case.
9269         (process_serial_event): Leave running if there are printfs in
9270         effect.
9271         * mem-break.h (any_persistent_commands): Declare.
9272         (add_breakpoint_commands): Declare.
9273         (gdb_no_commands_at_breakpoint): Declare.
9274         (run_breakpoint_commands): Declare.
9275         * mem-break.c (struct point_command_list): New struct.
9276         (struct breakpoint): New field command_list.
9277         (any_persistent_commands): New function.
9278         (add_commands_to_breakpoint): New function.
9279         (add_breakpoint_commands): New function.
9280         (gdb_no_commands_at_breakpoint): New function.
9281         (run_breakpoint_commands): New function.
9282         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9283         locally.
9284         * ax.c: Include format.h.
9285         (ax_printf): New function.
9286         (gdb_eval_agent_expr): Add printf opcode.
9287
9288 2012-06-13  Yao Qi  <yao@codesourcery.com>
9289
9290         * server.c (start_inferior): Remove duplicated writes to fields
9291         'last_resume_kind' and 'last_status' of 'current_inferior'.
9292
9293 2012-06-12  Yao Qi  <yao@codesourcery.com>
9294             Pedro Alves  <palves@redhat.com>
9295
9296         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
9297         comment.
9298         * server.c (handle_v_cont): Extend comment.
9299
9300 2012-06-11  Yao Qi  <yao@codesourcery.com>
9301
9302         * linux-low.c (linux_attach): Add 'static'.
9303
9304 2012-06-06  Yao Qi  <yao@codesourcery.com>
9305
9306         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9307
9308 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
9309
9310         Fix gcc -flto compilation warning.
9311         * server.c (main): Make variable multi_mode and attach volatile.
9312
9313 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9314
9315         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9316         if the platform doesn't know about it.
9317
9318 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
9319
9320         * Makefile.in (SFILES): Add linux-tile-low.c.
9321         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9322         * configure.srv: Handle tilegx-*-linux*.
9323         * linux-tile-low.c: New file.
9324
9325 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9326
9327         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9328
9329 2012-05-24  Pedro Alves  <palves@redhat.com>
9330
9331         PR gdb/7205
9332
9333         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9334
9335 2012-05-24  Pedro Alves  <palves@redhat.com>
9336
9337         PR gdb/7205
9338
9339         Replace target_signal with gdb_signal throughout.
9340
9341 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
9342
9343         * linux-low.c (linux_store_registers): Avoid the copying sequence
9344         when no data has been retrieved by ptrace.
9345
9346 2012-05-22  Will Deacon  <will.deacon@arm.com>
9347
9348         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9349         Include asm/ptrace.h.
9350         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9351         already defined.
9352
9353 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
9354
9355         * linux-low.c (linux_store_registers): Don't re-retrieve data
9356         with ptrace that has already been obtained from /proc.  Always
9357         copy any data retrieved with ptrace to the buffer supplied.
9358
9359 2012-05-11  Yao Qi  <yao@codesourcery.com>
9360             Pedro Alves  <palves@redhat.com>
9361
9362         * linux-low.c (enum stopping_threads_kind): New.
9363         (stopping_threads): Change type to `enum stopping_threads_kind'.
9364         (handle_extended_wait): If stopping and suspending threads, leave
9365         the new_lwp suspended too.
9366         (linux_wait_for_event): Adjust.
9367         (stop_all_lwps): Set `stopping_threads' to
9368         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9369         whether we're suspending threads or just stopping them.  Assert no
9370         recursion happens.
9371
9372 2012-04-29  Yao Qi  <yao@codesourcery.com>
9373
9374         * server.h: Move some code to ...
9375         * gdbthread.h: ... here.  New.
9376         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9377         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9378         (nto-low.o, win32-low.o): Likewise.
9379         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9380         * regcache.c, remote-utils.c, server.c: Likewise.
9381         * target.c, tracepoint.c, win32-low.c: Likewise.
9382
9383 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9384
9385         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9386         (PTRACE_ARG4_TYPE): Likewise.
9387         (PTRACE_XFER_TYPE): Likewise.
9388         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9389         ptrace to PTRACE_ARG3_TYPE.
9390         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9391         (PTRACE_ARG4_TYPE): Likewise.
9392         (PTRACE_XFER_TYPE): Likewise.
9393         (linux_detach_one_lwp): Cast fourth argument of
9394         ptrace to long then PTRACE_ARG4_TYPE.
9395         (regsets_fetch_inferior_registers): Cast third argument of
9396         ptrace to long then PTRACE_ARG3_TYPE.
9397         (regsets_store_inferior_registers): Likewise.
9398
9399 2012-04-20  Pedro Alves  <palves@redhat.com>
9400
9401         * configure: Regenerate.
9402
9403 2012-04-19  Pedro Alves  <palves@redhat.com>
9404
9405         * Makefile.in (GNULIB_BUILDDIR): New.
9406         (LIBGNU, INCGNU, GNULIB_H): Adjust.
9407         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9408         (all, install-only, uninstall, clean-info, all-lib, clean): No
9409         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
9410         (maintainer-clean realclean distclean): Use subdir_do.
9411         (subdir_do): New.
9412         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
9413         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
9414         * acinclude.m4: Include acx_configure_dir.m4.
9415         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9416         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
9417         ACX_CONFIGURE_DIR.
9418         (GNULIB): New.
9419         (GNULIB_STDINT_H): Adjust.
9420         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9421         * gdbreplay.c: Include build-gnulib/config.h.
9422         * server.h: Likewise.
9423         * aclocal.m4: Regenerate.
9424         * config.in: Regenerate.
9425         * configure: Regenerate.
9426
9427 2012-04-19  Pedro Alves  <palves@redhat.com>
9428
9429         * Makefile.in (LIBGNU, INCGNU): Adjust.
9430         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9431         (all, install-only, uninstall, clean-info, all-lib, clean)
9432         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9433         * configure.ac: Adjust AC_OUTPUT output.
9434         * aclocal.m4: Regenerate.
9435         * configure: Regenerate.
9436
9437 2012-04-19  Pedro Alves  <palves@redhat.com>
9438
9439         * Makefile.in (generated_files): New.
9440         (server_h): Remove the explicit dependency on config.h, and depend
9441         on $generated_files.
9442
9443 2012-04-19  Pedro Alves  <palves@redhat.com>
9444
9445         * Makefile.in (INCGNU): Add -Ignulib.
9446
9447 2012-04-19  Pedro Alves  <palves@redhat.com>
9448
9449         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9450         (INCGNU): ... this, and spell out -I here.
9451         (GNULIB_LIB): Rename to ...
9452         (LIBGNU): ... this.
9453         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9454
9455 2012-04-19  Pedro Alves  <palves@redhat.com>
9456
9457         * config.in: Regenerate.
9458
9459 2012-04-19  Pedro Alves  <palves@redhat.com>
9460
9461         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9462         * server.h (memmem): Remove declaration.
9463         * config.in: Regenerate.
9464         * configure: Regenerate.
9465
9466 2012-04-19  Yao Qi  <yao@codesourcery.com>
9467
9468         * Makefile.in (SFILES): Add common/vec.c.
9469         (OBS): Add vec.o.
9470         (vec.o): New rule.
9471
9472 2012-04-19  Yao Qi  <yao@codesourcery.com>
9473
9474         * remote-utils.c (prepare_resume_reply): Replace with macro
9475         target_core_of_thread.
9476         * server.c (handle_qxfer_threads_proper): Likewise.
9477         * target.h (traget_core_of_thread): New macro.
9478
9479 2012-04-18  Pedro Alves  <palves@redhat.com>
9480
9481         * aclocal.m4: Regenerate.
9482         * configure: Regenerate.
9483
9484 2012-04-16  Yao Qi  <yao@codesourcery.com>
9485
9486         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9487         duplicated on address.
9488
9489 2012-04-16  Yao Qi  <yao@codesourcery.com>
9490
9491         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9492         (struct tracepoint_action_ops) <send>: New field.
9493         (m_tracepoint_action_send, r_tracepoint_action_send): New.
9494         (agent_expr_send, x_tracepoint_action_send): New.
9495         (l_tracepoint_action_send): New.
9496         (cmd_qtdp): Download and install tracepoint
9497         according to `use_agent'.
9498         (run_inferior_command): Add one more parameter `len'.
9499         Update callers.
9500         (tracepoint_send_agent): New.
9501         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9502
9503 2012-04-16  Yao Qi  <yao@codesourcery.com>
9504
9505         * tracepoint.c (download_tracepoints): Moved to ...
9506         (cmd_qtstart): ... here.
9507
9508 2012-04-14  Yao Qi  <yao@codesourcery.com>
9509
9510         * tracepoint.c: Include inttypes.h.
9511         (struct collect_memory_action): Use sized types.
9512         (struct tracepoint): Likewise.
9513         (cmd_qtdp, stop_tracing): Update print specifiers.
9514         (cmd_qtp, response_tracepoint): Likewise.
9515         (collect_data_at_tracepoint): Likewise.
9516         (collect_data_at_step): Likewise.
9517
9518 2012-04-14  Yao Qi  <yao@codesourcery.com>
9519
9520         Import gnulib module inttypes.
9521         * aclocal.m4, config.in, configure: Regenerated.
9522
9523 2012-04-14  Yao Qi  <yao@codesourcery.com>
9524
9525         * Makefile.in (maintainer-clean, realclean, distclean): Remove
9526         Makefile and config.status at last.
9527
9528 2012-04-13  Yao Qi  <yao@codesourcery.com>
9529
9530         * tracepoint.c: Include stdint.h unconditionally.
9531
9532 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9533
9534         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9535         on BFD_HAVE_SYS_PROCFS_TYPE.
9536         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9537         * configure: Regenerate.
9538         * config.in: Likewise.
9539
9540 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
9541
9542         * Makefile.in (clean): Also remove x32.c x32-linux.c
9543         x32-avx.c x32-avx-linux.c.
9544         (x32.o): New target.
9545         (x32.c): Likewise.
9546         (x32-linux.o): Likewise.
9547         (x32-linux.c): Likewise.
9548         (x32-avx.o): Likewise.
9549         (x32-avx.c): Likewise.
9550         (x32-avx-linux.o): Likewise.
9551         (x32-avx-linux.c): Likewise.
9552
9553         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9554         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9555         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9556         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9557         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9558         i386/x32-avx-linux.xml.
9559
9560         * linux-x86-low.c (init_registers_x32_linux): New prototype.
9561         (init_registers_x32_avx_linux): Likwise.
9562         (x86_linux_update_xmltarget): Call init_registers_x32_linux
9563         or init_registers_x32_avx_linux if linux_is_elf64 is false.
9564
9565 2012-04-13  Pedro Alves  <palves@redhat.com>
9566
9567         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9568         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9569         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9570         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9571         the sub-make.
9572
9573 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9574
9575         * linux-x86-low.c (compat_x32_clock_t): New.
9576         (compat_x32_siginfo_t): Likewise.
9577         (compat_x32_siginfo_from_siginfo): Likewise.
9578         (siginfo_from_compat_x32_siginfo): Likewise.
9579         (linux_is_elf64): Likewise.
9580         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9581         and siginfo_from_compat_x32_siginfo for x32.
9582         (x86_arch_setup): Set linux_is_elf64.
9583
9584 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9585
9586         PR gdb/13969
9587         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9588         e_machine field.
9589         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9590         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9591         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9592         compatible with process.
9593
9594 2012-04-12  Yao Qi  <yao@codesourcery.com>
9595
9596         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9597         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9598         (install-only, install-info, clean): Handle sub dir gnulib.
9599         (all-lib, am--refresh): New targets.
9600         (memmem.o): Remove target.
9601         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9602         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
9603         (AC_REPLACE_FUNCS): Remove memmem.
9604         Invoke gl_INIT and AM_INIT_AUTOMAKE.
9605         (AC_OUTPUT): Generate Makefile in gnulib/.
9606         * aclocal.m4, config.in, configure: Regenerated.
9607
9608 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
9609
9610         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9611
9612 2012-04-05  Pedro Alves  <palves@redhat.com>
9613
9614         -Werror=strict-aliasing
9615
9616         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9617         pointer.
9618
9619 2012-04-04  Pedro Alves  <palves@redhat.com>
9620
9621         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9622         (sparc_store_gregset_from_stack, sparc_store_gregset)
9623         (sparc_breakpoint_at): Fix formatting.
9624
9625 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9626
9627         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9628         are available.
9629         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9630         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9631         * config.in: Regenerate.
9632         * configure: Likewise.
9633
9634 2012-03-29  Pedro Alves  <palves@redhat.com>
9635
9636         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9637         Correct ptrace arguments.
9638
9639 2012-03-28  Pedro Alves  <palves@redhat.com>
9640
9641         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9642         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9643         (IA64_FR1_REGNUM): New defines.
9644         (ia64_fetch_register): New.
9645         (the_low_target): Install it.
9646         * linux-low.h (struct linux_target_ops) <fetch_register>: New
9647         field.
9648         * linux-low.c (linux_fetch_registers): Try the
9649         the_low_target.fetch_register hook first.
9650
9651         * linux-arm-low.c (the_low_target): Adjust.
9652         * linux-bfin-low.c (the_low_target): Adjust.
9653         * linux-cris-low.c (the_low_target): Adjust.
9654         * linux-crisv32-low.c (the_low_target): Adjust.
9655         * linux-m32r-low.c (the_low_target): Adjust.
9656         * linux-m68k-low.c (the_low_target): Adjust.
9657         * linux-mips-low.c (the_low_target): Adjust.
9658         * linux-ppc-low.c (the_low_target): Adjust.
9659         * linux-s390-low.c (the_low_target): Adjust.
9660         * linux-sh-low.c (the_low_target): Adjust.
9661         * linux-sparc-low.c (the_low_target): Adjust.
9662         * linux-tic6x-low.c (the_low_target): Adjust.
9663         * linux-x86-low.c (the_low_target): Adjust.
9664         * linux-xtensa-low.c (the_low_target): Adjust.
9665
9666 2012-03-26  Pedro Alves  <palves@redhat.com>
9667
9668         * server.c (handle_qxfer_libraries): Don't bail early if
9669         the_target->qxfer_libraries_svr4 is not NULL.
9670
9671 2012-03-26  Pedro Alves  <palves@redhat.com>
9672
9673         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9674
9675 2012-03-23  Pedro Alves  <palves@redhat.com>
9676
9677         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9678         "library-list-svr4" element's start tag when the the DSO list is
9679         empty.
9680
9681 2012-03-23  Pedro Alves  <palves@redhat.com>
9682
9683         * linux-low.c (read_one_ptr): Read the inferior's pointer through
9684         a variable whose type size is the same as the inferior's pointer
9685         size.
9686
9687 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
9688
9689         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9690         struct siginfo.
9691         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9692         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9693         * linux-low.h: Include <signal.h>.
9694         (struct siginfo): Remove forward declaration.
9695         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9696         struct siginfo.
9697
9698 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
9699
9700         * .gitignore: Ignore more files.
9701
9702 2012-03-19  Pedro Alves  <palves@redhat.com>
9703             Jan Kratochvil  <jan.kratochvil@redhat.com>
9704
9705         * server.c (cont_thread, general_thread): Add describing comments.
9706         (start_inferior): Clear `cont_thread'.
9707         (handle_v_cont): Don't set `cont_thread' if resuming all threads
9708         of a process.
9709
9710 2012-03-15  Yao Qi  <yao@codesourcery.com>
9711
9712         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9713         handling to ...
9714         (cmd_qtdp): ... here.
9715
9716 2012-03-15  Yao Qi  <yao@codesourcery.com>
9717
9718         * tracepoint.c (struct tracepoint_action_ops): New.
9719         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9720         (m_tracepoint_action_download): New.
9721         (r_tracepoint_action_download): New.
9722         (x_tracepoint_action_download): New.
9723         (l_tracepoint_action_download): New.
9724         (add_tracepoint_action): Install `action->ops' according type.
9725         (download_tracepoint_1): Move code `download' function pointer
9726         of various tracepoint_action_ops.
9727
9728 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
9729
9730         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
9731         linux_ptrace_attach_warnings.
9732
9733 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
9734
9735         * Makefile.in (linux-ptrace.o): New.
9736         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9737         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9738         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9739         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9740         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9741         of these targets.
9742         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9743
9744 2012-03-08  Yao Qi  <yao@codesourcery.com>
9745             Pedro Alves  <palves@redhat.com>
9746
9747         Fix PR server/13392.
9748         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9749         offset of JMP insn.
9750         * tracepoint.c (remove_tracepoint): New.
9751         (cmd_qtdp): Call remove_tracepoint when failed to install.
9752
9753 2012-03-07  Pedro Alves  <palves@redhat.com>
9754
9755         * linux-low.c (get_detach_signal): New.
9756         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9757         Pass on pending signals to PTRACE_DETACH.  Check the result of the
9758         ptrace call.
9759         * server.c (program_signals, program_signals_p): New.
9760         (handle_general_set): Handle QProgramSignals.
9761         * server.h (program_signals, program_signals_p): Declare.
9762
9763 2012-03-05  Pedro Alves  <palves@redhat.com>
9764             Jan Kratochvil  <jan.kratochvil@redhat.com>
9765
9766         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9767         New comment why.
9768
9769 2012-03-03  Yao Qi  <yao@codesourcery.com>
9770
9771         * tracepoint.c (tracepoint_look_up_symbols): Update call to
9772         agent_look_up_symbols.
9773
9774 2012-03-03  Yao Qi  <yao@codesourcery.com>
9775
9776         * Makefile.in (linux-low.o): Keep dependence on agent.h.
9777         (linux-x86-low.o): Likewise.
9778         * server.h: Remove in_process_agent_loaded.
9779         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
9780         common/agent.c.
9781         Update callers.
9782
9783 2012-03-03  Yao Qi  <yao@codesourcery.com>
9784
9785         * tracepoint.c (gdb_agent_capability): New global.
9786         (in_process_agent_loaded_ust): Renamed to
9787         `in_process_agent_supports_ust'.
9788         Update callers.
9789         (in_process_agent_supports_ust): Call agent_capability_check.
9790         (clear_installed_tracepoints): Assert that agent supports
9791         agent.
9792
9793 2012-03-03  Yao Qi  <yao@codesourcery.com>
9794
9795         * linux-low.c (linux_supports_agent): New.
9796         (linux_target_ops): Initialize field `supports_agent' with
9797         linux_supports_agent.
9798         * target.h (struct target_ops) <supports_agent>: New.
9799         (target_supports_agent): New macro.
9800         * server.c (handle_general_set): Handle packet 'QAgent'.
9801         (handle_query): Send `QAgent+'.
9802         * Makefile.in (server.o): Depends on agent.h.
9803
9804 2012-03-03  Yao Qi  <yao@codesourcery.com>
9805
9806         * Makefile.in (OBS): Add agent.o.
9807         Add new rule for agent.o.
9808         Track dependence of tracepoint.c on agent.h.
9809         * tracepoint.c (run_inferior_command_1):
9810         (run_inferior_command): Call agent_run_command.
9811         (gdb_ust_connect_sync_socket): Deleted.  Move it to
9812         common/agent.c.
9813         (resume_thread, stop_thread): Likewise.
9814         (gdb_ust_socket_init): Renamed to ...
9815         (gdb_agent_socket_init): ... New.
9816         (gdb_ust_thread): Renamed to ...
9817         (gdb_agent_helper_thread): ... New.
9818         (gdb_ust_init): Move some code to ...
9819         (gdb_agent_init): ... here.  New.
9820         [HAVE_UST]: Call gdb_ust_init.
9821         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
9822         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9823         * config.in, configure: Regenerated.
9824
9825 2012-03-02  Pedro Alves  <palves@redhat.com>
9826
9827         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9828         * linux-low.c (struct simple_pid_list): New.
9829         (stopped_pids): New a struct simple_pid_list pointer.
9830         (add_to_pid_list, pull_pid_from_list): New.
9831         (handle_extended_wait): Don't assume the first signal new children
9832         report is SIGSTOP.  Adjust call to pull_pid_from_list.
9833         (linux_wait_for_lwp): Adjust.
9834
9835 2012-03-02  Yao Qi  <yao@codesourcery.com>
9836
9837         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9838         debug log.
9839
9840 2012-03-02  Yao Qi  <yao@codesourcery.com>
9841
9842         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9843         `stop_pc' and `tpoint'.  Update caller.
9844
9845 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
9846
9847         * linux-low.h (linux_target_ops): Add regset_bitmap member.
9848         * linux-low.c (use_linux_regsets): New macro.
9849         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9850         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9851         (linux_register_in_regsets): New function.
9852         (usr_fetch_inferior_registers): Skip registers covered by
9853         regsets.
9854         (usr_store_inferior_registers): Likewise.
9855         (usr_fetch_inferior_registers): New macro.
9856         (usr_store_inferior_registers): Likewise.
9857         (linux_fetch_registers): Handle mixed regset/non-regset targets.
9858         (linux_store_registers): Likewise.
9859         * linux-mips-low.c (init_registers_mips_dsp_linux): New
9860         prototype.
9861         (init_registers_mips64_dsp_linux): Likewise.
9862         (init_registers_mips_linux): New macro.
9863         (init_registers_mips_dsp_linux): Likewise.
9864         (mips_dsp_num_regs): Likewise.
9865         (DSP_BASE, DSP_CONTROL): New fallback macros.
9866         (mips_base_regs): New macro.
9867         (mips_regmap): Use it.  Fix the size.
9868         (mips_dsp_regmap): New variable.
9869         (mips_dsp_regset_bitmap): Likewise.
9870         (mips_arch_setup): New function.
9871         (mips_cannot_fetch_register): Use the_low_target.regmap rather
9872         than mips_regmap.
9873         (mips_cannot_store_register): Likewise.
9874         (the_low_target): Update .arch_setup, .num_regs and .regmap
9875         initializers.  Add .regset_bitmap initializer.
9876         * linux-arm-low.c (the_low_target): Add .regset_bitmap
9877         initializer.
9878         * linux-bfin-low.c (the_low_target): Likewise.
9879         * linux-cris-low.c (the_low_target): Likewise.
9880         * linux-crisv32-low.c (the_low_target): Likewise.
9881         * linux-ia64-low.c (the_low_target): Likewise.
9882         * linux-m32r-low.c (the_low_target): Likewise.
9883         * linux-m68k-low.c (the_low_target): Likewise.
9884         * linux-ppc-low.c (the_low_target): Likewise.
9885         * linux-s390-low.c (the_low_target): Likewise.
9886         * linux-sh-low.c (the_low_target): Likewise.
9887         * linux-sparc-low.c (the_low_target): Likewise.
9888         * linux-tic6x-low.c (the_low_target): Likewise.
9889         * linux-x86-low.c (the_low_target): Likewise.
9890         * linux-xtensa-low.c (the_low_target): Likewise.
9891         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9892         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
9893         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9894         srv_xmlfiles.
9895         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9896         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9897
9898 2012-02-29  Yao Qi  <yao@codesourcery.com>
9899             Pedro Alves  <palves@redhat.com>
9900
9901         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9902         `step_over_finished' is true.
9903
9904 2012-02-27  Pedro Alves  <palves@redhat.com>
9905
9906         * linux-low.c (pid_is_stopped): Delete, moved to common/.
9907         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9908
9909 2012-02-27  Pedro Alves  <palves@redhat.com>
9910
9911         PR server/9684
9912         * linux-low.c (pid_is_stopped): New.
9913         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9914
9915 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
9916
9917         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9918         of conditions.
9919
9920 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
9921
9922         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9923
9924 2012-02-24  Luis Machado  <lgustavo@codesourcery>
9925
9926         * server.c (handle_query): Advertise support for target-side
9927         breakpoint condition evaluation.
9928         (process_point_options): New function.
9929         (process_serial_event): When inserting a breakpoint, check for
9930         a target-side condition that should be evaluated.
9931
9932         * mem-break.c: Include regcache.h and ax.h.
9933         (point_cond_list_t): New data structure.
9934         (breakpoint) <cond_list>: New field.
9935         (find_gdb_breakpoint_at): Make non-static.
9936         (delete_gdb_breakpoint_at): Clear any target-side
9937         conditions.
9938         (clear_gdb_breakpoint_conditions): New function.
9939         (add_condition_to_breakpoint): Likewise.
9940         (add_breakpoint_condition): Likewise.
9941         (gdb_condition_true_at_breakpoint): Likewise.
9942         (gdb_breakpoint_here): Return result directly instead
9943         of going through a local variable.
9944
9945         * mem-break.h (find_gdb_breakpoint_at): New prototype.
9946         (clear_gdb_breakpoint_conditions): Likewise.
9947         (add_breakpoint_condition): Likewise.
9948         (gdb_condition_true_at_breakpoint): Likewise.
9949
9950         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9951         (need_step_over_p): Take target-side breakpoint condition into
9952         consideration.
9953
9954 2012-02-24  Luis Machado  <lgustavo@codesourcery>
9955
9956         * server.h: Include tracepoint.h.
9957         (agent_mem_read, agent_get_trace_state_variable_value,
9958         agent_set_trace_state_variable_value,
9959         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9960         get_set_tsv_func_addr): New prototypes.
9961
9962         * ax.h: New include file.
9963         * ax.c: New source file.
9964
9965         * tracepoint.c: Include ax.h.
9966         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9967         agent_expr, eval_result_type): Move to ax.h.
9968         (parse_agent_expr): Rename to ...
9969         (gdb_parse_agent_expr): ... this, make it non-static and move
9970         to ax.h.
9971         (unparse_agent_expr) Rename to ...
9972         (gdb_unparse_agent_expr): ... this, make it non-static and move
9973         to ax.h.
9974         (eval_agent_expr): Rename to ...
9975         (eval_tracepoint_agent_expr): ... this.
9976         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9977         forward declarations.
9978         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9979         (agent_get_trace_state_variable_value): New function.
9980         (agent_set_trace_state_variable_value): New function.
9981         (cmd_qtdp): Call gdb_parse_agent_expr (...).
9982         (response_tracepoint): Call gdb_unparse_agent_expr (...).
9983         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9984         (condition_true_at_tracepoint): Likewise.
9985         (parse_agent_expr): Rename to ...
9986         (gdb_parse_agent_expr): ... this and move to ax.c.
9987         (unparse_agent_expr): Rename to ...
9988         (gdb_unparse_agent_expr): ... this and move to ax.c.
9989         (gdb_agent_op_name): Move to ax.c.
9990         (eval_agent_expr): Rename to ...
9991         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9992         and move to ax.c.
9993         (eval_tracepoint_agent_expr): New function.
9994         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9995         non-static.
9996         (current_insn_ptr, emit_error, struct bytecode_address): Move to
9997         ax.c.
9998         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9999         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10000         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10001         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10002         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10003         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10004         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10005         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10006         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10007         (compile_bytecodes): Remove forward declaration.
10008         (is_goto_target): Move to ax.c.
10009         (compile_bytecodes): Move to ax.c and call
10010         agent_get_trace_state_variable_value (...) and
10011         agent_set_trace_state_variable_value (...).
10012
10013         * Makefile.in: Update ax.c and IPA dependencies.
10014
10015 2012-02-24  Pedro Alves  <palves@redhat.com>
10016
10017         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10018         (cmd_bigqtbuffer_circular): ... this.  Only handle
10019         'QTBuffer:circular:'.
10020         (handle_tracepoint_general_set): Adjust.
10021
10022 2012-02-16  Yao Qi  <yao@codesourcery.com>
10023
10024         * inferiors.c: Move code to ...
10025         * dll.c: .... here.  New.
10026         * server.h: Declare clear_dlls.
10027         * Makefile.in (SFILES): Add dll.c.
10028         (OBS): Add dll.o
10029         (dll.o): New rule.
10030
10031 2012-02-11  Yao Qi  <yao@codesourcery.com>
10032
10033         * server.c: (handle_monitor_command): Add a new parameter
10034         `own_buf'.
10035         (handle_query): Update caller.
10036
10037 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
10038
10039         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10040         * configure, config.in: Regenerate.
10041         * hostio.c: Provide an alternate implementation if HAVE_READLINK
10042         is not defined.
10043
10044 2012-02-02  Pedro Alves  <palves@redhat.com>
10045
10046         Try SIGKILL first, then PTRACE_KILL.
10047         * linux-low.c (linux_kill_one_lwp): New.
10048         (linux_kill_one_lwp): Rename to ...
10049         (kill_one_lwp_callback): ... this.  Use the new
10050         linux_kill_one_lwp.
10051
10052 2012-02-02  Pedro Alves  <palves@redhat.com>
10053
10054         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10055         inferior.
10056
10057 2012-01-27  Pedro Alves  <palves@redhat.com>
10058
10059         * linux-low.c (linux_child_pid_to_exec_file): Delete.
10060         (elf_64_file_p): Make static.
10061         (linux_pid_exe_is_elf_64_file): New.
10062         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10063         Delete declarations.
10064         (linux_pid_exe_is_elf_64_file): Declare.
10065         * linux-x86-low.c (x86_arch_setup): Use
10066         linux_pid_exe_is_elf_64_file.
10067
10068 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
10069
10070         * linux-low.c (linux_wait_for_event_1): Rename to ...
10071         (linux_wait_for_event): ... here and merge it with former
10072         linux_wait_for_event - new variable wait_ptid, use it.
10073         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10074
10075 2012-01-23  Pedro Alves  <palves@redhat.com>
10076
10077         * server.c (main): Avoid yet another case of infinite loop while
10078         detaching/killing after a longjmp.
10079
10080 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10081
10082         Code cleanup.
10083         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10084
10085 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
10086
10087         * hostio.c (handle_readlink): New function.
10088         (handle_vFile): Call it to handle "vFile:readlink" packets.
10089
10090 2012-01-20  Pedro Alves  <palves@redhat.com>
10091             Ulrich Weigand  <ulrich.weigand@linaro.org>
10092
10093         * server.c (handle_v_requests): Only support vAttach and vRun to
10094         start multiple processes when in extended protocol mode.
10095
10096 2012-01-17  Pedro Alves  <palves@redhat.com>
10097
10098         * tracepoint.c (initialize_tracepoint): Use mmap instead of
10099         memalign plus mprotect to allocate the scratch buffer.
10100
10101 2012-01-13  Pedro Alves  <palves@redhat.com>
10102
10103         * server.c (attach_inferior): Clear `cont_thread'.
10104
10105 2012-01-13  Pedro Alves  <palves@redhat.com>
10106
10107         * server.c (main): Avoid infinite loop while detaching/killing
10108         after a longjmp.
10109
10110 2012-01-09  Doug Evans  <dje@google.com>
10111
10112         * server.c (start_inferior): Set last_ptid in --wrapper case.
10113
10114 2012-01-06  Yao Qi  <yao@codesourcery.com>
10115
10116         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10117         defined.
10118         [IN_PROCESS_AGENT] (debug_agent): New global variable.
10119
10120 2012-01-04  Yao Qi  <yao@codesourcery.com>
10121
10122         * tracepoint.c (cmd_qtdp): Print debug message
10123         for static tracepoint.
10124
10125 2012-01-04  Yao Qi  <yao@codesourcery.com>
10126
10127         * tracepoint.c (trace_vdebug): Differentiate debug message
10128         between gdbserver and IPA.
10129
10130 2012-01-03  Yao Qi  <yao@codesourcery.com>
10131
10132         * tracepoint.c (tracepoint_was_hit): Don't collect for
10133         static tracepoint.
10134
10135 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
10136
10137         * terminal.h: Reformat copyright header.
10138
10139 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
10140
10141         * server.c (gdbserver_version): Update copyright year.
10142         * gdbreplay.c (gdbreplay_version): Likewise.
10143
10144 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
10145
10146         * linux-low.c (linux_create_inferior): Put empty if clause for write.
10147
10148         Revert:
10149         2011-12-18  Hui Zhu  <teawater@gmail.com>
10150         * linux-low.c (linux_create_inferior): Save return value to ret.
10151
10152 2011-12-18  Hui Zhu  <teawater@gmail.com>
10153
10154         * linux-low.c (linux_create_inferior): Save return value to ret.
10155
10156 2011-12-16  Doug Evans  <dje@google.com>
10157
10158         * linux-low.c (linux_create_inferior): If stdio connection,
10159         redirect stdin from /dev/null, stdout to stderr.
10160         * remote-utils.c (remote_is_stdio): New static global.
10161         (remote_connection_is_stdio): New function.
10162         (remote_prepare): Handle stdio connection.
10163         (remote_open): Ditto.
10164         (remote_close): Don't close stdin for stdio connections.
10165         (read_prim,write_prim): New functions.  Replace all calls to
10166         read/write to these.
10167         * server.c (main): Watch for "-" argument.  Move call to
10168         remote_prepare before start_inferior.
10169         * server.h (STDIO_CONNECTION_NAME): New macro.
10170         (remote_connection_is_stdio): Declare.
10171
10172         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10173         in debugging output.
10174
10175 2011-12-15  Yao Qi  <yao@codesourcery.com>
10176
10177         * tracepoint.c: Include sys/syscall.h.
10178         (gdb_ust_thread): Remove preprocessor conditional.
10179
10180 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
10181
10182         * linux-low.c (linux_detach_one_lwp): Call
10183         the_low_target.prepare_to_resume before detaching.
10184
10185 2011-12-14  Yao Qi  <yao@codesourcery.com>
10186
10187         * tracepoint.c (gdb_ust_thread): Don't ignore return value
10188         of write.
10189
10190 2011-12-14  Yao Qi  <yao@codesourcery.com>
10191
10192         * i386-low.c (i386_low_stopped_data_address): Initialize local
10193         variable `control'.
10194
10195 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
10196
10197         PR remote/13492
10198
10199         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10200         DR_CONTROL unless necessary.  Extend comments.
10201         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10202         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
10203
10204 2011-12-13  Yao Qi  <yao@codesourcery.com>
10205
10206         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10207         macros.
10208         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10209
10210 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
10211
10212         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10213         Print new debug message for such case.
10214
10215 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
10216
10217         Fix overlapping memcpy.
10218         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
10219         the read_inferior_memory transfer.
10220         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
10221         write_inferior_memory transfer.
10222         (set_fast_tracepoint_jump): New variable buf.  Use it for the
10223         read_inferior_memory and write_inferior_memory transfers.
10224         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10225         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10226         Use it for the write_inferior_memory transfer.
10227         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10228         buffers.
10229
10230 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
10231
10232         * linux-low.c (fetch_register, store_register): Make code
10233         consistent, fix formatting.
10234
10235 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
10236
10237         * linux-low.c (usr_store_inferior_registers): Factor out code
10238         to handle individual registers into...
10239         (store_register): ... this new function.
10240
10241 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
10242
10243         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10244         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10245         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10246         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10247         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10248         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10249         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10250         (srv_xmlfiles): Add new XML files.
10251
10252         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10253         and <sys/uio.h>.
10254         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10255         (init_registers_s390_linux32v1): Add prototype.
10256         (init_registers_s390_linux32v2): Likewise.
10257         (init_registers_s390_linux64v1): Likewise.
10258         (init_registers_s390_linux64v2): Likewise.
10259         (init_registers_s390x_linux64v1): Likewise.
10260         (init_registers_s390x_linux64v2): Likewise.
10261         (s390_num_regs): Increment to 52.
10262         (s390_regmap): Add orig_r2 register.
10263         (s390_num_regs_3264): Increment to 68.
10264         (s390_regmap_3264): Add orig_r2 register.
10265         (s390_collect_ptrace_register): Handle orig_r2 register.
10266         (s390_supply_ptrace_register): Likewise.
10267         (s390_fill_last_break): New function.
10268         (s390_store_last_break): Likewise.
10269         (s390_fill_system_call): New function.
10270         (s390_store_system_call): Likewise.
10271         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10272         register sets.
10273         (s390_check_regset): New function.
10274         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10275         NT_S390_SYSTEM_CALL regsets and use appropriate description.
10276         Update target_regsets for available register sets.
10277
10278 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
10279             Jan Kratochvil  <jan.kratochvil@redhat.com>
10280
10281         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10282         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10283         New.
10284         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10285         * linux-low.h (struct process_info_private): New member r_debug.
10286         * server.c (handle_qxfer_libraries): Call
10287         the_target->qxfer_libraries_svr4.
10288         (handle_qxfer_libraries_svr4): New function.
10289         (qxfer_packets): New entry "libraries-svr4".
10290         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10291         * target.h (struct target_ops): New member qxfer_libraries_svr4.
10292         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10293         PACKET_qXfer_libraries_svr4.
10294
10295 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
10296
10297         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10298         PSW address/mask between 8-byte and 16-byte formats.
10299         (s390_supply_ptrace_register): Likewise.
10300         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10301         basic addressing mode bit.
10302
10303 2011-11-24  Stan Shebs  <stan@codesourcery.com>
10304
10305         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10306
10307 2011-11-17  Stan Shebs  <stan@codesourcery.com>
10308
10309         * tracepoint.c (struct tracepoint): New field traceframe_usage.
10310         (tracing_start_time): New global.
10311         (tracing_stop_time): New global.
10312         (tracing_user_name): New global.
10313         (tracing_notes): New global.
10314         (tracing_stop_note): New global.
10315         (cmd_qtstart): Set traceframe_usage, start_time.
10316         (stop_tracing): Set stop_time.
10317         (cmd_qtstatus): Report additional status.
10318         (cmd_qtp): New function.
10319         (handle_tracepoint_query): Call it.
10320         (cmd_qtnotes): New function.
10321         (handle_tracepoint_general_set): Call it.
10322         (get_timestamp): Rename from tsv_get_timestamp.
10323
10324 2011-11-14  Stan Shebs  <stan@codesourcery.com>
10325             Kwok Cheung Yeung  <kcy@codesourcery.com>
10326
10327         * linux-x86-low.c (small_jump_insn): New.
10328         (i386_install_fast_tracepoint_jump_pad): Add arguments for
10329         trampoline and error message, build a trampoline and issue a small
10330         jump instruction to it.
10331         (x86_install_fast_tracepoint_jump_pad): Add arguments for
10332         trampoline and error message.
10333         (x86_get_min_fast_tracepoint_insn_len): New.
10334         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10335         * linux-low.h (struct linux_target_ops): Add arguments to
10336         install_fast_tracepoint_jump_pad operation, add new operation.
10337         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10338         arguments.
10339         (linux_get_min_fast_tracepoint_insn_len): New function.
10340         (linux_target_op): Add new operation.
10341         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10342         (gdb_trampoline_buffer_end): Ditto.
10343         (gdb_trampoline_buffer_error): Ditto.
10344         (struct ipa_sym_addresses): Add fields for new IPA variables.
10345         (symbol_list): Add entries for new IPA variables.
10346         (struct tracepoint): Add fields to hold the address range of the
10347         trampoline used by the tracepoint.
10348         (trampoline_buffer_head): New static variable.
10349         (trampoline_buffer_tail): Ditto.
10350         (claim_trampoline_space): New function.
10351         (have_fast_tracepoint_trampoline_buffer): New function.
10352         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10353         structure.
10354         (install_fast_tracepoint): Ditto, also add error buffer argument.
10355         (cmd_qtminftpilen): New function.
10356         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10357         (fast_tracepoint_from_trampoline_address): New function.
10358         (fast_tracepoint_collecting): Handle trampoline as part of jump
10359         pad space.
10360         (set_trampoline_buffer_space): New function.
10361         (initialize_tracepoint): Initialize new IPA variables.
10362         * target.h (struct target_ops): Add arguments to
10363         install_fast_tracepoint_jump_pad operation, add new
10364         get_min_fast_tracepoint_insn_len operation.
10365         (target_get_min_fast_tracepoint_insn_len): New.
10366         (install_fast_tracepoint_jump_pad): Add arguments.
10367         * server.h (IPA_BUFSIZ): Define.
10368         * linux-i386-ipa.c: Include extra header files.
10369         (initialize_fast_tracepoint_trampoline_buffer): New function.
10370         (initialize_low_tracepoint): Call it.
10371         * server.h (set_trampoline_buffer_space): Declare.
10372         (claim_trampoline_space): Ditto.
10373         (have_fast_tracepoint_trampoline_buffer): Ditto.
10374
10375 2011-11-14  Yao Qi  <yao@codesourcery.com>
10376
10377         * server.c (handle_query): Handle InstallInTrace for qSupported.
10378         * tracepoint.c (add_tracepoint): Sort list.
10379         (install_tracepoint, download_tracepoint): New.
10380         (cmd_qtdp): Call them to install and download tracepoints.
10381         (sort_tracepoints): Removed.
10382         (cmd_qtstart): Update.
10383
10384 2011-11-14  Yao Qi  <yao@codesourcery.com>
10385
10386         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10387         * mem-break.h: Declare.
10388         * tracepoint.c (cmd_qtstart): Move some code to ...
10389         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10390         New.
10391         (download_tracepoints): Move some code to ...
10392         (download_tracepoint_1): ... here.  New.
10393
10394 2011-11-08  Yao Qi  <yao@codesourcery.com>
10395
10396         * remote-utils.c (relocate_instruction): A comment fix.
10397
10398 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
10399
10400         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10401         (i386_dr_low_get_control, i386_dr_low_get_status): Use
10402         dr_status_mirror and dr_control_mirror from debug_reg_state.
10403         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10404         (i386_initial_stuff): Remove use of deleted globals.
10405         (i386_get_thread_context, i386_set_thread_context,
10406         i386_thread_added): Use dr_status_mirror and dr_control_mirror
10407         from debug_reg_state.
10408
10409 2011-11-05  Yao Qi  <yao@codesourcery.com>
10410
10411         * tracepoint.c (gdb_collect): Loop over tracepoints of same
10412         address as TPOINT's.
10413
10414 2011-11-02  Stan Shebs  <stan@codesourcery.com>
10415
10416         * tracepoint.c (agent_mem_read_string): New function.
10417         (eval_agent_expr): Call it for tracenz.
10418         * server.c (handle_query): Report support for tracenz.
10419
10420 2011-11-02  Yao Qi  <yao@codesourcery.com>
10421
10422         * tracepoint.c (cmd_qtstart): Remove unused local variables.
10423
10424 2011-11-02  Yao Qi  <yao@codesourcery.com>
10425
10426         * target.h: Fix a typo in comment.
10427
10428 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
10429
10430         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
10431         clobber the breakpoints' shadows with fast tracepoint jumps.
10432         * mem-break.h (check_mem_write): Add `myaddr' parameter.
10433         * target.c (write_inferior_memory): Also pass MYADDR down to
10434         check_mem_write.
10435
10436 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
10437
10438         * configure.ac: Check support for personality routine.
10439         * configure: Regenerate.
10440         * config.in: Likewise.
10441         * linux-low.c: Include <sys/personality.h>.
10442         Define ADDR_NO_RANDOMIZE if necessary.
10443         (linux_create_inferior): Disable address space randomization when
10444         forking inferior, if requested.
10445         (linux_supports_disable_randomization): New function.
10446         (linux_target_ops): Install it.
10447         * server.h (disable_randomization): Declare.
10448         * server.c (disable_randomization): New global variable.
10449         (handle_general_set): Handle QDisableRandomization.
10450         (handle_query): Likewise for qSupported.
10451         (main): Support --disable-randomization and --no-disable-randomization
10452         command line arguments.
10453         * target.h (struct target_ops): Add supports_disable_randomization.
10454         (target_supports_disable_randomization): New macro.
10455
10456 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
10457
10458         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10459         ifdef check.
10460         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10461         [!PT_GETDSBT] (target_loadmap): New definition.
10462         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10463         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10464         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10465         and PT_GETDSBT to LINUX_LOADMAP.
10466         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10467         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10468
10469 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10470
10471         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10472         (arm_linux_hwbp_cap): New static variable.
10473         (arm_linux_get_hwbp_cap): Replace by ...
10474         (arm_linux_init_hwbp_cap): ... this new function.
10475         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10476         (arm_linux_get_hw_watchpoint_count): Likewise.
10477         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10478         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10479         (arm_prepare_to_resume): Use perror_with_name instead of error.
10480
10481 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10482
10483         * linux-arm-low.c: Include <signal.h>.
10484         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10485         (struct arm_linux_hwbp_cap): New data type.
10486         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10487         (struct arm_linux_hw_breakpoint): New data type.
10488         (MAX_BPTS, MAX_WPTS): Define.
10489         (struct arch_process_info, struct arch_lwp_info): New data types.
10490         (arm_linux_get_hwbp_cap): New function.
10491         (arm_linux_get_hw_breakpoint_count): Likewise.
10492         (arm_linux_get_hw_watchpoint_count): Likewise.
10493         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10494         (arm_hwbp_control_initialize): Likewise.
10495         (arm_hwbp_control_is_enabled): Likewise.
10496         (arm_hwbp_control_is_initialized): Likewise.
10497         (arm_hwbp_control_disable): Likewise.
10498         (arm_linux_hw_breakpoint_equal): Likewise.
10499         (arm_linux_hw_point_initialize): Likewise.
10500         (struct update_registers_data): New data structure.
10501         (update_registers_callback: New function.
10502         (arm_insert_point): Likewise.
10503         (arm_remove_point): Likewise.
10504         (arm_stopped_by_watchpoint): Likewise.
10505         (arm_stopped_data_address): Likewise.
10506         (arm_new_process): Likewise.
10507         (arm_new_thread): Likewise.
10508         (arm_prepare_to_resume): Likewise.
10509         (the_low_target): Register arm_insert_point, arm_remove_point,
10510         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10511         arm_new_thread, and arm_prepare_to_resume.
10512
10513 2011-09-15  Stan Shebs  <stan@codesourcery.com>
10514
10515         * server.h (struct emit_ops): Add compare-goto fields.
10516         * tracepoint.c (gdb_agent_op_sizes): New table.
10517         (emit_eq_goto): New function.
10518         (emit_ne_goto): New function.
10519         (emit_lt_goto): New function.
10520         (emit_le_goto): New function.
10521         (emit_gt_goto): New function.
10522         (emit_ge_goto): New function.
10523         (is_goto_target): New function.
10524         (compile_bytecodes): Recognize special cases of compare-goto
10525         combinations and call specialized emitters for them.
10526         * linux-x86-low.c (amd64_emit_eq_goto): New function.
10527         (amd64_emit_ne_goto): New function.
10528         (amd64_emit_lt_goto): New function.
10529         (amd64_emit_le_goto): New function.
10530         (amd64_emit_gt_goto): New function.
10531         (amd64_emit_ge_goto): New function.
10532         (amd64_emit_ops): Add the new functions.
10533         (i386_emit_eq_goto): New function.
10534         (i386_emit_ne_goto): New function.
10535         (i386_emit_lt_goto): New function.
10536         (i386_emit_le_goto): New function.
10537         (i386_emit_gt_goto): New function.
10538         (i386_emit_ge_goto): New function.
10539         (i386_emit_ops): Add the new functions.
10540
10541 2011-09-08  Stan Shebs  <stan@codesourcery.com>
10542
10543         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10544         (i386_emit_epilogue): Restore %ebx.
10545
10546 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
10547
10548         * server.c (step_thread): Remove definition.
10549         (process_serial_event): Don't handle Hs.
10550         * server.h (step_thread): Remove declaration.
10551         * target.c (set_desired_inferior): Remove use of step_thread.
10552
10553 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10554
10555         * linux-low.c: Include linux-procfs.h.
10556         (linux_attach_lwp_1): Update comments.
10557         (linux_attach): Scan for existing threads when attaching to a
10558         process that is the tgid.
10559         * Makefile.in: Update dependencies.
10560
10561 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10562
10563         * configure.srv: Add linux-procfs.o dependencies.
10564
10565 2011-08-14  Yao Qi  <yao@codesourcery.com>
10566
10567         * target.h (struct target_ops): Fix indent.
10568         * win32-low.c (win32_target_ops): Fix comment.
10569
10570 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
10571             Yao Qi  <yao@codesourcery.com>
10572
10573         * Makefile.in (clean): Remove tic6x-*.c files.
10574         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10575         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10576         (tic6x-c64xp-linux.c): Likewise.
10577         * configure.srv: Add support for tic6x-*-uclinux.
10578         * linux-tic6x-low.c: New.
10579         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10580
10581 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
10582             Yao Qi  <yao@codesourcery.com>
10583
10584         * target.h (struct target_ops): Add read_loadmap.
10585         * linux-low.c (struct target_loadseg): New type.
10586         (struct target_loadmap): New type.
10587         (linux_read_loadmap): New function.
10588         (linux_target_ops): Add linux_read_loadmap.
10589         * server.c (handle_query): Support qXfer:fdpic:read packet.
10590         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10591         to NULL.
10592
10593 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
10594
10595         * win32-low.c: Include <stdint.h>.
10596
10597 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
10598
10599         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10600         to the inferior here.
10601         (i386_remove_aligned_watchpoint): Ditto.
10602         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10603         fit part of the watchpoint in the debug registers.
10604         (i386_update_inferior_debug_regs): New.
10605         (i386_low_insert_watchpoint): Work on a local mirror of the debug
10606         registers, and only update the inferior on success.
10607         (i386_low_remove_watchpoint): Ditto.
10608
10609 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
10610
10611         * linux-low.c (compare_ints, unique, list_threads, show_process,
10612         linux_core_of_thread): Delete.
10613         (linux_target_ops): Change linux_core_of_thread to
10614         linux_common_core_of_thread.
10615         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10616         * utils.c (malloc_failure): Change type of argument.
10617         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10618         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10619         common/linux-osdata.c, common/ptid.c and common/buffer.c.
10620         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10621         (IPA_OBJS): Add common-utils-ipa.o.
10622         (ptid_h, linux_osdata_h): New macros.
10623         (server_h): Add common/common-utils.h, common/xml-utils.h,
10624         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10625         common/ptid.h.
10626         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10627         ptid.o, buffer.o): New rules.
10628         (linux-low.o): Add common/linux-osdata.h as a dependency.
10629         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10630         * configure.ac: Add AC_HEADER_DIRENT check.
10631         * config.in: Regenerate.
10632         * configure: Regenerate.
10633         * remote-utils.c (xml_escape_text): Delete.
10634         (buffer_grow, buffer_free, buffer_init, buffer_finish,
10635         buffer_xml_printf): Move to common/buffer.c.
10636         * server.c (main): Remove call to initialize_inferiors.
10637         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10638         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10639         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10640         internal_error, gdb_assert, gdb_assert_fail): Delete.
10641         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10642         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10643         common/buffer.h.
10644         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10645         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10646         initialize_inferiors): Delete.
10647
10648 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
10649
10650         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10651         symbol error.
10652
10653 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
10654
10655         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10656         assertion.
10657         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10658
10659 2011-05-26  Yao Qi  <yao@codesourcery.com>
10660
10661         * Makefile.in (thread-db.o): Track dependence to
10662         common/gdb_thread_db.h.
10663         * thread-db.c: include gdb_thread_db.h from right place.
10664
10665 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
10666
10667         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10668         __FILE__ and __LINE__ to internal_error.
10669
10670 2011-05-13  Doug Evans  <dje@google.com>
10671
10672         * thread-db.c (try_thread_db_load_from_sdir): New function.
10673         (try_thread_db_load_from_dir): New function.
10674         (thread_db_load_search): Handle $sdir, ignore $pdir.
10675         Remove trying of system directories if search of
10676         libthread-db-search-path fails, that is now done via $sdir.
10677
10678 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
10679
10680         * server.c (handle_query): Add EnableDisableTracepoints to the list
10681         of supported features.
10682         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10683         tracepoints.
10684         (cmd_qtenable_disable): New.
10685         (cmd_qtstart): Install tracepoints even if disabled.
10686         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10687         receiving a QTEnable or QTDisable packet.
10688         (gdb_collect): Skip data collection if fast tracepoint is disabled.
10689         (ust_marker_to_static_tracepoint): Do not ignore disabled static
10690         tracepoints.
10691         (gdb_probe): Skip data collection if static tracepoint is disabled.
10692
10693 2011-05-10  Doug Evans  <dje@google.com>
10694
10695         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10696
10697 2011-05-04  Doug Evans  <dje@google.com>
10698
10699         * linux-low.c (linux_join): Skip process lookup.
10700         * spu-low.c (spu_join): Ditto.
10701         * server.c (join_inferiors_callback): Delete.
10702         (process_serial_event): For 'D' packet (detach) call join_inferior
10703         directly.
10704
10705 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
10706
10707         * README: Don't mention xscale*-*-linux*.
10708         * configure.srv (xscale*-*-linux*): Don't handle target.
10709
10710 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
10711
10712         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10713         casting pointers.
10714         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10715         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10716         (i386_emit_void_call_2): Likewise.
10717
10718 2011-04-26  Yao Qi  <yao@codesourcery.com>
10719
10720         * linux-low.c: Move common macros to linux-ptrace.h.
10721         Include linux-ptrace.h.
10722         * Makefile.in (linux_ptrace_h): New.
10723         (linux-low.o): Depends on linux-ptrace.h.
10724
10725 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10726
10727         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10728         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
10729         (remote_prepare): New function with most of the TCP code from ...
10730         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
10731         setting transport_is_reliable.
10732         * server.c (run_once): New variable.
10733         (gdbserver_usage): Document it.
10734         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
10735         the first run if RUN_ONCE.
10736         * server.h (run_once, remote_prepare): New declarations.
10737
10738 2011-04-19  Tom Tromey  <tromey@redhat.com>
10739
10740         * win32-low.c (handle_load_dll): Remove duplicate "the".
10741
10742 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
10743
10744         Remove support for old Cygwin 1.5 versions.
10745         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10746         function to avoid warning.
10747         (win32_add_one_solib): Use cygwin_conv_path function to avoid
10748         warning.
10749
10750 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
10751
10752         * gdbserver/server.h (Macro _): Define it if not available.
10753
10754 2011-03-14  Michael Snyder  <msnyder@vmware.com>
10755
10756         * hostio.c (handle_close): Remove unnecessary null test.
10757
10758 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
10759
10760         * Makefile.in (maintainer-clean realclean distclean): Remove
10761         "make ...  subdir_do" command.
10762
10763 2011-03-10  Michael Snyder  <msnyder@vmware.com>
10764
10765         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10766
10767         * server.c (handle_v_run): Free alloced buffer on early return.
10768
10769 2011-03-09  Yao Qi  <yao@codesourcery.com>
10770
10771         Revert:
10772         2011-03-04  Yao Qi  <yao@codesourcery.com>
10773
10774         * Makefile.in: Remove GNU make feature --directory.
10775
10776         2011-03-05  Yao Qi  <yao@codesourcery.com>
10777
10778         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10779         (subdir_do): New make target.  Copied from gdb/Makefile.
10780         (maintainer-clean, realclean, distclean, clean): Call corresponding
10781         make targets in common/Makefile.
10782
10783         2011-02-11  Yao Qi  <yao@codesourcery.com>
10784
10785         * configure.ac: Call AC_PROG_RANLIB.
10786         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
10787         * configure: Regenerate.
10788
10789 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
10790
10791         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10792
10793 2011-03-06  Yao Qi  <yao@codesourcery.com>
10794
10795         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10796
10797 2011-03-05  Yao Qi  <yao@codesourcery.com>
10798
10799         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10800         (subdir_do): New make target.  Copied from gdb/Makefile.
10801         (maintainer-clean, realclean, distclean, clean): Call corresponding
10802         make targets in common/Makefile.
10803
10804 2011-03-04  Yao Qi  <yao@codesourcery.com>
10805
10806         * Makefile.in: Remove GNU make feature --directory.
10807
10808 2011-03-04  Michael Snyder  <msnyder@vmware.com>
10809
10810         * server.c (queue_stop_reply): Call xmalloc not malloc.
10811
10812 2011-03-02  Michael Snyder  <msnyder@vmware.com>
10813
10814         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10815
10816 2011-02-28  Michael Snyder  <msnyder@vmware.com>
10817
10818         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10819         (cmd_qtframe): Ditto.
10820         (cmd_qtbuffer): Ditto.
10821         (cmd_bigqtbuffer): Ditto.
10822
10823         * utils.c (decimal2str): Initialize 'width' to nine, then
10824         don't mess with it.
10825
10826 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10827
10828         * hostio.c (require_data): Free *data, not data.
10829
10830 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
10831
10832         * hostio.c (require_data): Use free, not xfree.
10833
10834 2011-02-27  Michael Snyder  <msnyder@vmware.com>
10835
10836         * server.c (handle_query): Discard unused value.
10837
10838         * hostio.c (require_data): Free malloc memory before returning
10839         error.
10840
10841 2011-02-26  Michael Snyder  <msnyder@vmware.com>
10842
10843         * linux-low.c (list_threads): Call closedir for dirent.
10844
10845 2011-02-27  Michael Snyder  <msnyder@vmware.com>
10846
10847         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10848         a case statement falls through.
10849
10850         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10851
10852         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10853         in comparison.
10854
10855 2011-02-26  Michael Snyder  <msnyder@vmware.com>
10856
10857         * utils.c (decimal2str): Eliminate dead code and dead param.
10858         (pulongest): Drop dead param from call to decimal2str.
10859         (plongest): Ditto.
10860
10861 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
10862
10863         Revert the following patch (not approved yet):
10864         2011-02-21  Hui Zhu  <teawater@gmail.com>
10865         * tracepoint.c (tp_printf): New function.
10866         (eval_agent_expr): Handle gdb_agent_op_printf.
10867
10868 2011-02-21  Hui Zhu  <teawater@gmail.com>
10869
10870         * tracepoint.c (tp_printf): New function.
10871         (eval_agent_expr): Handle gdb_agent_op_printf.
10872
10873 2011-02-18  Tom Tromey  <tromey@redhat.com>
10874
10875         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10876         (tracepoint.o): Likewise.
10877         * tracepoint.c (enum gdb_agent_op): Use ax.def.
10878         (gdb_agent_op_names): Likewise.
10879
10880 2011-02-18  Tom Tromey  <tromey@redhat.com>
10881
10882         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10883         gdb_agent_op_rot>: New constants.
10884         (gdb_agent_op_names): Add pick and roll.
10885         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10886         cases.
10887
10888 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
10889
10890         * aclocal.m4: Regenerated with aclocal-1.11.1.
10891
10892 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
10893
10894         * server.c (handle_qxfer_traceframe_info): New.
10895         (qxfer_packets): Register "traceframe-info".
10896         (handle_query): Report support for qXfer:traceframe-info:read+.
10897         * tracepoint.c (match_blocktype): New.
10898         (traceframe_find_block_type): Rename to ...
10899         (traceframe_walk_blocks): ... this.  Add callback filter argument,
10900         and use it.
10901         (traceframe_find_block_type): New, reimplemented on top of
10902         traceframe_walk_blocks.
10903         (build_traceframe_info_xml): New.
10904         (traceframe_read_info): New.
10905         * server.h (traceframe_read_info): Declare.
10906
10907 2011-02-11  Yao Qi  <yao@codesourcery.com>
10908
10909         * configure.ac: Call AC_PROG_RANLIB.
10910         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
10911         * configure: Regenerate.
10912
10913 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
10914
10915         * server.c (gdb_read_memory): Change return semantics to allow
10916         partial transfers.
10917         (handle_search_memory_1): Adjust.
10918         (process_serial_event) <'m' packet>: Handle partial transfers.
10919         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10920
10921 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
10922
10923         * regcache.c (init_register_cache): Initialize
10924         regcache->register_status.
10925         (free_register_cache): Release regcache->register_status.
10926         (regcache_cpy): Copy register_status.
10927         (registers_to_string): Print 'x's for unavailable registers.
10928         (supply_register): Mark the register's status valid or
10929         unavailable, depending on whether a buffer was passed in or not.
10930         (supply_register_zeroed): New.
10931         (supply_regblock): Mark the registers' status valid or
10932         unavailable, depending on whether a buffer was passed in or not.
10933         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10934         (struct regcache): New `register_status' field.
10935         (supply_register_zeroed): Declare.
10936         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10937         supply_register_zeroed, rather than passing a NULL buffer to
10938         supply_register.
10939         * tracepoint.c (fetch_traceframe_registers): Update comment.
10940
10941 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
10942
10943         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10944         buffer explicit.
10945
10946 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
10947
10948         * server.h (decode_xfer_write): Change prototype.
10949         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10950         and don't extract the annex here.
10951         * server.c (decode_xfer_read): Remove `annex' parameter,
10952         and don't extract the annex here.
10953         (decode_xfer): New.
10954         (struct qxfer): New.
10955         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10956         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10957         (handle_qxfer_statictrace): New functions, abstracted out from
10958         handle_query, and made to use the struct qxfer interface.
10959         (handle_threads_qxfer_proper): Rename to ...
10960         (handle_qxfer_threads_proper): ... this.
10961         (handle_threads_qxfer): Rename to ...
10962         (handle_qxfer_threads): ... this.  Adjust.
10963         (qxfer_packets): New array.
10964         (handle_qxfer): New function.
10965         (handle_query): Use handle_qxfer.
10966
10967 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
10968
10969         * gdbreplay.c: Shorten lines of >= 80 columns.
10970         * linux-low.c: Ditto.
10971         * linux-ppc-low.c: Ditto.
10972         * linux-s390-low.c: Ditto.
10973         * linux-sparc-low.c: Ditto.
10974         * linux-x86-low.c: Ditto.
10975         * linux-xtensa-low.c: Ditto.
10976         * mem-break.c: Ditto.
10977         * nto-low.c: Ditto.
10978         * regcache.h: Ditto.
10979         * remote-utils.c: Ditto.
10980         * server.c: Ditto.
10981         * server.h: Ditto.
10982         * thread-db.c: Ditto.
10983         * tracepoint.c: Ditto.
10984         * utils.c: Ditto.
10985         * win32-low.h: Ditto.
10986
10987 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
10988
10989         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10990         update.
10991
10992 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
10993
10994         * server.c (gdbserver_version): Update copyright year in version
10995         output.
10996         * gdbreplay.c (gdbreplay_version): Ditto.
10997
10998 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
10999
11000         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11001         * linux-bfin-low.c: New file.
11002         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11003         PT_DATA_ADDR for BFIN targets.
11004         * Makefile.in (SFILES): Add linux-bfin-low.c.
11005         (clean): Remove reg-bfin.c.
11006         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11007         * README: Mention supported Blackfin targets.
11008
11009 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
11010
11011         * .gitignore: New file.
11012
11013 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
11014
11015         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11016
11017 2010-10-22  Jie Zhang  <jie@codesourcery.com>
11018
11019         * Makefile.in: Add FLAGS_TO_PASS variable.
11020         (install): Remove dependency of install-only and recursively
11021         invoke make for install-only.
11022
11023 2010-10-04  Doug Evans  <dje@google.com>
11024
11025         * Makefile.in (uninstall): Use $(DESTDIR).
11026
11027 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
11028
11029         PR gdb/11842
11030
11031         * linux-x86-low.c (compat_siginfo_from_siginfo)
11032         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11033         si_code is < 0.  Check for si_code == SI_TIMER before checking for
11034         si_code < 0.
11035
11036 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11037
11038         * lynx-i386-low.c: New file.
11039         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11040
11041 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11042
11043         * lynx-low.c (ptrace_request_to_str): Remove handling for
11044         request values that have been removed in LynxOS 5.x.
11045
11046 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11047
11048         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11049         <ptrace.h>
11050
11051 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
11052
11053         * configure.ac: Add --enable-inprocess-agent option.
11054         * configure: Rebuilt.
11055
11056 2010-09-06  Yao Qi  <yao@codesourcery.com>
11057
11058         * linux-low.c (linux_kill): Remove unused variable.
11059         (linux_stabilize_threads): Likewise.
11060         * server.c (start_inferior): Likewise.
11061         (queue_stop_reply_callback): Likewise.
11062         * tracepoint.c (do_action_at_tracepoint): Likewise.
11063
11064 2010-09-06  Yao Qi  <yao@codesourcery.com>
11065
11066         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11067         on return.
11068
11069 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
11070
11071         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11072
11073 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
11074
11075         * Makefile.in (install-only): Replace $IPA_DEPFILES with
11076         "$(IPA_DEPFILES)".
11077
11078 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11079
11080         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11081         gdbserver/lynx-ppc-low.c: New files.
11082         * Makefile.in (lynx_low_h): New variable.
11083         (lynx-low.o, lynx-ppc-low.o): New rules.
11084         * configure.ac: On LynxOS, link with -lnetinet.
11085         * configure.srv: Add handling of powerpc-*-lynxos* targets.
11086         * configure: regenerate.
11087
11088 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11089
11090         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11091         * configure.ac: Add check for vasprintf and vsnprintf.
11092         * configure, config.in: Regenerate.
11093         * server.h (vasprintf, vsnprintf): Add conditional declarations.
11094
11095 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11096
11097         * gdbreplay.c: Move include of alloca.h up, next to include of
11098         malloc.h.
11099         * server.h: Add include of malloc.h.
11100         * mem-break.c: Remove include of malloc.h.
11101         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11102
11103 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11104
11105         * Makefile.in (memmem.o): Build with -Wno-error.
11106
11107 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11108
11109         * utils.c (xsnprintf): Make non-static.
11110         * server.h: Add xsnprintf declaration.
11111         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11112         replace calls to snprintf by calls to xsnprintf throughout.
11113
11114 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11115
11116         * configure.ac: Add configure check for alloca.
11117         * configure, config.in: Regenerate.
11118         * server.h: Include alloca.h if it exists.
11119         * gdbreplay.c: Include alloca.h if it exists.
11120
11121 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
11122
11123         * linux-low.c (__SIGRTMIN): Define if not already defined.
11124         (linux_create_inferior): Check for __ANDROID__ rather than
11125         __SIGRTMIN.
11126         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11127         are already deferred.
11128         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11129         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11130         stopped and already has a pending signal to report.
11131         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11132         a pending signal to report or is moving out of a jump pad.
11133         (linux_init_signals): Check for __ANDROID__ rather than
11134         __SIGRTMIN.
11135
11136 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
11137
11138         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11139         debug_threads check.  Avoid a linear search when not doing debug
11140         output.
11141
11142 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11143
11144         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11145         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11146         (struct file_handler) <fd>: Change type to gdb_fildes_t.
11147         (process_event): Change local fd's type to gdb_fildes_t.
11148         (create_file_handler): Adjust prototype.
11149         (delete_file_handler): Adjust prototype.
11150         (handle_file_event): Adjust prototype.  Use pfildes.
11151         (create_file_event): Adjsut prototype.
11152         * remote-utils.c (remote_desc, listen_desc): Change type to
11153         gdb_fildes_t.
11154         * server.h: New gdb_fildes_t typedef.
11155         [USE_WIN32API]: Include winsock2.h.
11156         (delete_file_handler, add_file_handler): Adjust prototypes.
11157         (pfildes): Declare.
11158         * utils.c (pfildes): New.
11159
11160 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11161
11162         * configure.ac (build_warnings): Add -Wno-char-subscripts.
11163         * configure: Regenerate.
11164
11165 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11166
11167         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11168         (linux_done_accessing_memory): ... this.
11169         (linux_target_ops): Adjust.
11170         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11171         * nto-low.c (nto_target_ops): Adjust comment.
11172         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11173         * spu-low.c (spu_target_ops): Adjust comment.
11174         * target.h (target_ops): Rename unprepare_to_access_memory field
11175         to done_accessing_memory.
11176         (unprepare_to_access_memory): Rename to ...
11177         (done_accessing_memory): ... this.
11178
11179 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11180
11181         * linux-low.c (linux_prepare_to_access_memory): New.
11182         (linux_unprepare_to_access_memory): New.
11183         (linux_target_ops): Install them.
11184         * server.c (read_memory): Rename to ...
11185         (gdb_read_memory): ... this.  Use
11186         prepare_to_access_memory/prepare_to_access_memory.
11187         (write_memory): Rename to ...
11188         (gdb_write_memory): ... this.  Use
11189         prepare_to_access_memory/prepare_to_access_memory.
11190         (handle_search_memory_1): Adjust.
11191         (process_serial_event): Adjust.
11192         * target.h (struct target_ops): New fields
11193         prepare_to_access_memory and unprepare_to_access_memory.
11194         (prepare_to_access_memory, unprepare_to_access_memory): New.
11195         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11196         prepare_to_access_memory/prepare_to_access_memory.
11197         * nto-low.c (nto_target_ops): Adjust.
11198         * spu-low.c (spu_target_ops): Adjust.
11199         * win32-low.c (win32_target_ops): Adjust.
11200
11201 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11202
11203         * Makefile.in (WARN_CFLAGS): Get it from configure.
11204         (WERROR_CFLAGS): New.
11205         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11206         * configure.ac: Introduce --enable-werror, which adds -Werror to
11207         the compiler command line.  Enabled by default.  Disable with
11208         --disable-werror.  Add -Wdeclaration-after-statement
11209         Wpointer-arith and -Wformat-nonliteral to warning flags.
11210         * configure: Regenerate.
11211
11212 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11213
11214         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11215
11216 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11217
11218         * gdbreplay.c (remote_error): New.
11219         (gdbchar): New.
11220         (expect): Use gdbchar.  Check for error reading from GDB.
11221         Clarify sync error output.
11222         (play): Check for errors writing to GDB.
11223         * linux-low.c (sigchld_handler): Really ignore `write' errors.
11224         * remote-utils.c (getpkt): Check for errors writing to the remote
11225         descriptor.
11226
11227 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11228
11229         * linux-low.c (linux_wait_1): Move non-debugging code out of
11230         `debug_threads' control.
11231
11232 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11233
11234         * linux-low.c (linux_wait_1): Don't set last_status here.
11235         * server.c (push_event, queue_stop_reply_callback): Assert we're
11236         not pushing a TARGET_WAITKIND_IGNORE event.
11237         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11238         (myresume, handle_target_event): Set the thread's last_resume_kind
11239         and last_status from the target returned status.
11240
11241 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11242
11243         PR threads/10729
11244
11245         * linux-x86-low.c (update_debug_registers_callback): New.
11246         (i386_dr_low_set_addr): Use it.
11247         (i386_dr_low_get_addr): New.
11248         (i386_dr_low_set_control): Use update_debug_registers_callback.
11249         (i386_dr_low_get_control): New.
11250         (i386_dr_low_get_status): Adjust.
11251         * linux-low.c (linux_stop_lwp): New.
11252         * linux-low.h (linux_stop_lwp): Declare.
11253
11254         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11255         argument instead of a i386_debug_reg_state.
11256         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11257         a i386_debug_reg_state.
11258         (i386_insert_aligned_watchpoint): Adjust.
11259         (i386_remove_aligned_watchpoint): Adjust.
11260         (i386_low_stopped_data_address): Read the debug registers from the
11261         inferior instead of from the mirrors.
11262         * i386-low.h (struct i386_debug_reg_state): Extend comment.
11263         (i386_dr_low_get_addr): Declare.
11264         (i386_dr_low_get_control): Declare.
11265         (i386_dr_low_get_status): Change prototype.
11266
11267         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11268         (i386_dr_low_get_addr): New.
11269         (i386_dr_low_get_control): New.
11270         (i386_dr_low_get_status): Adjust prototype.  Return
11271         dr_status_mirror.
11272         (i386_initial_stuff): Clear dr_status_mirror and
11273         dr_control_mirror.
11274         (i386_get_thread_context): Adjust.
11275         (i386_set_thread_context): Adjust.
11276         (i386_thread_added): Adjust.
11277
11278 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
11279
11280         * linux-low.h (linux_thread_area): Delete declaration.
11281
11282 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
11283
11284         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11285         after its termination.
11286
11287 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
11288
11289         * linux-low.c (gdb_wants_lwp_stopped): Delete.
11290         (gdb_wants_all_stopped): Delete.
11291         (linux_wait_1): Don't call them.
11292         * server.c (handle_v_cont): Tag all threads as want-stopped.
11293         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
11294         stopped as "client-wants-stopped".
11295
11296 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
11297
11298         * Makefile.in (signals_h): New.
11299         (server_h): Depend on it.
11300         (server.o): Don't depend on $(signals_def).
11301         (signals.o): Depend on $(signals_def).
11302
11303 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
11304
11305         * Makefile.in (signals_def): New.
11306         (server_h): Append include/gdb/signals.h and signals_def.
11307         (server.o): Append signals_def.
11308
11309 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
11310
11311         * server.c (handle_target_event): Use target_signal_to_host for
11312         resume_info.sig initialization.
11313         * target.h (struct thread_resume) <sig>: New comment.
11314
11315 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
11316
11317         * server.c (handle_query): strcpy() the returned string from paddress()
11318         instead of sprintf().
11319         * utils.c (paddress): Return phex_nz().
11320
11321 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
11322
11323         * server.c (handle_v_cont): Call mourn_inferior if process
11324         just exited.
11325         (myresume): Likewise.
11326
11327 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
11328
11329         Static tracepoints, and integration with UST.
11330
11331         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
11332         * mem-break.c (uninsert_all_breakpoints)
11333         (reinsert_all_breakpoints): New.
11334         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11335         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11336         (gdb_agent_ust_loaded, helper_thread_id)
11337         (gdb_agent_helper_thread_id): New macros.
11338         (struct ipa_sym_addresses): Add addr_ust_loaded,
11339         addr_helper_thread_id, addr_cmd_buf.
11340         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11341         (in_process_agent_loaded_ust): New.
11342         (write_e_ust_not_loaded): New.
11343         (maybe_write_ipa_ust_not_loaded): New.
11344         (struct collect_static_trace_data_action): New.
11345         (enum tracepoint_type) <static_tracepoint>: New.
11346         (struct tracepoint) <handle>: Mention static tracepoints.
11347         (struct static_tracepoint_ctx): New.
11348         (CMD_BUF_SIZE): New.
11349         (add_tracepoint_action): Handle static tracepoint actions.
11350         (unprobe_marker_at): New.
11351         (clear_installed_tracepoints): Handle static tracepoints.
11352         (cmd_qtdp): Handle static tracepoints.
11353         (probe_marker_at): New.
11354         (cmd_qtstart): Handle static tracepoints.
11355         (response_tracepoint): Handle static tracepoints.
11356         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11357         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11358         (get_context_regcache): Handle static tracepoints.
11359         (do_action_at_tracepoint): Handle static tracepoint actions.
11360         (traceframe_find_block_type): Handle static trace data blocks.
11361         (traceframe_read_sdata): New.
11362         (download_tracepoints): Download static tracepoint actions.
11363         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11364         (GDB_PROBE_NAME): New.
11365         (ust_ops): New.
11366         (GET_UST_SYM): New.
11367         (USTF): New.
11368         (dlsym_ust): New.
11369         (ust_marker_to_static_tracepoint): New.
11370         (gdb_probe): New.
11371         (collect_ust_data_at_tracepoint): New.
11372         (gdb_ust_probe): New.
11373         (UNIX_PATH_MAX, SOCK_DIR): New.
11374         (gdb_ust_connect_sync_socket): New.
11375         (resume_thread, stop_thread): New.
11376         (run_inferior_command): New.
11377         (init_named_socket): New.
11378         (gdb_ust_socket_init): New.
11379         (cstr_to_hexstr): New.
11380         (next_st): New.
11381         (first_marker, next_marker): New.
11382         (response_ust_marker): New.
11383         (cmd_qtfstm, cmd_qtsstm): New.
11384         (unprobe_marker_at, probe_marker_at): New.
11385         (cmd_qtstmat, gdb_ust_thread): New.
11386         (gdb_ust_init): New.
11387         (initialize_tracepoint_ftlib): Call gdb_ust_init.
11388         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11389         (ST_REGENTRY): New.
11390         (x86_64_st_collect_regmap): New.
11391         (X86_64_NUM_ST_COLLECT_GREGS): New.
11392         (AMD64_RIP_REGNUM): New.
11393         (supply_static_tracepoint_registers): New.
11394         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11395         (ST_REGENTRY): New.
11396         (i386_st_collect_regmap): New.
11397         (i386_NUM_ST_COLLECT_GREGS): New.
11398         (supply_static_tracepoint_registers): New.
11399         * server.c (handle_query): Handle qXfer:statictrace:read.
11400         <qSupported>: Report support for StaticTracepoints, and
11401         qXfer:statictrace:read features.
11402         * server.h (traceframe_read_sdata)
11403         (supply_static_tracepoint_registers): Declare.
11404         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11405         (unpack_varlen_hex): Include in IPA build.
11406         * Makefile.in (ustlibs, ustinc): New.
11407         (IPA_OBJS): Add remote-utils-ipa.o.
11408         ($(IPA_LIB)): Link -ldl and -lpthread.
11409         (UST_CFLAGS): New.
11410         (IPAGENT_CFLAGS): Add UST_CFLAGS.
11411         * config.in, configure: Regenerate.
11412
11413 2010-06-20  Ian Lance Taylor  <iant@google.com>
11414             Pedro Alves  <pedro@codesourcery.com>
11415
11416         * linux-x86-low.c (always_true): Delete.
11417         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11418         trying to fool the compiler with always_true.
11419
11420 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
11421
11422         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11423         conditions in gdbserver.
11424
11425 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
11426
11427         * spu-low.c (spu_read_memory): Wrap around local store limit.
11428         (spu_write_memory): Likewise.
11429
11430 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
11431
11432         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11433         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11434         LONGEST uses.
11435         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11436         uses.
11437         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11438         uses with LONGEST uses.
11439
11440 2010-06-14  Stan Shebs  <stan@codesourcery.com>
11441             Pedro Alves  <pedro@codesourcery.com>
11442
11443         Bytecode compiler.
11444
11445         * linux-x86-low.c: Include limits.h.
11446         (add_insns): New.
11447         (always_true): New.
11448         (EMIT_ASM): New.
11449         (EMIT_ASM32): New.
11450         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11451         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11452         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11453         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11454         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11455         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11456         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11457         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11458         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11459         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11460         (amd64_emit_void_call_2): New.
11461         (amd64_emit_ops): New.
11462         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11463         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11464         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11465         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11466         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11467         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11468         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11469         (i386_emit_call, i386_emit_reg, i386_emit_pop)
11470         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11471         (i386_emit_stack_adjust, i386_emit_int_call_1)
11472         (i386_emit_void_call_2): New.
11473         (i386_emit_ops): New.
11474         (x86_emit_ops): New.
11475         (the_low_target): Install x86_emit_ops.
11476         * server.h (struct emit_ops): New.
11477         (get_raw_reg_func_addr): Declare.
11478         (current_insn_ptr, emit_error): Declare.
11479         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11480         (set_trace_state_variable_value): New defines.
11481         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11482         addr_get_trace_state_variable_value and
11483         addr_set_trace_state_variable_value.
11484         (symbol_list): New fields for get_raw_reg,
11485         get_trace_state_variable_value and set_trace_state_variable_value.
11486         (condfn): New typedef.
11487         (struct tracepoint): New field `compiled_cond'.
11488         (do_action_at_tracepoint): Clear compiled_cond.
11489         (get_trace_state_variable_value, set_trace_state_variable_value):
11490         Export in the IPA.
11491         (condition_true_at_tracepoint): If there's a compiled condition,
11492         run that.
11493         (current_insn_ptr, emit_error): New globals.
11494         (struct bytecode_address): New.
11495         (get_raw_reg_func_addr): New.
11496         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11497         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11498         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11499         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11500         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11501         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11502         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11503         (compile_tracepoint_condition, compile_bytecodes): New.
11504         * target.h (emit_ops): Forward declare.
11505         (struct target_ops): New field emit_ops.
11506         (target_emit_ops): New.
11507         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11508         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11509         * linux-low.c (linux_emit_ops): New.
11510         (linux_target_ops): Install it.
11511         * linux-low.h (struct linux_target_ops): New field emit_ops.
11512
11513 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
11514
11515         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11516         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11517
11518 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
11519             Stan Shebs  <stan@codesourcery.com>
11520
11521         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11522         (all): Depend on $(extra_libraries).
11523         (install-only): Install the IPA.
11524         (IPA_OBJS, IPA_LIB): New.
11525         (clean): Remove the IPA lib.
11526         (IPAGENT_CFLAGS): New.
11527         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11528         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11529         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11530         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11531         * configure.ac: Check for atomic builtins support in the compiler.
11532         (IPA_DEPFILES, extra_libraries): Define.
11533         * configure.srv (ipa_obj): Add description.
11534         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11535         (i[34567]86-*-linux*): Set ipa_obj.
11536         (x86_64-*-linux*): Set ipa_obj.
11537         * linux-low.c (stabilizing_threads): New.
11538         (supports_fast_tracepoints): New.
11539         (linux_detach): Stabilize threads before detaching.
11540         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
11541         the lwp is either not stabilizing, or is moving out of a jump pad.
11542         (linux_fast_tracepoint_collecting): New.
11543         (maybe_move_out_of_jump_pad): New.
11544         (enqueue_one_deferred_signal): New.
11545         (dequeue_one_deferred_signal): New.
11546         (linux_wait_for_event_1): If moving out of a jump pad, defer
11547         pending signals to later.
11548         (linux_stabilize_threads): New.
11549         (linux_wait_1): Check if threads need moving out of jump pads, and
11550         do it if so.
11551         (stuck_in_jump_pad_callback): New.
11552         (move_out_of_jump_pad_callback): New.
11553         (lwp_running): New.
11554         (linux_resume_one_lwp): Handle moving out of jump pads.
11555         (linux_set_resume_request): Dequeue deferred signals.
11556         (need_step_over_p): Also step over fast tracepoint jumps.
11557         (start_step_over): Also uninsert fast tracepoint jumps.
11558         (finish_step_over): Also reinsert fast tracepoint jumps.
11559         (linux_install_fast_tracepoint_jump): New.
11560         (linux_target_ops): Install linux_stabilize_threads and
11561         linux_install_fast_tracepoint_jump_pad.
11562         * linux-low.h (linux_target_ops) <get_thread_area,
11563         install_fast_tracepoint_jump_pad>: New fields.
11564         (struct lwp_info) <collecting_fast_tracepoint,
11565         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11566         (linux_get_thread_area): Declare.
11567         * linux-x86-low.c (jump_insn): New.
11568         (x86_get_thread_area): New.
11569         (append_insns): New.
11570         (push_opcode): New.
11571         (amd64_install_fast_tracepoint_jump_pad): New.
11572         (i386_install_fast_tracepoint_jump_pad): New.
11573         (x86_install_fast_tracepoint_jump_pad): New.
11574         (the_low_target): Install x86_get_thread_area and
11575         x86_install_fast_tracepoint_jump_pad.
11576         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11577         (struct fast_tracepoint_jump): New.
11578         (fast_tracepoint_jump_insn): New.
11579         (fast_tracepoint_jump_shadow): New.
11580         (find_fast_tracepoint_jump_at): New.
11581         (fast_tracepoint_jump_here): New.
11582         (delete_fast_tracepoint_jump): New.
11583         (set_fast_tracepoint_jump): New.
11584         (uninsert_fast_tracepoint_jumps_at): New.
11585         (reinsert_fast_tracepoint_jumps_at): New.
11586         (set_breakpoint_at): Use write_inferior_memory.
11587         (uninsert_raw_breakpoint): Use write_inferior_memory.
11588         (check_mem_read): Mask out fast tracepoint jumps.
11589         (check_mem_write): Mask out fast tracepoint jumps.
11590         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11591         (set_fast_tracepoint_jump): Declare.
11592         (delete_fast_tracepoint_jump)
11593         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11594         (reinsert_fast_tracepoint_jumps_at): Declare.
11595         * regcache.c: Don't compile many functions when building the
11596         in-process agent library.
11597         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11598         the register buffer in the heap.
11599         (free_register_cache): If the register buffer isn't owned by the
11600         regcache, don't free it.
11601         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11602         pre-existing register caches.
11603         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11604         type.
11605         (convert_ascii_to_int): : Constify `from' parameter type.
11606         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11607         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
11608         the needed buffer in-place.
11609         (relocate_instruction): New.
11610         * server.c (handle_query) <qSymbols>: If the target supports
11611         tracepoints, give it a chance of looking up symbols.  Report
11612         support for fast tracepoints.
11613         (handle_status): Stabilize threads.
11614         (process_serial_event): Adjust.
11615         * server.h (struct fast_tracepoint_jump): Forward declare.
11616         (struct process_info) <fast_tracepoint_jumps>: New field.
11617         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11618         (decode_X_packet, decode_M_packet): Adjust.
11619         (relocate_instruction): Declare.
11620         (in_process_agent_loaded): Declare.
11621         (tracepoint_look_up_symbols): Declare.
11622         (struct fast_tpoint_collect_status): Declare.
11623         (fast_tracepoint_collecting): Declare.
11624         (force_unlock_trace_buffer): Declare.
11625         (handle_tracepoint_bkpts): Declare.
11626         (initialize_low_tracepoint)
11627         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11628         * target.h (struct target_ops) <stabilize_threads,
11629         install_fast_tracepoint_jump_pad>: New fields.
11630         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11631         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11632         [HAVE_STDINT_H]: Include stdint.h.
11633         (trace_debug_1): Rename to ...
11634         (trace_vdebug): ... this.
11635         (trace_debug): Rename to ...
11636         (trace_debug_1): ... this.  Add `level' parameter.
11637         (trace_debug): New.
11638         (ATTR_USED, ATTR_NOINLINE): New.
11639         (IP_AGENT_EXPORT): New.
11640         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11641         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11642         (about_to_request_buffer_space, trace_buffer_is_full)
11643         (stopping_tracepoint, expr_eval_result, error_tracepoint)
11644         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11645         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11646         (traceframe_write_count, traceframes_created)
11647         (trace_state_variables)
11648         New renaming defines.
11649         (struct ipa_sym_addresses): New.
11650         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11651         (symbol_list): New.
11652         (ipa_sym_addrs): New.
11653         (all_tracepoint_symbols_looked_up): New.
11654         (in_process_agent_loaded): New.
11655         (write_e_ipa_not_loaded): New.
11656         (maybe_write_ipa_not_loaded): New.
11657         (tracepoint_look_up_symbols): New.
11658         (debug_threads) [IN_PROCESS_AGENT]: New.
11659         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11660         (UNKNOWN_SIDE_EFFECTS): New.
11661         (stop_tracing): New.
11662         (flush_trace_buffer): New.
11663         (stop_tracing_bkpt): New.
11664         (flush_trace_buffer_bkpt): New.
11665         (read_inferior_integer): New.
11666         (read_inferior_uinteger): New.
11667         (read_inferior_data_pointer): New.
11668         (write_inferior_data_pointer): New.
11669         (write_inferior_integer): New.
11670         (write_inferior_uinteger): New.
11671         (struct collect_static_trace_data_action): Delete.
11672         (enum tracepoint_type): New.
11673         (struct tracepoint) <type>: New field `type'.
11674         <actions_str, step_actions, step_actions_str>: Only include in
11675         GDBserver.
11676         <orig_size, obj_addr_on_target, adjusted_insn_addr>
11677         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11678         (tracepoints): Use IP_AGENT_EXPORT.
11679         (last_tracepoint): Don't include in the IPA.
11680         (stopping_tracepoint): Use IP_AGENT_EXPORT.
11681         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11682         (alloced_trace_state_variables): New.
11683         (trace_state_variables): Use IP_AGENT_EXPORT.
11684         (traceframe_t): Delete unused variable.
11685         (circular_trace_buffer): Don't include in the IPA.
11686         (trace_buffer_start): Delete.
11687         (struct trace_buffer_control): New.
11688         (trace_buffer_free): Delete.
11689         (struct ipa_trace_buffer_control): New.
11690         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11691         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11692         New.
11693         (trace_buffer_ctrl): New.
11694         (TRACE_BUFFER_CTRL_CURR): New.
11695         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11696         Reimplement as macros.
11697         (trace_buffer_wrap): Delete.
11698         (traceframe_write_count, traceframe_read_count)
11699         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11700         (struct tracepoint_hit_ctx) <type>: New field.
11701         (struct fast_tracepoint_ctx): New.
11702         (memory_barrier): New.
11703         (cmpxchg): New.
11704         (record_tracepoint_error): Update atomically in the IPA.
11705         (clear_inferior_trace_buffer): New.
11706         (about_to_request_buffer_space): New.
11707         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11708         updating the same buffer.
11709         (add_tracepoint): Default the tracepoint's type to trap
11710         tracepoint, and orig_size to -1.
11711         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11712         internal variables.
11713         (create_trace_state_variable): New parameter `gdb'.  Handle it.
11714         (clear_installed_tracepoints): Clear fast tracepoint jumps.
11715         (cmd_qtdp): Handle fast tracepoints.
11716         (cmd_qtdv): Adjust.
11717         (max_jump_pad_size): New.
11718         (gdb_jump_pad_head): New.
11719         (get_jump_space_head): New.
11720         (claim_jump_space): New.
11721         (sort_tracepoints): New.
11722         (MAX_JUMP_SIZE): New.
11723         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
11724         IPA.
11725         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11726         support.  Upload fast traceframes, and delete internal IPA
11727         breakpoints.
11728         (stop_tracing_handler): New.
11729         (flush_trace_buffer_handler): New.
11730         (cmd_qtstop): Upload fast tracepoints.
11731         (response_tracepoint): Handle fast tracepoints.
11732         (tracepoint_finished_step): Upload fast traceframes.  Set the
11733         tracepoint hit context's tracepoint type.
11734         (handle_tracepoint_bkpts): New.
11735         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11736         type.  Add comment about fast tracepoints.
11737         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11738         non-existing action_str field.
11739         (get_context_regcache): Handle fast tracepoints.
11740         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11741         to the regcache.
11742         (fast_tracepoint_from_jump_pad_address): New.
11743         (fast_tracepoint_from_ipa_tpoint_address): New.
11744         (collecting_t): New.
11745         (force_unlock_trace_buffer): New.
11746         (fast_tracepoint_collecting): New.
11747         (collecting): New.
11748         (gdb_collect): New.
11749         (write_inferior_data_ptr): New.
11750         (target_tp_heap): New.
11751         (target_malloc): New.
11752         (download_agent_expr): New.
11753         (UALIGN): New.
11754         (download_tracepoints): New.
11755         (download_trace_state_variables): New.
11756         (upload_fast_traceframes): New.
11757         (IPA_FIRST_TRACEFRAME): New.
11758         (IPA_NEXT_TRACEFRAME_1): New.
11759         (IPA_NEXT_TRACEFRAME): New.
11760         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11761         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11762         (gdb_jump_pad_buffer_end): New.
11763         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11764         (initialize_tracepoint): Adjust.
11765         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11766         buffer.  Initialize the low module.
11767         * utils.c (PREFIX, TOOLNAME): New.
11768         (malloc_failure): Use PREFIX.
11769         (error): In the IPA, an error causes an exit.
11770         (fatal, warning): Use PREFIX.
11771         (internal_error): Use TOOLNAME.
11772         (NUMCELLS): Increase to 10.
11773         * configure, config.in: Regenerate.
11774
11775 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
11776
11777         * server.c (handle_query) <qSupported>: Do two passes over the
11778         qSupported string to avoid nesting strtok.
11779
11780 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11781
11782         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11783         (CDEPS): New.
11784         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
11785         -Wl,--dynamic-list.
11786         * configure: Regenerate.
11787         * proc-service.list: New.
11788
11789 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11790
11791         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11792         New comment.
11793
11794 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
11795
11796         * gdbreplay.c (remote_open): Check error return from socket() call by
11797         its equality to -1 not by it being negative.
11798         * remote-utils.c (remote_open): Likewise.
11799
11800 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
11801
11802         * config.h: Regenerate.
11803
11804 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
11805
11806         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11807         doesn't provide PTRACE_GET_THREAD_AREA.
11808
11809 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
11810
11811         * linux-m68k-low.c: Include <asm/ptrace.h>
11812         (ps_get_thread_area): Implement.
11813
11814 2010-05-03  Doug Evans  <dje@google.com>
11815
11816         * event-loop.c (struct callback_event): New struct.
11817         (callback_list): New global.
11818         (append_callback_event, delete_callback_event): New functions.
11819         (process_callback): New function.
11820         (start_event_loop): Call it.
11821         * remote-utils.c (NOT_SCHEDULED): Define.
11822         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11823         moved out of readchar.
11824         (readchar): Rewrite.  Call reschedule before returning.
11825         (reset_readchar): New function.
11826         (remote_close): Call it.
11827         (process_remaining, reschedule): New functions.
11828         * server.h (callback_handler_func): New typedef.
11829         (append_callback_event, delete_callback_event): Declare.
11830
11831 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11832
11833         * proc-service.c (ps_pglobal_lookup): Use
11834         thread_db_look_up_one_symbol.
11835         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11836         parameter.  Use it instead of all_symbols_looked_up.
11837         * server.h (struct process_info) <all_symbols_looked_up>: Delete
11838         field.
11839         (all_symbols_looked_up): Don't declare.
11840         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11841         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11842         field.
11843         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11844         Set all_symbols_looked_up here.
11845         (thread_db_look_up_one_symbol): New.
11846         (thread_db_get_tls_address): Adjust.
11847         (thread_db_load_search, try_thread_db_load_1): Always allocate the
11848         thread_db object on the heap, and tentatively set it in the
11849         process structure.
11850         (thread_db_init): Don't set all_symbols_looked_up here.
11851         * linux-low.h (thread_db_look_up_one_symbol): Declare.
11852
11853 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11854
11855         * linux-low.c (linux_kill, linux_detach): Adjust.
11856         (status_pending_p_callback): Remove redundant statement.  Check
11857         for !TARGET_WAITIKIND_IGNORE, instead of
11858         TARGET_WAITKIND_STOPPED.
11859         (handle_tracepoints): Make sure LWP is locked.  Adjust.
11860         (linux_wait_for_event_1): Adjust.
11861         (linux_cancel_breakpoints): New.
11862         (unsuspend_one_lwp): New.
11863         (unsuspend_all_lwps): New.
11864         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11865         (send_sigstop_callback): Change return type to int, add new
11866         `except' parameter and handle it.
11867         (suspend_and_send_sigstop_callback): New.
11868         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11869         pass them down.  If SUSPEND, also increment the lwp's suspend
11870         count.
11871         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11872         (need_step_over_p): Don't consider suspended LWPs.
11873         (start_step_over): Adjust.
11874         (proceed_one_lwp): Change return type to int, add new `except'
11875         parameter and handle it.
11876         (unsuspend_and_proceed_one_lwp): New.
11877         (proceed_all_lwps): Use find_inferior instead of
11878         for_each_inferior.
11879         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
11880         also decrement the suspend count of LWPs.  Pass `except' down,
11881         instead of hacking its suspend count.
11882         (linux_pause_all): Add `freeze' parameter.  Adjust.
11883         (linux_unpause_all): New.
11884         (linux_target_ops): Install linux_unpause_all.
11885         * server.c (handle_status): Adjust.
11886         * target.h (struct target_ops): New fields `unpause_all' and
11887         `cancel_breakpoints'.  Add new parameter to `pause_all'.
11888         (pause_all): Add new `freeze' parameter.
11889         (unpause_all): New.
11890         (cancel_breakpoints): New.
11891         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11892         cancel breakpoints.
11893         (cmd_qtstart): Pause threads.
11894         (stop_tracing): Pause threads, and cancel breakpoints.
11895         * win32-low.c (win32_target_ops): Adjust.
11896
11897 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
11898
11899         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11900         the inferior right away from here...
11901         (linux_wait_1): ... to here, and adjust to check the thread's
11902         last_resume_kind instead of the lwp's step or stop_expected flags.
11903
11904 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
11905
11906         * README: Use consistent `GDB' and `GDBserver' spellings.
11907
11908 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
11909
11910         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11911         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
11912         (linux_detach_one_lwp): Assume the lwp is stopped.
11913         (any_thread_of): Delete.
11914         (linux_detach): Stop all lwps here.  Don't blindly delete all
11915         breakpoints.
11916         (delete_lwp_callback): New.
11917         (linux_mourn): Delete all lwps of the process that is gone.
11918         (linux_wait_1): Don't delete the last lwp of the process here.
11919         * mem-break.h (mark_breakpoints_out): Declare.
11920         * mem-break.c (mark_breakpoints_out): New.
11921         (free_all_breakpoints): Use it.
11922         * server.c (handle_target_event): If the process is gone, mark
11923         breakpoints out.
11924         * thread-db.c (struct thread_db) <create_bp>: New field.
11925         (thread_db_enable_reporting): Fix prototype.  Store a thread event
11926         breakpoint reference in the thread_db struct.
11927         (thread_db_load_search): Clear the thread_db object.
11928         (try_thread_db_load_1): Ditto.
11929         (switch_to_process): New.
11930         (disable_thread_event_reporting): Use it.
11931         (remove_thread_event_breakpoints): New.
11932         (thread_db_detach, thread_db_mourn): Use it.
11933
11934 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
11935
11936         * linux-low.c (linux_enable_event_reporting): New.
11937         (linux_wait_for_event_1, handle_extended_wait): Use it.
11938
11939 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
11940
11941         * linux-low.c (linux_kill_one_lwp, linux_kill)
11942         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11943         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
11944         SIGSTOP even if the LWP is stopped.
11945         (send_sigstop_callback): New.
11946         (stop_all_lwps): Use send_sigstop_callback instead.
11947         (linux_resume_one_thread): Adjust.
11948         (proceed_one_lwp): Still proceed an LWP that the client has
11949         requested to stop, if we haven't reported it as stopped yet.  Make
11950         sure that LWPs the client want stopped, have a pending SIGSTOP.
11951
11952 2010-04-26  Doug Evans  <dje@google.com>
11953
11954         * server.c (handle_general_set): Make static.
11955
11956         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11957         Print received char after testing for error/eof instead of before.
11958         (input_interrupt): Tweak comment.
11959
11960 2010-04-23  Doug Evans  <dje@google.com>
11961
11962         * server.c (start_inferior): Print inferior argv if --debug.
11963
11964 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
11965
11966         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11967         * nto-x86-low.c: Include server.h
11968
11969 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
11970
11971         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11972         be consistent with other sources of this directory.
11973         (init_registers_amd64): Correct name of source file of this function
11974         in the comment.
11975
11976 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11977
11978         * configure.srv (x86_64-*-mingw*): New configuration for Windows
11979         64-bit executables.
11980
11981 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11982
11983         * win32-i386-low.c: Add 64-bit support.
11984         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11985         (init_registers_amd64): Declare.
11986         (mappings): Add 64-bit version of array.
11987         (init_windows_x86): New function.
11988         (the_low_target): Change init_arch field to init_windows_x86.
11989
11990 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
11991
11992         * win32-low.c: Adapt to support also 64-bit architecture.
11993         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11994         (get_image_name): Use SIZE_T type for local variable `done'.
11995         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11996         (toolhelp_get_dll_name): Idem.
11997         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11998         Use uintptr_t typecast to avoid warning.
11999         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12000         (handle_exception): Use phex_nz to avoid warning.
12001         (win32_wait): Remove unused local variable `process'.
12002
12003 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12004
12005         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12006         `amd64-avx.o'.
12007
12008 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
12009
12010         * configure.ac: Use `ws2_32' library for srv_mingw.
12011         * configure: Regenerate.
12012         * gdbreplay.c: Include winsock2.h instead of winsock.h.
12013         * remote-utils.c: Likewise.
12014
12015 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
12016
12017         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12018         if __x86_64__ is defined.
12019
12020 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12021
12022         * configure: Regenerate.
12023
12024 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12025
12026         * server.c (handle_query): Handle 'qGetTIBAddr' query.
12027         * target.h (target_ops): New get_tib_address field.
12028         * win32-low.h (win32_thread_info): Add thread_local_base field.
12029         * win32-low.c (child_add_thread): Add tlb argument.
12030         Set thread_local_base field to TLB.
12031         (get_child_debug_event): Adapt to child_add_thread change.
12032         (win32_get_tib_address): New function.
12033         (win32_target_ops): Set get_tib_address field to
12034         win32_get_tib_address.
12035         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12036
12037 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12038
12039         * linux-low.c (linux_mourn): Also remove the process.
12040         * server.c (handle_target_event): Don't remove the process here.
12041         * nto-low.c (nto_mourn): New.
12042         (nto_target_ops): Install it.
12043         * spu-low.c (spu_mourn): New.
12044         (spu_target_ops): Install it.
12045         * win32-low.c (win32_mourn): New.
12046         (win32_target_ops): Install it.
12047
12048 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12049
12050         * server.h (buffer_xml_printf): Remove redundant `;'.
12051
12052 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12053
12054         * regcache.c (set_register_cache): Invalidate regcaches before
12055         changing the register cache layout.
12056         (regcache_invalidate_one): Allow a NULL regcache.
12057         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12058         regcaches before changing the register cache layout or the target
12059         regsets.
12060
12061 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
12062
12063         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12064         variable warning on Linux/x86-64.
12065
12066 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12067
12068         GDBserver disconnected tracing support.
12069
12070         * linux-low.c (linux_remove_process): Delete.
12071         (add_lwp): Don't set last_resume_kind here.
12072         (linux_kill): Use `mourn'.
12073         (linux_detach): Use `thread_db_detach', and `mourn'.
12074         (linux_mourn): New.
12075         (linux_attach_lwp_1): Adjust comment.
12076         (linux_attach): last_resume_kind moved the thread_info; adjust.
12077         (status_pending_p_callback): Adjust.
12078         (linux_wait_for_event_1): Adjust.
12079         (count_events_callback, select_singlestep_lwp_callback)
12080         (select_event_lwp_callback, cancel_breakpoints_callback)
12081         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12082         (proceed_one_lwp): Adjust.
12083         (linux_async): Add debug output.
12084         (linux_thread_stopped): New.
12085         (linux_pause_all): New.
12086         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12087         linux_pause_all.
12088         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12089         (thread_db_free): Delete declaration.
12090         (thread_db_detach, thread_db_mourn): Declare.
12091         * thread-db.c (thread_db_init): Use thread_db_mourn.
12092         (thread_db_free): Delete, split in two.
12093         (disable_thread_event_reporting): New.
12094         (thread_db_detach): New.
12095         (thread_db_mourn): New.
12096
12097         * server.h (struct thread_info) <last_resume_kind>: New field.
12098         <attached>: Add comment.
12099         <gdb_detached>: New field.
12100         (handler_func): Change return type to int.
12101         (handle_serial_event, handle_target_event): Ditto.
12102         (gdb_connected): Declare.
12103         (tracing): Delete.
12104         (disconnected_tracing): Declare.
12105         (stop_tracing): Declare.
12106
12107         * server.c (handle_query) <qSupported>: Report support for
12108         disconnected tracing.
12109         (queue_stop_reply_callback): Account for running threads.
12110         (gdb_wants_thread_stopped): New.
12111         (gdb_wants_all_threads_stopped): New.
12112         (gdb_reattached_process): New.
12113         (handle_status): Clear the `gdb_detached' flag of all processes.
12114         In all-stop, stop all threads.
12115         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
12116         (process_serial_event): If the remote connection breaks, or if an
12117         exit was forced with "monitor exit", force an event loop exit.
12118         Handle disconnected tracing on detach.
12119         (handle_serial_event): Adjust.
12120         (handle_target_event): If GDB isn't connected, forward events back
12121         to the inferior, unless the last process exited, in which case,
12122         exit gdbserver.  Adjust interface.
12123
12124         * remote-utils.c (remote_open): Don't block in accept.  Instead
12125         register an event loop source on the listen socket file
12126         descriptor.  Refactor bits into ...
12127         (listen_desc): ... this new global.
12128         (gdb_connected): ... this new function.
12129         (enable_async_notification): ... this new function.
12130         (handle_accept_event): ... this new function.
12131         (remote_close): Clear remote_desc.
12132
12133         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12134
12135         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12136         New fields.
12137         (mourn_inferior): Define.
12138         (target_process_qsupported): Avoid the dangling else problem.
12139         (thread_stopped): Define.
12140         (pause_all): Define.
12141         (target_waitstatus_to_string): Declare.
12142         * target.c (target_waitstatus_to_string): New.
12143
12144         * tracepoint.c (tracing): Make extern.
12145         (disconnected_tracing): New.
12146         (stop_tracing): Make extern.  Handle tracing stops due to GDB
12147         disconnecting.
12148         (cmd_qtdisconnected): New.
12149         (cmd_qtstatus): Report disconnected tracing status in trace reply.
12150         (handle_tracepoint_general_set): Handle QTDisconnected.
12151
12152         * event-loop.c (event_handler_func): Change return type to int.
12153         (process_event): Bail out if the event handler wants the event
12154         loop to stop.
12155         (handle_file_event): Ditto.
12156         (start_event_loop): Bail out if the event handler wants the event
12157         loop to stop.
12158
12159         * nto-low.c (nto_target_ops): Adjust.
12160         * spu-low.c (spu_wait): Don't remove the process here.
12161         (spu_target_ops): Adjust.
12162         * win32-low.c (win32_wait): Don't remove the process here.
12163         (win32_target_ops): Adjust.
12164
12165 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12166
12167         * regcache.c (realloc_register_cache): Invalidate inferior's
12168         regcache before recreating it.
12169
12170 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
12171
12172         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12173
12174 2010-04-09  Stan Shebs  <stan@codesourcery.com>
12175             Pedro Alves  <pedro@codesourcery.com>
12176
12177         * server.h (LONGEST): New.
12178         (struct thread_info) <while_stepping>: New field.
12179         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12180         Declare.
12181         (initialize_tracepoint, handle_tracepoint_general_set)
12182         (handle_tracepoint_query, tracepoint_finished_step)
12183         (tracepoint_was_hit, release_while_stepping_state_list):
12184         (current_traceframe): Declare.
12185         * server.c (handle_general_set): Handle tracepoint packets.
12186         (read_memory): New.
12187         (write_memory): New.
12188         (handle_search_memory_1): Use read_memory.
12189         (handle_query): Report support for conditional tracepoints, trace
12190         state variables, and tracepoint sources.  Handle tracepoint
12191         queries.
12192         (main): Initialize the tracepoints module.
12193         (process_serial_event): Handle traceframe reads/writes.
12194
12195         * linux-low.c (handle_tracepoints): New.
12196         (linux_wait_1): Call it.
12197         (linux_resume_one_lwp): Handle while-stepping.
12198         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12199         (linux_target_ops): Install them.
12200         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12201         New field.
12202         * linux-x86-low.c (x86_supports_tracepoints): New.
12203         (the_low_target). Install it.
12204
12205         * mem-break.h (delete_breakpoint): Declare.
12206         * mem-break.c (delete_breakpoint): Make external.
12207
12208         * target.h (struct target_ops): Add `supports_tracepoints',
12209         `read_pc', and `write_pc' fields.
12210         (target_supports_tracepoints): Define.
12211         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12212         (phex_nz): New.
12213
12214         * regcache.h (struct regcache) <registers_owned>: New field.
12215         (init_register_cache, regcache_cpy): Declare.
12216         (regcache_read_pc, regcache_write_pc): Declare.
12217         (register_cache_size): Declare.
12218         (supply_regblock): Declare.
12219         * regcache.c (init_register_cache): New.
12220         (new_register_cache): Use it.
12221         (regcache_cpy): New.
12222         (register_cache_size): New.
12223         (supply_regblock): New.
12224         (regcache_read_pc, regcache_write_pc): New.
12225
12226         * tracepoint.c: New.
12227
12228         * Makefile.in (OBS): Add tracepoint.o.
12229         (tracepoint.o): New rule.
12230
12231 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
12232
12233         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12234         (i386-mmx.o): New.
12235         (i386-mmx.c): Likewise.
12236         (i386-mmx-linux.o): Likewise.
12237         (i386-mmx-linux.c): Likewise.
12238
12239         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12240         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12241         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12242         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12243
12244         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12245         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12246         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12247
12248 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
12249
12250         * Makefile.in (clean): Updated.
12251         (i386-avx.o): New.
12252         (i386-avx.c): Likewise.
12253         (i386-avx-linux.o): Likewise.
12254         (i386-avx-linux.c): Likewise.
12255         (amd64-avx.o): Likewise.
12256         (amd64-avx.c): Likewise.
12257         (amd64-avx-linux.o): Likewise.
12258         (amd64-avx-linux.c): Likewise.
12259
12260         * configure.srv (srv_i386_regobj): Add i386-avx.o.
12261         (srv_i386_linux_regobj): Add i386-avx-linux.o.
12262         (srv_amd64_regobj): Add amd64-avx.o.
12263         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12264         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12265         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12266         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12267         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12268         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12269         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12270
12271         * i387-fp.c: Include "i386-xstate.h".
12272         (i387_xsave): New.
12273         (i387_cache_to_xsave): Likewise.
12274         (i387_xsave_to_cache): Likewise.
12275         (x86_xcr0): Likewise.
12276
12277         * i387-fp.h (i387_cache_to_xsave): Likewise.
12278         (i387_xsave_to_cache): Likewise.
12279         (x86_xcr0): Likewise.
12280
12281         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12282         * linux-crisv32-low.c (target_regsets): Likewise.
12283         * linux-m68k-low.c (target_regsets): Likewise.
12284         * linux-mips-low.c (target_regsets): Likewise.
12285         * linux-ppc-low.c (target_regsets): Likewise.
12286         * linux-s390-low.c (target_regsets): Likewise.
12287         * linux-sh-low.c (target_regsets): Likewise.
12288         * linux-sparc-low.c (target_regsets): Likewise.
12289         * linux-xtensa-low.c (target_regsets): Likewise.
12290
12291         * linux-low.c: Include <sys/uio.h>.
12292         (regsets_fetch_inferior_registers): Support nt_type.
12293         (regsets_store_inferior_registers): Likewise.
12294         (linux_process_qsupported): New.
12295         (linux_target_ops): Add linux_process_qsupported.
12296
12297         * linux-low.h (regset_info): Add nt_type.
12298         (linux_target_ops): Add process_qsupported.
12299
12300         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12301         and <sys/uio.h>.
12302         (init_registers_i386_avx_linux): New.
12303         (init_registers_amd64_avx_linux): Likewise.
12304         (xmltarget_i386_linux_no_xml): Likewise.
12305         (xmltarget_amd64_linux_no_xml): Likewise.
12306         (PTRACE_GETREGSET): Likewise.
12307         (PTRACE_SETREGSET): Likewise.
12308         (x86_fill_xstateregset): Likewise.
12309         (x86_store_xstateregset): Likewise.
12310         (use_xml): Likewise.
12311         (x86_linux_update_xmltarget): Likewise.
12312         (x86_linux_process_qsupported): Likewise.
12313         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12314         (x86_arch_setup): Don't call init_registers_amd64_linux nor
12315         init_registers_i386_linux here.  Call
12316         x86_linux_update_xmltarget.
12317         (the_low_target): Add x86_linux_process_qsupported.
12318
12319         * server.c (handle_query): Call target_process_qsupported.
12320
12321         * target.h (target_ops): Add process_qsupported.
12322         (target_process_qsupported): New.
12323
12324 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
12325
12326         * inferiors.c (add_thread): Set last_status kind to
12327         TARGET_WAITKIND_IGNORE.
12328         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12329         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
12330         (linux_wait_1): Move `thread' local definition to block that uses
12331         it.  Don't NULL initialize `event_child'.
12332         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12333         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12334         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12335
12336 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12337
12338         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12339         an extended waitstatus, or by a watchpoint.
12340         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12341         thread was stepping or has been stopped by a watchpoint.
12342
12343 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12344
12345         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12346         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12347         of another, then delete the previous, and validate all
12348         breakpoints.
12349         (validate_inserted_breakpoint): New.
12350         (delete_disabled_breakpoints): New.
12351         (validate_breakpoints): New.
12352         (check_mem_read): Validate breakpoints before trusting their
12353         shadow.  Delete disabled breakpoints.
12354         (check_mem_write): Validate breakpoints before trusting they
12355         should be inserted.  Delete disabled breakpoints.
12356         * mem-break.h (validate_breakpoints):
12357         * server.c (handle_query): Validate breakpoints when we see a
12358         qSymbol query.
12359
12360 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12361
12362         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12363         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
12364         if we could tell there's a GDB breakpoint at stop_pc.
12365         (need_step_over_p): Don't do a step over if we find a GDB
12366         breakpoint at the resume PC.
12367
12368         * mem-break.c (struct raw_breakpoint): New.
12369         (enum bkpt_type): New type `gdb_breakpoint'.
12370         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12371         fields.  New field `raw'.
12372         (find_raw_breakpoint_at): New.
12373         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
12374         breakpoint instead.
12375         (set_breakpoint_at): Adjust.
12376         (delete_raw_breakpoint): New.
12377         (release_breakpoint): New.
12378         (delete_breakpoint): Rename to...
12379         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
12380         release_breakpoint.  Return ENOENT.
12381         (delete_breakpoint): Reimplement.
12382         (find_breakpoint_at): Delete.
12383         (find_gdb_breakpoint_at): New.
12384         (delete_breakpoint_at): Delete.
12385         (set_gdb_breakpoint_at): New.
12386         (delete_gdb_breakpoint_at): New.
12387         (gdb_breakpoint_here): New.
12388         (set_reinsert_breakpoint): Use release_breakpoint.
12389         (uninsert_breakpoint): Rename to ...
12390         (uninsert_raw_breakpoint): ... this.
12391         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12392         (reinsert_raw_breakpoint): Change parameter type to
12393         raw_breakpoint.
12394         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12395         instead.
12396         (check_breakpoints): Adjust.  Use release_breakpoint.
12397         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12398         (breakpoint_inserted_here): Ditto.
12399         (check_mem_read): Adjust to iterate over raw breakpoints instead.
12400         Don't trust the breakpoint's shadow if it is not inserted.
12401         (check_mem_write): Adjust to iterate over raw breakpoints instead.
12402         (delete_all_breakpoints): Adjust.
12403         (free_all_breakpoints): Mark all breakpoints as uninserted, and
12404         use delete_breakpoint_1.
12405
12406         * mem-break.h (breakpoints_supported): Delete declaration.
12407         (set_gdb_breakpoint_at): Declare.
12408         (gdb_breakpoint_here): Declare.
12409         (delete_breakpoint_at): Delete.
12410         (delete_gdb_breakpoint_at): Declare.
12411
12412         * server.h (struct raw_breakpoint): Forward declare.
12413         (struct process_info): New field `raw_breakpoints'.
12414
12415         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12416         breakpoints.
12417
12418 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12419
12420         * linux-low.c (status_pending_p_callback): Fix comment.
12421         (linux_wait_for_event_1): Move most of the internal breakpoint
12422         handling from here...
12423         (linux_wait_1): ... to here.
12424         (count_events_callback): New.
12425         (select_singlestep_lwp_callback): New.
12426         (select_event_lwp_callback): New.
12427         (cancel_breakpoints_callback): New.
12428         (select_event_lwp): New.
12429         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
12430         priority to all LWPs that have had events that should be reported
12431         to the client.  Cancel breakpoints when about to reporting the
12432         event to the client, not while stopping lwps.  No longer cancel
12433         finished single-steps here.
12434         (cancel_finished_single_step): Delete.
12435         (cancel_finished_single_steps): Delete.
12436
12437 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12438
12439         * mem-break.c (enum bkpt_type): New.
12440         (struct breakpoint): New field `type'.
12441         (set_breakpoint_at): Change return type to struct breakpoint
12442         pointer.  Set type to `other_breakpoint' by default.
12443         (delete_breakpoint): Rewrite, supporting more than one breakpoint
12444         in the breakpoint list.
12445         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12446         (reinsert_breakpoint): Rename to ...
12447         (reinsert_raw_breakpoint): ... this.
12448         (reinsert_breakpoints_at): Adjust.
12449         * mem-break.h (struct breakpoint): Declare.
12450         (set_breakpoint_at): Change return type to struct breakpoint
12451         pointer.
12452
12453 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12454
12455         * server.c (handle_query): Assign, not compare.
12456
12457 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12458
12459         Teach linux gdbserver to step-over-breakpoints.
12460
12461         * linux-low.c (can_hardware_single_step): New.
12462         (supports_breakpoints): New.
12463         (handle_extended_wait): If stopping threads, read the stop pc of
12464         the new cloned LWP.
12465         (get_pc): New.
12466         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
12467         low target doesn't support retrieving the PC.
12468         (add_lwp): Set last_resume_kind to resume_continue.
12469         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
12470         (linux_attach): Don't clear stop_expected.  Set the lwp's
12471         last_resume_kind to resume_stop.
12472         (linux_detach_one_lwp): Don't check for removed breakpoints.
12473         (check_removed_breakpoint): Delete.
12474         (status_pending_p): Rename to ...
12475         (status_pending_p_callback): ... this.  Don't check for removed
12476         breakpoints.  Don't consider threads that are stopped from GDB's
12477         perspective.
12478         (linux_wait_for_lwp): Always read the stop_pc here.
12479         (cancel_breakpoint): New.
12480         (step_over_bkpt): New global.
12481         (linux_wait_for_event_1): Implement stepping over breakpoints.
12482         (gdb_wants_lwp_stopped): New.
12483         (gdb_wants_all_stopped): New.
12484         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
12485         single-step traps here.  Store the thread's last reported target
12486         wait status.
12487         (send_sigstop): Don't clear stop_expected.  Always set it,
12488         instead.
12489         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12490         (cancel_finished_single_step): New.
12491         (cancel_finished_single_steps): New.
12492         (wait_for_sigstop): Don't cancel finished single-step traps here.
12493         (linux_resume_one_lwp): Don't check for removed breakpoints.
12494         Don't set `step' on non-hardware step archs.
12495         (linux_set_resume_request): Ignore resume_stop requests if already
12496         stopping or stopped.  Set the lwp's last_resume_kind.
12497         (resume_status_pending_p): Don't check for removed breakpoints.
12498         (need_step_over_p): New.
12499         (start_step_over): New.
12500         (finish_step_over): New.
12501         (linux_resume_one_thread): Always queue a sigstop for resume_stop
12502         requests.  Clear the thread's last reported target waitstatus.
12503         Don't use the `suspended' flag.  Don't consider pending breakpoints.
12504         (linux_resume): Start a step-over if necessary.
12505         (proceed_one_lwp): New.
12506         (proceed_all_lwps): New.
12507         (unstop_all_lwps): New.
12508         * linux-low.h (struct lwp_info): Rewrite comment for the
12509         `suspended' flag.  Add the `stop_pc' field.  Delete the
12510         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
12511         Add `'last_resume_kind' and `need_step_over' fields.
12512         * inferiors.c (struct thread_info): Delete, moved elsewhere.
12513         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12514         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
12515         (set_raw_breakpoint_at): New.
12516         (set_breakpoint_at): Rewrite to use it.
12517         (reinsert_breakpoint_handler): Delete.
12518         (set_reinsert_breakpoint): New.
12519         (reinsert_breakpoint_by_bp): Delete.
12520         (delete_reinsert_breakpoints): New.
12521         (uninsert_breakpoint): Rewrite.
12522         (uninsert_breakpoints_at): New.
12523         (reinsert_breakpoint): Rewrite.
12524         (reinsert_breakpoints_at): New.
12525         (check_breakpoints): Rewrite.
12526         (breakpoint_here): New.
12527         (breakpoint_inserted_here): New.
12528         (check_mem_read): Adjust.
12529         * mem-break.h (breakpoints_supported, breakpoint_here)
12530         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12531         (reinsert_breakpoint_by_bp): Delete declaration.
12532         (delete_reinsert_breakpoints): Declare.
12533         (reinsert_breakpoint): Delete declaration.
12534         (reinsert_breakpoints_at): Declare.
12535         (uninsert_breakpoint): Delete declaration.
12536         (uninsert_breakpoints_at): Declare.
12537         (check_breakpoints): Adjust prototype.
12538         * server.h: Adjust include order.
12539         (struct thread_info): Declare here.  Add a `last_status' field.
12540
12541 2010-03-23  Michael Snyder  <msnyder@vmware.com>
12542
12543         * server.c (crc32): New function.
12544         (handle_query): Add handling for 'qCRC:' request.
12545
12546 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
12547
12548         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12549         lwp had been stopped by a watchpoint.
12550
12551 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
12552
12553         * server.h (internal_error): Declare.
12554         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12555         * utils.c (internal_error): New function.
12556
12557 2010-03-15  Andreas Schwab  <schwab@redhat.com>
12558
12559         * configure.srv: Fix typo setting srv_regobj.
12560
12561 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
12562
12563         * linux-low.c (fetch_register): Avoid passing a non string literal
12564         format to `error'.
12565         (usr_store_inferior_registers): Ditto.
12566
12567 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12568
12569         * linux-low.c (linux_write_memory): Bail out early if peeking
12570         memory failed.
12571
12572 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12573
12574         * linux-low.h (struct lwp_info): New fields
12575         `stopped_by_watchpoint' and `stopped_data_address'.
12576         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12577         here, and cache them in the lwp object.
12578         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12579         directly.
12580         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12581         field.
12582         (linux_stopped_by_watchpoint): Rewrite.
12583         (linux_stopped_data_address): Rewrite.
12584
12585 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
12586
12587         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12588         switching the current inferior, not before.
12589
12590 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
12591
12592         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12593         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12594         i386-linux.c and amd64-linux.c.
12595         (reg-i386.o): Removed.
12596         (reg-i386.c): Likewise.
12597         (reg-i386-linux.o): Likewise.
12598         (reg-i386-linux.c): Likewise.
12599         (reg-x86-64.o): Likewise.
12600         (reg-x86-64.c): Likewise.
12601         (reg-x86-64-linux.o): Likewise.
12602         (reg-x86-64-linux.c): Likewise.
12603         (i386.o): New.
12604         (i386.c): Likewise.
12605         (i386-linux.o): Likewise.
12606         (i386-linux.c): Likewise.
12607         (amd64.o): Likewise.
12608         (amd64.c): Likewise.
12609         (amd64-linux.o): Likewise.
12610         (amd64-linux.c): Likewise.
12611
12612         * configure.srv (srv_i386_regobj): New.
12613         (srv_i386_linux_regobj): Likewise.
12614         (srv_amd64_regobj): Likewise.
12615         (srv_amd64_linux_regobj): Likewise.
12616         (srv_i386_32bit_xmlfiles): Likewise.
12617         (srv_i386_64bit_xmlfiles): Likewise.
12618         (srv_i386_xmlfiles): Likewise.
12619         (srv_amd64_xmlfiles): Likewise.
12620         (srv_i386_linux_xmlfiles): Likewise.
12621         (srv_amd64_linux_xmlfiles): Likewise.
12622         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
12623         srv_xmlfiles to $srv_i386_xmlfiles.
12624         (i[34567]86-*-mingw32ce*): Likewise.
12625         (i[34567]86-*-mingw*): Likewise.
12626         (i[34567]86-*-nto*): Likewise.
12627         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12628         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
12629         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12630         (x86_64-*-linux*): Likewise.
12631
12632         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12633         (init_registers_amd64_linux): New.
12634         (x86_arch_setup): Replace init_registers_x86_64_linux with
12635         init_registers_amd64_linux.
12636
12637 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
12638
12639         * configure.ac: Check for libdl.  If it is not available link against
12640         static libthread_db.
12641         * configure: Regenerate.
12642
12643 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
12644
12645         PR9605
12646
12647         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12648         handing a read watchpoint.
12649         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12650
12651 2010-02-12  Doug Evans  <dje@google.com>
12652
12653         * linux-low.c (linux_supports_tracefork_flag): Document.
12654         (linux_look_up_symbols): Add comment.
12655
12656 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
12657
12658         * regcache.c (supply_register): Clear regcache if buf is NULL.
12659
12660 2010-02-02  Nicolas Roche  <roche@sourceware.org>
12661             Joel Brobecker  <brobecker@adacore.com>
12662
12663         * inferiors.c (find_inferior): Add function documentation.
12664         (unloaded_dll): Handle the case where the unloaded dll has not
12665         been previously registered in the dll list.
12666
12667 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12668
12669         * linux-arm-low.c (thumb_breakpoint_len): Delete.
12670         (thumb2_breakpoint): New.
12671         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12672
12673 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12674
12675         * linux-low.c (get_stop_pc): Check for SIGTRAP.
12676         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12677         breakpoints.
12678
12679 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12680
12681         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12682
12683 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12684
12685         * linux-s390-low.c (s390_collect_ptrace_register)
12686         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12687
12688 2010-01-21  Doug Evans  <dje@google.com>
12689
12690         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12691         (PTRACE_ARG4_TYPE): New macro.
12692         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12693         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12694         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12695         (usr_store_inferior_registers): Ditto.
12696         (linux_read_memory, linux_write_memory): Ditto.
12697         (linux_test_for_tracefork): Ditto.
12698
12699         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12700         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12701
12702 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12703
12704         * proc-service.c (ps_lgetregs): Don't refetch registers from the
12705         target.
12706
12707 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
12708
12709         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12710         prototype to take a regcache.  Adjust.
12711
12712 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
12713
12714         * regcache.h (struct thread_info): Forward declare.
12715         (struct regcache): New.
12716         (new_register_cache): Adjust prototype.
12717         (get_thread_regcache): Declare.
12718         (free_register_cache): Adjust prototype.
12719         (registers_to_string, registers_from_string): Ditto.
12720         (supply_register, supply_register_by_name, collect_register)
12721         (collect_register_as_string, collect_register_by_name): Ditto.
12722         * regcache.c (struct inferior_regcache_data): Delete.
12723         (get_regcache): Rename to ...
12724         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
12725         fetching registers.
12726         (regcache_invalidate_one): Adjust.
12727         (regcache_invalidate): Fix prototype.
12728         (new_register_cache): Return the new register cache.
12729         (free_register_cache): Change prototype.
12730         (realloc_register_cache): Adjust.
12731         (registers_to_string): Change prototype to take a regcache.  Adjust.
12732         (registers_from_string): Ditto.
12733         (register_data): Ditto.
12734         (supply_register): Ditto.
12735         (supply_register_by_name): Ditto.
12736         (collect_register): Ditto.
12737         (collect_register_as_string): Ditto.
12738         (collect_register_by_name): Ditto.
12739         * server.c (process_serial_event): Adjust.
12740         * linux-low.h (regset_fill_func, regset_store_func): Change
12741         prototype.
12742         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12743         Change prototype.
12744         * linux-low.c (get_stop_pc): Adjust.
12745         (check_removed_breakpoint): Adjust.
12746         (linux_wait_for_event): Adjust.
12747         (linux_resume_one_lwp): Adjust.
12748         (fetch_register): Add regcache parameter.  Adjust.
12749         (usr_store_inferior_registers): Ditto.
12750         (regsets_fetch_inferior_registers): Ditto.
12751         (regsets_store_inferior_registers): Ditto.
12752         (linux_fetch_registers, linux_store_registers): Ditto.
12753         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12754         regcache.  Adjust.
12755         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12756         Ditto.
12757         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12758         prototype to take a regcache.
12759         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12760         * remote-utils.c (convert_ascii_to_int, outreg)
12761         (prepare_resume_reply): Change prototype to take a regcache.
12762         Adjust.
12763         * target.h (struct target_ops) <fetch_registers, store_registers>:
12764         Change prototype to take a regcache.
12765         (fetch_inferior_registers, store_inferior_registers): Change
12766         prototype to take a regcache.  Adjust.
12767         * proc-service.c (ps_lgetregs): Adjust.
12768         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12769         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12770         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12771         take a regcache.  Adjust.
12772         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12773         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12774         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12775         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
12776         * linux-cris-low.c (cris_get_pc, cris_set_pc)
12777         (cris_cannot_fetch_register):
12778         (cris_breakpoint_at): Change prototype to take a regcache.
12779         Adjust.
12780         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12781         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12782         to take a regcache.  Adjust.
12783         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12784         Adjust.
12785         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12786         take a regcache.  Adjust.
12787         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12788         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12789         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
12790         * linux-mips-low.c (mips_get_pc):
12791         (mips_set_pc): Change prototype to take a regcache.  Adjust.
12792         (mips_reinsert_addr): Adjust.
12793         (mips_collect_register): Change prototype to take a regcache.
12794         Adjust.
12795         (mips_supply_register):
12796         (mips_collect_register_32bit, mips_supply_register_32bit)
12797         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12798         (mips_store_fpregset): Ditto.
12799         * linux-ppc-low.c (ppc_supply_ptrace_register)
12800         (ppc_supply_ptrace_register): Ditto.
12801         (parse_spufs_run): Adjust.
12802         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12803         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12804         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12805         take a regcache.  Adjust.
12806         * linux-s390-low.c (s390_collect_ptrace_register)
12807         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12808         (s390_set_pc): Change prototype to take a regcache.  Adjust.
12809         (s390_arch_setup): Adjust.
12810         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12811         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
12812         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12813         (sparc_fill_gregset, sparc_store_gregset_from_stack)
12814         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12815         regcache.  Adjust.
12816         (sparc_breakpoint_at): Adjust.
12817         * linux-xtensa-low.c (xtensa_fill_gregset):
12818         (xtensa_store_gregset):
12819         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12820         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
12821         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12822         prototype to take a regcache.  Adjust.
12823         * win32-arm-low.c (arm_fetch_inferior_register)
12824         (arm_store_inferior_register): Change prototype to take a
12825         regcache.  Adjust.
12826         * win32-i386-low.c (i386_fetch_inferior_register)
12827         (i386_store_inferior_register): Change prototype to take a
12828         regcache.  Adjust.
12829         * win32-low.c (child_fetch_inferior_registers)
12830         (child_store_inferior_registers): Change prototype to take a
12831         regcache.  Adjust.
12832         (win32_wait): Adjust.
12833         (win32_fetch_inferior_registers): Change prototype to take a
12834         regcache.  Adjust.
12835         (win32_store_inferior_registers): Adjust.
12836         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12837         store_inferior_register>: Change prototype to take a regcache.
12838
12839 2010-01-20  Doug Evans  <dje@google.com>
12840
12841         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12842         #ifdef.
12843         (linux_wait_for_event1, linux_init_signals): Ditto.
12844         (W_STOPCODE): Provide definition if missing.
12845
12846 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
12847
12848         * linux-low.c (linux_core_of_thread): New.
12849         (compare_ints, show_process, list_threads): New.
12850         (linux_qxfer_osdata): Report threads and cores.
12851         (linux_target_op): Register linux_core_of_thread.
12852         * remote-utils.c (prepare_resume_reply): Report the core.
12853         (buffer_xml_printf): Support %d specifier.
12854         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12855         New.
12856         (handle_query): Handle qXfer:threads.  Announce availability
12857         thereof.
12858         * target.h (struct target_ops): New field core_of_thread.
12859
12860 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
12861
12862         * Makefile.in (clean): Remove new generated files.
12863         (reg-s390.o, reg-s390.c): Remove rules.
12864         (reg-s390x.o, reg-s390x.c): Likewise.
12865         (s390-linux32.o, s390-linux32.c): Add rules.
12866         (s390-linux64.o, s390-linux64.c): Likewise.
12867         (s390x-linux64.o, s390x-linux64.c): Likewise.
12868         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12869         * linux-s390-low.c: Include <elf.h>.
12870         (HWCAP_S390_HIGH_GPRS): Define if undefined.
12871         (init_registers_s390): Remove prototype.
12872         (init_registers_s390x): Likewise.
12873         (init_registers_s390_linux32): Add prototype.
12874         (init_registers_s390_linux64): Likewise.
12875         (init_registers_s390x_linux64): Likewise.
12876         (s390_num_regs_3264): New define.
12877         (s390_regmap_3264): New global variable.
12878         (s390_cannot_fetch_register): Remove obsolete check.
12879         (s390_cannot_store_register): Likewise.
12880         (s390_collect_ptrace_register): Handle upper/lower register halves.
12881         (s390_supply_ptrace_register): Likewise.
12882         (s390_fill_gregset): Update to register number changes.
12883         (s390_get_hwcap): New routine.
12884         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12885         Install appropriate regmap and register set.
12886
12887 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
12888
12889         * server.c (gdbserver_version): Update copyright year to 2010.
12890         * gdbreplay.c (gdbreplay_version): Likewise.
12891
12892 2009-12-28  Doug Evans  <dje@google.com>
12893
12894         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12895         elf/external.h.  Include <elf.h> instead but only if necessary.
12896
12897 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
12898
12899         * linux-low.c (linux_remove_process): Remove `detaching'
12900         parameter.  Don't release/detach from thread_db here.
12901         (linux_kill): Release/detach from thread_db here, ...
12902         (linux_detach): ... and here, before actually detaching.
12903         (linux_wait_1): ... and here, when a process exits.
12904         * thread-db.c (any_thread_of): New.
12905         (thread_db_free): Switch the current inferior to a thread of the
12906         passed in process.
12907
12908 2009-12-21  Doug Evans  <dje@google.com>
12909
12910         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12911
12912         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12913         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12914         warning ifndef __NR_tkill.  Move setting of errno there too.
12915         Delete unnecessary resetting of errno after syscall.
12916         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12917
12918         * configure.ac: Check for dladdr.
12919         * config.in: Regenerate.
12920         * configure: Regenerate.
12921         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12922         (try_thread_db_load): Update.
12923
12924         * linux-low.c (my_waitpid): Delete unnecessary prototype.
12925
12926 2009-12-18  Doug Evans  <dje@google.com>
12927
12928         * event-loop.c: Include unistd.h if it exists.
12929
12930         * linux-low.c (my_waitpid): Move definition away from being in
12931         between linux_tracefork_child/linux_test_for_tracefork.
12932
12933         * gdb_proc_service.h (psaddr_t): Fix type.
12934         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12935         signature to match glibc.
12936
12937 2009-12-16  Doug Evans  <dje@google.com>
12938
12939         * linux-low.c (linux_read_memory): Fix argument to read.
12940
12941 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12942
12943         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12944         events, don't leave current_inferior pointing at null.
12945
12946 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12947
12948         * win32-low.c (LOG): Delete.
12949         (OUTMSG): Output to stderr.
12950         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12951         on compile time LOG macro.
12952         (win32_wait): Fix debug output.
12953
12954 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
12955
12956         * win32-low.c (win32_add_one_solib): If the dll name is
12957         "ntdll.dll", prepend the system directory to the dll path.
12958
12959 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
12960
12961         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12962
12963 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
12964             Vladimir Prus  <vladimir@codesourcery.com>
12965
12966         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12967         * configure.ac: Check for __mcoldfire__ and set
12968         gdb_cv_m68k_is_coldfire.
12969         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12970         reg-cf.o and reg-m68k.o.
12971         * configure: Regenerated.
12972
12973 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
12974
12975         * linux-low.c (linux_remove_process): Add `detaching' parameter.
12976         Pass it to thread_db_free.
12977         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12978         proper `detaching' argument to linux_remove_process.
12979         * linux-low.h (thread_db_free): Add `detaching' parameter.
12980         * thread-db.c (thread_db_init): Pass false as `detaching' argument
12981         to thread_db_free.
12982         (thread_db_free): Add `detaching' parameter.  Only
12983         call td_ta_clear_event if detaching from process.
12984
12985 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
12986
12987         * thread-db.c (thread_db_free): Fix typo.
12988
12989 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
12990
12991         PR gdb/10838
12992         * thread-db.c (thread_db_free): Call td_ta_clear_event.
12993
12994 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
12995
12996         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12997         with an i686 compiler.
12998         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12999         needed.
13000         * configure: Rebuilt.
13001
13002 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
13003
13004         PR gdb/10783
13005
13006         * server.c (handle_search_memory_1): Correct read_addr initialization
13007         in loop for searching subsequent chunks.
13008
13009 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
13010
13011         * configure.ac: New --with-libthread-db option.
13012         * thread-db.c: Allow direct dependence on libthread_db.
13013         (thread_db_free): Adjust.
13014         * config.in: Regenerate.
13015         * configure: Likewise.
13016
13017 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
13018
13019         PR gdb/10757
13020         * thread-db.c (attach_thread): New function.
13021         (maybe_attach_thread): Return success/failure.
13022         (find_new_threads_callback): Adjust.
13023         (thread_db_find_new_threads): Loop until no new threads.
13024
13025 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
13026
13027         * proc-service.c (ps_lgetregs): Formatting.
13028
13029 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
13030
13031         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13032         * configure.ac: Adjust.
13033         * linux-low.h (struct process_info_private): Move members to struct
13034         thread_db.
13035         (thread_db_free, thread_db_handle_monitor_command): New prototype.
13036         * linux-low.c (linux_remove_process): Adjust.
13037         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13038         * server.c (handle_query): Move code ...
13039         (handle_monitor_command): ... here. New function.
13040         * target.h (struct target_ops): New member.
13041         * thread-db.c (struct thread_db): New.
13042         (libthread_db_search_path): New variable.
13043         (thread_db_create_event, thread_db_enable_reporting)
13044         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13045         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13046         (try_thread_db_load_1, dladdr_to_soname): New functions.
13047         (try_thread_db_load, thread_db_load_search): New functions.
13048         (thread_db_init): Search for libthread_db.
13049         (thread_db_free): New function.
13050         (thread_db_handle_monitor_command): Likewise.
13051         * config.in: Regenerate.
13052         * configure: Regenerate.
13053
13054 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
13055
13056         * spu-low.c (spu_kill): Wait for inferior to terminate.
13057         Call clear_inferiors.
13058         (spu_detach): Call clear_inferiors.
13059
13060 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13061
13062         * aclocal.m4: Regenerate.
13063         * config.in: Likewise.
13064         * configure: Likewise.
13065
13066 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13067
13068         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13069         (parse_spufs_run): New function.
13070         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13071         (ppc_breakpoint_at): Handle SPU breakpoints.
13072
13073 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13074
13075         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13076         (SPUFS_MAGIC): Define.
13077         (spu_enumerate_spu_ids): New function.
13078         (linux_qxfer_spu): New function.
13079         (linux_target_ops): Install linux_qxfer_spu.
13080
13081 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13082
13083         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13084         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
13085         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13086         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13087         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13088         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13089         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13090         (init_registers_powerpc_cell32l): Add prototype.
13091         (init_registers_powerpc_cell64l): Likewise.
13092         (ppc_arch_setup): Detect Cell/B.E. architecture.
13093
13094 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13095
13096         * Makefile.in (datarootdir): New variable.
13097
13098 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13099
13100         * linux-low.c (linux_write_memory): Update debugging output.
13101         * Makefile.in (clean): Add new descriptions.
13102         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13103         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13104         * configure.srv: Add new files for arm*-*-linux*.
13105         * linux-arm-low.c: Add new declarations.
13106         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13107         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13108         (HWCAP_VFPv3D16): New.
13109         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13110         instead of __IWMMXT__.
13111         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13112         (arm_arch_setup): New.
13113         (target_regsets): Remove #ifdef.  Add VFP regset.
13114         (the_low_target): Use arm_arch_setup.
13115
13116 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13117
13118         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13119         the main thread again.
13120
13121 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
13122
13123         Adding Neutrino gdbserver.
13124         * configure: Regenerated.
13125         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13126         * configure.srv (i[34567]86-*-nto*): New target.
13127         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13128         * remote-utils.c [__QNX__]: Include sys/iomgr.h
13129         (nto_comctrl) [__QNX__]: New function.
13130         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13131
13132 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
13133
13134         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13135         srv_tgtobj.
13136
13137 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
13138             Pedro Alves  <pedro@codesourcery.com>
13139
13140         * win32-i386-low.c (i386_get_thread_context): Handle systems that
13141         don't support CONTEXT_EXTENDED_REGISTERS.
13142         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13143         (the_low_target): Install them.
13144         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13145         failing with ERROR_PIPE_NOT_CONNECTED.
13146
13147 2009-06-30  Doug Evans  <dje@google.com>
13148             Pierre Muller  <muller@ics.u-strasbg.fr>
13149
13150         Add h/w watchpoint support to x86-linux, win32-i386.
13151         * Makefile.in (SFILES): Add i386-low.c
13152         (i386_low_h): Define.
13153         (i386-low.o): Add dependencies.
13154         (linux-x86-low.o): Add i386-low.h dependency.
13155         (win32-i386-low.o): Ditto.
13156         * i386-low.c: New file.
13157         * i386-low.h: New file.
13158         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13159         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13160         * linux-low.c (linux_add_process): Initialize arch_private.
13161         (linux_remove_process): Free arch_private.
13162         (add_lwp): Initialize arch_private.
13163         (delete_lwp): Free arch_private.
13164         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13165         provided.
13166         * linux-low.h (process_info_private): New member arch_private.
13167         (lwp_info): New member arch_private.
13168         (linux_target_ops): New members new_process, new_thread,
13169         prepare_to_resume.
13170         (ptid_of): New macro.
13171         * linux-x86-low.c: Include stddef.h, i386-low.h.
13172         (arch_process_info): New struct.
13173         (arch_lwp_info): New struct.
13174         (x86_linux_dr_get, x86_linux_dr_set): New functions.
13175         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13176         (i386_dr_low_get_status): New function.
13177         (x86_insert_point, x86_remove_point): New functions.
13178         (x86_stopped_by_watchpoint): New function.
13179         (x86_stopped_data_address): New function.
13180         (x86_linux_new_process, x86_linux_new_thread): New functions.
13181         (x86_linux_prepare_to_resume): New function.
13182         (the_low_target): Add entries for insert_point, remove_point,
13183         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13184         prepare_to_resume.
13185         * server.c (debug_hw_points): New global.
13186         (monitor_show_help): Document set debug-hw-points.
13187         (handle_query): Process "set debug-hw-points".
13188         * server.h (debug_hw_points): Declare.
13189         (paddress): Declare.
13190         * utils.c (NUMCELLS, CELLSIZE): New macros.
13191         (get_sell, xsnprintf, paddress): New functions.
13192         * win32-arm-low.c (the_low_target): Add entries for insert_point,
13193         remove_point, stopped_by_watchpoint, stopped_data_address.
13194         * win32-i386-low.c: Include i386-low.h.
13195         (debug_reg_state): Replaces dr.
13196         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13197         (i386_dr_low_get_status): New function.
13198         (i386_insert_point, i386_remove_point): New functions.
13199         (i386_stopped_by_watchpoint): New function.
13200         (i386_stopped_data_address): New function.
13201         (i386_initial_stuff): Update.
13202         (get_thread_context,set_thread_context,i386_thread_added): Update.
13203         (the_low_target): Add entries for insert_point,
13204         remove_point, stopped_by_watchpoint, stopped_data_address.
13205         * win32-low.c (win32_insert_watchpoint): New function.
13206         (win32_remove_watchpoint): New function.
13207         (win32_stopped_by_watchpoint): New function.
13208         (win32_stopped_data_address): New function.
13209         (win32_target_ops): Add entries for insert_watchpoint,
13210         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13211         * win32-low.h (win32_target_ops): New members insert_point,
13212         remove_point, stopped_by_watchpoint, stopped_data_address.
13213
13214 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
13215
13216         * server.c (process_serial_event): Re-return unsupported, not
13217         error, if the type isn't recognized.  Re-allow supporting only
13218         insert or remove packets.  Also call require_running for
13219         breakpoints.  Add missing break statement to default case.  Tidy.
13220         * target.h (struct target_ops): Rename insert_watchpoint to
13221         insert_point, and remove_watchpoint to remove_point.
13222
13223         * linux-low.h (struct linux_target_ops): Likewise.
13224         * linux-low.c (linux_insert_watchpoint): Rename to ...
13225         (linux_insert_point): ... this.  Adjust.
13226         (linux_remove_watchpoint): Rename to ...
13227         (linux_remove_point): ... this.  Adjust.
13228         (linux_target_ops): Adjust.
13229         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13230         (cris_insert_point): ... this.
13231         (cris_remove_watchpoint): Rename to ...
13232         (cris_remove_point): ... this.
13233         (the_low_target): Adjust.
13234
13235 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
13236
13237         * server.c (handle_v_kill): Pass signal_pid to
13238         kill_inferior if multi_process is zero.
13239
13240 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
13241
13242         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13243         * target.h (target_ops): Comment for *_watchpoint to make it clear
13244         the functions can get types '0' and '1'.
13245
13246 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
13247
13248         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13249         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13250         * regcache.c (get_regcache): Likewise.
13251         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13252         * win32-low.c (child_fetch_inferior_registers): Remove check for
13253         regno 0.
13254
13255 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
13256             Pedro Alves <pedro@codesourcery.com>
13257
13258         * target.h (struct target_ops) <supports_multi_process>: New
13259         callback.
13260         (target_supports_multi_process): New.
13261         * server.c (handle_query): Even if GDB reports support, only
13262         enable multi-process if the target also supports it.  Report
13263         multi-process support only if the target backend supports it.
13264         * linux-low.c (linux_supports_multi_process): New function.
13265         (linux_target_ops): Install it as target_supports_multi_process
13266         callback.
13267
13268 2009-05-24  Doug Evans  <dje@google.com>
13269
13270         Global renaming of find_thread_pid to find_thread_ptid.
13271         * server.h (find_thread_ptid): Renamed from find_thread_pid.
13272         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13273         All callers updated.
13274
13275         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13276         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13277         directly.
13278
13279         * linux-low.c (get_stop_pc): Print pc if debug_threads.
13280         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13281         (linux_resume_one_lwp): Ditto.
13282
13283 2009-05-23  Doug Evans  <dje@google.com>
13284
13285         * linux-low.c (linux_resume_one_lwp): Change type of first arg
13286         from struct inferior_list_entry * to struct lwp_info *.
13287         All callers updated.
13288
13289 2009-05-13  Doug Evans  <dje@google.com>
13290
13291         * linux-x86-low.c: Don't include assert.h.
13292         (x86_siginfo_fixup): Use fatal, not assert.
13293         (x86_arch_setup): Fix comment.
13294
13295 2009-05-12  Doug Evans  <dje@google.com>
13296
13297         Biarch support for i386/amd64 gdbserver.
13298         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13299         Add linux-x86-low.c.
13300         (linux-i386-low.o, linux-x86-64-low.o): Delete.
13301         (linux-x86-low.o): Add.
13302         * linux-x86-64-low.c: Delete.
13303         * linux-i386-low.c: Delete.
13304         * linux-x86-low.c: New file.
13305         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13306         linux-x86-low.o.
13307         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13308         linux-x86-low.o.
13309         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13310         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13311         (linux_child_pid_to_exec_file): New function.
13312         (elf_64_header_p, elf_64_file_p): New functions.
13313         (siginfo_fixup): New function.
13314         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
13315         give target a chance to convert layout.
13316         * linux-low.h (linux_target_ops): New member siginfo_fixup.
13317         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13318
13319 2009-05-07  Doug Evans  <dje@google.com>
13320
13321         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13322         (regsets_store_inferior_registers): Ditto.
13323
13324 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
13325
13326         PR server/10048
13327
13328         * linux-low.c (must_set_ptrace_flags): Delete.
13329         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13330         of the global.
13331         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
13332         `lwp->must_set_ptrace_flags' instead.
13333         (linux_wait_for_event_1): Set ptrace options here.
13334         (linux_wait_1): ... not here.
13335
13336 2009-04-30  Doug Evans  <dje@google.com>
13337
13338         * inferiors.c (started_inferior_callback): New function.
13339         (attached_inferior_callback): New function.
13340         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13341         * server.c (print_started_pid, print_attached_pid): New functions.
13342         (detach_or_kill_for_exit): New function.
13343         (main): Call it instead of for_each_inferior (kill_inferior_callback).
13344         * server.h (have_started_inferiors_p): Declare.
13345         (have_attached_inferiors_p): Declare.
13346
13347         * inferiors.c (remove_process): Fix memory leak, free process.
13348         * linux-low.c (linux_remove_process): New function.
13349         (linux_kill): Call it instead of remove_process.
13350         (linux_detach, linux_wait_1): Ditto.
13351
13352 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
13353
13354         * configure.srv: Add x86 Windows CE target.
13355
13356 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13357
13358         * inferiors.c (get_thread_process): Make global.
13359         * server.h (get_thread_process): Add prototype.
13360         * thread-db.c (find_one_thread): Use get_thread_process
13361         instead of current_process.
13362         (thread_db_get_tls_address): Do not crash if called when
13363         thread layer is not yet initialized.
13364
13365 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13366
13367         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13368         * spu-low.c (current_tid): Rename to ...
13369         (current_ptid): ... this.
13370         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13371         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13372         ptid_get_lwp (current_ptid) instead of current_tid.
13373         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13374         instead of current_tid.  Use find_process_pid to verify pid
13375         argument is valid.  Pass proper argument to remove_process.
13376         (spu_thread_alive): Compare current_ptid instead of current_tid.
13377         (spu_resume): Likewise.
13378
13379 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
13380
13381         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13382         variable.
13383
13384 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13385
13386         Implement the multiprocess extensions, and add linux multiprocess
13387         support.
13388
13389         * server.h (ULONGEST): Declare.
13390         (struct ptid, ptid_t): New.
13391         (minus_one_ptid, null_ptid): Declare.
13392         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13393         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13394         (struct inferior_list_entry): Change `id' type from unsigned from
13395         to ptid_t.
13396         (struct sym_cache, struct breakpoint, struct
13397         process_info_private): Forward declare.
13398         (struct process_info): Declare.
13399         (current_process): Declare.
13400         (all_processes): Declare.
13401         (initialize_inferiors): Declare.
13402         (add_thread): Adjust to use ptid_t.
13403         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13404         (add_process, remove_process, find_thread_pid): Declare.
13405         (find_inferior_id): Adjust to use ptid_t.
13406         (cont_thread, general_thread, step_thread): Change type to ptid_t.
13407         (multi_process): Declare.
13408         (push_event): Adjust to use ptid_t.
13409         (read_ptid, write_ptid): Declare.
13410         (prepare_resume_reply): Adjust to use ptid_t.
13411         (clear_symbol_cache): Declare.
13412         * inferiors.c (all_processes): New.
13413         (null_ptid, minus_one_ptid): New.
13414         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13415         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13416         (add_thread): Change unsigned long to ptid.  Remove gdb_id
13417         parameter.  Adjust.
13418         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13419         (gdb_id_to_thread): Rename to ...
13420         (find_thread_pid): ... this.  Change unsigned long to ptid.
13421         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13422         (loaded_dll, pull_pid_from_list): Adjust.
13423         (add_process, remove_process, find_process_pid)
13424         (get_thread_process, current_process, initialize_inferiors): New.
13425         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13426         (struct target_waitstatus) <related_pid>: Ditto.
13427         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
13428         return type to int.
13429         (struct target_ops) <join>: Add `pid' argument.
13430         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13431         (struct target_ops) <wait>: Add `ptid' field.  Change return type
13432         to ptid.
13433         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13434         (mywait): Add `ptid' argument.  Change return type to ptid_t.
13435         (target_pid_to_str): Declare.
13436         * target.c (set_desired_inferior): Adjust to use ptids.
13437         (mywait): Add new `ptid' argument.  Adjust.
13438         (target_pid_to_str): New.
13439         * mem-break.h (free_all_breakpoints): Declare.
13440         * mem-break.c (breakpoints): Delelete.
13441         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13442         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13443         to use per-process breakpoint list.
13444         (free_all_breakpoints): New.
13445         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13446         (symbol_cache, all_symbols_looked_up): Delete.
13447         (hexchars): New.
13448         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13449         read_ptid): New.
13450         (prepare_resume_reply): Change ptid argument's type from unsigned
13451         long to ptid_t.  Adjust.  Implement W;process and X;process.
13452         (free_sym_cache, clear_symbol_cache): New.
13453         (look_up_one_symbol): Adjust to per-process symbol cache.  *
13454         * server.c (cont_thread, general_thread, step_thread): Change type
13455         to ptid_t.
13456         (attached): Delete.
13457         (multi_process): New.
13458         (last_ptid): Change type to ptid_t.
13459         (struct vstop_notif) <ptid>: Change type to ptid_t.
13460         (queue_stop_reply, push_event): Change `ptid' argument's type to
13461         ptid_t.
13462         (discard_queued_stop_replies): Add `pid' argument.
13463         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
13464         changes.  Don't reference the `attached' global.
13465         (attach_inferior): Adjust to mywait interface changes.
13466         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
13467         features.  Handle and report "multiprocess+".  Handle
13468         "qAttached:PID".
13469         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
13470         changes.
13471         (handle_v_kill): New.
13472         (handle_v_stopped): Adjust to use target_pid_to_str.
13473         (handle_v_requests): Allow multiple attaches and runs when
13474         multiprocess extensions are in effect.  Handle "vKill".
13475         (myresume): Adjust to use ptids.
13476         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
13477         (handle_status): Adjust to discard_queued_stop_replies interface
13478         change.
13479         (first_thread_of, kill_inferior_callback)
13480         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13481         (main): Call initialize_inferiors.  Adjust to use ptids, killing
13482         and detaching from all inferiors.  Handle multiprocess packet
13483         variants.
13484         * linux-low.h: Include gdb_proc_service.h.
13485         (struct process_info_private): New.
13486         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13487         <lwpid_of>: Use ptid_get_lwp.
13488         (get_lwp_thread): Adjust.
13489         (struct lwp_info): Add `dead' member.
13490         (find_lwp_pid): Declare.
13491         * linux-low.c (thread_db_active): Delete.
13492         (new_inferior): Adjust comment.
13493         (inferior_pid): Delete.
13494         (linux_add_process): New.
13495         (handle_extended_wait): Adjust.
13496         (add_lwp): Change unsigned long to ptid.
13497         (linux_create_inferior): Add process to processes table.  Adjust
13498         to use ptids.  Don't set new_inferior here.
13499         (linux_attach_lwp): Rename to ...
13500         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
13501         it.  Adjust to use ptids.
13502         (linux_attach_lwp): New.
13503         (linux_attach): Add process to processes table.  Don't set
13504         new_inferior here.
13505         (struct counter): New.
13506         (second_thread_of_pid_p, last_thread_of_process_p): New.
13507         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
13508         multiple processes.
13509         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
13510         processes.  Remove process from process table.
13511         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
13512         to multiple processes.
13513         (any_thread_of): New.
13514         (linux_detach): Add `pid' argument, and handle it.  Remove process
13515         from processes table.
13516         (linux_join): Add `pid' argument.  Handle it.
13517         (linux_thread_alive): Change unsighed long argument to ptid_t.
13518         Consider dead lwps as not being alive.
13519         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
13520         threads we're not interested in.
13521         (same_lwp, find_lwp_pid): New.
13522         (linux_wait_for_lwp): Change `pid' argument's type from int to
13523         ptid_t.  Adjust.
13524         (linux_wait_for_event): Rename to ...
13525         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
13526         from int to ptid_t.  Adjust.
13527         (linux_wait_for_event): New.
13528         (linux_wait_1): Add `ptid' argument.  Change return type to
13529         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
13530         that exit from the process table.
13531         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
13532         Adjust.
13533         (mark_lwp_dead): New.
13534         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
13535         stopping all threads, mark its main lwp as dead.
13536         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13537         ptids.
13538         (fetch_register, usr_store_inferior_registers)
13539         (regsets_fetch_inferior_registers)
13540         (regsets_store_inferior_registers, linux_read_memory)
13541         (linux_write_memory): Inline `inferior_pid'.
13542         (linux_look_up_symbols): Adjust to use per-process
13543         `thread_db_active'.
13544         (linux_request_interrupt): Adjust to use ptids.
13545         (linux_read_auxv): Inline `inferior_pid'.
13546         (initialize_low): Don't reference thread_db_active.
13547         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13548         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13549         (ps_getpid): Return the pid of the current inferior.
13550         * thread-db.c (proc_handle, thread_agent): Delete.
13551         (thread_db_create_event, thread_db_enable_reporting): Adjust to
13552         per-process data.
13553         (find_one_thread): Change argument type to ptid_t.  Adjust to
13554         per-process data.
13555         (maybe_attach_thread): Adjust to per-process data and ptids.
13556         (thread_db_find_new_threads): Ditto.
13557         (thread_db_init): Ditto.
13558         * spu-low.c (spu_create_inferior, spu_attach): Add process to
13559         processes table.  Adjust to use ptids.
13560         (spu_kill, spu_detach): Adjust interface.  Remove process from
13561         processes table.
13562         (spu_join, spu_thread_alive): Adjust interface.
13563         (spu_wait): Adjust interface.  Remove process from processes
13564         table.  Adjust to use ptids.
13565         * win32-low.c (current_inferior_tid): Delete.
13566         (current_inferior_ptid): New.
13567         (debug_event_ptid): New.
13568         (thread_rec): Take a ptid.  Adjust.
13569         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
13570         (child_delete_thread): Ditto.
13571         (do_initial_child_stuff): Add `attached' argument.  Add process to
13572         processes table.
13573         (child_fetch_inferior_registers, child_store_inferior_registers):
13574         Adjust.
13575         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13576         (win32_attach): Pass 1 to do_initial_child_stuff.
13577         (win32_kill): Adjust interface.  Remove process from processes
13578         table.
13579         (win32_detach): Ditto.
13580         (win32_join): Adjust interface.
13581         (win32_thread_alive): Take a ptid.
13582         (win32_resume): Adjust to use ptids.
13583         (get_child_debug_event): Ditto.
13584         (win32_wait): Adjust interface.  Remove exiting process from
13585         processes table.
13586
13587 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13588
13589         Non-stop mode support.
13590
13591         * server.h (non_stop): Declare.
13592         (gdb_client_data, handler_func): Declare.
13593         (delete_file_handler, add_file_handler, start_event_loop):
13594         Declare.
13595         (handle_serial_event, handle_target_event, push_event)
13596         (putpkt_notif): Declare.
13597         * target.h (enum resume_kind): New.
13598         (struct thread_resume): Replace `step' field by `kind' field.
13599         (TARGET_WNOHANG): Define.
13600         (struct target_ops) <wait>: Add `options' argument.
13601         <supports_non_stop, async, start_non_stop>: New fields.
13602         (target_supports_non_stop, target_async): New.
13603         (start_non_stop): Declare.
13604         (mywait): Add `options' argument.
13605         * target.c (mywait): Add `options' argument.  Print child exit
13606         notifications here.
13607         (start_non_stop): New.
13608         * server.c (non_stop, own_buf, mem_buf): New globals.
13609         (struct vstop_notif): New.
13610         (notif_queue): New global.
13611         (queue_stop_reply, push_event, discard_queued_stop_replies)
13612         (send_next_stop_reply): New.
13613         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
13614         interface changes.
13615         (attach_inferior): In non-stop mode, don't wait for the target
13616         here.
13617         (handle_general_set): Handle QNonStop.
13618         (handle_query): When handling qC, return the current general
13619         thread, instead of the first thread of the list.
13620         (handle_query): If the backend supports non-stop mode, include
13621         QNonStop+ in the qSupported query response.
13622         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
13623         and non-stop mode.
13624         (handle_v_attach, handle_v_run): Handle non-stop mode.
13625         (handle_v_stopped): New.
13626         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
13627         (myresume): Adjust to use resume_kind.  Handle non-stop.
13628         (queue_stop_reply_callback): New.
13629         (handle_status): Handle non-stop mode.
13630         (main): Clear non_stop flag on reconnection.  Use the event-loop.
13631         Refactor serial protocol handling from here ...
13632         (process_serial_event): ... to this new function.  When GDB
13633         selects any thread, select one here.  In non-stop mode, wait until
13634         GDB acks all pending events before exiting.
13635         (handle_serial_event, handle_target_event): New.
13636         * remote-utils.c (remote_open): Install remote_desc in the event
13637         loop.
13638         (remote_close): Remove remote_desc from the event loop.
13639         (putpkt_binary): Rename to...
13640         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
13641         (putpkt_binary): New as wrapper around putpkt_binary_1.
13642         (putpkt_notif): New.
13643         (prepare_resume_reply): In non-stop mode, don't change the
13644         general_thread.
13645         * event-loop.c: New.
13646         * Makefile.in (OBJ): Add event-loop.o.
13647         (event-loop.o): New rule.
13648
13649         * linux-low.h (pid_of): Moved here.
13650         (lwpid_of): New.
13651         (get_lwp_thread): Use lwpid_of.
13652         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
13653         * linux-low.c (pid_of): Delete.
13654         (inferior_pid): Use lwpid_of.
13655         (linux_event_pipe): New.
13656         (target_is_async_p): New.
13657         (delete_lwp): New.
13658         (handle_extended_wait): Use lwpid_of.
13659         (add_lwp): Don't set lwpid field.
13660         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
13661         (linux_kill_one_lwp): If killing a running lwp, stop it first.
13662         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
13663         (linux_detach_one_lwp): If detaching from a running lwp, stop it
13664         first.  Adjust to linux_wait_for_event interface changes.  Use
13665         lwpid_of.
13666         (linux_detach): Don't delete the main lwp here.
13667         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
13668         (status_pending_p): Don't consider explicitly suspended lwps.
13669         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13670         pointer.  Add OPTIONS argument.  Change return type to int.  Use
13671         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
13672         (linux_wait_for_event): Take an integer pid instead of a lwp_info
13673         pointer.  Add status pointer argument.  Return a pid instead of a
13674         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
13675         changes.  In non-stop mode, don't switch to a random thread.
13676         (linux_wait): Rename to...
13677         (linux_wait_1): ... this.  Add target_options argument, and handle
13678         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
13679         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
13680         clean exit and signal exit code.  Don't stop all threads in
13681         non-stop mode.  In all-stop mode, only stop all threads when
13682         reporting a stop to GDB.  Handle explicit thread stop requests.
13683         (async_file_flush, async_file_mark): New.
13684         (linux_wait): New.
13685         (send_sigstop): Use lwpid_of.
13686         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
13687         interface changes.  In non-stop mode, don't switch to a random
13688         thread.
13689         (linux_resume_one_lwp): Use lwpid_of.
13690         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13691         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
13692         non-stop mode, don't look for pending flag in all threads.
13693         (resume_status_pending_p): Don't consider explicitly suspended
13694         threads.
13695         (my_waitpid): Reimplement.  Emulate __WALL.
13696         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13697         Use lwpid_of.
13698         (sigchld_handler, linux_supports_non_stop, linux_async)
13699         (linux_start_non_stop): New.
13700         (linux_target_ops): Register linux_supports_non_stop, linux_async
13701         and linux_start_non_stop.
13702         (initialize_low): Install SIGCHLD handler.
13703         * thread-db.c (thread_db_create_event, find_one_thread)
13704         (thread_db_get_tls_address): Use lwpid_of.
13705         * win32-low.c (win32_detach): Adjust to use resume_kind.
13706         (win32_wait): Add `options' argument.
13707         * spu-low.c (spu_resume): Adjust to use resume_kind.
13708         (spu_wait): Add `options' argument.
13709
13710 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13711
13712         Decouple target code from remote protocol.
13713
13714         * target.h (enum target_waitkind): New.
13715         (struct target_waitstatus): New.
13716         (struct target_ops) <wait>: Return an unsigned long.  Take a
13717         target_waitstatus pointer instead of a char pointer.
13718         (mywait): Likewise.
13719         * target.c (mywait): Change prototype to return an unsigned long.
13720         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
13721         * server.h (thread_from_wait, old_thread_from_wait): Delete
13722         declarations.
13723         (prepare_resume_reply): Change prototype to take a
13724         target_waitstatus.
13725         * server.c (thread_from_wait, old_thread_from_wait): Delete.
13726         (last_status, last_ptid): New.
13727         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
13728         pid instead of a signal.
13729         (attach_inferior): Remove "status" and "signal" parameters.
13730         Adjust.
13731         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13732         not as an address.
13733         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13734         (handle_v_requests, myresume): Remove "status" and "signal"
13735         parameters.  Adjust.
13736         (handle_status): New.
13737         (main): Delete local `status'.  Adjust.
13738         * remote-utils.c: Include target.h.
13739         (prepare_resume_reply): Change prototype to take a
13740         target_waitstatus.  Adjust.
13741
13742         * linux-low.c (linux_wait): Adjust to new target_ops->wait
13743         interface.
13744         * spu-low.c (spu_wait): Adjust.
13745         * win32-low.c (enum target_waitkind, struct target_waitstatus):
13746         Delete.
13747         (win32_wait): Adjust.
13748
13749 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13750
13751         * target.h (struct thread_resume): Delete leave_stopped member.
13752         (struct target_ops): Add a `n' argument to the `resume' callback.
13753         * server.c (start_inferior): Adjust.
13754         (handle_v_cont, myresume): Adjust.
13755         * linux-low.c (check_removed_breakpoint): Adjust to resume
13756         interface change, and to removed leave_stopped field.
13757         (resume_ptr): Delete.
13758         (struct thread_resume_array): New.
13759         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
13760         resume interface change.
13761         (linux_continue_one_thread, linux_queue_one_thread)
13762         (resume_status_pending_p): Check if the resume field is NULL
13763         instead of checking the leave_stopped member.
13764         (linux_resume): Adjust to the target resume interface change.
13765         * spu-low.c (spu_resume): Adjust to the target resume interface
13766         change.
13767         * win32-low.c (win32_detach, win32_resume): Ditto.
13768
13769 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13770
13771         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13772         flag.
13773         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13774         pending.
13775         (linux_continue_one_thread): Only preserve the stepping flag if
13776         there's a pending breakpoint.
13777
13778 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
13779
13780         * server.c (main): After the inferior having exited, call
13781         remote_close before exiting gdbserver.
13782
13783 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
13784
13785         Fix size of FPSCR in Power 7 processors.
13786         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13787         (PPC_FEATURE_HAS_DFP): New #define.
13788         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13789         size of the FPSCR.
13790
13791 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
13792
13793         * server.c (handle_query) Whitespace and formatting.
13794
13795 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13796
13797         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13798         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13799         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13800         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13801         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13802         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13803         Makefile.in, configure.ac: Fix whitespace throughout.
13804         * configure: Regenerate.
13805
13806 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13807
13808         * inferiors.c (find_inferior): Make it safe for the callback
13809         function to delete the currently iterated inferior.
13810
13811 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
13812
13813         * Makefile.in (linuw_low_h): Move higher.
13814         (thread-db.o): Depend on $(linux_low_h).
13815
13816 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
13817
13818         Rename "process" to "lwp" throughout.
13819
13820         * linux-low.c (all_processes): Rename to...
13821         (all_lwps): ... this.
13822         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13823         (add_process): Rename to ...
13824         (add_lwp): ... this.  Adjust.
13825         (linux_create_inferior): Adjust.
13826         (linux_attach_lwp): Adjust.
13827         (linux_attach): Adjust.
13828         (linux_kill_one_process): Rename to ...
13829         (linux_kill_one_lwp): ... this.  Adjust.
13830         (linux_kill): Adjust.
13831         (linux_detach_one_process): Rename to ...
13832         (linux_detach_one_lwp): ... this.  Adjust.
13833         (linux_detach): Adjust.
13834         (check_removed_breakpoint): Adjust.
13835         (status_pending_p): Adjust.
13836         (linux_wait_for_process): Rename to ...
13837         (linux_wait_for_lwp): ... this.  Adjust.
13838         (linux_wait_for_event): Adjust.
13839         (send_sigstop): Adjust.
13840         (wait_for_sigstop): Adjust.
13841         (stop_all_processes): Rename to ...
13842         (stop_all_lwps): ... this.
13843         (linux_resume_one_process): Rename to ...
13844         (linux_resume_one_lwp): ... this.  Adjust.
13845         (linux_set_resume_request, linux_continue_one_thread)
13846         (linux_queue_one_thread, resume_status_pending_p)
13847         (usr_store_inferior_registers, regsets_store_inferior_registers)
13848         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13849         Adjust.
13850         * linux-low.h (get_process): Rename to ...
13851         (get_lwp): ... this.  Adjust.
13852         (get_thread_process): Rename to ...
13853         (get_thread_lwp): ... this.  Adjust.
13854         (get_process_thread): Rename to ...
13855         (get_lwp_thread): ... this.  Adjust.
13856         (struct process_info): Rename to ...
13857         (struct lwp_info): ... this.
13858         (all_processes): Rename to ...
13859         (all_lwps): ... this.
13860         * proc-service.c (ps_lgetregs): Adjust.
13861         * thread-db.c (thread_db_create_event, find_one_thread)
13862         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13863
13864 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
13865
13866         * server.c (handle_query): Handle "qAttached".
13867
13868 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
13869
13870         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13871         GPLv3, update license URL.
13872
13873 2009-03-01  Doug Evans  <dje@google.com>
13874
13875         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13876         (server_h): Add gdb_signals.h.
13877         (signals.o): Update.
13878         * server.h (target_signal_from_host,target_signal_to_host_p)
13879         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13880
13881 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
13882
13883         * remote-utils.c (getpkt): Also generate remote-debug
13884         information if noack_mode is set.
13885
13886 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
13887
13888         * server.c (handle_query): Report qXfer:siginfo:read and
13889         qXfer:siginfo:write as supported and handle them.
13890         * target.h (struct target_ops) <qxfer_siginfo>: New field.
13891         * linux-low.c (linux_xfer_siginfo): New.
13892         (linux_target_ops): Set it.
13893
13894 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
13895
13896         * server.c (gdbserver_usage): Mention --remote-debug.
13897         (main): Accept '--remote-debug' switch.
13898
13899 2009-01-18  Doug Evans  <dje@google.com>
13900
13901         * regcache.c (new_register_cache): No need to check result of xcalloc.
13902         * server.c (handle_search_memory): Back out calls to xmalloc,
13903         result is checked and error is returned to user upon failure.
13904         (handle_query): Ditto.  Add more checks for result of malloc.
13905         (handle_v_cont): Check result of malloc, report error back to
13906         user upon failure.
13907         (handle_v_run): Ditto.  Call freeargv.
13908         * server.h (freeargv): Declare.
13909         * utils.c (freeargv): New fn.
13910
13911 2009-01-15  Doug Evans  <dje@google.com>
13912
13913         * gdbreplay.c (perror_with_name): Make arg const char *.
13914         * server.h (target_signal_to_name): Make return type const char *.
13915         * thread-db.c (thread_db_err_str): Make return type const char *.
13916         * utils.c (perror_with_name): Make arg const char *.
13917
13918 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
13919
13920         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13921         when handling a EXIT_PROCESS_DEBUG_EVENT.
13922
13923 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
13924
13925         * gdbreplay.c (gdbreplay_version): Update copyright year.
13926         * server.c (gdbserver_version): Likewise.
13927
13928 2009-01-05  Doug Evans  <dje@google.com>
13929
13930         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13931         (handle_extended_wait): Improve comment.
13932
13933 2008-12-13  Doug Evans  <dje@google.com>
13934
13935         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13936         * server.h (ATTR_MALLOC): New macro.
13937         (xmalloc,xcalloc,xstrdup): Declare.
13938         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13939         * inferiors.c: Ditto.
13940         * linux-low.c: Ditto.
13941         * mem-break.c: Ditto.
13942         * regcache.c: Ditto.
13943         * remote-utils.c: Ditto.
13944         * server.c: Ditto.
13945         * target.c: Ditto.
13946         * win32-low.c: Ditto.
13947
13948 2008-12-12  Doug Evans  <dje@google.com>
13949
13950         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13951         in debugging printf.
13952
13953         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13954
13955 2008-12-09  Doug Evans  <dje@google.com>
13956
13957         * linux-low.h (struct process_info): Delete member tid, unused.
13958         * thread-db.c (find_one_thread): Update.
13959         (maybe_attach_thread): Update.
13960
13961 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
13962
13963         * target.h (struct target_ops): Add qxfer_osdata member.
13964         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13965         and dirent.h.
13966         (linux_qxfer_osdata): New functions.
13967         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13968         callback.
13969         * server.c (handle_query): Handle "qXfer:osdata:read:".
13970         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13971         (buffer_xml_printf): New functions.
13972         * server.h (struct buffer): New.
13973         (buffer_grow_str, buffer_grow_str0): New macros.
13974         (buffer_grow, buffer_free, buffer_init, buffer_finish)
13975         (buffer_xml_printf): Declare.
13976
13977 2008-11-24  Doug Evans  <dje@google.com>
13978
13979         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13980
13981 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
13982
13983         * server.c (handle_v_run): Always use the supplied argument list.
13984
13985 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
13986
13987         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13988         (xtensa_regmap_table): Add entry for scompare1.
13989
13990 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
13991
13992         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13993         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13994         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13995         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13996         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13997         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13998         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13999         XML target descriptions.
14000         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14001         when inferior is running on an ISA 2.05 or later processor.  Add
14002         special case to return offset for full 64-bit slot of FPSCR when
14003         in 32-bits.
14004
14005 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
14006
14007         * Makefile.in (SFILES, clean): Added sparc64 files.
14008         (reg-sparc64.o, reg-sparc64.c): New.
14009         * configure.srv (sparc*-*-linux*): New configuration.
14010         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14011         syscall arguments for SPARC.
14012         (regsets_store_inferior_registers): Likewise.
14013         * linux-sparc-low.c: New file.
14014
14015 2008-10-21  Doug Evans  <dje@google.com>
14016
14017         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14018         (READLINE_DIR,READLINE_DEP): Delete.
14019         (INTERNAL_CFLAGS): Update.
14020         (LINTFLAGS): Update.
14021
14022 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
14023
14024         * server.c (handle_v_run): If GDB didn't specify an argv, use the
14025         whole argv from the last run, not just argv[0].
14026
14027 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
14028
14029         * regcache.c (new_register_cache): Return NULL if the register
14030         cache size isn't known yet.
14031         (free_register_cache): Avoid dereferencing a NULL regcache.
14032
14033 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
14034
14035         * configure.srv: Merge MIPS and MIPS64.
14036
14037 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
14038
14039         * Makefile.in (uninstall): Apply $(EXEEXT) too.
14040
14041 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
14042
14043         * Makefile.in: Add required vsx dependencies.
14044
14045         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14046         Declare init_registers_powerpc_vsx32l.
14047         Declare init_registers_powerpc_vsx64l.
14048         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14049         (ppc_arch_setup): Check for VSX in hwcap.
14050         (ppc_fill_vsxregset): New function.
14051         (ppc_store_vsxregset): New function.
14052         Add new VSX entry in regset_info target_regsets.
14053
14054         * configure.srv: Add new VSX dependencies.
14055
14056 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
14057
14058         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14059         (remote_open): Set or clear transport_is_reliable.
14060         (putpkt_binary): Don't expect acks in noack mode.
14061         (getpkt): Don't send ack/nac in noack mode.
14062         * server.c (handle_general_set): Handle QStartNoAckMode.
14063         (handle_query): If connected by tcp pass QStartNoAckMode+ in
14064         qSupported.
14065         (main): Reset noack_mode on every connection.
14066         * server.h (noack_mode): Declare.
14067
14068 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14069
14070         * Makefile.in (GDBREPLAY_OBS): New variable.
14071         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14072
14073 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
14074             Daniel Jacobowitz  <dan@codesourcery.com>
14075
14076         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14077         (usr_store_inferior_registers): Likewise.
14078         (regsets_store_inferior_registers): Likewise.
14079
14080 2008-07-31  Rolf Jansen  <rj@surtec.com>
14081             Pedro Alves  <pedro@codesourcery.com>
14082
14083         * configure.ac: Check for memmem declaration.
14084         * server.c [HAVE_MALLOC_H]: Include malloc.h.
14085         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14086         (disable_packet_qfThreadInfo): Unconditionally compile.
14087         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14088         * configure, config.in: Regenerate.
14089
14090 2008-07-28  Doug Kwan  <dougkwan@google.com>
14091
14092         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14093         (linux_write_memory): Remove declaration of errno.
14094
14095 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
14096
14097         * linux-low.c (handle_extended_wait): Do not use "status"
14098         variable uninitialized.
14099
14100 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
14101
14102         * server.c (handle_v_attach): Inhibit reporting dll changes.
14103
14104 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
14105
14106         * remote-utils.c (prepare_resume_reply): If requested, don't
14107         output "thread:TID" in the T stop reply.
14108
14109         * server.c (disable_packet_vCont, disable_packet_Tthread)
14110         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14111         (handle_query): If requested, disable support for qC, qfThreadInfo
14112         and qsThreadInfo.
14113         (handle_v_requests): If requested, disable support for vCont.
14114         (gdbserver_show_disableable): New.
14115         (main): Handle --disable-packet and --disable-packet=LIST.
14116
14117         * server.h (disable_packet_vCont, disable_packet_Tthread)
14118         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14119
14120 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
14121
14122         * server.c (gdbserver_usage): Mention --version.
14123
14124 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
14125
14126         * Makefile.in (gdbreplay.o): New rule.
14127
14128 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
14129
14130         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14131         message, not gdbserver.
14132
14133 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
14134             Nathan Sidwell  <nathan@codesourcery.com>
14135             Joseph Myers  <joseph@codesourcery.com>
14136
14137         * acinclude.m4: Include ../../config/acx.m4.
14138         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14139         * configure, config.in: Regenerate.
14140         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14141         * server.c (gdbserver_version): Print PKGVERSION.
14142         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
14143         (main): Adjust gdbserver_usage calls.
14144         * gdbreplay.c (version, host_name): Add declarations.
14145         (gdbreplay_version, gdbreplay_usage): New.
14146         (main): Accept --version and --help options.
14147
14148 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
14149
14150         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14151         (arm_breakpoint_at): Handle Thumb.
14152         (the_low_target): Add comment.
14153
14154 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
14155
14156         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14157
14158 2008-05-09  Doug Evans  <dje@google.com>
14159
14160         * server.h (decode_search_memory_packet): Declare.
14161         * remote-utils.c (decode_search_memory_packet): New fn.
14162         * server.c (handle_search_memory_1): New fn.
14163         (handle_search_memory): New fn.
14164         (handle_query): Process qSearch:memory packets.
14165
14166 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
14167
14168         * regcache.c (registers_length): Remove.
14169         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14170         full register packet.
14171         * regcache.h (registers_length): Remove prototype.
14172         * server.h (PBUFSIZ): Define to 16384.
14173
14174 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
14175
14176         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14177         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14178         powerpc-64l.o, and powerpc-altivec64l.o.
14179         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14180         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14181         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14182         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14183         rs6000/power-linux.xml, and rs6000/power64-linux.xml
14184         to srv_xmlfiles.
14185
14186         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14187         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14188         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14189         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14190         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14191         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14192         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14193         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14194         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14195         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14196         (clean): Update.
14197
14198         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14199         (init_registers_powerpc_32l): ... this new prototype.
14200         (init_registers_powerpc_32): Remove, replace by ...
14201         (init_registers_powerpc_altivec32l): ... this new prototype.
14202         (init_registers_powerpc_e500): Remove, replace by ...
14203         (init_registers_powerpc_e500l): ... this new prototype.
14204         (init_registers_ppc64): Remove, replace by ...
14205         (init_registers_powerpc_64l): ... this new prototype.
14206         (init_registers_powerpc_64): Remove, replace by ...
14207         (init_registers_powerpc_altivec64l): ... this new prototype.
14208         (ppc_num_regs): Set to 73.
14209         (PT_ORIG_R3, PT_TRAP): Define if necessary.
14210         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14211         (ppc_cannot_store_register): Handle orig_r3 and trap.
14212         (ppc_arch_setup): Update init_registers_... calls.
14213         (ppc_fill_gregset): Handle orig_r3 and trap.
14214
14215         * inferiors.c (clear_inferiors): Reset current_inferior.
14216
14217 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
14218
14219         * acinclude.m4: Add override.m4.
14220         * configure: Regenerate.
14221
14222 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
14223
14224         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14225         initial call to init_register_ppc64.
14226
14227 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
14228
14229         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14230         single powerpc*-*-linux* case.
14231         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14232
14233 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
14234
14235         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14236         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14237         from reg_xmlfiles.
14238         * linux-ppc-low.c: Include <elf.h>.
14239         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14240         (ppc_hwcap): New global variable.
14241         (ppc_regmap): Remove __SPE__ #ifdef sections.
14242         (ppc_regmap_e500): New global variable.
14243         (ppc_cannot_store_register): Update __SPE__ special case.
14244         (ppc_get_hwcap): New function.
14245         (ppc_arch_setup): Use it to determine whether inferior supports
14246         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
14247         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14248         Do not access registers if target does not support AltiVec.
14249         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14250         Do not access registers if target does not support SPE.
14251         (target_regsets): Unconditionally include AltiVec and SPE regsets.
14252
14253 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
14254
14255         * linux-low.c (disabled_regsets, num_regsets): New.
14256         (use_regsets_p): Delete.
14257         (linux_wait_for_process): Clear disabled_regsets.
14258         (regsets_fetch_inferior_registers): Check and set it.
14259         (regsets_store_inferior_registers): Likewise.
14260         (linux_fetch_registers, linux_store_registers): Do not use
14261         use_regsets_p.
14262         (initialize_low): Allocate disabled_regsets.
14263
14264 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
14265
14266         * Makefile.in (LIBOBJS): New.
14267         (OBS): Use LIBOBJS.
14268         (memmem.o): New rule.
14269         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14270         * configure: Regenerated.
14271
14272 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
14273
14274         * server.c (handle_query): Never return "unsupported" for
14275         qXfer:features:read queries.
14276
14277 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
14278
14279         * server.c (get_features_xml): Fix inverted condition.
14280         (handle_query): Always support qXfer:feature:read.
14281
14282 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
14283
14284         * server.c (wrapper_argv): New.
14285         (start_inferior): Handle wrapper_argv.  If set, expect an extra
14286         trap.
14287         (gdbserver_usage): Document --wrapper.
14288         (main): Parse --wrapper.
14289
14290 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14291
14292         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14293         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14294         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14295         (ppc_set_pc): Likewise.
14296         (ppc_arch_setup): New function.
14297         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14298         of collect_register.
14299         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14300
14301 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14302
14303         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14304         instead of linux-ppc64-low.o.
14305         * linux-ppc64-low.c: Remove file.
14306         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14307         (linux-ppc64-low.o): Remove rule.
14308
14309         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14310         (init_registers_powerpc_64): Likewise.
14311         (ppc_regmap): Conditionally define depending on __powerpc64__.
14312         (ppc_cannot_store_register): Do not special-case "fpscr" when
14313         compiled on __powerpc64__.
14314         (ppc_collect_ptrace_register): New function.
14315         (ppc_supply_ptrace_register): New function.
14316         (ppc_breakpoint): Change type to "unsigned int".
14317         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14318         (the_low_target): Conditionally provide initializers for the
14319         arch_setup member depending on __powerpc64__.  Install
14320         collect_ptrace_register and supply_ptrace_register members.
14321
14322 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14323
14324         * regcache.h (gdbserver_xmltarget): Add extern declaration.
14325         * server.c (gdbserver_xmltarget): Define.
14326         (get_features_xml): Use it to replace "target.xml" and arch_string.
14327
14328         * configure.srv: Remove srv_xmltarget.  Add XML files that were
14329         mentioned there to srv_xmlfiles instead.  Remove conditional tests
14330         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14331         srv_xmlfiles and srv_regobj to include all possible choices.
14332         * configure.ac (srv_xmltarget): Remove.
14333         (srv_xmlfiles): Do not add "target.xml".
14334         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14335         checks for supplementary target information.
14336         * configure: Regenerate.
14337         * Makefile.in (XML_TARGET): Remove.
14338         (target.xml): Remove rule.
14339         (clean): Do not clean up target.xml.
14340         (.PRECIOUS): Do not mention target.xml.
14341
14342         * target.h (struct target_ops): Remove arch_string member.
14343         * linux-low.c (linux_arch_string): Remove.
14344         (linux_target_ops): Remove arch_string initializer.
14345         * linux-low.h (struct linux_target_ops): Remove arch_string member.
14346         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14347         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14348         * spu-low.c (spu_arch_string): Remove.
14349         (spu_target_ops): Remove arch_string initializer.
14350         * win32-low.c (win32_arch_string): Remove.
14351         (win32_target_ops): Remove arch_string initializer.
14352         * win32-low.h (struct win32_target_ops): Remove arch_string member.
14353         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14354         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14355
14356 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14357
14358         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14359         by collect_ptrace_register and supply_ptrace_register hooks.
14360         * linux-low.c (fetch_register): Use supply_ptrace_register callback
14361         instead of checking for the_low_target.left_pad_xfer.
14362         (usr_store_inferior_registers): Use collect_ptrace_register callback
14363         instead of checking for the_low_target.left_pad_xfer.
14364
14365         * linux-s390-low.c (s390_collect_ptrace_register): New function.
14366         (s390_supply_ptrace_register): Likewise.
14367         (s390_fill_gregset): Call s390_collect_ptrace_register.
14368         (the_low_target): Update.
14369
14370         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14371         (ppc_supply_ptrace_register): Likewise.
14372         (the_low_target): Update.
14373
14374         * linux-i386-low.c (the_low_target): Update.
14375         * linux-x86-64-low.c (the_low_target): Update.
14376
14377 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14378
14379         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14380         reg-s390.o and reg-s390x.o.
14381
14382         * linux-low.c (new_inferior): New global variable.
14383         (linux_create_inferior, linux_attach): Set it.
14384         (linux_wait_for_process): Call the_low_target.arch_setup after the
14385         target has stopped for the first time.
14386         (initialize_low): Do not call the_low_target.arch_setup.
14387
14388         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14389         (s390_set_pc): Likewise.
14390         (s390_arch_setup): New function.
14391         (the_low_target): Use s390_arch_setup as arch_setup routine.
14392
14393         * regcache.c (realloc_register_cache): New function.
14394         (set_register_cache): Call it for each existing regcache.
14395
14396 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14397
14398         * server.h (init_registers): Remove prototype.
14399
14400         * linux-low.h (struct linux_target_ops): Add arch_setup field.
14401         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14402         instead of init_registers ().
14403         * linux-arm-low.c (init_registers_arm): Add prototype.
14404         (init_registers_arm_with_iwmmxt): Likewise.
14405         (the_low_target): Add initializer for arch_setup field.
14406         * linux-cris-low.c (init_registers_cris): Add prototype.
14407         (the_low_target): Add initializer for arch_setup field.
14408         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14409         (the_low_target): Add initializer for arch_setup field.
14410         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14411         (the_low_target): Add initializer for arch_setup field.
14412         * linux-ia64-low.c (init_registers_ia64): Add prototype.
14413         (the_low_target): Add initializer for arch_setup field.
14414         * linux-m32r-low.c (init_registers_m32r): Add prototype.
14415         (the_low_target): Add initializer for arch_setup field.
14416         * linux-m68k-low.c (init_registers_m68k): Add prototype.
14417         (the_low_target): Add initializer for arch_setup field.
14418         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14419         (init_registers_mips64_linux): Likewise.
14420         (the_low_target): Add initializer for arch_setup field.
14421         * linux-ppc-low.c (init_registers_ppc): Add prototype.
14422         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14423         (the_low_target): Add initializer for arch_setup field.
14424         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14425         (init_registers_powerpc_64): Likewise.
14426         (the_low_target): Add initializer for arch_setup field.
14427         * linux-s390-low.c (init_registers_s390): Add prototype.
14428         (init_registers_s390x): Likewise.
14429         (the_low_target): Add initializer for arch_setup field.
14430         * linux-sh-low.c (init_registers_sh): Add prototype.
14431         (the_low_target): Add initializer for arch_setup field.
14432         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14433         (the_low_target): Add initializer for arch_setup field.
14434         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14435         (the_low_target): Add initializer for arch_setup field.
14436
14437         * win32-low.h (struct win32_target_ops): Add arch_setup field.
14438         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14439         instead of init_registers ().
14440         * win32-arm-low.c (init_registers_arm): Add prototype.
14441         (the_low_target): Add initializer for arch_setup field.
14442         * win32-i386-low.c (init_registers_i386): Add prototype.
14443         (the_low_target): Add initializer for arch_setup field.
14444
14445         * spu-low.c (init_registers_spu): Add prototype.
14446         (initialize_low): Call initialie_registers_spu () instead of
14447         initialize_registers ().
14448
14449 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
14450
14451         * server.c (handle_v_requests): When handling the vRun and vAttach
14452         packets, if already debugging a process, don't kill it.  Return an
14453         error instead.
14454
14455 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
14456
14457         * server.c (handle_query): Correct length check.
14458
14459 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
14460
14461         * win32-low.c (do_initial_child_stuff): Add process handle
14462         parameter.  Set current_process_handle and current_process_id from the
14463         parameters. Clear globals.
14464         (win32_create_inferior): Don't set current_process_handle and
14465         current_process_id here.  Instead pass them on the call to
14466         do_initial_child_stuff.
14467         (win32_attach): Likewise.
14468         (win32_clear_inferiors): New.
14469         (win32_kill): Don't close the current process handle or the
14470         current thread handle here.  Instead call win32_clear_inferiors.
14471         (win32_detach): Don't open a new handle to the process.  Call
14472         win32_clear_inferiors.
14473         (win32_join): Don't rely on current_process_handle; open a new
14474         handle using the process id.
14475         (win32_wait): Call win32_clear_inferiors when the inferior process
14476         has exited.
14477
14478 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
14479
14480         * server.c (monitor_show_help): Add "exit".
14481
14482 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
14483
14484         * Makefile.in (SFILES): Add linux-xtensa-low.c.
14485         (clean): Add reg-xtensa.c.
14486         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14487         * configure.srv (xtensa*-*-linux*) New target.
14488         * linux-xtensa-low.c: New.
14489         * xtensa-xtregs.c: New.
14490
14491 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
14492
14493         * hostio.c: Don't include errno.h.
14494         (errno_to_fileio_errno): Move to hostio-errno.
14495         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
14496         error number outputting to the target->hostio_last_error callback.
14497         (hostio_packet_error): Use FILEIO_EINVAL directly.
14498         (handle_open, handle_pread, hostio_error, handle_unlink): Update
14499         calls to hostio_error.
14500         * hostio-errno.c: New.
14501         * server.h (hostio_last_error_from_errno): Declare.
14502         * target.h (target_ops): Add hostio_last_error member.
14503         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14504         as hostio_last_error handler.
14505         * spu-low.c (spu_target_ops): Likewise.
14506         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14507         (wince_hostio_last_error): New functions.
14508         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14509         as hostio_last_error handler.
14510         (win32_target_ops) [!_WIN32_WCE]: Register
14511         hostio_last_error_from_errno as hostio_last_error handler.
14512         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14513         (hostio-errno.o): New rule.
14514         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14515         * configure.srv (srv_hostio_err_objs): New variable.  Default to
14516         hostio-errno.o.
14517         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14518         * configure: Regenerate.
14519
14520 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
14521
14522         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14523         (linux_kill, linux_detach): Clean up the process list.
14524         * remote-utils.c (remote_open): Improve port number parsing.
14525         (putpkt_binary, input_interrupt): Only send interrupts if the target
14526         is running.
14527         * server.c (extended_protocol): Make static.
14528         (attached): Define earlier.
14529         (exit_requested, response_needed, program_argv): New variables.
14530         (target_running): New.
14531         (start_inferior): Clear attached here.
14532         (attach_inferior): Set attached here.
14533         (require_running): Define.
14534         (handle_query): Use require_running and target_running.  Implement
14535         "monitor exit".
14536         (handle_v_attach, handle_v_run): New.
14537         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
14538         (gdbserver_usage): Update.
14539         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
14540         --attach along with other options or after the port.  Save
14541         program_argv.  Support no initial program.  Resynchronize
14542         communication with GDB after an error.  Handle "monitor exit".
14543         Use require_running and target_running.  Always allow the extended
14544         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
14545         restart in extended mode.
14546         * README: Refer to the GDB manual.  Update --attach usage.
14547
14548 2007-12-20  Andreas Schwab  <schwab@suse.de>
14549
14550         * linux-low.c (STACK_SIZE): Define.
14551         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
14552         (linux_test_for_tracefork): Likewise.
14553
14554 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
14555
14556         * linux-low.c (linux_wait_for_event): Update messages.  Do not
14557         reinsert auto-delete breakpoints.
14558         * mem-break.c (struct breakpoint): Change return type of handler to
14559         int.
14560         (set_breakpoint_at): Update handler type.
14561         (reinsert_breakpoint_handler): Return 1 instead of calling
14562         delete_breakpoint.
14563         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14564         setting a new one.
14565         (check_breakpoints): Delete auto-delete breakpoints and return 2.
14566         * mem-break.h (set_breakpoint_at): Update handler type.
14567         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14568         * win32-low.c (auto_delete_breakpoint): New.
14569         (get_child_debug_event): Use it.
14570
14571 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
14572
14573         * configure.ac: Check for pread and pwrite.
14574         * hostio.c (handle_pread): Fall back to lseek and read.
14575         (handle_pwrite): Fall back to lseek and write.
14576         * config.in, configure: Regenerated.
14577
14578 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
14579
14580         * server.c (myresume): Add own_buf argument.
14581         (main): Update calls.
14582
14583 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
14584
14585         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14586         * remote-utils.c (remote_open): Do not call disable_async_io.
14587         (block_async_io): Delete.
14588         (unblock_async_io): Make static.
14589         (initialize_async_io): New.
14590         * server.c (handle_v_cont): Handle async I/O here.
14591         (myresume): Likewise.  Move other common resume tasks here...
14592         (main): ... from here.  Call initialize_async_io.  Disable async
14593         I/O before the main loop.
14594         * server.h (initialize_async_io): Declare.
14595         (block_async_io, unblock_async_io): Delete prototypes.
14596         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14597
14598 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
14599
14600         * remote-utils.c (readchar): Allow binary data in received messages.
14601
14602 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14603
14604         * win32-low.c (attaching): New global.
14605         (win32_create_inferior): Clear the `attaching' global.
14606         (win32_attach): Set the `attaching' global.
14607         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14608         attaching.  Only set a breakpoint at the entry point if not
14609         attaching.
14610
14611 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14612
14613         * server.c (main): Don't report dll events on the initial
14614         connection on attaches.
14615
14616 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14617
14618         * server.c (main): Relax numerical bases supported for the pid of
14619         the --attach command line argument.
14620
14621 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14622
14623         * win32-low.c (win32_attach): Call OpenProcess before
14624         DebugActiveProcess, not after.  Add last error output to error
14625         call.
14626
14627 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14628
14629         * win32-low.c (win32_get_thread_context)
14630         (win32_set_thread_context): New functions.
14631         (thread_rec): Use win32_get_thread_context.
14632         (continue_one_thread, win32_resume): Use win32_set_thread_context.
14633         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14634         field.
14635
14636 2007-12-03  Leo Zayas
14637             Pedro Alves  <pedro_alves@portugalmail.pt>
14638
14639         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14640         global variables.
14641         (child_add_thread): Minor cleanup.
14642         (child_continue): Resume artificially suspended threads before
14643         calling ContinueDebugEvent.
14644         (suspend_one_thread): New.
14645         (fake_breakpoint_event): New.
14646         (get_child_debug_event): Change return type to int.  Check here if
14647         gdb sent an interrupt request.  If a soft interrupt was requested,
14648         fake a breakpoint event.  Return 0 if there is no event to handle,
14649         and 1 otherwise.
14650         (win32_wait): Don't check here if gdb sent an interrupt request.
14651         Ensure there is a valid event to handle.
14652         (win32_request_interrupt): Add soft interruption method as last
14653         resort.
14654
14655 2007-12-03  Leo Zayas
14656             Pedro Alves  <pedro_alves@portugalmail.pt>
14657
14658         * win32-low.h (win32_thread_info): Add descriptions to the
14659         structure members.  Replace `suspend_count' counter by a
14660         `suspended' flag.
14661         * win32-low.c (thread_rec): Update condition of when to get the
14662         context from the inferior.  Rely on ContextFlags being set if it
14663         has already been retrieved.  Only suspend the inferior thread if
14664         we haven't already.  Warn if that fails.
14665         (continue_one_thread): s/suspend_count/suspended/.  Only call
14666         ResumeThread once.  Warn if that fails.
14667
14668 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
14669
14670         * win32-low.c (win32_wait): Don't read from the inferior when it
14671         has already exited.
14672
14673 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
14674
14675         * Makefile.in (win32_low_h): New variable.
14676         (win32-low.o): Add dependency on $(win32_low_h).
14677         (win32-arm-low.o, win32-i386-low.o): New rules.
14678
14679 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
14680
14681         * hostio.c: Correct copyright year.
14682
14683 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
14684
14685         * Makefile.in (OBS): Add hostio.o.
14686         (hostio.o): New rule.
14687         * server.h (handle_vFile): Declare.
14688         * hostio.c: New file.
14689         * server.c (handle_v_requests): Take packet_len and new_packet_len
14690         for binary packets.  Call handle_vFile.
14691         (main): Update call to handle_v_requests.
14692
14693 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
14694
14695         * linux-low.c: Include <sched.h>.
14696
14697 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
14698
14699         * linux-low.c (linux_tracefork_grandchild): New.
14700         (linux_tracefork_child): Use clone.
14701         (linux_test_for_tracefork): Use clone; allocate and free a stack.
14702
14703 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
14704
14705         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14706
14707 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
14708
14709         * linux-low.c (handle_extended_wait): Handle unexpected signals.
14710
14711 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
14712
14713         * inferiors.c (change_inferior_id): Delete.
14714         (add_pid_to_list, pull_pid_from_list): New.
14715         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14716         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14717         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14718         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14719         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14720         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14721         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14722         (using_threads): Always set to 1.
14723         (handle_extended_wait): New.
14724         (add_process): Do not set TID.
14725         (linux_create_inferior): Set must_set_ptrace_flags.
14726         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
14727         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
14728         (linux_thread_alive): Rename TID argument to LWPID.
14729         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
14730         (linux_wait_for_event): Do not use TID or check using_threads.  Update
14731         call to dead_thread_notify.  Call handle_extended_wait.
14732         (linux_create_inferior): Use PTRACE_SETOPTIONS.
14733         (send_sigstop): Delete sigstop_sent.
14734         (wait_for_sigstop): Avoid TID.
14735         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14736         (linux_test_for_tracefork): New.
14737         (linux_lookup_signals): Use thread_db_active and
14738         linux_supports_tracefork_flag.
14739         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14740         * linux-low.h (get_process_thread): Avoid TID.
14741         (struct process_ifo): Move thread_known and tid to the end.  Remove
14742         sigstop_sent.
14743         (linux_attach_lwp, thread_db_init): Update prototypes.
14744         * server.h (change_inferior_id): Delete prototype.
14745         (add_pid_to_list, pull_pid_from_list): New prototypes.
14746         * thread-db.c (thread_db_use_events): New.
14747         (find_first_thread): Rename to...
14748         (find_one_thread): ...this.  Update callers and messages.  Do not
14749         call fatal.  Check thread_db_use_events.  Do not call
14750         change_inferior_id or new_thread_notify.
14751         (maybe_attach_thread): Update.  Do not call new_thread_notify.
14752         (thread_db_init): Set thread_db_use_events.  Check use_events.
14753         * utils.c (fatal, warning): Correct message prefix.
14754
14755 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
14756
14757         * Makefile.in (clean): Remove new files.
14758         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14759         (powerpc-64.o, powerpc-64.c): New rules.
14760         * configure.srv: Use alternate register sets for powerpc64-*-linux*
14761         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14762         with SPE.
14763         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14764         SPE targets.
14765         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14766         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14767         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14768         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14769         (target_regsets): Add AltiVec and SPE register sets.
14770         * configure.ac: Check for AltiVec and SPE.
14771         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14772         (ppc_fill_vrregset, ppc_store_vrregset): New.
14773         (target_regsets): Add AltiVec register set.
14774         * configure: Regenerated.
14775
14776 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
14777
14778         * linux-low.c (O_LARGEFILE): Define.
14779         (linux_read_memory): Use /proc/PID/mem.
14780         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
14781         * configure, config.in: Regenerated.
14782
14783 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
14784
14785         * linux-low.c (linux_wait_for_event): Do not pass signals while
14786         single-stepping.
14787
14788 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14789
14790         * win32-low.c (create_process): New.
14791         (win32_create_inferior): Use create_process instead of
14792         CreateProcess.  If create_process failed retry appending an ".exe"
14793         suffix.  Store the GetLastError result immediatelly after
14794         create_process calls and use it on the call to error.
14795
14796 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
14797
14798         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14799
14800 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
14801
14802         * configure.ac: Switch license to GPLv3.
14803
14804 2007-08-01  Michael Snyder  <msnyder@access-company.com>
14805
14806         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14807
14808 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
14809
14810         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14811         typedef.
14812         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14813         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
14814         CloseToolhelp32Snapshot.
14815         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14816         CloseToolhelp32Snapshot.
14817
14818 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
14819
14820         * server.c (main): Check for inferior exit before main loop.
14821
14822 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
14823
14824         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14825         instead of on tmp_desc.
14826
14827 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
14828             Daniel Jacobowitz  <dan@codesourcery.com>
14829
14830         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14831         (add_thread): Minor cleanups.
14832         (clear_inferiors): Move lower in the file.  Clear the DLL
14833         list.
14834         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14835         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14836         (xml_escape_text): New.
14837         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
14838         for qSupported.
14839         (handle_v_cont): Report errors.
14840         (gdbserver_version): Update.
14841         (main): Correct size of own_buf.  Do not report initial DLL events.
14842         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14843         (unloaded_dll, xml_escape_text): New.
14844         * win32-low.c (enum target_waitkind): Update comments.
14845         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14846         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14847         (win32_EnumProcessModules, win32_GetModuleInformation)
14848         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14849         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14850         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14851         (win32_Module32First, win32_Module32Next, load_toolhelp)
14852         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14853         (get_child_debug_event): Handle DLL events.
14854         (win32_wait): Likewise.
14855
14856 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
14857
14858         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14859         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14860
14861 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
14862
14863         * win32-low.c (handle_output_debug_string): Ignore event if not
14864         waiting.
14865
14866 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
14867
14868         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14869
14870 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
14871
14872         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14873
14874 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
14875
14876         * inferiors.c (change_inferior_id): Add comment.
14877         * linux-low.c (check_removed_breakpoint): Add an early
14878         prototype.  Improve debug output.
14879         (linux_attach): Doc update.
14880         (linux_detach_one_process, linux_detach): Clean up before releasing
14881         each process.
14882         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14883         * linux-low.h (struct process_info): Doc improvement.
14884         * mem-break.c (delete_all_breakpoints): New.
14885         * mem-break.h (delete_all_breakpoints): New prototype.
14886         * thread-db.c (find_first_thread): New.
14887         (thread_db_create_event): Call it instead of
14888         thread_db_find_new_threads.  Clean up unused variables.
14889         (maybe_attach_thread): Remove first thread handling.
14890         (thread_db_find_new_threads): Use find_first_thread.
14891         (thread_db_get_tls_address): Likewise.
14892
14893 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
14894
14895         * thread-db.c (thread_db_find_new_threads): Add prototype.
14896         (thread_db_create_event): Check for the main thread before adding
14897         a new thread.
14898         (maybe_attach_thread): Only enable event reporting if TID == 0.
14899         (thread_db_get_tls_address): Check for new threads.
14900
14901 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
14902
14903         * linux-low.c (linux_create_inferior): Try execv before execvp.
14904         * spu-low.c (spu_create_inferior): Likewise.
14905
14906 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
14907
14908         * linux-low.c (linux_create_inferior): Change execv to execvp.
14909         * spu-low.c (spu_create_inferior): Likewies.
14910
14911 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
14912
14913         * Makefile.in (clean): Clean new files instead of deleted ones.
14914         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14915         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14916         rules.
14917         * configure.srv: Specify XML files and new regformats for MIPS and
14918         MIPS64 GNU/Linux.
14919         * linux-mips-low.c (mips_num_regs): Set to only used registers.
14920         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
14921         an entry for the restart register.
14922         (mips_cannot_fetch_register, mips_cannot_store_register)
14923         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14924         register names to match the XML descriptions.
14925         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
14926         restart register instead of $0.
14927
14928 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
14929             Markus Deuling  <deuling@de.ibm.com>
14930
14931         * remote-utils.c (decode_xfer_write): New function.
14932         * server.h (decode_xfer_write): Add prototype.
14933         * server.c (handle_query): Add PACKET_LEN argument.  Support
14934         qXfer:spu:read and qXfer:spu:write packets.
14935         (main): Pass packet_len to handle_query.
14936         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14937         * target.h (target_ops): Add qxfer_spu.
14938
14939 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
14940
14941         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14942         accessing non-seekable spufs files.
14943
14944 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
14945
14946         * server.c (handle_query): Add reply for qC packet.
14947
14948 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14949             Leo Zayas  <lerele@champenstudios@com>
14950
14951         * server.h (check_remote_input_interrupt_request): New function.
14952         * remote_utils.c (INVALID_DESCRIPTOR): New define.
14953         (remote_desc): Initialize with INVALID_DESCRIPTOR.
14954         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
14955         (check_remote_input_interrupt_request): New function.
14956         * server.h (check_remote_input_interrupt_request): Declare.
14957         * win32-low.c (winapi_DebugBreakProcess,
14958         winapi_GenerateConsoleCtrlEvent): New typedefs.
14959         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14960         to 250 ms.
14961         (win32_wait): Check for remote interrupt request
14962         with check_remote_input_interrupt_request.
14963         (win32_request_interrupt): New function.
14964         (win32_target_op): Set request_interrupt to win32_request_interrupt.
14965
14966 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
14967
14968         * win32-low.c (debug_registers_changed,
14969         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14970         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14971         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14972         (thread_rec): Get context using the low target.
14973         (child_add_thread): Call thread_added on the low target,
14974         which does the same thing.
14975         (regptr): Delete.
14976         (do_initial_child_stuff): Remove debug registers references.
14977         Set context using the low target.  Resume threads after
14978         setting the contexts.
14979         (child_continue): Remove dead variable.  Remove debug
14980         registers references.
14981         (child_fetch_inferior_registers): Go through the low target.
14982         (do_child_store_inferior_registers): Remove.
14983         (child_store_inferior_registers): Go through the low target.
14984         (win32_resume): Remove debug registers references.
14985         Set context using the low target.
14986         (handle_exception): Change return type to void.  Don't record
14987         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
14988         first chance exception.
14989         (get_child_debug_event): Change return type to void.  Remove
14990         goto loop.  Always return after waiting for debug event.
14991         (win32_wait): Convert to switch statement.  Handle spurious
14992         events.
14993
14994         * win32-i386-low.c (debug_registers_changed,
14995         debug_registers_used): New.
14996         (initial_stuff): Rename to ...
14997         (i386_initial_stuff): ... this.  Clear debug registers
14998         state variables.
14999         (store_debug_registers): Delete.
15000         (i386_get_thread_context): New.
15001         (load_debug_registers): Delete.
15002         (i386_set_thread_context): New.
15003         (i386_thread_added): New.
15004         (single_step): Rename to ...
15005         (i386_single_step): ... this.
15006         (do_fetch_inferior_registers): Rename to ...
15007         (i386_fetch_inferior_register): ... this.
15008         (i386_store_inferior_register): New.
15009         (the_low_target): Adapt to new interface.
15010
15011         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15012         (arm_get_thread_context): New.
15013         (arm_set_thread_context): New.
15014         (regptr): New.
15015         (do_fetch_inferior_registers): Rename to ...
15016         (arm_fetch_inferior_register): ... this.
15017         (arm_store_inferior_register): New.
15018         (arm_wince_breakpoint): Reimplement as unsigned long.
15019         (arm_wince_breakpoint_len): Define.
15020         (the_low_target): Adapt to new interface.
15021
15022         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15023         load_debug_registers.  Add get_thread_context, set_thread_context,
15024         thread_added and store_inferior_register.  Rename
15025         fetch_inferior_registers to fetch_inferior_register.
15026         (regptr): Remove declaration.
15027
15028 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15029
15030         * linux-low.c (linux_detach): Change return type to int.  Return 0.
15031         * spu-low.c (spu_detach): Likewise.
15032
15033 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15034
15035         * target.h (target_ops): Change return type of detach to int.
15036         Add join.
15037         (join_inferior): New.
15038         * server.c (main): Don't skip detach support on mingw32.
15039         If the inferior doesn't support detaching return error.
15040         Call join_inferior instead of using waitpid.
15041         * linux-low.c (linux_join): New.
15042         (linux_target_op): Add linux_join.
15043         * spu-low.c (spu_join): New.
15044         (spu_target_ops): Add spu_join.
15045         * win32-low.c (win32_detach): Adapt to new interface.
15046         Reopen current_process_handle before detaching.  Issue a child
15047         resume before detaching.
15048         (win32_join): New.
15049         (win32_target_op): Add win32_join.
15050
15051 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15052
15053         * win32-low.c (win32-attach): Fix return value.
15054         * target.h (target_ops): Describe ATTACH return values.
15055
15056 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15057
15058         * win32-low.c (GETPROCADDRESS): Define.
15059         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
15060         (winapi_DebugSetProcessKillOnExit): Likewise.
15061         (win32_create_inferior): Force usage of ansi CreateProcessA.
15062         (win32_attach): Use GETPROCADDRESS.
15063         (win32_detach): Likewise.
15064
15065 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15066
15067         * win32-low.c (win32_wait): Don't use WSTOPSIG.
15068
15069 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
15070
15071         * win32-low.c: Commit leftover changes from 2007-03-29.
15072
15073 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15074
15075         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15076         fields short instead of int.  Add explicit padding.
15077         (i387_cache_to_fsave): Remove unnecessary casts.
15078         (i387_fsave_to_cache): Doc fix.
15079         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15080
15081 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15082
15083         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15084         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15085
15086 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15087
15088         * configure.srv (arm*-*-mingw32ce*): Move near the other
15089         arm targets.
15090
15091 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15092
15093         * configure.ac: Add errno checking.
15094         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15095         sys/file.h and malloc.h.
15096         (AC_CHECK_DECLS): Add perror.
15097         (srv_mingwce): Handle.
15098         * configure.srv (i[34567]86-*-cygwin*): Add
15099         win32-i386-low.o to srv_tgtobj.
15100         (i[34567]86-*-mingw*): Likewise.
15101         (arm*-*-mingw32ce*): Add case.
15102         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15103         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15104         [__MINGW32CE__] (strerror): New function.
15105         [__MINGW32CE__] (errno): Define to GetLastError.
15106         [__MINGW32CE__] (COUNTOF): New macro.
15107         (remote_open): Remove extra close call.
15108         * mem-break.c (delete_breakpoint_at): New function.
15109         * mem-break.h (delete_breakpoint_at): Declare.
15110         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15111         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15112         [USE_WIN32API] (read, write): Add char* casts.
15113         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15114         * server.h: Include wincecompat.h on Windows CE.
15115         [HAVE_ERRNO_H]: Check.
15116         (perror): Declare if not declared.
15117         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15118         (perror_with_name): Remove errno declaration.
15119         * wincecompat.h: New.
15120         * wincecompat.c: New.
15121         * win32-low.h: New.
15122         * win32-arm-low.c: New.
15123         * win32-i386-low.c: New.
15124         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15125         (OUTMSG2): Make it safe.
15126         (_T): New macro.
15127         (COUNTOF): New macro.
15128         (NUM_REGS): Get it from the low target.
15129         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15130         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15131         (thread_rec): Let low target handle debug registers.
15132         (child_add_thread): Likewise.
15133         (child_init_thread_list): Likewise.
15134         (continue_one_thread): Likewise.
15135         (regptr): New.
15136         (do_child_fetch_inferior_registers): Move to ...
15137         * win32-i386-low.c: ... here, and rename to ...
15138         (do_fetch_inferior_registers): ... this.
15139         * win32-low.c (child_fetch_inferior_registers):
15140         Go through the low target.
15141         (do_child_store_inferior_registers): Use regptr.
15142         (strwinerror): New function.
15143         (win32_create_inferior): Handle Windows CE.
15144         Use strwinerror instead of strerror on Windows error
15145         codes.  Add program to the error output.
15146         Don't close the main thread handle on Windows CE.
15147         (win32_attach): Use coredll.dll on Windows CE.
15148         (win32_kill): Close current process and current
15149         thread handles.
15150         (win32_detach): Use coredll.dll on Windows CE.
15151         (win32_resume): Let low target handle debug registers, and
15152         step request.
15153         (handle_exception): Add/Remove initial breakpoint.  Avoid
15154         non-existant WSTOPSIG on Windows CE.
15155         (win32_read_inferior_memory): Cast to remove warning.
15156         (win32_arch_string): Go through the low target.
15157         (initialize_low): Call set_breakpoint_data with the low
15158         target's breakpoint.
15159         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15160         FOP_REGNUM, mappings): Move to ...
15161         * win32-i386-low.c: ... here.
15162         * win32-low.c (win32_thread_info): Move to ...
15163         * win32-low.h: ... here.
15164         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15165         win32-arm-low.c and wincecompat.c.
15166         (all:): Add $EXEEXT.
15167         (install-only:): Likewise.
15168         (gdbserver:): Likewise.
15169         (gdbreplay:): Likewise.
15170         * config.in: Regenerate.
15171         * configure: Regenerate.
15172
15173 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
15174
15175         * win32-low.c: Rename typedef thread_info to
15176         win32_thread_info throughout.
15177
15178 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
15179
15180         * win32-i386-low.c: Rename to ...
15181         * win32-low.c: ... this.
15182         * configure.srv: Replace win32-i386-low.o with win32-low.o.
15183         * Makefile.in: Likewise.
15184
15185 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
15186
15187         * remote-utils.c (monitor_output): Constify msg parameter.
15188         * server.h (monitor_output): Likewise.
15189         * win32-i386-low.c (handle_output_debug_string): New.
15190         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15191         handle_output_debug_string.
15192         (get_child_debug_event): Likewise.
15193
15194 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
15195
15196         * server.c (main): Correct strtoul check.
15197
15198 2007-03-27  Jon Ringle  <jon@ringle.org>
15199
15200         * linux-low.c: Check __ARCH_HAS_MMU__ also.
15201
15202 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
15203
15204         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15205
15206 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
15207
15208         * terminal.h: Check HAVE_SGTTY_H.
15209
15210 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
15211
15212         * remote-utils.c (remote_open): Print out the assigned port number.
15213
15214 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
15215
15216         * remote-utils.c (monitor_output): New function.
15217         * server.c (debug_threads): Define here.
15218         (monitor_show_help): New function.
15219         (handle_query): Handle qRcmd.
15220         (main): Do not handle 'd' packet.
15221         * server.h (debug_threads, remote_debug, monitor_output): Declare.
15222         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15223         of debug_threads.
15224
15225 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15226
15227         * Makefile.in (EXEEXT): New.
15228         (clean): Use $(EXEEXT).
15229
15230 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15231
15232         * target.h (target_ops): Rename send_signal to request_interrupt,
15233         and remove enum target_signal parameter.
15234         * linux-low.c (linux_request_interrupt): Rename from
15235         linux_send_signal, and always send SIGINT.
15236         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15237         and always send SIGINT.
15238         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15239         of send_signal.
15240         (input_interrupt): Likewise.
15241
15242 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15243
15244         * server.c (get_features_xml): Check if target implemented
15245         arch_string.
15246         * win32-i386-low.c (win32_arch_string): New.
15247         (win32_target_ops): Add win32_arch_string as arch_string member.
15248
15249 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
15250
15251         * spu-low.c (spu_arch_string): New.
15252         (spu_target_ops): Add spu_arch_string.
15253
15254 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
15255
15256         * remote-utils.c: Remove HAVE_TERMINAL_H check.
15257         * configure.ac: Do not check for terminal.h.
15258         * configure, config.in: Regenerated.
15259
15260 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15261
15262         * Makefile.in (OBS): Add $(XML_BUILTIN).
15263         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15264         (clean): Update.
15265         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15266         (arm-with-iwmmxt.c): New.
15267         * config.in, configure: Regenerate.
15268         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
15269         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
15270         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15271         (arm*-*-linux*): Add iWMMXt and regset support.
15272         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15273         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15274         (arm_store_wmmxregset, target_regsets): New.
15275         * server.c (get_features_xml): Take annex argument.  Check builtin
15276         XML documents.
15277         (handle_query): Handle multiple annexes.
15278
15279 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
15280
15281         * remote-utils.c [USE_WIN32API] (read, write): Define.
15282         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15283         write.
15284
15285 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
15286
15287         * linux-i386-low.c (the_low_target): Set arch_string.
15288         * linux-x86-64-low.c (the_low_target): Likewise.
15289         * linux-low.c (linux_arch_string): New.
15290         (linux_target_ops): Add it.
15291         * linux-low.h (struct linux_target_ops): Add arch_string.
15292         * server.c (write_qxfer_response): Use const void * for DATA.
15293         (get_features_xml): New.
15294         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
15295         * target.h (struct target_ops): Add arch_string method.
15296
15297 2007-01-03  Denis Pilat  <denis.pilat@st.com>
15298             Daniel Jacobowitz  <dan@codesourcery.com>
15299
15300         * linux-low.c (linux_kill): Handle being called with no threads.
15301         * win32-i386-low.c (win32_kill): Likewise.
15302         (get_child_debug_event): Clear current_process_handle.
15303
15304 2006-12-30  Denis PILAT  <denis.pilat@st.com>
15305             Daniel Jacobowitz  <dan@codesourcery.com>
15306
15307         * remote-utils.c (remote_open): Check the type of specified
15308         serial port devices before opening them.
15309         * server.c (main): Kill the inferior if an error occurs during
15310         the first remote_open.
15311
15312 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
15313
15314         * README: Update supported targets.
15315
15316 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
15317
15318         * Makefile.in (clean): Remove reg-mips64.c.
15319         (reg-mips64.c, reg-mips64.o): New rules.
15320         * configure.srv: Handle mips64.  Include regset support for mips.
15321         * linux-mips-low.c (union mips_register): New.
15322         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15323         (mips_breakpoint, mips_breakpoint_at): Use int.
15324         (mips_collect_register, mips_supply_register)
15325         (mips_collect_register_32bit, mips_supply_register_32bit)
15326         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15327         (mips_store_fpregset, target_regsets): New.
15328         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15329
15330 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
15331
15332         * configure.srv: Add target "spu*-*-*".
15333         * Makefile.in (clean): Remove reg-spu.c.
15334         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15335         * spu-low.c: New file.
15336
15337 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15338
15339         * configure.ac: Correct td_thr_tls_get_addr test.
15340         * configure: Regenerated.
15341
15342 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15343
15344         * linux-low.c (linux_wait_for_event): Reformat.  Use the
15345         pass_signals array.
15346         * remote-utils.c (decode_address_to_semicolon): New.
15347         * server.c (pass_signals, handle_general_set): New.
15348         (handle_query): Mention QPassSignals for qSupported.
15349         (main): Call handle_general_set.
15350         * server.h (pass_signals, decode_address_to_semicolon): New.
15351
15352 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
15353
15354         * server.c (handle_query): Correct error handling for read_auxv.
15355
15356 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
15357
15358         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15359         and srv_linux_thread_db to yes.
15360         * linux-s390-low.c (s390_fill_gregset): New function.
15361         (target_regsets): Define data structure.
15362
15363 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
15364
15365         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15366         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
15367         * config.in, configure: Regenerated.
15368         * inferiors.c (gdb_id_to_thread): New function.
15369         (gdb_id_to_thread_id): Use it.
15370         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15371         * linux-low.h (struct process_info): Add th member.
15372         (thread_db_get_tls_address): New prototype.
15373         * remote-utils.c (decode_address): Make non-static.
15374         * server.c (handle_query): Handle qGetTLSAddr.
15375         * server.h (gdb_id_to_thread, decode_address): New prototypes.
15376         * target.h (struct target_ops): Add get_tls_address.
15377         * thread-db.c (maybe_attach_thread): Save the thread handle.
15378         (thread_db_get_tls_address): New.
15379
15380 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
15381
15382         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15383         (linux_resume_one_process): Take a siginfo_t *.  Update all
15384         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
15385         (struct pending_signals): Add a siginfo_t.
15386         (linux_wait_for_process): Always set last_status.
15387         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15388         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15389         * linux-low.h (struct process_info): Add last_status.
15390
15391 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
15392
15393         * remote-utils.c (try_rle): New function.
15394         (putpkt_binary): Use it.
15395
15396 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
15397
15398         * Makefile.in (clean): Clean reg-x86-64-linux.c.
15399         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15400         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15401         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15402         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15403         point registers.
15404
15405 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
15406
15407         * server.c (terminal_fd): New variable.
15408         (old_foreground_pgrp): Likewise.
15409         (restore_old_foreground_pgrp): New function.
15410         (start_inferior): Record the terminal file descriptor in terminal_fd
15411         and its original foreground group in old_foreground_pgrp.  Register
15412         restore_old_foreground_pgrp with atexit().
15413
15414 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
15415
15416         * server.c (handle_query): Correct qPart to qXfer.
15417
15418 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
15419
15420         * configure.ac: Check for more headers which are missing on
15421         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
15422         * configure.srv: Add Cygwin and mingw32.
15423         * remote-utils.c: Don't include headers unconditionally which
15424         are missing on mingw32.  Include <winsock.h> for mingw32.
15425         (remote_open): Adjust for mingw32 support.  Flush
15426         standard error after writing to it.
15427         (remote_close, putpkt_binary, input_interrupt, block_async_io)
15428         (unblock_async_io, enable_async_io, disable_async_io)
15429         (readchar, getpkt): Update for Winsock support.
15430         (prepare_resume_reply): Expect a protocol signal number.
15431         * server.c: Disable <sys/wait.h> on mingw32.
15432         (start_inferior): Adjust for mingw32 support.  Flush
15433         standard error after writing to it.
15434         (attach_inferior): Likewise.  Use protocol signal
15435         numbers.
15436         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
15437         and names.
15438         * win32-i386-low.c: New file.
15439         * Makefile.in (XM_CLIBS): Set.
15440         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15441         (win32-i386-low.o): New dependency rule.
15442         * linux-low.c (linux_wait): Use target signal numbers.
15443         * target.h (struct target_ops): Doc fix.
15444         * server.h (target_signal_to_name): New prototype.
15445         * gdbreplay.c: Don't include headers unconditionally which
15446         are missing on mingw32.  Include <winsock.h> for mingw32.
15447         (remote_close, remote_open): Adjust for Winsock support.
15448         * configure, config.in: Regenerated.
15449
15450 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15451
15452         * server.c (decode_xfer_read, write_qxfer_response): New.
15453         (handle_query): Take a packet length argument.  Handle
15454         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
15455         the qSupported response.
15456         (main): Update call to handle_query.
15457
15458 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
15459
15460         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15461         (putpkt_binary): Renamed from putpkt and adjusted for binary
15462         data.
15463         (putpkt): New wrapper for putpkt_binary.
15464         (readchar): Don't mask off the high bit.
15465         (decode_X_packet): New function.
15466         * server.c (main): Call putpkt_binary if a handler sets the packet
15467         length.  Save the length of the incoming packet.  Handle 'X'.
15468         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15469
15470 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
15471
15472         * server.c (handle_query): Handle qSupported.
15473
15474 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15475
15476         * remote-utils.c (all_symbols_looked_up): New variable.
15477         (look_up_one_symbol): Check it.
15478         * server.h (look_up_one_symbol): New declaration.
15479         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15480
15481 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15482
15483         * Makefile.in (linux-arm-low.o): Update dependencies.
15484         * linux-arm-low.c: Include "gdb_proc_service.h".
15485         (PTRACE_GET_THREAD_AREA): Define.
15486         (ps_get_thread_area): New function.
15487
15488 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
15489
15490         * configure.srv (m68k*-*-uclinux*): New target.
15491         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15492         (linux_resume_one_process): Remove extraneous cast.
15493         (linux_read_offsets): New.
15494         (linux_target_op): Add linux_read_offsets on mmuless systems.
15495         * server.c (handle_query): Add qOffsets logic.
15496         * target.h (struct target_ops): Add read_offsets.
15497
15498 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15499
15500         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15501         (PTRACE_GET_THREAD_AREA): Define.
15502         (ps_get_thread_area): New function.
15503         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15504         (linux-x86-64-low.o): Update.
15505
15506 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15507
15508         * configure.ac: Remove checks for prfpregset_t.
15509         * gdb_proc_service.h: New file.
15510         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15511         new "gdb_proc_service.h".
15512         * proc-service.c: Likewise.
15513         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15514         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15515         * Makefile.in (gdb_proc_service_h): Updated.
15516         * configure, config.in: Regenerated.
15517
15518 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
15519
15520         * remote-utils.c (prepare_resume_reply): Move declaration
15521         of gdb_id_from_wait to the top of the block.
15522
15523 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
15524
15525         * linux-low.c (regsets_store_inferior_registers): Read the regset
15526         from the target before filling it.
15527
15528 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15529
15530         * server.c (attach_inferior): Return SIGTRAP for a successful
15531         attach.
15532
15533 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
15534
15535         * Makefile.in (OBS): Add version.o.
15536         (STAGESTUFF): Delete.
15537         (version.o): Add dependencies.
15538         (version.c): Replace rule.
15539         (clean): Remove version.c.
15540         * server.c (gdbserver_version): New.
15541         (gdbserver_usage): Use printf.
15542         (main): Handle --version and --help.
15543         * server.h (version, host_name): Add declarations.
15544
15545 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
15546
15547         * linux-arm-low.c:
15548         * linux-arm-low.c:
15549         * inferiors.c:
15550         * i387-fp.h:
15551         * i387-fp.c:
15552         * gdbreplay.c:
15553         * regcache.c:
15554         * proc-service.c:
15555         * mem-break.h:
15556         * mem-break.c:
15557         * linux-x86-64-low.c:
15558         * linux-sh-low.c:
15559         * linux-s390-low.c:
15560         * linux-ppc64-low.c:
15561         * linux-ppc-low.c:
15562         * linux-mips-low.c:
15563         * linux-m68k-low.c:
15564         * linux-m32r-low.c:
15565         * linux-low.h:
15566         * linux-low.c:
15567         * linux-ia64-low.c:
15568         * linux-i386-low.c:
15569         * linux-crisv32-low.c:
15570         * thread-db.c:
15571         * terminal.h:
15572         * target.h:
15573         * target.c:
15574         * server.h:
15575         * server.c:
15576         * remote-utils.c:
15577         * regcache.h:
15578         * utils.c:
15579         * Makefile.in:
15580         * configure.ac:
15581         * gdbserver.1: Add (C) after Copyright.  Update the FSF
15582         address.
15583
15584 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
15585
15586         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15587         (arm_breakpoint_at): Recognize both breakpoints.
15588         (the_low_target): Use the correct breakpoint instruction.
15589
15590 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
15591
15592         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15593         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15594         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15595         (the_low_target): Update.
15596
15597 2005-10-25  Andreas Schwab  <schwab@suse.de>
15598
15599         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15600
15601         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15602         (ia64_num_regs): Reduce to 462.
15603
15604 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
15605
15606         * acinclude.m4: Correct quoting.
15607         * aclocal.m4: Regenerated.
15608
15609         Suggested by SZOKOVACS Robert <szo@ies.hu>:
15610         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15611         (thread_db_init): Call thread_db_err_str.
15612         * configure.ac: Check for TD_VERSION.
15613         * config.in, configure: Regenerated.
15614
15615 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15616
15617         * server.h (error, fatal, warning): Add ATTR_FORMAT.
15618
15619 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15620
15621         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15622         is not available.  Define HAVE_PTRACE_GETREGS if it is.
15623         * config.in, configure: Regenerated.
15624         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15625         * linux-i386-low.c, linux-m68k-low.c: Update to use
15626         HAVE_PTRACE_GETREGS.
15627         * linux-low.c (regsets_fetch_inferior_registers)
15628         (regsets_store_inferior_registers): Only return 0 if we processed
15629         GENERAL_REGS.
15630         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15631         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15632
15633 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15634
15635         * inferiors.c (struct thread_info): Add gdb_id.
15636         (add_thread): Add gdb_id argument.
15637         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15638         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15639         calls to add_thread.
15640         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15641         * server.c (handle_query): Use thread_to_gdb_id.
15642         (handle_v_cont, main): Use gdb_id_to_thread_id.
15643         * server.h (add_thread): Update prototype.
15644         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15645         prototypes.
15646
15647 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
15648
15649         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15650         left-padded registers.
15651         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15652         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15653
15654 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
15655
15656         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15657         * configure: Regenerate.
15658         * config.in: Regenerate.
15659         * server.h (NEED_DECLARATION_STRERROR):
15660         Replace with !HAVE_DECL_STRERROR.
15661
15662 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
15663
15664         * linux-low.c (linux_wait, linux_send_signal): Don't test
15665         an unsigned long variable for > 0 if it could be MAX_ULONG.
15666         * server.c (myresume): Likewise.
15667         * target.c (set_desired_inferior): Likewise.
15668
15669 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
15670
15671         * configure.ac: Simplify and improve check for socklen_t.
15672         * configure, config.in: Regenerate.
15673
15674 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
15675
15676         * acconfig.h: Remove.
15677         * configure.ac: Add a test for socklen_t.  Use three-argument
15678         AC_DEFINE throughout.
15679         * config.in: Regenerated using autoheader 2.59.
15680         * configure: Regenerated.
15681
15682         * gdbreplay.c (socklen_t): Provide a default.
15683         (remote_open): Use socklen_t.
15684         * remote-utils.c (socklen_t): Provide a default.
15685         (remote_open): Use socklen_t.
15686         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15687         unsigned char.
15688
15689         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15690         char for buffers.
15691         * linux-low.c (linux_read_memory, linux_write_memory)
15692         (linux_read_auxv): Likewise.
15693         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15694         (check_mem_write): Likewise.
15695         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15696         Likewise.
15697         * regcache.c (struct inferior_rgcache_data, registers_to_string)
15698         (registers_from_string, register_data): Likewise.
15699         * server.c (handle_query, main): Likewise.
15700         * server.h (convert_ascii_to_int, convert_int_to_ascii)
15701         (decode_M_packet): Likewise.
15702         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15703         * target.h (struct target_ops): Update read_memory, write_memory,
15704         and read_auxv.
15705         (read_inferior_memory, write_inferior_memory): Update.
15706         * linux-low.h (struct linux_target_ops): Change type of breakpoint
15707         to unsigned char *.
15708         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15709         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15710         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15711         linux-s390-low.c, linux-sh-low.c: Update for changes in
15712         read_inferior_memory and the_low_target->breakpoint.
15713
15714 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
15715
15716         * Makefile.in (SFILES): Add linux-ppc64-low.c.
15717         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15718         * configure.srv: Add powerpc64-*-linux*.
15719         * linux-ppc64-low.c: New file.
15720
15721 2005-05-23  Orjan Friberg  <orjanf@axis.com>
15722
15723         * linux-cris-low.c: New file with support for CRIS.
15724         * linux-crisv32-low.c: Ditto for CRISv32.
15725         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15726         (clean): Add reg-cris.c and reg-crisv32.c.
15727         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15728         reg-crisv32.o, and reg-crisv32.c to make rules.
15729         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15730         recognized targets.
15731
15732 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
15733
15734         * linux-low.c (fetch_register): Ensure buffer size is a multiple
15735         of sizeof (PTRACE_XFER_TYPE).
15736         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
15737
15738 2005-05-12  Orjan Friberg  <orjanf@axis.com>
15739
15740         * target.h (struct target_ops): Add insert_watchpoint,
15741         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15742         pointers for hardware watchpoint support.
15743         * linux-low.h (struct linux_target_ops): Ditto.
15744         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15745         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
15746         to linux_target_ops.
15747         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15748         reply packet.
15749         * server.c (main): Recognize 'Z' and 'z' packets.
15750
15751 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
15752
15753         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15754         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15755         (the_low_target): Add new members.
15756
15757 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
15758
15759         * proc-service.c (ps_lgetregs): Search all_processes instead of
15760         all_threads.
15761
15762 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
15763
15764         * server.c (start_inferior): Change return type to int.
15765         (attach_inferior): Change sigptr to int *.
15766         (handle_v_cont, handle_v_requests): Change signal to int *.
15767         (main): Change signal to int.
15768
15769 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
15770
15771         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15772         * configure.srv: Add m32r*-*-linux*.
15773         * linux-m32r-low.c: New file.
15774
15775 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
15776
15777         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15778
15779 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
15780
15781         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15782         Take unsigned long arguments for PIDs.
15783         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15784         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15785         (wait_for_sigstop, linux_resume_one_process)
15786         (regsets_fetch_inferior_registers, linux_send_signal)
15787         (linux_read_auxv): Likewise.  Update the types of variables holding
15788         PIDs.  Update format string specifiers.
15789         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15790         * remote-utils.c (prepare_resume_reply): Likewise.
15791         * server.c (cont_thread, general_thread, step_thread)
15792         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15793         unsigned long.
15794         (handle_query): Update format specifiers.
15795         (handle_v_cont, main): Use strtoul for thread IDs.
15796         * server.h (struct inferior_list_entry): Use unsigned long for ID.
15797         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15798         (general_thread, step_thread, thread_from_wait)
15799         (old_thread_from_wait): Update.
15800         * target.h (struct thread_resume): Use unsigned long for THREAD.
15801         (struct target_ops): Use unsigned long for arguments to attach and
15802         thread_alive.
15803
15804 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
15805
15806         * acinclude.m4: Include bfd/bfd.m4 directly.
15807         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
15808         <agriffis@toolchain.org>.
15809         * aclocal.m4, configure: Regenerated.
15810
15811 2005-01-07  Andrew Cagney  <cagney@gnu.org>
15812
15813         * configure.ac: Rename configure.in, require autoconf 2.59.
15814         * configure: Re-generate.
15815
15816 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
15817
15818         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
15819         LIBS when finished.
15820         * aclocal.m4: Regenerated.
15821         * configure: Regenerated.
15822
15823 2004-11-21  Andreas Schwab  <schwab@suse.de>
15824
15825         * linux-m68k-low.c (m68k_num_gregs): Define.
15826         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15827         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15828         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15829         (m68k_breakpoint_at): New.  Add to the_low_target.
15830
15831         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15832         srv_linux_thread_db to yes.
15833
15834 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
15835
15836         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15837         (ARCH_SET_FS): Likewise.
15838         (ARCH_GET_FS): Likewise.
15839         (ARCH_GET_GS): Likewise.
15840
15841 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
15842
15843         * linux-i386-low.c (ps_get_thread_area): New.
15844         * linux-x86-64-low.c (ps_get_thread_area): New.
15845         * linux-low.c: Include <sys/syscall.h>.
15846         (linux_kill_one_process): Don't kill the first thread here.
15847         (linux_kill): Kill the first thread here.
15848         (kill_lwp): New function.
15849         (send_sigstop, linux_send_signal): Use it.
15850         * proc-service.c: Clean up #ifdefs.
15851         (fpregset_info): Delete.
15852         (ps_lgetregs): Update and enable implementation.
15853         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15854         implementations.
15855         * remote-utils.c (struct sym_cache, symbol_cache): New.
15856         (input_interrupt): Print a clearer message.
15857         (async_io_enabled): New variable.
15858         (enable_async_io, disable_async_io): Use it.  Update comments.
15859         (look_up_one_symbol): Use the symbol cache.
15860         * thread-db.c (thread_db_look_up_symbols): New function.
15861         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
15862
15863 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
15864
15865         * configure.in: Test for -rdynamic.
15866         * configure: Regenerated.
15867         * Makefile (INTERNAL_LDFLAGS): New.
15868         (gdbserver, gdbreplay): Use it.
15869
15870 2004-09-02  Andrew Cagney  <cagney@gnu.org>
15871
15872         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15873
15874 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
15875
15876         * linux-low.c (linux_wait): Clear all_processes list also.
15877
15878 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
15879
15880         * linux-low.c: Include <errno.h>.  Remove extern declaration of
15881         errno.
15882
15883 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
15884
15885         * gdbreplay.c, server.h, utils.c: Update copyright years.
15886
15887 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
15888
15889         * server.c (main): Print child status or termination signal from
15890         variable 'signal', not 'sig'.
15891
15892 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
15893
15894         * linux-low.c (linux_read_memory): Change return type to
15895         int.  Check for and return error from ptrace().
15896         * target.c (read_inferior_memory): Change return type to int.  Pass
15897         back return status from the_target->read_memory().
15898         * target.h (struct target_ops): Adapt *read_memory() prototype.
15899         Update comment.
15900         (read_inferior_memory): Adapt prototype.
15901         * server.c (main): Return an error packet if
15902         read_inferior_memory() returns an error.
15903
15904 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
15905
15906         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15907         Unify with other clean targets.
15908
15909 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15910
15911         * server.c (handle_v_cont): Call set_desired_inferior.
15912
15913 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15914
15915         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15916
15917 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15918
15919         * linux-low.c (linux_wait): Unblock async I/O.
15920         (linux_resume): Block and enable async I/O.
15921         * remote-utils.c (block_async_io, unblock_async_io): New functions.
15922         * server.h (block_async_io, unblock_async_io): Add prototypes.
15923
15924 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15925
15926         * remote-utils.c (remote_open): Print a status notice after
15927         opening a TCP port.
15928         * server.c (attach_inferior): Print a status notice after
15929         attaching.
15930
15931 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
15932
15933         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15934
15935 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
15936
15937         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15938         error packet.
15939         * server.c, target.h: Update copyright years.
15940
15941 2004-02-25  Roland McGrath  <roland@redhat.com>
15942
15943         * target.h (struct target_ops): New member `read_auxv'.
15944         * server.c (handle_query): Handle qPart:auxv:read: query using that.
15945         * linux-low.c (linux_read_auxv): New function.
15946         (linux_target_ops): Initialize `read_auxv' member to that.
15947
15948 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15949
15950         Committed by Jim Blandy  <jimb@redhat.com>.
15951
15952         * linux-s390-low.c (s390_num_regs): Update.
15953         (s390_regmap): Remove control registers.  Use __s390x__ predefine
15954         instead of GPR_SIZE to distiguish s390 and s390x targets.
15955
15956 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
15957
15958         * linux-low.c: Update copyright year.
15959         (check_removed_breakpoint): Clear pending_is_breakpoint.
15960         (linux_set_resume_request, linux_queue_one_thread)
15961         (resume_status_pending_p): New functions.
15962         (linux_continue_one_thread): Use process->resume.
15963         (linux_resume): Only resume threads if there are no pending events.
15964         * linux-low.h (struct process_info): Add resume request
15965         pointer.
15966
15967 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
15968
15969         * regcache.c (new_register_cache): Clear the allocated register
15970         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15971
15972 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
15973
15974         * linux-low.c (linux_resume): Take a struct thread_resume *
15975         argument.
15976         (linux_wait): Update call.
15977         (resume_ptr): New static variable.
15978         (linux_continue_one_thread): Renamed from
15979         linux_continue_one_process.  Use resume_ptr.
15980         (linux_resume): Use linux_continue_one_thread.
15981         * server.c (handle_v_cont, handle_v_requests): New functions.
15982         (myresume): New function.
15983         (main): Handle 'v' case.
15984         * target.h (struct thread_resume): New type.
15985         (struct target_ops): Change argument of "resume" to struct
15986         thread_resume *.
15987         (myresume): Delete macro.
15988
15989 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
15990
15991         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15992         (uninstall): Support DESTDIR.
15993
15994 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
15995
15996         * configure.srv: Add xscale*linux copy of arm*linux entry.
15997
15998 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
15999
16000         * linux-arm-low.c (arm_reinsert_addr): New function.
16001         (the_low_target): Add arm_reinsert_addr.
16002
16003 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
16004
16005         * mem-break.c: Remove whitespace at end of file.
16006
16007 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16008
16009         * configure.in: Check whether we need to prototype strerror.
16010         * server.h: Optionally prototype strerror.
16011         * gdbreplay.c (perror_with_name): Use strerror.
16012         * linux-low.c (linux_attach_lwp): Use strerror.
16013         * utils.c (perror_with_name): Use strerror.
16014         * config.in, configure: Regenerated.
16015
16016 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16017
16018         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16019         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16020
16021 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
16022
16023         * Makefile.in (SFILES): Update.
16024         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16025         low-sun3.c: Remove files.
16026
16027 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
16028
16029         * linux-low.c: Move comment to linux_thread_alive where it belonged.
16030         (linux_detach_one_process, linux_detach): New functions.
16031         (linux_target_ops): Add linux_detach.
16032         * server.c (main): Handle 'D' packet.
16033         * target.h (struct target_ops): Add "detach" member.
16034         (detach_inferior): Define.
16035
16036 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
16037
16038         From Kelley Cook  <kelleycook@wideopenwest.com>:
16039         * configure.srv: Accept i[34567]86 variants.
16040
16041 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
16042
16043         * linux-low.c (linux_wait_for_event): Correct comment typos.
16044         (linux_resume_one_process): Call check_removed_breakpoint.
16045         (linux_send_signal): New function.
16046         (linux_target_ops): Add linux_send_signal.
16047         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16048         of kill.
16049         * target.h (struct target_ops): Add send_signal.
16050
16051 2003-05-29  Jim Blandy  <jimb@redhat.com>
16052
16053         * linux-low.c (usr_store_inferior_registers): Transfer buf in
16054         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
16055         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16056         away part of the register's value.
16057
16058 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
16059
16060         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16061         (linux_wait_for_event, linux_init_signals): Likewise.
16062
16063 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
16064
16065         * configure.in: Check for stdlib.h.
16066         * configure: Regenerated.
16067         * config.in: Regenerated.
16068
16069 2003-01-04  Andreas Schwab  <schwab@suse.de>
16070
16071         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16072
16073 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
16074
16075         * Makefile.in: Remove obsolete code.
16076
16077 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
16078
16079         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16080         defined(PT_FPR0_HI).
16081
16082 2002-11-17  Stuart Hughes  <seh@zee2.com>
16083
16084         * linux-arm-low.c (arm_num_regs): Increase.
16085         (arm_regmap): Include status register.
16086
16087 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
16088
16089         * linux-low.c (register_addr): Remove incorrect -1 check.
16090
16091 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
16092
16093         * linux-low.c (linux_create_inferior): Call setpgid.  Return
16094         the new PID.
16095         (unstopped_p, linux_signal_pid): Remove.
16096         (linux_target_ops): Remove linux_signal_pid.
16097         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16098         global instead of target method.
16099         * target.h (struct target_ops): Remove signal_pid.  Update comment
16100         for create_inferior.
16101         * server.c (signal_pid): New variable.
16102         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
16103         gdbserver.  Set the child to be the foreground process group.
16104         (attach_inferior): Set signal_pid.
16105
16106 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
16107
16108         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16109
16110 2002-08-20  Jim Blandy  <jimb@redhat.com>
16111
16112         * Makefile.in (LDFLAGS): Allow the configure script to establish a
16113         default for this.
16114
16115 2002-08-01  Andrew Cagney  <cagney@redhat.com>
16116
16117         * Makefile.in: Make chill references obsolete.
16118
16119 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
16120
16121         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16122         * configure: Regenerate.
16123         * config.in: Regenerate.
16124
16125 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
16126
16127         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16128         (perror_with_name, remote_close, remote_open, expect, play): Static.
16129
16130 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
16131
16132         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16133         byte offsets instead of an array of indexes.
16134         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16135
16136 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
16137
16138         * regcache.c: Add comment.
16139
16140 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
16141
16142         * thread-db.c: New file.
16143         * proc-service.c: New file.
16144         * acinclude.m4: New file.
16145         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16146         proc-service.o, and thread-db.o.
16147         (linux-low.o): Add USE_THREAD_DB.
16148         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16149         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16150         * aclocal.m4: Regenerated.
16151         * config.in: Regenerated.
16152         * configure: Regenerated.
16153         * configure.in: Check for proc_service.h, sys/procfs.h,
16154         thread_db.h, and linux/elf.h headrs.
16155         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16156         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
16157         Check for -lthread_db and thread support.
16158         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16159         PowerPC, and SuperH.
16160         * i387-fp.c: Constify arguments.
16161         * i387-fp.h: Likewise.
16162         * inferiors.c: (struct thread_info): Renamed from
16163         `struct inferior_info'.  Remove PID member.  Use generic inferior
16164         list header.  All uses updated.
16165         (inferiors, signal_pid): Removed.
16166         (all_threads): New variable.
16167         (get_thread): Define.
16168         (add_inferior_to_list): New function.
16169         (for_each_inferior): New function.
16170         (change_inferior_id): New function.
16171         (add_inferior): Removed.
16172         (remove_inferior): New function.
16173         (add_thread): New function.
16174         (free_one_thread): New function.
16175         (remove_thread): New function.
16176         (clear_inferiors): Use for_each_inferior and free_one_thread.
16177         (find_inferior): New function.
16178         (find_inferior_id): New function.
16179         (inferior_target_data): Update argument type.
16180         (set_inferior_target_data): Likewise.
16181         (inferior_regcache_data): Likewise.
16182         (set_inferior_regcache_data): Likewise.
16183         * linux-low.c (linux_bp_reinsert): Remove.
16184         (all_processes, stopping_threads, using_thrads)
16185         (struct pending_signals, debug_threads, pid_of): New.
16186         (inferior_pid): Replace with macro.
16187         (struct inferior_linux_data): Remove.
16188         (get_stop_pc, add_process): New functions.
16189         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16190         Use add_process and add_thread.
16191         (linux_attach_lwp): New function, based on old linux_attach.  Use
16192         add_process and add_thread.  Set stop_expected for new threads.
16193         (linux_attach): New function.
16194         (linux_kill_one_process): New function.
16195         (linux_kill): Kill all LWPs.
16196         (linux_thread_alive): Use find_inferior_id.
16197         (check_removed_breakpoints, status_pending_p): New functions.
16198         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16199         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
16200         struct for the found process.
16201         (linux_wait_for_event): New function.
16202         (linux_wait): Use it.  Support LWPs.
16203         (send_sigstop, wait_for_sigstop, stop_all_processes)
16204         (linux_resume_one_process, linux_continue_one_process): New functions.
16205         (linux_resume): Support LWPs.
16206         (REGISTER_RAW_SIZE): Remove.
16207         (fetch_register): Use register_size instead.  Call supply_register.
16208         (usr_store_inferior_registers): Likewise.  Call collect_register.
16209         Fix recursive case.
16210         (regsets_fetch_inferior_registers): Improve error message.
16211         (regsets_store_inferior_registers): Add debugging.
16212         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16213         (unstopped_p, linux_signal_pid): New functions.
16214         (linux_target_ops): Add linux_signal_pid.
16215         (linux_init_signals): New function.
16216         (initialize_low): Call it.  Initialize using_threads.
16217         * regcache.c (inferior_regcache_data): Add valid
16218         flag.
16219         (get_regcache): Fetch registers lazily.  Add fetch argument
16220         and update all callers.
16221         (regcache_invalidate_one, regcache_invalidate): New
16222         functions.
16223         (new_register_cache): Renamed from create_register_cache.
16224         Return the new regcache.
16225         (free_register_cache): Change argument to a void *.
16226         (registers_to_string, registers_from_string): Call get_regcache
16227         with fetch flag set.
16228         (register_data): Make static.  Pass fetch flag to get_regcache.
16229         (supply_register): Call get_regcache with fetch flag clear.
16230         (collect_register): Call get_regcache with fetch flag set.
16231         (collect_register_as_string): New function.
16232         * regcache.h: Update.
16233         * remote-utils.c (putpkt): Flush after debug output and use
16234         stderr.
16235         Handle input interrupts while waiting for an ACK.
16236         (input_interrupt): Use signal_pid method.
16237         (getpkt): Flush after debug output and use stderr.
16238         (outreg): Use collect_register_as_string.
16239         (new_thread_notify, dead_thread_notify): New functions.
16240         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
16241         and general_thread.
16242         (look_up_one_symbol): Flush after debug output.
16243         * server.c (step_thread, server_waiting): New variables.
16244         (start_inferior): Don't use signal_pid.  Update call to mywait.
16245         (attach_inferior): Update call to mywait.
16246         (handle_query): Handle qfThreadInfo and qsThreadInfo.
16247         (main): Don't fetch/store registers explicitly.  Use
16248         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
16249         calls to mywait.
16250         * server.h: Update.
16251         (struct inferior_list, struct_inferior_list_entry): New.
16252         * target.c (set_desired_inferior): New.
16253         (write_inferior_memory): Constify.
16254         (mywait): New function.
16255         * target.h: Update.
16256         (struct target_ops): New signal_pid method.
16257         (mywait): Removed macro, added prototype.
16258
16259         * linux-low.h (regset_func): Removed.
16260         (regset_fill_func, regset_store_func): New.
16261         (enum regset_type): New.
16262         (struct regset_info): Add type field.  Use new operation types.
16263         (struct linux_target_ops): stop_pc renamed to get_pc.
16264         Add decr_pc_after_break and breakpoint_at.
16265         (get_process, get_thread_proess, get_process_thread)
16266         (strut process_info, all_processes, linux_attach_lwp)
16267         (thread_db_init): New.
16268
16269         * linux-arm-low.c (arm_get_pc, arm_set_pc,
16270         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16271         (the_low_target): Add new members.
16272         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16273         (i386_store_fpxregset): Constify.
16274         (target_regsets): Add new kind identifier.
16275         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
16276         (i386_set_pc): Add debugging.
16277         (i386_breakpoint_at): New function.
16278         (the_low_target): Add new members.
16279         * linux-mips-low.c (mips_get_pc, mips_set_pc)
16280         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16281         (mips_breakpoint_at): New.
16282         (the_low_target): Add new members.
16283         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16284         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16285         (the_low_target): Add new members.
16286         * linux-sh-low.c (sh_get_pc, sh_set_pc)
16287         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16288         (the_low_target): Add new members.
16289         * linux-x86-64-low.c (target_regsets): Add new kind
16290         identifier.
16291
16292 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
16293
16294         From Martin Pool <mbp@samba.org>:
16295         * server.c (gdbserver_usage): New function.
16296         (main): Call it.
16297
16298 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
16299
16300         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16301         stop_at -> stop_pc.
16302
16303 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
16304
16305         * Makefile.in: Remove obsolete code.
16306
16307 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
16308
16309         * linux-low.c (regsets_fetch_inferior_registers),
16310         (regsets_store_inferior_registers): Removed cast to int from
16311         ptrace() calls.
16312         * regcache.h: Added declaration of struct inferior_info.
16313
16314 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16315
16316         * inferiors.c (struct inferior_info): Add regcache_data.
16317         (add_inferior): Call create_register_cache.
16318         (clear_inferiors): Call free_register_cache.
16319         (inferior_regcache_data, set_inferior_regcache_data): New functions.
16320         * regcache.c (struct inferior_regcache_data): New.
16321         (registers): Remove.
16322         (get_regcache): New function.
16323         (create_register_cache, free_register_cache): New functions.
16324         (set_register_cache): Don't initialize the register cache here.
16325         (registers_to_string, registers_from_string, register_data): Call
16326         get_regcache.
16327         * regcache.h: Add prototypes.
16328         * server.h: Likewise.
16329
16330 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16331
16332         * mem-break.c: New file.
16333         * mem-break.h: New file.
16334         * Makefile.in: Add mem-break.o rule; update server.h
16335         dependencies.
16336         * inferiors.c (struct inferior_info): Add target_data
16337         member.
16338         (clear_inferiors): Free target_data member if set.
16339         (inferior_target_data, set_inferior_target_data): New functions.
16340         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16341         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
16342         * linux-low.c (linux_bp_reinsert): New variable.
16343         (struct inferior_linux_data): New.
16344         (linux_create_inferior): Use set_inferior_target_data.
16345         (linux_attach): Likewise.  Call add_inferior.
16346         (linux_wait_for_one_inferior): New function.
16347         (linux_wait): Call it.
16348         (linux_write_memory): Add const.
16349         (initialize_low): Call set_breakpoint_data.
16350         * linux-low.h (struct linux_target_ops): Add breakpoint
16351         handling members.
16352         * server.c (attach_inferior): Remove extra add_inferior
16353         call.
16354         * server.h: Include mem-break.h.  Update inferior.c
16355         prototypes.
16356         * target.c (read_inferior_memory)
16357         (write_inferior_memory): New functions.
16358         * target.h (read_inferior_memory)
16359         (write_inferior_memory): Change macros to prototypes.
16360         (struct target_ops): Update comments.  Add const to write_memory
16361         definition.
16362
16363 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
16364
16365         * linux-low.c (usr_store_inferior_registers): Support
16366         registers which are allowed to fail to store.
16367         * linux-low.h (linux_target_ops): Likewise.
16368         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16369         (ppc_cannot_store_register): FPSCR may not be storable.
16370
16371 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16372
16373         * server.h: Include <string.h> if HAVE_STRING_H.
16374         * ChangeLog: Correct paths in last ChangeLog entry.
16375
16376 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16377
16378         * linux-low.h: Remove obsolete prototypes.
16379         (struct linux_target_ops): New.
16380         (extern the_low_target): New.
16381         * linux-low.c (num_regs, regmap): Remove declarations.
16382         (register_addr): Use the_low_target explicitly.
16383         (fetch_register): Likewise.
16384         (usr_fetch_inferior_registers): Likewise.
16385         (usr_store_inferior_registers): Likewise.
16386         * linux-arm-low.c (num_regs): Remove.
16387         (arm_num_regs): Define.
16388         (arm_regmap): Renamed from regmap, made static.
16389         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16390         made static.
16391         (arm_cannot_store_register): Renamed from cannot_store_register,
16392         made static.
16393         (the_low_target): New.
16394         * linux-i386-low.c (num_regs): Remove.
16395         (i386_num_regs): Define.
16396         (i386_regmap): Renamed from regmap, made static.
16397         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16398         made static.
16399         (i386_cannot_store_register): Renamed from cannot_store_register,
16400         made static.
16401         (the_low_target): New.
16402         * linux-ia64-low.c (num_regs): Remove.
16403         (ia64_num_regs): Define.
16404         (ia64_regmap): Renamed from regmap, made static.
16405         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16406         made static.
16407         (ia64_cannot_store_register): Renamed from cannot_store_register,
16408         made static.
16409         (the_low_target): New.
16410         * linux-m68k-low.c (num_regs): Remove.
16411         (m68k_num_regs): Define.
16412         (m68k_regmap): Renamed from regmap, made static.
16413         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16414         made static.
16415         (m68k_cannot_store_register): Renamed from cannot_store_register,
16416         made static.
16417         (the_low_target): New.
16418         * linux-mips-low.c (num_regs): Remove.
16419         (mips_num_regs): Define.
16420         (mips_regmap): Renamed from regmap, made static.
16421         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16422         made static.
16423         (mips_cannot_store_register): Renamed from cannot_store_register,
16424         made static.
16425         (the_low_target): New.
16426         * linux-ppc-low.c (num_regs): Remove.
16427         (ppc_num_regs): Define.
16428         (ppc_regmap): Renamed from regmap, made static.
16429         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16430         made static.
16431         (ppc_cannot_store_register): Renamed from cannot_store_register,
16432         made static.
16433         (the_low_target): New.
16434         * linux-s390-low.c (num_regs): Remove.
16435         (s390_num_regs): Define.
16436         (s390_regmap): Renamed from regmap, made static.
16437         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16438         made static.
16439         (s390_cannot_store_register): Renamed from cannot_store_register,
16440         made static.
16441         (the_low_target): New.
16442         * linux-sh-low.c (num_regs): Remove.
16443         (sh_num_regs): Define.
16444         (sh_regmap): Renamed from regmap, made static.
16445         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16446         made static.
16447         (sh_cannot_store_register): Renamed from cannot_store_register,
16448         made static.
16449         (the_low_target): New.
16450         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16451         (the_low_target): New.
16452
16453 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16454
16455         * Makefile.in: Add stamp-h target.
16456         * configure.in: Create stamp-h.
16457         * configure: Regenerated.
16458
16459 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16460
16461         * inferiors.c: New file.
16462         * target.c: New file.
16463         * target.h: New file.
16464         * Makefile.in:  Add target.o and inferiors.o.  Update
16465         dependencies.
16466         * linux-low.c (inferior_pid): New static variable,
16467         moved from server.c.
16468         (linux_create_inferior): Renamed from create_inferior.
16469         Call add_inferior.  Return 0 on success instead of a PID.
16470         (linux_attach): Renamed from myattach.
16471         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
16472         (linux_thread_alive): Renamed from mythread_alive.
16473         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
16474         child dies.
16475         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
16476         (regsets_store_inferior_registers): Correct error message.
16477         Add missing ``return 0''.
16478         (linux_fetch_registers): Renamed from fetch_inferior_registers.
16479         (linux_store_registers): Renamed from store_inferior_registers.
16480         (linux_read_memory): Renamed from read_inferior_memory.
16481         (linux_write_memory): Renamed from write_inferior_memory.
16482         (linux_target_ops): New structure.
16483         (initialize_low): Call set_target_ops ().
16484         * remote-utils.c (unhexify): New function.
16485         (hexify): New function.
16486         (input_interrupt): Send signals to ``signal_pid''.
16487         * server.c (inferior_pid): Remove.
16488         (start_inferior): Update create_inferior call.
16489         (attach_inferior): Call add_inferior.
16490         (handle_query): New function.
16491         (main): Call handle_query for `q' packets.
16492         * server.h: Include "target.h".  Remove obsolete prototypes.
16493         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16494
16495 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16496
16497         * Makefile.in: Add WARN_CFLAGS.  Update configury
16498         dependencies.
16499         * configure.in: Check for <string.h>
16500         * configure: Regenerate.
16501         * config.in: Regenerate.
16502         * gdbreplay.c: Include needed system headers.
16503         (remote_open): Remove strchr prototype.
16504         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16505         * regcache.c (supply_register): Change buf argument to const void *.
16506         (supply_register_by_name): Likewise.
16507         (collect_register): Change buf argument to void *.
16508         (collect_register_by_name): Likewise.
16509         * regcache.h: Add missing prototypes.
16510         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16511         * server.c (handle_query): New function.
16512         (attached): New static variable, moved out of main.
16513         (main): Quiet longjmp clobber warnings.
16514         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
16515         * utils.c (error): Remove NORETURN.
16516         (fatal): Likewise.