Remove trademark acknowledgements throughout
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-01-12  Pedro Alves  <palves@redhat.com>
2
3         Remove use of the registered trademark symbol throughout.
4
5 2016-01-08  Yao Qi  <yao.qi@linaro.org>
6
7         * remote-utils.c (getpkt): If c is '\003', call target hook
8         request_interrupt.
9
10 2016-01-06  Yao Qi  <yao.qi@linaro.org>
11
12         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
13         linux-aarch32-low.c.
14         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
15         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
16         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
17         (thumb2_breakpoint): Declare.
18         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
19         linux-aarch32-low.h.
20         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
21         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
22         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
23
24 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
25
26         * gdbreplay.c (gdbreplay_version): Change copyright year in
27         version message.
28         * server.c (gdbserver_version): Likewise.
29
30 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
31
32         * server.c (crc32_table): Delete.
33         (crc32): Use libiberty's xcrc32 function.
34
35 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
36
37         * lynx-low.c (lynx_delete_thread_callback): New function.
38         (lynx_mourn): Properly delete our process and all of its
39         threads.  Remove call to clear_inferiors.
40
41 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
42
43         * target.c (thread_search_callback): Add check that
44         the thread_stopped target callback is not NULL before
45         calling it.
46
47 2015-12-21  Yao Qi  <yao.qi@linaro.org>
48
49         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
50         arm breakpoint.
51
52 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
53
54         * server.c (handle_query): Call target_supports_software_single_step.
55
56 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
57
58         * linux-low.c (single_step): New function.
59         (linux_resume_one_lwp_throw): Call single_step.
60         (start_step_over): Likewise.
61
62 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
63
64         * Makefile.in (SFILES): Append arch/arm-linux.c,
65         arch/arm-get-next-pcs.c.
66         (arm-linux.o): New rule.
67         (arm-get-next-pcs.o): New rule.
68         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
69         arm-linux.o.
70         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
71         to linux-aarch32-low.c.
72         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
73         (arm_breakpoint_len, thumb_breakpoint): Likewise.
74         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
75         (thumb2_breakpoint_len): Likewise.
76         (arm_is_thumb_mode): Make non-static.
77         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
78         from linux-aarch32-low.c.
79         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
80         (arm_breakpoint_len, thumb_breakpoint): Likewise.
81         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
82         (thumb2_breakpoint_len): Likewise.
83         (arm_is_thumb_mode): New declaration.
84         * linux-arm-low.c: Include arch/arm-linux.h
85         aarch/arm-get-next-pcs.h, sys/syscall.h.
86         (get_next_pcs_ops): New struct.
87         (get_next_pcs_addr_bits_remove): New function.
88         (get_next_pcs_is_thumb): New function.
89         (get_next_pcs_read_memory_unsigned_integer): Likewise.
90         (arm_sigreturn_next_pc): Likewise.
91         (get_next_pcs_syscall_next_pc): Likewise.
92         (arm_gdbserver_get_next_pcs): Likewise.
93         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
94         Initialize.
95         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
96         * server.h: Include gdb_vecs.h.
97
98 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
99
100         * Makefile.in (SFILES): Append common/common-regcache.c.
101         (OBS): Append common-regcache.o.
102         (common-regcache.o): New rule.
103         * regcache.c (init_register_cache): Initialize cache to
104         REG_UNAVAILABLE.
105         (regcache_raw_read_unsigned): New function.
106         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
107         register_status enum.
108
109 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
110
111         * linux-aarch64-low.c (the_low_targets): Rename
112         breakpoint_reinsert_addr to get_next_pcs.
113         * linux-arm-low.c (the_low_targets): Likewise.
114         * linux-bfin-low.c (the_low_targets): Likewise.
115         * linux-cris-low.c (the_low_targets): Likewise.
116         * linux-crisv32-low.c (the_low_targets): Likewise.
117         * linux-low.c (can_software_single_step): Likewise.
118         (install_software_single_step_breakpoints): New function.
119         (start_step_over): Use install_software_single_step_breakpoints.
120         * linux-low.h: New CORE_ADDR vector.
121         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
122         get_next_pcs.
123         * linux-mips-low.c (the_low_targets): Likewise.
124         * linux-nios2-low.c (the_low_targets): Likewise.
125         * linux-sparc-low.c (the_low_targets): Likewise.
126
127 2015-12-17  Pedro Alves  <palves@redhat.com>
128
129         * linux-low.c (linux_kill_one_lwp): Remove references to
130         LinuxThreads.
131         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
132         to 'kill'.
133         (linux_init_signals): Delete.
134         (initialize_low): Adjust.
135         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
136
137 2015-12-16  Pedro Alves  <palves@redhat.com>
138
139         * configure.ac (compiler warning flags): When testing a
140         -Wno-foo option, check whether -Wfoo works instead.
141         * configure: Regenerate.
142
143 2015-12-11  Don Breazeal  <donb@codesourcery.com>
144
145         * server.c (process_serial_event): Don't exit from gdbserver
146         in remote mode if there are still active inferiors.
147
148 2015-12-11  Yao Qi  <yao.qi@linaro.org>
149
150         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
151         arm_breakpoint_at if the process is 32-bit.
152
153 2015-12-11  Yao Qi  <yao.qi@linaro.org>
154
155         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
156         arm breakpoint.
157
158 2015-12-07  Yao Qi  <yao.qi@linaro.org>
159
160         * configure.srv: Append arm.o to srv_tgtobj for
161         aarch64*-*-linux* target.
162         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
163         from linux-arm-low.c.
164         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
165         (arm_breakpoint_len, thumb_breakpoint): Likewise.
166         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
167         (thumb2_breakpoint_len): Likewise.
168         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
169         (arm_breakpoint_kinds): Likewise.
170         (arm_breakpoint_kind_from_pc): Likewise.
171         (arm_sw_breakpoint_from_kind): Likewise.
172         (arm_breakpoint_kind_from_current_state): Likewise.
173         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
174         (arm_sw_breakpoint_from_kind): Declare.
175         (arm_breakpoint_kind_from_current_state): Declare.
176         (arm_breakpoint_at): Declare.
177         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
178         arm_sw_breakpoint_from_kind if process is 32-bit.
179         (aarch64_breakpoint_kind_from_pc): New function.
180         (aarch64_breakpoint_kind_from_current_state): New function.
181         (the_low_target): Initialize fields breakpoint_kind_from_pc
182         and breakpoint_kind_from_current_state.
183         * linux-arm-low.c (arm_breakpoint_kinds): Move to
184         linux-aarch32-low.c.
185         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
186         (arm_breakpoint, arm_breakpoint_len): Likewise.
187         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
188         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
189         (arm_is_thumb_mode): Likewise.
190         (arm_breakpoint_at): Likewise.
191         (arm_breakpoint_kind_from_pc): Likewise.
192         (arm_sw_breakpoint_from_kind): Likewise.
193         (arm_breakpoint_kind_from_current_state): Likewise.
194
195         Revert:
196         2015-08-04  Yao Qi  <yao.qi@linaro.org>
197
198         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
199         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
200         * server.c (extended_protocol): Remove "static".
201         * server.h (extended_protocol): Declare it.
202
203 2015-12-04  Josh Stone  <jistone@redhat.com>
204
205         * target.h (struct target_ops) <arch_setup>: Rename to ...
206         (struct target_ops) <post_create_inferior>: ... this.
207         (target_arch_setup): Rename to ...
208         (target_post_create_inferior): ... this, calling post_create_inferior.
209         * server.c (start_inferior): Update target_arch_setup calls to
210         target_post_create_inferior.
211         * linux-low.c (linux_low_ptrace_options): Forward declare.
212         (linux_arch_setup): Update its comment for general use.
213         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
214         (struct linux_target_ops): Use linux_post_create_inferior.
215         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
216         to post_create_inferior.
217         * nto-low.c (struct nto_target_ops): Likewise.
218         * spu-low.c (struct spu_target_ops): Likewise.
219         * win32-low.c (struct win32_target_ops): Likewise.
220
221 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
222
223         * linux-arm-low.c: Remove duplicate arch/arm.h include.
224
225 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
226
227         * linux-arm-low.c (arm_reinsert_addr): Remove function.
228         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
229         * linux-cris-low.c (cris_reinsert_addr> Remove function.
230         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
231         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
232         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
233         * linux-mips-low.c (mips_reinsert_addr): Remove function.
234         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
235         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
236         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
237         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
238         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
239
240 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
241
242         * linux-low.c (linux_look_up_symbols): Don't call
243         linux_supports_traceclone.
244         * linux-low.h (thread_db_init): Remove use_events argument.
245         * thread-db.c (thread_db_use_event): Remove global variable.
246         (struct thread_db) <td_thr_event_enable_p>: Remove field.
247         (struct thread_db) <td_create_bp>: Remove field.
248         (thread_db_create_event): Remove function.
249         (thread_db_enable_reporting): Likewise.
250         (find_one_thread): Don't check for thread_db_use_events.
251         (attach_thread): Likewise.
252         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
253         (try_thread_db_load_1): Don't check for thread_db_use_events.
254         (thread_db_init): Remove use_events argument and thread events
255         handling.
256         (remove_thread_event_breakpoints): Remove function.
257         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
258
259 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
260
261         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
262         New function.
263         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
264         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
265         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
266         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
267         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
268         Initialize.
269         * linux-crisv32-low.c (cris_supports_hardware_single_step):
270         New function.
271         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
272         * linux-low.c (can_hardware_single_step): Use
273         supports_hardware_single_step.
274         (can_software_single_step): New function.
275         (start_step_over): Call can_software_single_step.
276         (linux_supports_hardware_single_step): New function.
277         (struct target_ops) <supports_software_single_step>: Initialize.
278         * linux-low.h (struct linux_target_ops)
279         <supports_hardware_single_step>: Initialize.
280         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
281         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
282         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
283         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
284         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
285         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
286         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
287         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
288         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
289         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
290         Initialize.
291         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
292         (struct linux_target_ops) <tile_supports_hardware_single_step>:
293         Initialize.
294         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
295         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
296         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
297         New function.
298         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
299         * target.h (struct target_ops): <supports_software_single_step>:
300         New field.
301         (target_supports_software_single_step): New macro.
302
303 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
304
305         * linux-low.c (linux_wait_1): Fix pc advance condition.
306         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
307         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
308
309 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
310
311         * linux-arm-low.c (arm_is_thumb_mode): New function.
312         (arm_breakpoint_at): Use arm_is_thumb_mode.
313         (arm_breakpoint_kind_from_current_state): New function.
314         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
315         Initialize.
316         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
317         (linux_breakpoint_kind_from_current_state): New function.
318         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
319         * linux-low.h (struct linux_target_ops)
320         <breakpoint_kind_from_current_state>: New field.
321         * target.h (struct target_ops): Likewise.
322         (target_breakpoint_kind_from_current_state): New macro.
323
324 2015-11-30  Pedro Alves  <palves@redhat.com>
325
326         * linux-low.c (linux_resume): Wake up the event loop before
327         returning.
328
329 2015-11-30  Pedro Alves  <palves@redhat.com>
330
331         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
332         check.
333         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
334         to -1.
335         * target.c (struct thread_search): New structure.
336         (thread_search_callback): New function.
337         (prev_general_thread): New global.
338         (prepare_to_access_memory, done_accessing_memory): New functions.
339         * target.h (prepare_to_access_memory, done_accessing_memory):
340         Replace macros with function declarations.
341
342 2015-11-30  Pedro Alves  <palves@redhat.com>
343
344         PR 14618
345         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
346         report TARGET_WAITKIND_NO_RESUMED.
347         * remote-utils.c (prepare_resume_reply): Handle
348         TARGET_WAITKIND_NO_RESUMED.
349         * server.c (report_no_resumed): New global.
350         (handle_query) <qSupported>: Handle "no-resumed+".  Report
351         "no-resumed+" support.
352         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
353         return error if the client doesn't support no-resumed events.
354         (push_stop_notification): New function.
355         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
356         events if the client supports them.
357
358 2015-11-30  Pedro Alves  <palves@redhat.com>
359
360         * linux-low.c (thread_still_has_status_pending_p): Don't check
361         vCont;t here.
362         (lwp_resumed): New function.
363         (status_pending_p_callback): Return early if the LWP is not
364         supposed to be resumed.
365
366 2015-11-30  Pedro Alves  <palves@redhat.com>
367
368         * linux-low.c (handle_extended_wait): Assert that the LWP's
369         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
370         thread create events, leave the new child's status pending.
371         (linux_low_filter_event): If GDB wants to hear about thread exit
372         events, leave the LWP marked dead and don't delete it.
373         (linux_wait_for_event_filtered): Don't check for thread exit.
374         (filter_exit_event): New function.
375         (linux_wait_1): Use it, when returning an exit event.
376         (linux_resume_one_lwp_throw): Assert that the LWP's
377         waitstatus is TARGET_WAITKIND_IGNORE.
378         * remote-utils.c (prepare_resume_reply): Handle
379         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
380         * server.c (report_thread_events): New global.
381         (handle_general_set): Handle QThreadEvents.
382         (handle_query) <qSupported>: Handle and report QThreadEvents+;
383         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
384         TARGET_WAITKIND_THREAD_EXITED.
385         * server.h (report_thread_events): Declare.
386
387 2015-11-30  Pedro Alves  <palves@redhat.com>
388
389         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
390         the thread's last_resume_kind was resume_stop.
391
392 2015-11-30  Pedro Alves  <palves@redhat.com>
393
394         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
395         before returning.
396
397 2015-11-30  Pedro Alves  <palves@redhat.com>
398
399         * server.c (handle_v_requests): Handle vCtrlC.
400
401 2015-11-30  Pedro Alves  <palves@redhat.com>
402
403         * gdbthread.h (find_any_thread_of_pid): Declare.
404         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
405         functions.
406         * server.c (handle_query): If current_thread is NULL, look for
407         another thread of the selected process.
408
409 2015-11-26  Daniel Colascione  <dancol@dancol.org>
410             Simon Marchi  <simon.marchi@ericsson.com>
411
412         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
413         * server.c (handle_qxfer_threads_worker): Refactor to include thread
414         name in reply.
415         * target.h (struct target_ops) <thread_name>: New field.
416         (target_thread_name): New macro.
417
418 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
419
420         * regcache.h (regcache_invalidate_pid): Add declaration.
421         * regcache.c (regcache_invalidate_pid): New function, extracted
422         from regcache_invalidate.
423         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
424         Add trivial documentation comment.
425         * lynx-low.c: Use regcache_invalidate_pid instead of
426         regcache_invalidate.
427
428 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
429
430         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
431         and Elf64_auxv_t if the target is Android.
432
433 2015-11-22  Doug Evans  <xdje42@gmail.com>
434
435         * target.h: #include <sys/types.h>.
436
437 2015-11-19  Pedro Alves  <palves@redhat.com>
438
439         * linux-low.c (linux_process_qsupported): Change prototype.
440         Adjust.
441         * linux-low.h (struct linux_target_ops) <process_qsupported>:
442         Change prototype.
443         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
444         and adjust to loop over all features.
445         * server.c (handle_query) <qSupported>: Adjust to call
446         target_process_qsupported once, passing it a vector of unprocessed
447         features.
448         * target.h (struct target_ops) <process_qsupported>: Change
449         prototype.
450         (target_process_qsupported): Adjust.
451
452 2015-11-19  Pedro Alves  <palves@redhat.com>
453
454         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
455         mode.
456         * configure: Regenerate.
457
458 2015-11-19  Pedro Alves  <palves@redhat.com>
459
460         * configure: Regenerate.
461
462 2015-11-19  Yao Qi  <yao.qi@linaro.org>
463
464         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
465         type to uint32_t.
466
467 2015-11-19  Yao Qi  <yao.qi@linaro.org>
468
469         * linux-aarch64-low.c (enum aarch64_operand_type): New.
470         (struct aarch64_operand): Move enum out.
471
472 2015-11-19  Yao Qi  <yao.qi@linaro.org>
473
474         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
475         struct user_fpsimd_state *.
476         (aarch64_store_fpregset): Likewise.
477
478 2015-11-19  Yao Qi  <yao.qi@linaro.org>
479
480         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
481         struct user_pt_regs *.
482         (aarch64_store_gregset): Likewise.
483
484 2015-11-18  Pedro Alves  <palves@redhat.com>
485
486         * Makefile.in (all_object_files): Add $IPA_OBJS.
487
488 2015-11-17  Pedro Alves  <palves@redhat.com>
489
490         * win32-low.c (win32_resume): Use gdb_signal_from_host,
491         GDB_SIGNAL_0 and gdb_signal_to_string.
492
493 2015-11-17  Pedro Alves  <palves@redhat.com>
494
495         * win32-low.c (handle_output_debug_string): Remove parameter.
496         (win32_kill): Remove our_status local and adjust call to
497         handle_output_debug_string.
498         (get_child_debug_event): Adjust call to
499         handle_output_debug_string.
500
501 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
502
503         * linux-mips-low.c (mips_fill_gregset): Add cast.
504         (mips_store_gregset): Likewise.
505         (mips_fill_fpregset): Likewise.
506         (mips_store_fpregset): Likewise.
507
508 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
509
510         * linux-mips-low.c (mips_add_watchpoint): Rename private to
511         priv.
512
513 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
514
515         * linux-mips-low.c (mips_linux_new_thread): Change type of
516         watch_type to enum target_hw_bp_type.
517
518 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
519
520                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
521                 Change return type to arm_hwbp_type.
522
523 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
524
525         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
526         (arm_store_gregset): Likewise.
527         * linux-arm-low.c (arm_get_hwcap): Likewise.
528         (arm_read_description): Likewise.
529
530 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
531
532         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
533
534 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
535
536         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
537         (ppc_fill_vsxregset): Likewise.
538         (ppc_store_vsxregset): Likewise.
539         (ppc_fill_vrregset): Likewise.
540         (ppc_store_vrregset): Likewise.
541         (ppc_fill_evrregset): Likewise.
542         (ppc_store_evrregset): Likewise.
543
544 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
545
546         * linux-ppc-low.c (ppc_usrregs_info): Remove
547         forward-declaration.
548         (ppc_arch_setup): Move lower in file.
549
550 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
551
552         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
553         (ps_pdwrite): Likewise.
554
555 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
556
557         * linux-arm-low.c (arm_new_thread): Move pointer dereference
558         to after assert checks.
559
560 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
561
562         * proc-service.c (ps_pdread): Add/adjust casts.
563         (ps_pdwrite): Add/adjust casts.
564
565 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
566
567         * server.c (handle_search_memory_1): Cast return value of
568         memmem.
569
570 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
571
572         * server.c (write_qxfer_response): Change type of data to
573         gdb_byte *.
574
575 2015-10-29  Pedro Alves  <palves@redhat.com>
576
577         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
578
579 2015-10-29  Pedro Alves  <palves@redhat.com>
580
581         * tracepoint.c (clear_installed_tracepoints): Add casts.
582
583 2015-10-29  Pedro Alves  <palves@redhat.com>
584
585         * server.c (handle_v_cont, process_serial_event): Add enum
586         gdb_signal casts to signal parsing code.
587
588 2015-10-29  Pedro Alves  <palves@redhat.com>
589
590         * linux-low.h (NULL_REGSET): Define.
591         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
592         * linux-arm-low.c (arm_regsets): Likewise.
593         * linux-crisv32-low.c (cris_regsets): Likewise.
594         * linux-m68k-low.c (m68k_regsets): Likewise.
595         * linux-mips-low.c (mips_regsets): Likewise.
596         * linux-nios2-low.c (nios2_regsets): Likewise.
597         * linux-ppc-low.c (ppc_regsets): Likewise.
598         * linux-s390-low.c (s390_regsets): Likewise.
599         * linux-sh-low.c (sh_regsets): Likewise.
600         * linux-sparc-low.c (sparc_regsets): Likewise.
601         * linux-tic6x-low.c (tic6x_regsets): Likewise.
602         * linux-tile-low.c (tile_regsets): Likewise.
603         * linux-x86-low.c (x86_regsets): Likewise.
604         * linux-xtensa-low.c (xtensa_regsets): Likewise.
605
606 2015-10-29  Pedro Alves  <palves@redhat.com>
607
608         * linux-low.h (NULL_REGSET): Define.
609         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
610         * linux-arm-low.c (arm_regsets): Likewise.
611         * linux-crisv32-low.c (cris_regsets): Likewise.
612         * linux-m68k-low.c (m68k_regsets): Likewise.
613         * linux-mips-low.c (mips_regsets): Likewise.
614         * linux-nios2-low.c (nios2_regsets): Likewise.
615         * linux-ppc-low.c (ppc_regsets): Likewise.
616         * linux-s390-low.c (s390_regsets): Likewise.
617         * linux-sh-low.c (sh_regsets): Likewise.
618         * linux-sparc-low.c (sparc_regsets): Likewise.
619         * linux-tic6x-low.c (tic6x_regsets): Likewise.
620         * linux-tile-low.c (tile_regsets): Likewise.
621         * linux-x86-low.c (x86_regsets): Likewise.
622         * linux-xtensa-low.c (xtensa_regsets): Likewise.
623
624 2015-10-26  Doug Evans  <dje@google.com>
625
626         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
627
628 2015-10-26  Doug Evans  <dje@google.com>
629
630         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
631
632 2015-10-26  Doug Evans  <dje@google.com>
633
634         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
635         for debug_printf.
636         (attach_thread, find_new_threads_callback): Ditto.
637
638 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
639
640         * mem-break.h (set_breakpoint_data): Remove.
641
642 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
643
644         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
645         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
646         (initialize_low): Remove set_breakpoint_data call.
647         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
648         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
649         (initialize_low): Remove set_breakpoint_data call.
650         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
651         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
652         (initialize_low): Remove set_breakpoint_data call.
653
654 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
655
656         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
657         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
658         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
659         * target.h (target_breakpoint_kind_from_pc): New macro.
660
661 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
662
663         * linux-low.c (default_breakpoint_kind_from_pc): New function.
664         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
665         the default breakpoint kind.
666
667 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
668
669         * linux-arm-low.c (arm_supports_z_point_type): Add software
670         breakpoint support.
671
672 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
673
674         * linux-arm-low.c: Refactor breakpoint definitions.
675         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
676         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
677
678 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
679
680         * Makefile.in: Add arm.c/o.
681         * configure.srv: Likewise.
682         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
683         (arm_breakpoint_kind_from_pc): New function.
684         (arm_sw_breakpoint_from_kind): Return proper kind.
685         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
686
687 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
688
689         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
690         removal.
691         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
692         (struct raw_breakpoint) <size>: Remove.
693         (struct raw_breakpoint) <kind>: Add.
694         (bp_size): New function.
695         (bp_opcode): Likewise.
696         (find_raw_breakpoint_at): Adjust for kind.
697         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
698         (remove_memory_breakpoint): Adjust for kind call bp_size.
699         (set_raw_breakpoint_at): Adjust for kind.
700         (set_breakpoint): Likewise.
701         (set_breakpoint_at): Call breakpoint_kind_from_pc.
702         (delete_raw_breakpoint): Adjust for kind.
703         (delete_breakpoint): Likewise.
704         (find_gdb_breakpoint): Likewise.
705         (set_gdb_breakpoint_1): Likewise.
706         (set_gdb_breakpoint): Likewise.
707         (delete_gdb_breakpoint_1): Likewise.
708         (delete_gdb_breakpoint): Likewise.
709         (uninsert_raw_breakpoint): Likewise.
710         (reinsert_raw_breakpoint): Likewise.
711         (set_breakpoint_data): Remove.
712         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
713         (check_mem_read): Adjust for kind call bp_size.
714         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
715         (clone_one_breakpoint): Adjust for kind.
716         * mem-break.h (set_gdb_breakpoint): Likewise.
717         (delete_gdb_breakpoint): Likewise.
718         * server.c (process_serial_event): Likewise.
719
720 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
721
722         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
723         (struct linux_target_ops) <breakpoint>: Remove.
724         (struct linux_target_ops) <breakpoint_len>: Remove.
725         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
726         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
727         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
728         (arm_sw_breakpoint_from_kind): New function.
729         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
730         (struct linux_target_ops) <breakpoint>: Remove.
731         (struct linux_target_ops) <breakpoint_len>: Remove.
732         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
733         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
734         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
735         (struct linux_target_ops) <breakpoint>: Remove.
736         (struct linux_target_ops) <breakpoint_len>: Remove.
737         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
738         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
739         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
740         (struct linux_target_ops) <breakpoint>: Remove.
741         (struct linux_target_ops) <breakpoint_len>: Remove.
742         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
743         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
744         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
745         and sw_breakpoint_from_kind to increment the pc.
746         (linux_breakpoint_kind_from_pc): New function.
747         (linux_sw_breakpoint_from_kind): New function.
748         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
749         (initialize_low): Call breakpoint_kind_from_pc and
750         sw_breakpoint_from_kind to replace breakpoint_data/len.
751         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
752         New field.
753         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
754         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
755         (struct linux_target_ops) <breakpoint>: Remove.
756         (struct linux_target_ops) <breakpoint_len>: Remove.
757         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
758         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
759         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
760         (struct linux_target_ops) <breakpoint>: Remove.
761         (struct linux_target_ops) <breakpoint_len>: Remove.
762         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
763         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
764         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
765         (struct linux_target_ops) <breakpoint>: Remove.
766         (struct linux_target_ops) <breakpoint_len>: Remove.
767         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
768         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
769         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
770         (struct linux_target_ops) <breakpoint>: Remove.
771         (struct linux_target_ops) <breakpoint_len>: Remove.
772         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
773         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
774         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
775         (struct linux_target_ops) <breakpoint>: Remove.
776         (struct linux_target_ops) <breakpoint_len>: Remove.
777         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
778         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
779         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
780         (struct linux_target_ops) <breakpoint>: Remove.
781         (struct linux_target_ops) <breakpoint_len>: Remove.
782         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
783         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
784         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
785         (struct linux_target_ops) <breakpoint>: Remove.
786         (struct linux_target_ops) <breakpoint_len>: Remove.
787         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
788         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
789         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
790         (struct linux_target_ops) <breakpoint>: Remove.
791         (struct linux_target_ops) <breakpoint_len>: Remove.
792         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
793         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
794         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
795         (struct linux_target_ops) <breakpoint>: Remove.
796         (struct linux_target_ops) <breakpoint_len>: Remove.
797         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
798         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
799         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
800         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
801         (struct linux_target_ops) <breakpoint>: Remove.
802         (struct linux_target_ops) <breakpoint_len>: Remove.
803         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
804         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
805         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
806         (struct linux_target_ops) <breakpoint>: Remove.
807         (struct linux_target_ops) <breakpoint_len>: Remove.
808         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
809         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
810
811 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
812
813         * linux-cris-low.c (cris_get_pc): Remove void arg.
814
815 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
816
817         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
818         variable name.
819
820 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
821
822         * inferiors.c (thread_pid_matches_callback): New function.
823         (find_thread_process): New function.
824         (remove_thread): Reset current_thread.
825         (remove_process): Assert threads have been removed first.
826
827 2015-10-15  Yao Qi  <yao.qi@linaro.org>
828
829         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
830         if it is 3.
831         (aarch64_remove_point): Likewise.
832         * regcache.c (regcache_register_size): New function.
833
834 2015-10-12  Yao Qi  <yao.qi@linaro.org>
835
836         * linux-aarch64-low.c: Update all callers as emit_load_store
837         is renamed to aarch64_emit_load_store.
838
839 2015-10-12  Yao Qi  <yao.qi@linaro.org>
840
841         * linux-aarch64-low.c: Update all callers of function renaming
842         from emit_insn to aarch64_emit_insn.
843
844 2015-10-12  Yao Qi  <yao.qi@linaro.org>
845
846         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
847         arch/aarch64-insn.h.
848         (struct aarch64_memory_operand): Likewise.
849         (ENCODE): Likewise.
850         (emit_insn): Move to arch/aarch64-insn.c.
851         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
852         (emit_load_store): Move to arch/aarch64-insn.c.
853         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
854         (can_encode_int32): Remove.
855
856 2015-10-12  Yao Qi  <yao.qi@linaro.org>
857
858         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
859         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
860         (aarch64_relocate_instruction): Likewise.
861         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
862         (struct aarch64_insn_visitor): Likewise.
863
864 2015-10-12  Yao Qi  <yao.qi@linaro.org>
865
866         * linux-aarch64-low.c (struct aarch64_insn_data): New.
867         (struct aarch64_insn_visitor): New.
868         (struct aarch64_insn_relocation_data): New.
869         (aarch64_ftrace_insn_reloc_b): New function.
870         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
871         (aarch64_ftrace_insn_reloc_cb): Likewise.
872         (aarch64_ftrace_insn_reloc_tb): Likewise.
873         (aarch64_ftrace_insn_reloc_adr): Likewise.
874         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
875         (aarch64_ftrace_insn_reloc_others): Likewise.
876         (visitor): New.
877         (aarch64_relocate_instruction): Use visitor.
878
879 2015-10-12  Yao Qi  <yao.qi@linaro.org>
880
881         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
882         int.  Add argument buf.
883         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
884         aarch64_relocate_instruction.
885
886 2015-10-12  Yao Qi  <yao.qi@linaro.org>
887
888         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
889         argument insn.  Remove local variable insn.  Don't call
890         target_read_uint32.
891         (aarch64_install_fast_tracepoint_jump_pad): Call
892         target_read_uint32.
893
894 2015-09-30  Yao Qi  <yao.qi@linaro.org>
895
896         * linux-aarch64-low.c (emit_movk): Shorten a long line.
897         (emit_load_store_pair): Likewise.
898
899 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
900
901         * dll.c (match_dll): Add cast(s).
902         (unloaded_dll): Likewise.
903         * linux-low.c (second_thread_of_pid_p): Likewise.
904         (delete_lwp_callback): Likewise.
905         (count_events_callback): Likewise.
906         (select_event_lwp_callback): Likewise.
907         (linux_set_resume_request): Likewise.
908         * server.c (accumulate_file_name_length): Likewise.
909         (emit_dll_description): Likewise.
910         (handle_qxfer_threads_worker): Likewise.
911         (visit_actioned_threads): Likewise.
912         * thread-db.c (any_thread_of): Likewise.
913         * tracepoint.c (same_process_p): Likewise.
914         (match_blocktype): Likewise.
915         (build_traceframe_info_xml): Likewise.
916
917 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
918
919         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
920         assignment.
921         (gdb_unparse_agent_expr): Likewise.
922         * hostio.c (require_data): Likewise.
923         (handle_pread): Likewise.
924         * linux-low.c (disable_regset): Likewise.
925         (fetch_register): Likewise.
926         (store_register): Likewise.
927         (get_dynamic): Likewise.
928         (linux_qxfer_libraries_svr4): Likewise.
929         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
930         (set_fast_tracepoint_jump): Likewise.
931         (uninsert_fast_tracepoint_jumps_at): Likewise.
932         (reinsert_fast_tracepoint_jumps_at): Likewise.
933         (validate_inserted_breakpoint): Likewise.
934         (clone_agent_expr): Likewise.
935         * regcache.c (init_register_cache): Likewise.
936         * remote-utils.c (putpkt_binary_1): Likewise.
937         (decode_M_packet): Likewise.
938         (decode_X_packet): Likewise.
939         (look_up_one_symbol): Likewise.
940         (relocate_instruction): Likewise.
941         (monitor_output): Likewise.
942         * server.c (handle_search_memory): Likewise.
943         (handle_qxfer_exec_file): Likewise.
944         (handle_qxfer_libraries): Likewise.
945         (handle_qxfer): Likewise.
946         (handle_query): Likewise.
947         (handle_v_cont): Likewise.
948         (handle_v_run): Likewise.
949         (captured_main): Likewise.
950         * target.c (write_inferior_memory): Likewise.
951         * thread-db.c (try_thread_db_load_from_dir): Likewise.
952         * tracepoint.c (init_trace_buffer): Likewise.
953         (add_tracepoint_action): Likewise.
954         (add_traceframe): Likewise.
955         (add_traceframe_block): Likewise.
956         (cmd_qtdpsrc): Likewise.
957         (cmd_qtdv): Likewise.
958         (cmd_qtstatus): Likewise.
959         (response_source): Likewise.
960         (response_tsv): Likewise.
961         (cmd_qtnotes): Likewise.
962         (gdb_collect): Likewise.
963         (initialize_tracepoint): Likewise.
964
965 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
966
967         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
968         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
969         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
970         <NOP>: New.
971         (enum aarch64_condition_codes): New enum.
972         (w0): New static global.
973         (fp): Likewise.
974         (lr): Likewise.
975         (struct aarch64_memory_operand) <type>: New
976         MEMORY_OPERAND_POSTINDEX type.
977         (postindex_memory_operand): New helper function.
978         (emit_ret): New function.
979         (emit_load_store_pair): New function, factored out of emit_stp
980         with support for MEMORY_OPERAND_POSTINDEX.
981         (emit_stp): Rewrite using emit_load_store_pair.
982         (emit_ldp): New function.
983         (emit_load_store): Likewise.
984         (emit_ldr): Mention post-index instruction in comment.
985         (emit_ldrh): New function.
986         (emit_ldrb): New function.
987         (emit_ldrsw): Mention post-index instruction in comment.
988         (emit_str): Likewise.
989         (emit_subs): New function.
990         (emit_cmp): Likewise.
991         (emit_and): Likewise.
992         (emit_orr): Likewise.
993         (emit_orn): Likewise.
994         (emit_eor): Likewise.
995         (emit_mvn): Likewise.
996         (emit_lslv): Likewise.
997         (emit_lsrv): Likewise.
998         (emit_asrv): Likewise.
999         (emit_mul): Likewise.
1000         (emit_sbfm): Likewise.
1001         (emit_sbfx): Likewise.
1002         (emit_ubfm): Likewise.
1003         (emit_ubfx): Likewise.
1004         (emit_csinc): Likewise.
1005         (emit_cset): Likewise.
1006         (emit_nop): Likewise.
1007         (emit_ops_insns): New helper function.
1008         (emit_pop): Likewise.
1009         (emit_push): Likewise.
1010         (aarch64_emit_prologue): New function.
1011         (aarch64_emit_epilogue): Likewise.
1012         (aarch64_emit_add): Likewise.
1013         (aarch64_emit_sub): Likewise.
1014         (aarch64_emit_mul): Likewise.
1015         (aarch64_emit_lsh): Likewise.
1016         (aarch64_emit_rsh_signed): Likewise.
1017         (aarch64_emit_rsh_unsigned): Likewise.
1018         (aarch64_emit_ext): Likewise.
1019         (aarch64_emit_log_not): Likewise.
1020         (aarch64_emit_bit_and): Likewise.
1021         (aarch64_emit_bit_or): Likewise.
1022         (aarch64_emit_bit_xor): Likewise.
1023         (aarch64_emit_bit_not): Likewise.
1024         (aarch64_emit_equal): Likewise.
1025         (aarch64_emit_less_signed): Likewise.
1026         (aarch64_emit_less_unsigned): Likewise.
1027         (aarch64_emit_ref): Likewise.
1028         (aarch64_emit_if_goto): Likewise.
1029         (aarch64_emit_goto): Likewise.
1030         (aarch64_write_goto_address): Likewise.
1031         (aarch64_emit_const): Likewise.
1032         (aarch64_emit_call): Likewise.
1033         (aarch64_emit_reg): Likewise.
1034         (aarch64_emit_pop): Likewise.
1035         (aarch64_emit_stack_flush): Likewise.
1036         (aarch64_emit_zero_ext): Likewise.
1037         (aarch64_emit_swap): Likewise.
1038         (aarch64_emit_stack_adjust): Likewise.
1039         (aarch64_emit_int_call_1): Likewise.
1040         (aarch64_emit_void_call_2): Likewise.
1041         (aarch64_emit_eq_goto): Likewise.
1042         (aarch64_emit_ne_goto): Likewise.
1043         (aarch64_emit_lt_goto): Likewise.
1044         (aarch64_emit_le_goto): Likewise.
1045         (aarch64_emit_gt_goto): Likewise.
1046         (aarch64_emit_ge_got): Likewise.
1047         (aarch64_emit_ops_impl): New static global variable.
1048         (aarch64_emit_ops): New target function, return
1049         &aarch64_emit_ops_impl.
1050         (struct linux_target_ops): Install it.
1051
1052 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1053
1054         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1055         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1056         aarch64-ipa.o.
1057         * linux-aarch64-ipa.c: New file.
1058         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1059         and endian.h.
1060         (aarch64_get_thread_area): New target method.
1061         (extract_signed_bitfield): New helper function.
1062         (aarch64_decode_ldr_literal): New function.
1063         (enum aarch64_opcodes): New enum.
1064         (struct aarch64_register): New struct.
1065         (struct aarch64_operand): New struct.
1066         (x0): New static global.
1067         (x1): Likewise.
1068         (x2): Likewise.
1069         (x3): Likewise.
1070         (x4): Likewise.
1071         (w2): Likewise.
1072         (ip0): Likewise.
1073         (sp): Likewise.
1074         (xzr): Likewise.
1075         (aarch64_register): New helper function.
1076         (register_operand): Likewise.
1077         (immediate_operand): Likewise.
1078         (struct aarch64_memory_operand): New struct.
1079         (offset_memory_operand): New helper function.
1080         (preindex_memory_operand): Likewise.
1081         (enum aarch64_system_control_registers): New enum.
1082         (ENCODE): New macro.
1083         (emit_insn): New helper function.
1084         (emit_b): New function.
1085         (emit_bcond): Likewise.
1086         (emit_cb): Likewise.
1087         (emit_tb): Likewise.
1088         (emit_blr): Likewise.
1089         (emit_stp): Likewise.
1090         (emit_ldp_q_offset): Likewise.
1091         (emit_stp_q_offset): Likewise.
1092         (emit_load_store): Likewise.
1093         (emit_ldr): Likewise.
1094         (emit_ldrsw): Likewise.
1095         (emit_str): Likewise.
1096         (emit_ldaxr): Likewise.
1097         (emit_stxr): Likewise.
1098         (emit_stlr): Likewise.
1099         (emit_data_processing_reg): Likewise.
1100         (emit_data_processing): Likewise.
1101         (emit_add): Likewise.
1102         (emit_sub): Likewise.
1103         (emit_mov): Likewise.
1104         (emit_movk): Likewise.
1105         (emit_mov_addr): Likewise.
1106         (emit_mrs): Likewise.
1107         (emit_msr): Likewise.
1108         (emit_sevl): Likewise.
1109         (emit_wfe): Likewise.
1110         (append_insns): Likewise.
1111         (can_encode_int32_in): New helper function.
1112         (aarch64_relocate_instruction): New function.
1113         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1114         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1115         (struct linux_target_ops): Install aarch64_get_thread_area,
1116         aarch64_install_fast_tracepoint_jump_pad and
1117         aarch64_get_min_fast_tracepoint_insn_len.
1118
1119 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1120
1121         * Makefile.in (aarch64-insn.o): New rule.
1122         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1123
1124 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1125
1126         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1127
1128 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1129
1130         * tracepoint.c (max_jump_pad_size): Remove.
1131
1132 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1133
1134         * linux-aarch64-low.c: Don't include sys/uio.h.
1135         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1136
1137 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1138
1139         * tracepoint.c (eval_result_type): Change prototype.
1140         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1141
1142 2015-09-15  Pedro Alves  <palves@redhat.com>
1143
1144         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1145         Check whether to report exec events instead of checking whether
1146         multiprocess is enabled.
1147
1148 2015-09-15  Pedro Alves  <palves@redhat.com>
1149
1150         PR remote/18965
1151         * remote-utils.c (prepare_resume_reply): Merge
1152         TARGET_WAITKIND_VFORK_DONE switch case with the
1153         TARGET_WAITKIND_FORKED case.
1154
1155 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1156
1157         * server.c (handle_query): Check string comparison using
1158         "else if" instead of "if".
1159
1160 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1161
1162         * server.c (vCont_supported): New global variable.
1163         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1164         matches.  Append ";vContSupported+" to own_buf.
1165         (handle_v_requests): Append ";s;S" to own_buf if target supports
1166         hardware single step or vCont_supported is false.
1167         (capture_main): Set vCont_supported to zero.
1168
1169 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1170
1171         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1172         it to ...
1173         (linux_supports_hardware_single_step): ... New function.
1174         (linux_target_ops): Update.
1175         * lynx-low.c (lynx_target_ops): Set field
1176         supports_hardware_single_step to target_can_do_hardware_single_step.
1177         * nto-low.c (nto_target_ops): Likewise.
1178         * spu-low.c (spu_target_ops): Likewise.
1179         * win32-low.c (win32_target_ops): Likewise.
1180         * target.c (target_can_do_hardware_single_step): New function.
1181         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1182         Remove.  <supports_hardware_single_step>: New field.
1183         (target_supports_conditional_breakpoints): Remove.
1184         (target_supports_hardware_single_step): New macro.
1185         (target_can_do_hardware_single_step): Declare.
1186         * server.c (handle_query): Use target_supports_hardware_single_step
1187         instead of target_supports_conditional_breakpoints.
1188
1189 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1190
1191         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1192         function.
1193         (struct linux_target_ops the_low_target): Install
1194         aarch64_linux_siginfo_fixup.
1195
1196 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1197             Luis Machado  <lgustavo@codesourcery.com>
1198
1199         * linux-low.c (linux_mourn): Static declaration.
1200         (linux_arch_setup): Move in front of
1201         handle_extended_wait.
1202         (linux_arch_setup_thread): New function.
1203         (handle_extended_wait): Handle exec events.  Call
1204         linux_arch_setup_thread.  Make event_lwp argument a
1205         pointer-to-a-pointer.
1206         (check_zombie_leaders): Do not check stopped threads.
1207         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1208         (linux_low_filter_event): Add lwp and thread for exec'ing
1209         non-leader thread if leader thread has been deleted.
1210         Refactor code into linux_arch_setup_thread and call it.
1211         Pass child lwp pointer by reference to handle_extended_wait.
1212         (linux_wait_for_event_filtered): Update comment.
1213         (linux_wait_1): Prevent clobbering exec event status.
1214         (linux_supports_exec_events): New function.
1215         (linux_target_ops) <supports_exec_events>: Initialize new member.
1216         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1217         new member.
1218         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1219         * server.c (report_exec_events): New global variable.
1220         (handle_query): Handle qSupported query for exec-events feature.
1221         (captured_main): Initialize report_exec_events.
1222         * server.h (report_exec_events): Declare new global variable.
1223         * target.h (struct target_ops) <supports_exec_events>: New
1224         member.
1225         (target_supports_exec_events): New macro.
1226         * win32-low.c (win32_target_ops) <supports_exec_events>:
1227         Initialize new member.
1228
1229 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1230
1231         * linux-low.c (linux_low_enable_btrace): Remove.
1232         (linux_target_ops): Replace linux_low_enable_btrace with
1233         linux_enable_btrace.
1234
1235 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1236
1237         * linux-aarch64-low.c (aarch64_insert_point): Call
1238         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1239         returns true.
1240
1241 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1242
1243         * linux-low.c (check_stopped_by_breakpoint): Use
1244         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1245
1246 2015-08-27  Pedro Alves  <palves@redhat.com>
1247
1248         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1249
1250 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1251
1252         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1253         the XNEW-family equivalent.
1254         (compile_bytecodes): Likewise.
1255         * dll.c (loaded_dll): Likewise.
1256         * event-loop.c (append_callback_event): Likewise.
1257         (create_file_handler): Likewise.
1258         (create_file_event): Likewise.
1259         * hostio.c (handle_open): Likewise.
1260         * inferiors.c (add_thread): Likewise.
1261         (add_process): Likewise.
1262         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1263         * linux-arm-low.c (arm_new_process): Likewise.
1264         (arm_new_thread): Likewise.
1265         * linux-low.c (add_to_pid_list): Likewise.
1266         (linux_add_process): Likewise.
1267         (handle_extended_wait): Likewise.
1268         (add_lwp): Likewise.
1269         (enqueue_one_deferred_signal): Likewise.
1270         (enqueue_pending_signal): Likewise.
1271         (linux_resume_one_lwp_throw): Likewise.
1272         (linux_resume_one_thread): Likewise.
1273         (linux_read_memory): Likewise.
1274         (linux_write_memory): Likewise.
1275         * linux-mips-low.c (mips_linux_new_process): Likewise.
1276         (mips_linux_new_thread): Likewise.
1277         (mips_add_watchpoint): Likewise.
1278         * linux-x86-low.c (initialize_low_arch): Likewise.
1279         * lynx-low.c (lynx_add_process): Likewise.
1280         * mem-break.c (set_raw_breakpoint_at): Likewise.
1281         (set_breakpoint): Likewise.
1282         (add_condition_to_breakpoint): Likewise.
1283         (add_commands_to_breakpoint): Likewise.
1284         (clone_agent_expr): Likewise.
1285         (clone_one_breakpoint): Likewise.
1286         * regcache.c (new_register_cache): Likewise.
1287         * remote-utils.c (look_up_one_symbol): Likewise.
1288         * server.c (queue_stop_reply): Likewise.
1289         (start_inferior): Likewise.
1290         (queue_stop_reply_callback): Likewise.
1291         (handle_target_event): Likewise.
1292         * spu-low.c (fetch_ppc_memory): Likewise.
1293         (store_ppc_memory): Likewise.
1294         * target.c (set_target_ops): Likewise.
1295         * thread-db.c (thread_db_load_search): Likewise.
1296         (try_thread_db_load_1): Likewise.
1297         * tracepoint.c (add_tracepoint): Likewise.
1298         (add_tracepoint_action): Likewise.
1299         (create_trace_state_variable): Likewise.
1300         (cmd_qtdpsrc): Likewise.
1301         (cmd_qtro): Likewise.
1302         (add_while_stepping_state): Likewise.
1303         * win32-low.c (child_add_thread): Likewise.
1304         (get_image_name): Likewise.
1305
1306 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1307
1308         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1309
1310 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1311
1312         * Makefile.in (aarch64-linux.o): New rule.
1313         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1314         srv_tgtobj.
1315         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1316         (aarch64_init_debug_reg_state): Make it extern.
1317         (aarch64_linux_prepare_to_resume): Remove.
1318
1319 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1320
1321         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1322         lwp_arch_private_info and ptid_of_lwp.
1323
1324 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1325
1326         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1327         Find proc_info by find_process_pid.  All callers updated.
1328
1329 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1330
1331         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1332         Remove.
1333         (debug_reg_change_callback): Remove.
1334         (aarch64_notify_debug_reg_change): Remove.
1335
1336 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1337
1338         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1339         Call current_lwp_ptid.
1340
1341 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1342
1343         * linux-aarch64-low.c (debug_reg_change_callback): Use
1344         debug_printf.
1345
1346 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1347
1348         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1349
1350 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1351
1352         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1353
1354 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1355
1356         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1357         the code.
1358
1359 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1360
1361         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1362         Remove.
1363         (debug_reg_change_callback): Remove argument entry and add argument
1364         lwp.  Remove local variable thread.  Don't print thread id in the
1365         debugging output.  Don't check whether pid of thread equals to pid.
1366         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1367         iterate_over_lwps instead find_inferior.
1368
1369 2015-08-24  Pedro Alves  <palves@redhat.com>
1370
1371         * inferiors.c (get_first_process): New function.
1372         * inferiors.h (get_first_process): New declaration.
1373         * remote-utils.c (read_ptid): Default to the first process in the
1374         list, instead of to the current thread's process.
1375
1376 2015-08-24  Pedro Alves  <palves@redhat.com>
1377
1378         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1379         * event-loop.c: Likewise.
1380         * remote-utils.c: Likewise.
1381         * tracepoint.c: Likewise.
1382
1383 2015-08-24  Pedro Alves  <palves@redhat.com>
1384
1385         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1386         ptid_get_lwp.
1387
1388 2015-08-21  Pedro Alves  <palves@redhat.com>
1389
1390         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1391         instead of literal 1.
1392
1393 2015-08-21  Pedro Alves  <palves@redhat.com>
1394
1395         * tdesc.c (default_description): Explicitly zero-initialize.
1396
1397 2015-08-21  Pedro Alves  <palves@redhat.com>
1398
1399         PR gdb/18749
1400         * inferiors.c (remove_thread): Discard any pending stop reply for
1401         this thread.
1402         * server.c (remove_all_on_match_pid): Rename to ...
1403         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1404         instead of a pid.
1405         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1406         extern.
1407         (handle_v_kill, kill_inferior_callback, captured_main)
1408         (process_serial_event): Adjust.
1409         * server.h (discard_queued_stop_replies): Declare.
1410
1411 2015-08-21  Pedro Alves  <palves@redhat.com>
1412
1413         * linux-low.c (wait_for_sigstop): Always switch to no thread
1414         selected if the previously current thread dies.
1415         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1416         process instead of the current thread's.
1417         * remote-utils.c (input_interrupt): Don't check if there's no
1418         current thread.
1419         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1420         current thread to the general thread fails, error out.
1421         (handle_qxfer_auxv, handle_qxfer_libraries)
1422         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1423         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1424         (handle_query): Check if there's a thread selected instead of
1425         checking whether there's any thread in the thread list.
1426         (handle_qxfer_threads, handle_qxfer_btrace)
1427         (handle_qxfer_btrace_conf): Don't error out early if there's no
1428         thread in the thread list.
1429         (handle_v_cont, myresume): Don't set the current thread to the
1430         continue thread.
1431         (process_serial_event) <Hg handling>: Also set thread_id if the
1432         previous general thread is still alive.
1433         (process_serial_event) <g/G handling>: If setting the current
1434         thread to the general thread fails, error out.
1435         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1436         thread's lwp instead of the current thread's.
1437         * target.c (set_desired_thread): If the desired thread was not
1438         found, leave the current thread pointing to NULL.  Return an int
1439         (boolean) indicating success.
1440         * target.h (set_desired_thread): Change return type to int.
1441
1442 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1443
1444         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1445         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1446         #includes.
1447         (ps_get_thread_area): New function.
1448
1449 2015-08-19  Gary Benson  <gbenson@redhat.com>
1450
1451         * hostio.c (handle_pread): Do not attempt to read more data
1452         than hostio_reply_with_data can fit in a packet.
1453
1454 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1455
1456         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1457
1458 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1459
1460         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1461
1462 2015-08-06  Pedro Alves  <palves@redhat.com>
1463
1464         * tracepoint.c (expr_eval_result): Now an int.
1465
1466 2015-08-06  Pedro Alves  <palves@redhat.com>
1467
1468         * gdbthread.h (struct regcache): Forward declare.
1469         (struct thread_info) <regcache_data>: Now a struct regcache
1470         pointer.
1471         * inferiors.c (inferior_regcache_data)
1472         (set_inferior_regcache_data): Now work with struct regcache
1473         pointers.
1474         * inferiors.h (struct regcache): Forward declare.
1475         (inferior_regcache_data, set_inferior_regcache_data): Now work
1476         with struct regcache pointers.
1477         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1478         (free_register_cache_thread): Remove struct regcache pointer
1479         casts.
1480
1481 2015-08-06  Pedro Alves  <palves@redhat.com>
1482
1483         * server.c (captured_main): On error, print the exception message
1484         to stderr, and if run_once is set, throw a quit.
1485
1486 2015-08-06  Pedro Alves  <palves@redhat.com>
1487
1488         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1489         the current thread.
1490
1491 2015-08-06  Pedro Alves  <palves@redhat.com>
1492
1493         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1494         reading beyond the passed in buffer length.
1495
1496 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1497
1498         * tracepoint.c (symbol_list) <required>: Remove.
1499
1500 2015-08-06  Pedro Alves  <palves@redhat.com>
1501
1502         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1503         count if stopping and suspending threads.
1504         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1505         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1506         (linux_detach): Complete an ongoing step-over.
1507         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1508         throughout.
1509         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1510         (linux_wait_1): If passing a signal to the inferior after
1511         finishing a step-over, unsuspend and re-resume all lwps.  If we
1512         see a single-step event but the thread should be continuing, don't
1513         pass the trap to gdb.
1514         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1515         internal_error instead of gdb_assert.
1516         (enqueue_pending_signal): New function.
1517         (check_ptrace_stopped_lwp_gone): Add debug output.
1518         (start_step_over): Use internal_error instead of gdb_assert.
1519         (complete_ongoing_step_over): New function.
1520         (linux_resume_one_thread): Don't resume a suspended thread.
1521         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1522         it stepping.
1523
1524 2015-08-06  Pedro Alves  <palves@redhat.com>
1525
1526         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1527         (linux_thread_alive): Use lwp_is_marked_dead.
1528         (extended_event_reported): Delete.
1529         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1530         instead of extended_event_reported.
1531         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1532         as well.
1533         (lwp_is_marked_dead): New function.
1534         (lwp_running): Use lwp_is_marked_dead.
1535         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1536         comment.
1537
1538 2015-08-06  Pedro Alves  <palves@redhat.com>
1539
1540         * linux-low.c (linux_wait_1): Move fork event output out of the
1541         !report_to_gdb check.  Pass event_child->waitstatus to
1542         target_waitstatus_to_string instead of ourstatus.
1543
1544 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1545
1546         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1547         if current_thread is 32 bit.
1548
1549 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1550
1551         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1552         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1553         * server.c (extended_protocol): Remove "static".
1554         * server.h (extended_protocol): Declare it.
1555
1556 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1557
1558         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1559         both aarch64 and aarch32.
1560         (aarch64_set_pc): Likewise.
1561
1562 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1563
1564         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1565         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1566         arm-with-neon.xml to srv_xmlfiles.
1567         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1568         (is_64bit_tdesc): New function.
1569         (aarch64_linux_read_description): New function.
1570         (aarch64_arch_setup): Call aarch64_linux_read_description.
1571         (regs_info): Rename to regs_info_aarch64.
1572         (aarch64_regs_info): Return right regs_info.
1573         (initialize_low_arch): Call initialize_low_arch_aarch32.
1574
1575 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1576
1577         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1578         * linux-aarch32-low.c: New file.
1579         * linux-aarch32-low.h: New file.
1580         * linux-arm-low.c (arm_fill_gregset): Move it to
1581         linux-aarch32-low.c.
1582         (arm_store_gregset): Likewise.
1583         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1584         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1585         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1586         (regs_info): Rename to regs_info_arm.
1587         (arm_regs_info): Return regs_info_aarch32 if
1588         have_ptrace_getregset is 1 and target description is
1589         arm_with_neon or arm_with_vfpv3.
1590         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1591         Call initialize_low_arch_aarch32 instead.
1592
1593 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1594
1595         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1596         * linux-low.c: ... here.
1597         * linux-low.h (have_ptrace_getregset): Declare it.
1598
1599 2015-08-04  Pedro Alves  <palves@redhat.com>
1600
1601         * thread-db.c (struct thread_db): Use new typedefs.
1602         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1603         CHK calls.
1604         (disable_thread_event_reporting): Cast result of dlsym to
1605         destination function pointer type.
1606         (thread_db_mourn): Use td_ta_delete_ftype.
1607
1608 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1609
1610         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1611         arch variant.
1612         (CDX_BREAKPOINT): Define for R2.
1613         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1614         (the_low_target): Add comments.
1615
1616 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1617
1618         * linux-arm-low.c (arm_hwcap): Remove it.
1619         (arm_read_description): New local variable arm_hwcap.  Don't
1620         set arm_hwcap to zero.
1621
1622 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1623
1624         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1625         Use regcache->tdesc instead.
1626         (arm_store_wmmxregset): Likewise.
1627         (arm_fill_vfpregset): Likewise.
1628         (arm_store_vfpregset): Likewise.
1629
1630 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1631
1632         * linux-arm-low.c: Include arch/arm.h.
1633         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1634         (arm_store_gregset): Likewise.
1635
1636 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
1637
1638         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1639         ptrace's 4th parameter.
1640
1641 2015-07-27  Yao Qi  <yao.qi@linaro.org>
1642
1643         * configure.srv (case aarch64*-*-linux*): Don't set
1644         srv_linux_usrregs.
1645
1646 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
1647
1648         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1649         sys/ptrace.h.
1650         * linux-arm-low.c: Likewise.
1651         * linux-cris-low.c: Likewise.
1652         * linux-crisv32-low.c: Likewise.
1653         * linux-low.c: Likewise.
1654         * linux-m68k-low.c: Likewise.
1655         * linux-mips-low.c: Likewise.
1656         * linux-nios2-low.c: Likewise.
1657         * linux-s390-low.c: Likewise.
1658         * linux-sparc-low.c: Likewise.
1659         * linux-tic6x-low.c: Likewise.
1660         * linux-tile-low.c: Likewise.
1661         * linux-x86-low.c: Likewise.
1662
1663 2015-07-24  Pedro Alves  <palves@redhat.com>
1664
1665         * config.in: Regenerate.
1666         * configure: Regenerate.
1667
1668 2015-07-24  Pedro Alves  <palves@redhat.com>
1669
1670         * acinclude.m4: Include ../ptrace.m4.
1671         * configure.ac: Call GDB_AC_PTRACE.
1672         * config.in, configure: Regenerate.
1673
1674 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1675
1676         * linux-low.c (linux_create_inferior): Remove setting to
1677         proc->priv->new_inferior.
1678         (linux_attach): Likewise.
1679         (linux_low_filter_event): Likewise.
1680         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1681
1682 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1683
1684         * linux-low.c (linux_arch_setup): New function.
1685         (linux_low_filter_event): If proc->tdesc is NULL and
1686         proc->attached is true, call the_low_target.arch_setup.
1687         Otherwise, keep status pending, and return.
1688         (linux_resume_one_lwp_throw): Don't call get_pc if
1689         thread->while_stepping isn't NULL.  Don't call
1690         get_thread_regcache if proc->tdesc is NULL.
1691         (need_step_over_p): Return 0 if proc->tdesc is NULL.
1692         (linux_target_ops): Install arch_setup.
1693         * server.c (start_inferior): Call the_target->arch_setup.
1694         * target.h (struct target_ops) <arch_setup>: New field.
1695         (target_arch_setup): New marco.
1696         * lynx-low.c (lynx_target_ops): Update.
1697         * nto-low.c (nto_target_ops): Update.
1698         * spu-low.c (spu_target_ops): Update.
1699         * win32-low.c (win32_target_ops): Update.
1700
1701 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1702
1703         * linux-low.c (linux_add_process): Don't set
1704         proc->priv->new_inferior.
1705         (linux_create_inferior): Set proc->priv->new_inferior to 1.
1706         (linux_attach): Likewise.
1707
1708 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1709
1710         * server.c (start_inferior): Code refactor.
1711
1712 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1713
1714         * server.c (process_serial_event): Set general_thread.
1715
1716 2015-07-21  Yao Qi  <yao.qi@linaro.org>
1717
1718         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1719         aarch64_linux_get_debug_reg_capacity.
1720
1721 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1722
1723         * Makefile.in (aarch64-linux-hw-point.o): New rule.
1724         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1725         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1726         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1727         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1728         (AARCH64_HWP_ALIGNMENT): Likewise.
1729         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1730         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1731         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1732         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1733         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1734         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1735         (struct aarch64_debug_reg_state): Likewise.
1736         (struct arch_lwp_info): Likewise.
1737         (aarch64_align_watchpoint): Likewise.
1738         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1739         (aarch64_watchpoint_length): Likewise.
1740         (aarch64_point_encode_ctrl_reg): Likewise
1741         (aarch64_point_is_aligned): Likewise.
1742         (aarch64_align_watchpoint): Likewise.
1743         (aarch64_linux_set_debug_regs):
1744         (aarch64_dr_state_insert_one_point): Likewise.
1745         (aarch64_dr_state_remove_one_point): Likewise.
1746         (aarch64_handle_breakpoint): Likewise.
1747         (aarch64_handle_aligned_watchpoint): Likewise.
1748         (aarch64_handle_unaligned_watchpoint): Likewise.
1749         (aarch64_handle_watchpoint): Likewise.
1750
1751 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1752
1753         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1754         and don't aarch64_get_debug_reg_state.  All callers update.
1755         (aarch64_handle_aligned_watchpoint): Likewise.
1756         (aarch64_handle_unaligned_watchpoint): Likewise.
1757         (aarch64_handle_watchpoint): Likewise.
1758         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1759         (aarch64_remove_point): Likewise.
1760
1761 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1762
1763         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1764         debug_printf.
1765         (aarch64_handle_unaligned_watchpoint): Likewise.
1766
1767 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1768
1769         Revert the previous 3 commits:
1770         Move gdb_regex* to common/
1771         Move linux_find_memory_regions_full & co.
1772         gdbserver build-id attribute generator
1773
1774 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1775             Jan Kratochvil  <jan.kratochvil@redhat.com>
1776
1777         gdbserver build-id attribute generator.
1778         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1779         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1780         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1781         (find_phdr): New.
1782         (get_dynamic): Use find_pdhr to traverse program headers.
1783         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1784         (compare_mapping_entry_range, struct find_memory_region_callback_data)
1785         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1786         (get_hex_build_id): New.
1787         (linux_qxfer_libraries_svr4): Add optional build-id attribute
1788         to reply XML document.
1789
1790 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1791             Jan Kratochvil  <jan.kratochvil@redhat.com>
1792
1793         * target.c: Include target/target-utils.h and fcntl.h.
1794         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1795         (target_fileio_read_stralloc): New functions.
1796
1797 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1798
1799         * Makefile.in (OBS): Add gdb_regex.o.
1800         (gdb_regex.o): New.
1801         * config.in: Rebuilt.
1802         * configure: Rebuilt.
1803
1804 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1805             Jan Kratochvil  <jan.kratochvil@redhat.com>
1806
1807         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1808         * Makefile.in (OBS): Add target-utils.o.
1809         (linux-maps.o, target-utils.o): New.
1810         * configure.srv (srv_linux_obj): Add linux-maps.o.
1811
1812 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
1813
1814         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1815         function, return 1.
1816         (the_low_target): Install it.
1817
1818 2015-07-14  Pedro Alves  <palves@redhat.com>
1819
1820         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1821         Instead, ignore ECHILD, and throw an error for other errnos.
1822
1823 2015-07-10  Pedro Alves  <palves@redhat.com>
1824
1825         * event-loop.c (struct callback_event) <data>: Change type to
1826         gdb_client_data instance instead of gdb_client_data pointer.
1827         (append_callback_event): Adjust.
1828
1829 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
1830
1831         * linux-aarch64-low.c: Add comments for each linux_target_ops
1832         method.  Remove comments already covered in target_ops and
1833         linux_target_ops definitions.
1834         (the_low_target): Add comments for each unimplemented method.
1835
1836 2015-07-09  Yao Qi  <yao.qi@linaro.org>
1837
1838         * linux-aarch64-low.c (aarch64_regmap): Remove.
1839         (aarch64_usrregs_info): Remove.
1840         (regs_info): Set field usrregs to NULL.
1841
1842 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1843
1844         * linux-low.c: Include "rsp-low.h"
1845         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1846         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1847         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1848         (handle_btrace_enable_pt): New.
1849         (handle_btrace_general_set): Support "pt".
1850         (handle_btrace_conf_general_set): Support "pt:size".
1851
1852 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1853
1854         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1855         Z_PACKET_SW_BP.
1856
1857 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1858
1859         * linux-aarch64-low.c: Remove comment about endianness.
1860         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
1861         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
1862         memcmp.
1863
1864 2015-06-24  Gary Benson  <gbenson@redhat.com>
1865
1866         * linux-i386-ipa.c (stdint.h): Do not include.
1867         * lynx-i386-low.c (stdint.h): Likewise.
1868         * lynx-ppc-low.c (stdint.h): Likewise.
1869         * mem-break.c (stdint.h): Likewise.
1870         * thread-db.c (stdint.h): Likewise.
1871         * tracepoint.c (stdint.h): Likewise.
1872         * win32-low.c (stdint.h): Likewise.
1873
1874 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
1875
1876         * server.c (write_qxfer_response): Update call to
1877         remote_escape_output.
1878
1879 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
1880             Jan Kratochvil  <jan.kratochvil@redhat.com>
1881
1882         Merge multiple hex conversions.
1883         * gdbreplay.c (tohex): Rename to 'fromhex'.
1884         (logchar): Use fromhex.
1885
1886 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1887
1888         * server.c (handle_qxfer_libraries): Set `version' attribute for
1889         <library-list>.
1890
1891 2015-06-10  Gary Benson  <gbenson@redhat.com>
1892
1893         * target.h (struct target_ops) <multifs_open>: New field.
1894         <multifs_unlink>: Likewise.
1895         <multifs_readlink>: Likewise.
1896         * linux-low.c (nat/linux-namespaces.h): New include.
1897         (linux_target_ops): Initialize the_target->multifs_open,
1898         the_target->multifs_unlink and the_target->multifs_readlink.
1899         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1900         * hostio.c (hostio_fs_pid): New static variable.
1901         (hostio_handle_new_gdb_connection): New function.
1902         (handle_setfs): Likewise.
1903         (handle_open): Use the_target->multifs_open as appropriate.
1904         (handle_unlink): Use the_target->multifs_unlink as appropriate.
1905         (handle_readlink): Use the_target->multifs_readlink as
1906         appropriate.
1907         (handle_vFile): Handle vFile:setfs packets.
1908         * server.c (handle_query): Call hostio_handle_new_gdb_connection
1909         after target_handle_new_gdb_connection.
1910
1911 2015-06-10  Gary Benson  <gbenson@redhat.com>
1912
1913         * configure.ac (AC_CHECK_FUNCS): Add setns.
1914         * config.in: Regenerate.
1915         * configure: Likewise.
1916         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1917         (linux-namespaces.o): New rule.
1918         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1919
1920 2015-06-09  Gary Benson <gbenson@redhat.com>
1921
1922         * hostio.c (handle_open): Process mode argument with
1923         fileio_to_host_mode.
1924
1925 2015-06-01  Yao Qi  <yao.qi@linaro.org>
1926
1927         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1928         * linux-x86-low.c: Likewise.
1929
1930 2015-05-28  Don Breazeal  <donb@codesourcery.com>
1931
1932         * linux-low.c (handle_extended_wait): Initialize
1933         thread_info.last_resume_kind for new fork children.
1934
1935 2015-05-15  Pedro Alves  <palves@redhat.com>
1936
1937         * target.h (target_handle_new_gdb_connection): Rewrite using if
1938         wrapped in do/while.
1939
1940 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
1941
1942         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1943         * configure, config.in: Regenerate.
1944         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1945         Declare typedef.
1946
1947 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1948
1949         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1950         PTRACE_EVENT_VFORK_DONE.
1951         (linux_low_ptrace_options, extended_event_reported): Add vfork
1952         events.
1953         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1954         and "vforkdone" for RSP 'T' Stop Reply Packet.
1955         * server.h (report_vfork_events): Declare
1956         global variable.
1957
1958 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1959
1960         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1961         (the_low_target) <new_fork>: Initialize new member.
1962         * linux-arm-low.c (arm_new_fork): New function.
1963         (the_low_target) <new_fork>: Initialize new member.
1964         * linux-low.c (handle_extended_wait): Call new target function
1965         new_fork.
1966         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1967         * linux-mips-low.c (mips_add_watchpoint): New function
1968         extracted from mips_insert_point.
1969         (the_low_target) <new_fork>: Initialize new member.
1970         (mips_linux_new_fork): New function.
1971         (mips_insert_point): Call mips_add_watchpoint.
1972         * linux-x86-low.c (x86_linux_new_fork): New function.
1973         (the_low_target) <new_fork>: Initialize new member.
1974
1975 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1976
1977         * linux-low.c (handle_extended_wait): Implement return value,
1978         rename argument 'event_child' to 'event_lwp', handle
1979         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1980         (linux_low_ptrace_options): New function.
1981         (linux_low_filter_event): Call linux_low_ptrace_options,
1982         use different argument fo linux_enable_event_reporting,
1983         use return value from handle_extended_wait.
1984         (extended_event_reported): New function.
1985         (linux_wait_1): Call extended_event_reported and set
1986         status to report fork events.
1987         (linux_write_memory): Add pid to debug message.
1988         (reset_lwp_ptrace_options_callback): New function.
1989         (linux_handle_new_gdb_connection): New function.
1990         (linux_target_ops): Initialize new structure member.
1991         * linux-low.h (struct lwp_info) <waitstatus>: New member.
1992         * lynx-low.c: Initialize new structure member.
1993         * remote-utils.c (prepare_resume_reply): Implement stop reason
1994         "fork" for "T" stop message.
1995         * server.c (handle_query): Call handle_new_gdb_connection.
1996         * server.h (report_fork_events): Declare global flag.
1997         * target.h (struct target_ops) <handle_new_gdb_connection>:
1998         New member.
1999         (target_handle_new_gdb_connection): New macro.
2000         * win32-low.c: Initialize new structure member.
2001
2002 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2003
2004         * mem-break.c (APPEND_TO_LIST): Define macro.
2005         (clone_agent_expr): New function.
2006         (clone_one_breakpoint): New function.
2007         (clone_all_breakpoints): New function.
2008         * mem-break.h: Declare new functions.
2009
2010 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2011
2012         * linux-low.c (linux_supports_fork_events): New function.
2013         (linux_supports_vfork_events): New function.
2014         (linux_target_ops): Initialize new structure members.
2015         (initialize_low): Call linux_check_ptrace_features.
2016         * lynx-low.c (lynx_target_ops): Initialize new structure
2017         members.
2018         * server.c (report_fork_events, report_vfork_events):
2019         New global flags.
2020         (handle_query): Add new features to qSupported packet and
2021         response.
2022         (captured_main): Initialize new global variables.
2023         * target.h (struct target_ops) <supports_fork_events>:
2024         New member.
2025         <supports_vfork_events>: New member.
2026         (target_supports_fork_events): New macro.
2027         (target_supports_vfork_events): New macro.
2028         * win32-low.c (win32_target_ops): Initialize new structure
2029         members.
2030
2031 2015-05-12  Gary Benson <gbenson@redhat.com>
2032
2033         * server.c (handle_qxfer_exec_file): Use current process
2034         if annex is empty.
2035
2036 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2037
2038         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2039         Remove HAVE_PTRACE_GETREGS conditionals.
2040         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2041         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2042
2043 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2044
2045         * linux-low.c (linux_supports_conditional_breakpoints): New
2046         function.
2047         (linux_target_ops): Install new target method.
2048         * lynx-low.c (lynx_target_ops): Install NULL hook for
2049         supports_conditional_breakpoints.
2050         * nto-low.c (nto_target_ops): Likewise.
2051         * spu-low.c (spu_target_ops): Likewise.
2052         * win32-low.c (win32_target_ops): Likewise.
2053         * server.c (handle_query): Check
2054         target_supports_conditional_breakpoints.
2055         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2056         New field.
2057         (target_supports_conditional_breakpoints): New macro.
2058
2059 2015-05-06  Pedro Alves  <palves@redhat.com>
2060
2061         PR server/18081
2062         * server.c (start_inferior): If the process exits, mourn it.
2063
2064 2015-04-21  Gary Benson <gbenson@redhat.com>
2065
2066         * hostio.c (fileio_open_flags_to_host): Factored out to
2067         fileio_to_host_openflags in common/fileio.c.  Single use
2068         updated.
2069
2070 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2071
2072         * linux-xtensa-low.c (xtensa_fill_gregset)
2073         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2074         XCHAL_HAVE_LOOP.
2075
2076 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2077
2078         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2079         (regs_info): Replace usrregs pointer with NULL.
2080
2081 2015-04-17  Gary Benson  <gbenson@redhat.com>
2082
2083         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2084         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2085         * server.c (handle_qxfer_exec_file): New function.
2086         (qxfer_packets): Add exec-file entry.
2087         (handle_query): Report qXfer:exec-file:read as supported packet.
2088
2089 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2090
2091         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2092
2093 2015-04-09  Gary Benson <gbenson@redhat.com>
2094
2095         * hostio-errno.c (errno_to_fileio_error): Remove function.
2096         Update caller to use remote_fileio_to_fio_error.
2097
2098 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2099
2100         * linux-low.c (linux_insert_point): Call
2101         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2102         (linux_remove_point): Call remove_memory_breakpoint if type is
2103         raw_bkpt_type_sw.
2104         * linux-x86-low.c (x86_insert_point): Don't call
2105         insert_memory_breakpoint.
2106         (x86_remove_point): Don't call remove_memory_breakpoint.
2107
2108 2015-04-01  Pedro Alves  <palves@redhat.com>
2109             Cleber Rosa  <crosa@redhat.com>
2110
2111         * server.c (gdbserver_usage): Reorganize and extend the usage
2112         message.
2113
2114 2015-03-24  Pedro Alves  <palves@redhat.com>
2115
2116         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2117         output.  Also dump TRAP_TRACE.
2118         (linux_low_filter_event): In debug output, distinguish a
2119         resume_stop SIGSTOP from a delayed SIGSTOP.
2120
2121 2015-03-24  Gary Benson  <gbenson@redhat.com>
2122
2123         * linux-x86-low.c (x86_linux_new_thread): Moved to
2124         nat/x86-linux.c.
2125         (x86_linux_prepare_to_resume): Likewise.
2126
2127 2015-03-24  Gary Benson  <gbenson@redhat.com>
2128
2129         * Makefile.in (x86-linux-dregs.o): New rule.
2130         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2131         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2132         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2133         (x86_linux_dr_get): Likewise.
2134         (x86_linux_dr_set): Likewise.
2135         (update_debug_registers_callback): Likewise.
2136         (x86_linux_dr_set_addr): Likewise.
2137         (x86_linux_dr_get_addr): Likewise.
2138         (x86_linux_dr_set_control): Likewise.
2139         (x86_linux_dr_get_control): Likewise.
2140         (x86_linux_dr_get_status): Likewise.
2141         (x86_linux_update_debug_registers): Likewise.
2142
2143 2015-03-24  Gary Benson  <gbenson@redhat.com>
2144
2145         * linux-x86-low.c (x86_linux_update_debug_registers):
2146         New function, factored out from...
2147         (x86_linux_prepare_to_resume): ...this.
2148
2149 2015-03-24  Gary Benson  <gbenson@redhat.com>
2150
2151         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2152         (x86_linux_dr_set): Likewise.
2153         (update_debug_registers_callback): Likewise.
2154         (x86_linux_dr_set_addr): Likewise.
2155         (x86_linux_dr_get_addr): Likewise.
2156         (x86_linux_dr_set_control): Likewise.
2157         (x86_linux_dr_get_control): Likewise.
2158         (x86_linux_dr_get_status): Likewise.
2159         (x86_linux_prepare_to_resume): Likewise.
2160
2161 2015-03-24  Gary Benson  <gbenson@redhat.com>
2162
2163         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2164         Use perror_with_name.  Pass string through gettext.
2165         (x86_linux_dr_set): Likewise.
2166
2167 2015-03-24  Gary Benson  <gbenson@redhat.com>
2168
2169         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2170         (x86_linux_dr_set_addr): ...this.
2171         (x86_dr_low_get_addr): Rename to...
2172         (x86_linux_dr_get_addr): ...this.
2173         (x86_dr_low_set_control): Rename to...
2174         (x86_linux_dr_set_control): ...this.
2175         (x86_dr_low_get_control): Rename to...
2176         (x86_linux_dr_get_control): ...this.
2177         (x86_dr_low_get_status): Rename to...
2178         (x86_linux_dr_get_status): ...this.
2179         (x86_dr_low): Update with new function names.
2180
2181 2015-03-24  Gary Benson  <gbenson@redhat.com>
2182
2183         * Makefile.in (x86-linux.o): New rule.
2184         * configure.srv: Add x86-linux.o to relevant targets.
2185         * linux-low.c (lwp_set_arch_private_info): New function.
2186         (lwp_arch_private_info): Likewise.
2187         * linux-x86-low.c: Include nat/x86-linux.h.
2188         (arch_lwp_info): Removed structure.
2189         (update_debug_registers_callback):
2190         Use lwp_set_debug_registers_changed.
2191         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2192         and lwp_set_debug_registers_changed.
2193         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2194
2195 2015-03-24  Gary Benson  <gbenson@redhat.com>
2196
2197         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2198         * linux-arm-low.c (arm_new_thread): Likewise.
2199         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2200         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2201         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2202         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2203
2204 2015-03-24  Gary Benson  <gbenson@redhat.com>
2205
2206         * linux-low.c (ptid_of_lwp): New function.
2207         (lwp_is_stopped): Likewise.
2208         (lwp_stop_reason): Likewise.
2209         * linux-x86-low.c (update_debug_registers_callback):
2210         Use lwp_is_stopped.
2211         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2212         lwp_stop_reason.
2213
2214 2015-03-24  Gary Benson  <gbenson@redhat.com>
2215
2216         * linux-low.h (linux_stop_lwp): Remove declaration.
2217
2218 2015-03-24  Gary Benson  <gbenson@redhat.com>
2219
2220         * linux-low.h: Include nat/linux-nat.h.
2221         * linux-low.c (iterate_over_lwps_args): New structure.
2222         (iterate_over_lwps_filter): New function.
2223         (iterate_over_lwps): Likewise.
2224         * linux-x86-low.c (update_debug_registers_callback):
2225         Update signature to what iterate_over_lwps expects.
2226         Remove PID check that iterate_over_lwps now performs.
2227         (x86_dr_low_set_addr): Use iterate_over_lwps.
2228         (x86_dr_low_set_control): Likewise.
2229
2230 2015-03-24  Gary Benson  <gbenson@redhat.com>
2231
2232         * linux-x86-low.c (x86_debug_reg_state): New function.
2233         (x86_linux_prepare_to_resume): Use the above.
2234
2235 2015-03-24  Gary Benson  <gbenson@redhat.com>
2236
2237         * linux-low.c (current_lwp_ptid): New function.
2238         * linux-x86-low.c: Include nat/linux-nat.h.
2239         (x86_dr_low_get_addr): Use current_lwp_ptid.
2240         (x86_dr_low_get_control): Likewise.
2241         (x86_dr_low_get_status): Likewise.
2242
2243 2015-03-20  Pedro Alves  <palves@redhat.com>
2244
2245         * tracepoint.c (cmd_qtstatus): Make "str" const.
2246
2247 2015-03-20  Pedro Alves  <palves@redhat.com>
2248
2249         * server.c (handle_general_set): Make "req_str" const.
2250
2251 2015-03-19  Pedro Alves  <palves@redhat.com>
2252
2253         * linux-low.c (linux_resume_one_lwp): Rename to ...
2254         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2255         instead call perror_with_name.
2256         (check_ptrace_stopped_lwp_gone): New function.
2257         (linux_resume_one_lwp): Reimplement as wrapper around
2258         linux_resume_one_lwp_throw that swallows errors if the LWP is
2259         gone.
2260
2261 2015-03-19  Pedro Alves  <palves@redhat.com>
2262
2263         * linux-low.c (count_events_callback, select_event_lwp_callback):
2264         No longer check whether the thread has resume_stop as last resume
2265         kind.
2266
2267 2015-03-19 Pedro Alves  <palves@redhat.com>
2268
2269         * linux-low.c (count_events_callback, select_event_lwp_callback):
2270         Use the lwp's status_pending_p field, not the thread's.
2271
2272 2015-03-19  Pedro Alves  <palves@redhat.com>
2273
2274         * linux-low.c (select_event_lwp_callback): Update comments to
2275         no longer mention SIGTRAP.
2276
2277 2015-03-18  Gary Benson  <gbenson@redhat.com>
2278
2279         * server.c (handle_query): Do not report vFile:fstat as supported.
2280
2281 2015-03-11  Gary Benson  <gbenson@redhat.com>
2282
2283         * hostio.c (sys/types.h): New include.
2284         (sys/stat.h): Likewise.
2285         (common-remote-fileio.h): Likewise.
2286         (handle_fstat): New function.
2287         (handle_vFile): Handle vFile:fstat packets.
2288
2289 2015-03-11  Gary Benson  <gbenson@redhat.com>
2290
2291         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2292         struct stat.st_blocks and struct stat.st_blksize.
2293         * configure: Regenerate.
2294         * config.in: Likewise.
2295         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2296         (OBS): Add common-remote-fileio.o.
2297         (common-remote-fileio.o): New rule.
2298
2299 2015-03-09  Pedro Alves  <palves@redhat.com>
2300
2301         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2302         'struct sockaddr' pointer in 'accept' call.
2303
2304 2015-03-09  Pedro Alves  <palves@redhat.com>
2305
2306         Revert:
2307         2015-03-07  Pedro Alves  <palves@redhat.com>
2308         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2309         or <winsock2.h> here.  Instead include "gdb_socket.h".
2310         (remote_open): Use union gdb_sockaddr_u.
2311         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2312         or <winsock2.h> here.  Instead include "gdb_socket.h".
2313         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2314         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2315         or <sys/un.h>.
2316         (init_named_socket, gdb_agent_helper_thread): Use union
2317         gdb_sockaddr_u.
2318
2319 2015-03-07  Pedro Alves  <palves@redhat.com>
2320
2321         * configure.ac (build_warnings): Move
2322         -Wdeclaration-after-statement to the C-specific set.
2323         * configure: Regenerate.
2324
2325 2015-03-07  Pedro Alves  <palves@redhat.com>
2326
2327         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2328         or <winsock2.h> here.  Instead include "gdb_socket.h".
2329         (remote_open): Use union gdb_sockaddr_u.
2330         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2331         or <winsock2.h> here.  Instead include "gdb_socket.h".
2332         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2333         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2334         or <sys/un.h>.
2335         (init_named_socket, gdb_agent_helper_thread): Use union
2336         gdb_sockaddr_u.
2337
2338 2015-03-07  Pedro Alves  <palves@redhat.com>
2339
2340         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2341         instead.
2342
2343 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2344
2345         * linux-aarch64-low.c (aarch64_insert_point): Use
2346         show_debug_regs as a boolean.
2347         (aarch64_remove_point): Likewise.
2348
2349 2015-03-05  Pedro Alves  <palves@redhat.com>
2350
2351         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2352         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2353         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2354         * nto-low.c (nto_target_ops): Likewise.
2355         * spu-low.c (spu_target_ops): Likewise.
2356         * win32-low.c (win32_target_ops): Likewise.
2357
2358 2015-03-04  Pedro Alves  <palves@redhat.com>
2359
2360         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2361         Decide whether a breakpoint triggered based on the SIGTRAP's
2362         siginfo.si_code.
2363         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2364         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2365         (linux_low_filter_event): Check for breakpoints before checking
2366         watchpoints.
2367         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2368         siginfo.si_code.
2369         (linux_stopped_by_sw_breakpoint)
2370         (linux_supports_stopped_by_sw_breakpoint)
2371         (linux_stopped_by_hw_breakpoint)
2372         (linux_supports_stopped_by_hw_breakpoint): New functions.
2373         (linux_target_ops): Install new target methods.
2374
2375 2015-03-04  Pedro Alves  <palves@redhat.com>
2376
2377         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2378         * server.c (swbreak_feature, hwbreak_feature): New globals.
2379         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2380         (captured_main): Clear swbreak_feature and hwbreak_feature.
2381         * server.h (swbreak_feature, hwbreak_feature): Declare.
2382         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2383         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2384         supports_stopped_by_hw_breakpoint>: New fields.
2385         (target_supports_stopped_by_sw_breakpoint)
2386         (target_stopped_by_sw_breakpoint)
2387         (target_supports_stopped_by_hw_breakpoint)
2388         (target_stopped_by_hw_breakpoint): Declare.
2389
2390 2015-03-04  Pedro Alves  <palves@redhat.com>
2391
2392         enum lwp_stop_reason -> enum target_stop_reason
2393         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2394         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2395         (linux_wait_1, stuck_in_jump_pad_callback)
2396         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2397         (linux_stopped_by_watchpoint):
2398         * linux-low.h (enum lwp_stop_reason): Delete.
2399         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2400         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2401
2402 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2403
2404         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2405
2406 2015-03-03  Gary Benson  <gbenson@redhat.com>
2407
2408         * hostio.c (handle_vFile): Fix prefix lengths.
2409
2410 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2411
2412         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2413         ptr_bits.
2414
2415 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2416
2417         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2418         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2419         (clean): Add "rm -f" for above C files.
2420         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2421         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2422         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2423         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2424         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2425         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2426         (init_registers_s390x_vx_linux64)
2427         (init_registers_s390x_tevx_linux64)
2428         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2429         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2430         declarations.
2431         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2432         (s390_store_vxrs_high): New functions.
2433         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2434         NT_S390_VXRS_HIGH.
2435         (s390_arch_setup): Add logic for selecting one of the new target
2436         descriptions.  Activate the new vector regsets if applicable.
2437         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2438         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2439         and init_registers_s390x_tevx_linux64.
2440
2441 2015-03-01  Pedro Alves  <palves@redhat.com>
2442
2443         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2444         parameter.
2445
2446 2015-02-27  Pedro Alves  <palves@redhat.com>
2447
2448         * linux-x86-low.c (u_debugreg_offset): New function.
2449         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2450
2451 2015-02-27  Pedro Alves  <palves@redhat.com>
2452
2453         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2454         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2455         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2456         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2457         (ps_lsetfpregs, ps_getpid)
2458         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2459         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2460         (ps_lsetxregs, ps_plog): Declare.
2461
2462 2015-02-27  Pedro Alves  <palves@redhat.com>
2463
2464         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2465         IP_AGENT_EXPORT_FUNC.
2466         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2467         IP_AGENT_EXPORT_FUNC.
2468         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2469         (IP_AGENT_EXPORT): Delete.
2470         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2471         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2472         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2473         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2474         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2475         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2476         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2477         (traceframe_read_count, traceframe_write_count)
2478         (traceframes_created, trace_state_variables, get_raw_reg)
2479         (get_trace_state_variable_value, set_trace_state_variable_value)
2480         (ust_loaded, helper_thread_id, cmd_buf): Use
2481         IPA_SYM_EXPORTED_NAME.
2482         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2483         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2484         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2485         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2486         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2487         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2488         EXTERN_C_PUSH/EXTERN_C_POP.
2489         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2490         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2491         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2492         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2493         (traceframe_write_count, traceframe_read_count)
2494         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2495         (about_to_request_buffer_space, get_trace_state_variable_value)
2496         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2497         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2498         EXTERN_C_PUSH/EXTERN_C_POP.
2499         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2500         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2501         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2502         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2503         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2504         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2505         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2506         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2507         Define.
2508         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2509         (IP_AGENT_EXPORT_VAR_DECL): Define.
2510         (tracing): Declare.
2511         (gdb_agent_get_raw_reg): Declare.
2512
2513 2015-02-27  Tom Tromey  <tromey@redhat.com>
2514             Pedro Alves  <palves@redhat.com>
2515
2516         Rename symbols whose names are reserved C++ keywords throughout.
2517
2518 2015-02-27  Pedro Alves  <palves@redhat.com>
2519
2520         * Makefile.in (COMPILER): New, get it from autoconf.
2521         (CXX): Get from autoconf instead.
2522         (COMPILE.pre): Use COMPILER.
2523         (CC-LD): Rename to ...
2524         (CC_LD): ... this.  Use COMPILER.
2525         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2526         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2527         * acinclude.m4: Include build-with-cxx.m4.
2528         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2529         Disable -Werror by default if building in C++ mode.
2530         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2531         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2532         the C++ compiler.  Save/restore CXXFLAGS too.
2533         * configure: Regenerate.
2534
2535 2015-02-27  Pedro Alves  <palves@redhat.com>
2536
2537         * acinclude.m4: Include libiberty.m4.
2538         * configure.ac: Call libiberty_INIT.
2539         * config.in, configure: Regenerate.
2540
2541 2015-02-26  Pedro Alves  <palves@redhat.com>
2542
2543         * linux-low.c (linux_wait_1): When incrementing the PC past a
2544         program breakpoint always use the_low_target.breakpoint_len as
2545         increment, rather than the maximum between that and
2546         the_low_target.decr_pc_after_break.
2547
2548 2015-02-23  Pedro Alves  <palves@redhat.com>
2549
2550         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2551         thread was doing a step-over; always adjust the PC if
2552         we stepped over a permanent breakpoint.
2553         (linux_wait_1): If we stepped over breakpoint that was on top of a
2554         permanent breakpoint, manually advance the PC past it.
2555
2556 2015-02-23  Pedro Alves  <palves@redhat.com>
2557
2558         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2559         modes.
2560         (x86_fill_gregset, x86_store_gregset): Use it when handling
2561         $orig_eax.
2562
2563 2015-02-20  Pedro Alves  <palves@redhat.com>
2564
2565         * thread-db.c: Include "nat/linux-procfs.h".
2566         (thread_db_init): Skip listing new threads if the kernel supports
2567         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2568
2569 2015-02-20  Pedro Alves  <palves@redhat.com>
2570
2571         * linux-low.c (status_pending_p_callback): Use ptid_match.
2572
2573 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2574
2575         PR breakpoints/16812
2576         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2577         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2578         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2579
2580 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2581
2582         PR breakpoints/15956
2583         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2584
2585 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2586
2587         * linux-low.c (linux_low_btrace_conf): Print size.
2588         * server.c (handle_btrace_conf_general_set): New.
2589         (hanle_general_set): Call handle_btrace_conf_general_set.
2590         (handle_query): Report Qbtrace-conf:bts:size as supported.
2591
2592 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2593
2594         * linux-low.c (linux_low_enable_btrace): Update parameters.
2595         (linux_low_btrace_conf): New.
2596         (linux_target_ops)<to_btrace_conf>: Initialize.
2597         * server.c (current_btrace_conf): New.
2598         (handle_btrace_enable): Rename to ...
2599         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2600         to target_enable_btrace.  Update comment.  Update users.
2601         (handle_qxfer_btrace_conf): New.
2602         (qxfer_packets): Add btrace-conf entry.
2603         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2604         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2605         (target_ops)<read_btrace_conf>: New.
2606         (target_enable_btrace): Update parameters.
2607         (target_read_btrace_conf): New.
2608
2609 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2610
2611         * server.c (handle_btrace_general_set): Remove call to
2612         target_supports_btrace.
2613         (supported_btrace_packets): New.
2614         (handle_query): Call supported_btrace_packets.
2615         * target.h: include btrace-common.h.
2616         (btrace_target_info): Removed.
2617         (supports_btrace, target_supports_btrace): Update parameters.
2618
2619 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2620
2621         * Makefile.in (SFILES): Add common/btrace-common.c.
2622         (OBS): Add common/btrace-common.o.
2623         (btrace-common.o): Add build rules.
2624         * linux-low: Include btrace-common.h.
2625         (linux_low_read_btrace): Use struct btrace_data.  Call
2626         btrace_data_init and btrace_data_fini.
2627
2628 2015-02-06  Pedro Alves  <palves@redhat.com>
2629
2630         * thread-db.c (find_new_threads_callback): Add debug output.
2631
2632 2015-02-04  Pedro Alves  <palves@redhat.com>
2633
2634         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2635         (resume_stopped_resumed_lwps): New function.
2636         (linux_wait_for_event_filtered): Use it.
2637
2638 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2639
2640         * Makefile.in (SFILES): Add linux-personality.c.
2641         (linux-personality.o): New rule.
2642         * configure.srv (srv_linux_obj): Add linux-personality.o to the
2643         list of objects to be built.
2644         * linux-low.c: Include nat/linux-personality.h.
2645         (linux_create_inferior): Remove code to disable address space
2646         randomization (moved to ../nat/linux-personality.c).  Create
2647         cleanup to disable address space randomization.
2648
2649 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2650
2651         * Makefile.in (posix-strerror.o): New rule.
2652         (mingw-strerror.o): Likewise.
2653         * configure: Regenerated.
2654         * configure.ac: Source file ../common/common.host.  Initialize new
2655         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
2656
2657 2015-01-14  Yao Qi  <yao@codesourcery.com>
2658
2659         * Makefile.in (SFILES): Add nat/ppc-linux.c.
2660         (ppc-linux.o): New rule.
2661         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2662         * configure.ac: AC_CHECK_FUNCS(getauxval).
2663         * config.in: Re-generated.
2664         * configure: Re-generated.
2665         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2666         ppc64_64bit_inferior_p
2667
2668 2015-01-14  Yao Qi  <yao@codesourcery.com>
2669
2670         * linux-ppc-low.c: Include "nat/ppc-linux.h".
2671          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2672         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
2673         (PT_ORIG_R3, PT_TRAP): Likewise.
2674         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2675         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2676         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2677
2678 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
2679
2680         * i387-fp.c (i387_cache_to_xsave): In look over
2681         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2682         zmmh_low_space field by use of zmmh_high_space.
2683
2684 2015-01-09  Pedro Alves  <palves@redhat.com>
2685
2686         * linux-low.c (step_over_bkpt): Move higher up in the file.
2687         (handle_extended_wait): Don't store the stop_pc here.
2688         (get_stop_pc): Adjust comments and rename to ...
2689         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
2690         stopped for a software breakpoint or hardware breakpoint.
2691         (thread_still_has_status_pending_p): New function.
2692         (status_pending_p_callback): Use
2693         thread_still_has_status_pending_p.  If the event is no longer
2694         interesting, resume the LWP.
2695         (handle_tracepoints): Add assert.
2696         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2697         (wstatus_maybe_breakpoint): New function.
2698         (cancel_breakpoint): Delete function.
2699         (check_stopped_by_watchpoint): New function, factored out from
2700         linux_low_filter_event.
2701         (lp_status_maybe_breakpoint): Delete function.
2702         (linux_low_filter_event): Remove filter_ptid argument.
2703         Leave thread group exits pending here.  Store the LWP's stop PC.
2704         Always leave events pending.
2705         (linux_wait_for_event_filtered): Pull all events out of the
2706         kernel, and leave them all pending.
2707         (count_events_callback, select_event_lwp_callback): Consider all
2708         events.
2709         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2710         (select_event_lwp): Only give preference to the stepping LWP in
2711         all-stop mode.  Adjust comments.
2712         (ignore_event): New function.
2713         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
2714         references to cancel_breakpoints.  Adjust to renames.  Also give
2715         equal priority to all LWPs that have had events in non-stop mode.
2716         If reporting a software breakpoint event, unadjust the LWP's PC.
2717         (linux_wait): If linux_wait_1 returned an ignored event, retry.
2718         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2719         Adjust.
2720         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
2721         (resume_status_pending_p): Use thread_still_has_status_pending_p.
2722         (linux_stopped_by_watchpoint): Adjust.
2723         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2724         * linux-low.h (enum lwp_stop_reason): New.
2725         (struct lwp_info) <stop_pc>: Adjust comment.
2726         <stopped_by_watchpoint>: Delete field.
2727         <stop_reason>: New field.
2728         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2729         * mem-break.c (software_breakpoint_inserted_here)
2730         (hardware_breakpoint_inserted_here): New function.
2731         * mem-break.h (software_breakpoint_inserted_here)
2732         (hardware_breakpoint_inserted_here): Declare.
2733         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2734         (cancel_breakpoints): Delete.
2735         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2736         (upload_fast_traceframes): Remove references to
2737         cancel_breakpoints.
2738
2739 2015-01-09  Pedro Alves  <palves@redhat.com>
2740
2741         * thread-db.c (find_new_threads_callback): Ignore thread if the
2742         kernel thread ID is -1.
2743
2744 2015-01-09  Pedro Alves  <palves@redhat.com>
2745
2746         * linux-low.c (linux_attach_fail_reason_string): Move to
2747         nat/linux-ptrace.c, and rename.
2748         (linux_attach_lwp): Update comment.
2749         (attach_proc_task_lwp_callback): New function.
2750         (linux_attach): Adjust to rename and use
2751         linux_proc_attach_tgid_threads.
2752         (linux_attach_fail_reason_string): Delete declaration.
2753
2754 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
2755
2756         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2757         * server.c (gdbserver_version): Likewise.
2758
2759 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2760
2761         * remote-utils.c: Include ctype.h.
2762         (input_interrupt): Explicitly handle the case when the char
2763         received is the NUL byte.  Improve the printing of non-ASCII
2764         characters.
2765
2766 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
2767
2768         * linux-low.c (linux_low_filter_event): Update call to
2769         linux_enable_event_reporting following the addition of
2770         a new parameter to that function.
2771
2772 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
2773
2774         PR server/17457
2775         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2776         (AARCH64_FPCR_REGNO): Likewise.
2777         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2778         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2779         (aarch64_store_fpregset): Likewise.
2780
2781 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
2782
2783         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2784         Remove FIXME comment about assumption about N.
2785
2786 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
2787
2788         * configure.ac: If large-file support is disabled in GDBserver,
2789         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2790         * configure: Regenerate.
2791
2792 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2793
2794         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2795         warning upon ENODATA from ptrace.
2796         * linux-s390-low.c (s390_store_tdb): New.
2797         (s390_regsets): Add regset for NT_S390_TDB.
2798
2799 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2800
2801         * linux-low.c (regsets_store_inferior_registers): Skip regsets
2802         without a fill_function.
2803         * linux-s390-low.c (s390_fill_last_break): Remove.
2804         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2805         (s390_arch_setup): Use regset's size instead of fill_function for
2806         loop end condition.
2807
2808 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2809
2810         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2811         the regset's store function when ptrace returned an error.
2812         * regcache.c (get_thread_regcache): Invalidate register cache
2813         before fetching inferior's registers.
2814
2815 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2816
2817         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2818         while-loop as for-loop.
2819         (regsets_store_inferior_registers): Likewise.
2820
2821 2014-11-28  Yao Qi  <yao@codesourcery.com>
2822
2823         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2824         * config.in, configure: Re-generate.
2825         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2826         is defined.
2827
2828 2014-11-21  Yao Qi  <yao@codesourcery.com>
2829
2830         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2831         (AC_CHECK_HEADERS): Remove malloc.h.
2832         * configure: Re-generated.
2833         * config.in: Re-generated.
2834         * server.h: Don't include alloca.h and malloc.h.
2835         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2836         Don't include malloc.h.
2837
2838 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
2839
2840         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2841         corresponding ERRNO check in same block.
2842
2843 2014-11-12  Pedro Alves  <palves@redhat.com>
2844
2845         * server.c (cont_thread): Update comment.
2846         (start_inferior, attach_inferior): No longer clear cont_thread.
2847         (handle_v_cont): No longer set cont_thread.
2848         (captured_main): Clear cont_thread each time a GDB connects.
2849
2850 2014-11-12  Pedro Alves  <palves@redhat.com>
2851
2852         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2853         thread, and don't resume all threads if the Hc thread has exited.
2854
2855 2014-11-12  Pedro Alves  <palves@redhat.com>
2856
2857         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2858         the process group instead of to a specific LWP.
2859
2860 2014-10-15  Pedro Alves  <palves@redhat.com>
2861
2862         PR server/17487
2863         * win32-arm-low.c (arm_set_thread_context): Remove current_event
2864         parameter.
2865         (arm_set_thread_context): Delete.
2866         (the_low_target): Adjust.
2867         * win32-i386-low.c (debug_registers_changed)
2868         (debug_registers_used): Delete.
2869         (update_debug_registers_callback): New function.
2870         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2871         needing to update their debug registers.
2872         (win32_get_current_dr): New function.
2873         (x86_dr_low_get_addr, x86_dr_low_get_control)
2874         (x86_dr_low_get_status): Fetch the debug register from the thread
2875         record's context.
2876         (i386_initial_stuff): Adjust.
2877         (i386_get_thread_context): Remove current_event parameter.  Don't
2878         clear debug_registers_changed nor copy DR values to
2879         debug_reg_state.
2880         (i386_set_thread_context): Delete.
2881         (i386_prepare_to_resume): New function.
2882         (i386_thread_added): Mark the thread as needing to update irs
2883         debug registers.
2884         (the_low_target): Remove i386_set_thread_context and install
2885         i386_prepare_to_resume.
2886         * win32-low.c (win32_get_thread_context): Adjust.
2887         (win32_set_thread_context): Use SetThreadContext
2888         directly.
2889         (win32_prepare_to_resume): New function.
2890         (win32_require_context): New function, factored out from ...
2891         (thread_rec): ... this.
2892         (continue_one_thread): Call win32_prepare_to_resume on each thread
2893         we're about to continue.
2894         (win32_resume): Call win32_prepare_to_resume on the event thread.
2895         * win32-low.h (struct win32_thread_info)
2896         <debug_registers_changed>: New field.
2897         (struct win32_target_ops): Change prototype of set_thread_context,
2898         delete set_thread_context and add prepare_to_resume.
2899         (win32_require_context): New declaration.
2900
2901 2014-10-08  Gary Benson  <gbenson@redhat.com>
2902
2903         * server.h: Do not include common-exceptions.h.
2904
2905 2014-10-08  Gary Benson  <gbenson@redhat.com>
2906
2907         * server.h: Do not include cleanups.h.
2908
2909 2014-09-30  James Hogan  <james.hogan@imgtec.com>
2910
2911         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2912         mips64-dsp-linux.c.
2913
2914 2014-09-23  Yao Qi  <yao@codesourcery.com>
2915
2916         * linux-low.c (lp_status_maybe_breakpoint): New function.
2917         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2918         (count_events_callback): Likewise.
2919         (select_event_lwp_callback): Likewise.
2920         (cancel_breakpoints_callback): Likewise.
2921
2922 2014-09-19  Don Breazeal  <donb@codesourcery.com>
2923
2924         * linux-low.c (handle_extended_wait): Call
2925         linux_ptrace_get_extended_event.
2926         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2927         linux_is_extended_waitstatus.
2928
2929 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
2930
2931         * Makefile.in (CPPFLAGS): Define.
2932         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2933         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2934
2935 2014-09-16  Gary Benson  <gbenson@redhat.com>
2936
2937         * inferiors.h (current_inferior): Renamed as...
2938         (current_thread): New variable.  All uses updated.
2939         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2940         (maybe_move_out_of_jump_pad): Likewise.
2941         (cancel_breakpoint): Likewise.
2942         (linux_low_filter_event): Likewise.
2943         (wait_for_sigstop): Likewise.
2944         (linux_resume_one_lwp): Likewise.
2945         (need_step_over_p): Likewise.
2946         (start_step_over): Likewise.
2947         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2948         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2949         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2950         and save_inferior as saved_thread.
2951         * regcache.c (get_thread_regcache): Renamed saved_inferior as
2952         saved_thread.
2953         (regcache_invalidate_thread): Likewise.
2954         * remote-utils.c (prepare_resume_reply): Likewise.
2955         * thread-db.c (thread_db_get_tls_address): Likewise.
2956         (disable_thread_event_reporting): Likewise.
2957         (remove_thread_event_breakpoints): Likewise.
2958         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2959         as saved_thread.
2960         * target.h (set_desired_inferior): Renamed as...
2961         (set_desired_thread): New declaration.  All uses updated.
2962         * server.c (myresume): Updated comment to reference thread instead
2963         of inferior.
2964         (handle_serial_event): Likewise.
2965         (handle_target_event): Likewise.
2966
2967 2014-09-12  Tom Tromey  <tromey@redhat.com>
2968             Gary Benson  <gbenson@redhat.com>
2969
2970         * regcache.h: Include common-regcache.h.
2971         (regcache_read_pc): Don't declare.
2972         * regcache.c (get_thread_regcache_for_ptid): New function.
2973
2974 2014-09-11  Tom Tromey  <tromey@redhat.com>
2975             Gary Benson  <gbenson@redhat.com>
2976
2977         * symbol.c: New file.
2978         * Makefile.in (SFILES): Add symbol.c.
2979         (OBS): Add symbol.o.
2980
2981 2014-09-11  Gary Benson  <gbenson@redhat.com>
2982
2983         * target.c (target_stop_ptid, target_continue_ptid): New
2984         functions.
2985
2986 2014-09-11  Tom Tromey  <tromey@redhat.com>
2987             Gary Benson  <gbenson@redhat.com>
2988
2989         * target.h: Include target/target.h.
2990         * target.c (target_read_memory, target_read_uint32)
2991         (target_write_memory): New functions.
2992
2993 2014-09-11  Gary Benson  <gbenson@redhat.com>
2994
2995         * server.h (debug_hw_points): Don't declare.
2996         * server.c (debug_hw_points): Don't define.  Replace all uses
2997         with show_debug_regs.
2998         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
2999         all uses with show_debug_regs.
3000
3001 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3002
3003         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3004         endianness into account.
3005         (ppc_supply_ptrace_register): Likewise.
3006
3007 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3008
3009         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3010         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3011
3012 2014-09-03  Gary Benson  <gbenson@redhat.com>
3013
3014         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3015         ALL_DEBUG_ADDRESS_REGISTERS.
3016
3017 2014-09-02  Gary Benson  <gbenson@redhat.com>
3018
3019         * i386-low.h: Renamed as...
3020         * x86-low.h: New file.  All type, function and variable name
3021         prefixes changed from "i386_" to "x86_".  All references updated.
3022         * i386-low.c: Renamed as...
3023         * x86-low.c: New file.  All type, function and variable name
3024         prefixes changed from "i386_" to "x86_".  All references updated.
3025
3026 2014-09-02  Gary Benson  <gbenson@redhat.com>
3027
3028         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3029         (x86_linux_new_thread): Likewise.
3030
3031 2014-08-29  Gary Benson  <gbenson@redhat.com>
3032
3033         * server.h (setjmp.h): Do not include.
3034         (toplevel): Do not declare.
3035         (common-exceptions.h): Include.
3036         (cleanups.h): Likewise.
3037         * server.c (toplevel): Do not define.
3038         (exit_code): New static global.
3039         (detach_or_kill_for_exit_cleanup): New function.
3040         (main): New function.  Original main renamed to...
3041         (captured_main): New function.
3042         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3043
3044 2014-08-29  Gary Benson  <gbenson@redhat.com>
3045
3046         * Makefile.in (SFILES): Add common/common-exceptions.c.
3047         (OBS): Add common-exceptions.o.
3048         (common-exceptions.o): New rule.
3049         * utils.c (prepare_to_throw_exception): New function.
3050
3051 2014-08-29  Gary Benson  <gbenson@redhat.com>
3052
3053         * config.in: Regenerate.
3054         * configure: Likewise.
3055
3056 2014-08-29  Gary Benson  <gbenson@redhat.com>
3057
3058         * Makefile.in (SFILES): Add common/cleanups.c.
3059         (OBS): cleanups.o.
3060         (cleanups.o): New rule.
3061
3062 2014-08-29  Gary Benson  <gbenson@redhat.com>
3063
3064         * utils.c (internal_vwarning): New function.
3065
3066 2014-08-28  Gary Benson  <gbenson@redhat.com>
3067
3068         * utils.h (fatal): Remove declaration.
3069         * utils.c (fatal): Remove function.
3070
3071 2014-08-28  Gary Benson  <gbenson@redhat.com>
3072
3073         * tracepoint.c (gdb_agent_init): Replace fatal with
3074         perror_with_name.
3075         (initialize_tracepoint): Likewise.
3076
3077 2014-08-28  Gary Benson  <gbenson@redhat.com>
3078
3079         * remote-utils.c (remote_prepare): Replace fatal with error.
3080
3081 2014-08-28  Gary Benson  <gbenson@redhat.com>
3082
3083         * linux-low.c (linux_async): Replace fatal with warning.
3084         Tidy up and return.
3085         (linux_start_non_stop): Return -1 if linux_async failed.
3086
3087 2014-08-28  Gary Benson  <gbenson@redhat.com>
3088
3089         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3090         gdb_assert.
3091         (i386_dr_low_get_addr): Remove vague comment.
3092         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3093         gdb_assert.
3094
3095 2014-08-28  Gary Benson  <gbenson@redhat.com>
3096
3097         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3098         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3099         internal_error.
3100         (linux_resume_one_lwp): Likewise.
3101         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3102         gdb_assert.
3103         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3104         with internal_error.
3105         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3106         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3107         (find_register_by_name): Replace fatal with internal_error.
3108         (find_regno): Likewise.
3109         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3110         * thread-db.c (thread_db_create_event): Likewise.
3111         (thread_db_load_search): Likewise.
3112         (try_thread_db_load_1): Likewise.
3113         * tracepoint.c (get_jump_space_head): Replace fatal with
3114         internal_error.
3115         (claim_trampoline_space): Likewise.
3116         (have_fast_tracepoint_trampoline_buffer): Likewise.
3117         (cmd_qtstart): Likewise.
3118         (stop_tracing): Likewise.
3119         (fast_tracepoint_collecting): Likewise.
3120         (target_malloc): Likewise.
3121         (download_tracepoint): Likewise.
3122         (download_trace_state_variables): Replace check with gdb_assert.
3123         (upload_fast_traceframes): Replace fatal with internal_error.
3124
3125 2014-08-19  Tom Tromey  <tromey@redhat.com>
3126             Gary Benson  <gbenson@redhat.com>
3127
3128         * Makefile.in (SFILES): Add common/common-debug.c.
3129         (OBS): Add common-debug.o.
3130         (common-debug.o): New rule.
3131         * debug.h (debug_printf): Don't declare.
3132         * debug.c (debug_printf): Renamed and rewritten as...
3133         (debug_vprintf): New function.
3134
3135 2014-08-19  Gary Benson  <gbenson@redhat.com>
3136
3137         * utils.h: Do not include print-utils.h.
3138
3139 2014-08-19  Tom Tromey  <tromey@redhat.com>
3140             Gary Benson  <gbenson@redhat.com>
3141
3142         * server.h: Add static assertion.
3143         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3144
3145 2014-08-19  Tom Tromey  <tromey@redhat.com>
3146             Gary Benson  <gbenson@redhat.com>
3147
3148         * Makefile.in (SFILES): Add common/errors.c.
3149         (OBS): Add errors.o.
3150         (IPA_OBS): Add errors-ipa.o.
3151         (errors.o): New rule.
3152         (errors-ipa.o): Likewise.
3153         * utils.h (perror_with_name, error, warning): Don't declare.
3154         * utils.c (warning): Renamed and rewritten as...
3155         (vwarning): New function.
3156         (error): Renamed and rewritten as...
3157         (verror): New function.
3158         (internal_error): Renamed and rewritten as...
3159         (internal_verror): New function.
3160
3161 2014-08-07  Gary Benson  <gbenson@redhat.com>
3162
3163         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3164         * configure: Regenerate.
3165         * config.in: Likewise.
3166         * server.h: Do not include errno.h.
3167         * event-loop.c: Likewise.
3168         * hostio-errno.c: Likewise.
3169         * linux-low.c: Likewise.
3170         * remote-utils.c: Likewise.
3171         * spu-low.c: Likewise.
3172         * utils.c: Likewise.
3173         * gdbreplay.c: Unconditionally include errno.h.
3174
3175 2014-08-07  Gary Benson  <gbenson@redhat.com>
3176
3177         * server.h: Do not include string.h.
3178         * event-loop.c: Likewise.
3179         * linux-low.c: Likewise.
3180         * regcache.c: Likewise.
3181         * remote-utils.c: Likewise.
3182         * spu-low.c: Likewise.
3183         * utils.c: Likewise.
3184
3185 2014-08-07  Gary Benson  <gbenson@redhat.com>
3186
3187         * server.h: Do not include gdb_assert.h.
3188
3189 2014-08-07  Gary Benson  <gbenson@redhat.com>
3190
3191         * server.h: Do not include common-utils.h.
3192
3193 2014-08-07  Gary Benson  <gbenson@redhat.com>
3194
3195         * server.h: Do not include ptid.h.
3196         * notif.h: Likewise.
3197
3198 2014-08-07  Gary Benson  <gbenson@redhat.com>
3199
3200         * server.h: Do not include gdb_locale.h.
3201
3202 2014-08-07  Gary Benson  <gbenson@redhat.com>
3203
3204         * server.h: Do not include gdb/signals.h.
3205         * win32-low.c: Likewise.
3206
3207 2014-08-07  Gary Benson  <gbenson@redhat.com>
3208
3209         * server.h: Do not include pathmax.h.
3210
3211 2014-08-07  Gary Benson  <gbenson@redhat.com>
3212
3213         * server.h: Do not include libiberty.h.
3214         * linux-bfin-low.c: Likewise.
3215
3216 2014-08-07  Gary Benson  <gbenson@redhat.com>
3217
3218         * server.h: Do not include ansidecl.h.
3219
3220 2014-08-07  Gary Benson  <gbenson@redhat.com>
3221
3222         * linux-x86-low.c: Do not include stddef.h.
3223         * lynx-ppc-low.c: Likewise.
3224         * tracepoint.c: Likewise.
3225
3226 2014-08-07  Gary Benson  <gbenson@redhat.com>
3227
3228         * server.h: Do not include stdarg.h.
3229         * nto-low.c: Likewise.
3230
3231 2014-08-07  Gary Benson  <gbenson@redhat.com>
3232
3233         * server.h: Do not include stdlib.h.
3234         * inferiors.c: Likewise.
3235         * linux-low.c: Likewise.
3236         * regcache.c: Likewise.
3237         * spu-low.c: Likewise.
3238         * tracepoint.c: Likewise.
3239         * utils.c: Likewise.
3240
3241 2014-08-07  Gary Benson  <gbenson@redhat.com>
3242
3243         * server.h: Do not include stdio.h.
3244         * linux-low.c: Likewise.
3245         * remote-utils.c: Likewise.
3246         * spu-low.c: Likewise.
3247         * utils.c: Likewise.
3248         * wincecompat.c: Likewise.
3249
3250 2014-08-06  Gary Benson  <gbenson@redhat.com>
3251
3252         * regcache.c (init_register_cache): Move conditionals inside if.
3253
3254 2014-08-06  Gary Benson  <gbenson@redhat.com>
3255
3256         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3257
3258 2014-07-31  Gary Benson  <gbenson@redhat.com>
3259
3260         * ax.h: Do not include server.h.
3261         * gdbthread.h: Likewise.
3262         * lynx-low.h: Likewise.
3263         * notif.h: Likewise.
3264
3265 2014-07-30  Gary Benson  <gbenson@redhat.com>
3266
3267         * server.h: Include common-defs.h.
3268         Do not include config.h or build-gnulib-gdbserver/config.h.
3269
3270 2014-07-30  Gary Benson  <gbenson@redhat.com>
3271
3272         * hostio-errno.c: Move server.h to top of includes list.
3273         * inferiors.c: Likewise.
3274         * linux-x86-low.c: Likewise.
3275         * notif.c: Include server.h.
3276
3277 2014-07-24  Tom Tromey  <tromey@redhat.com>
3278             Gary Benson  <gbenson@redhat.com>
3279
3280         * server.h (CORE_ADDR): Now unsigned.
3281
3282 2014-07-16  Pedro Alves  <palves@redhat.com>
3283
3284         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3285
3286 2014-07-15  Pedro Alves  <palves@redhat.com>
3287
3288         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3289         copy.
3290
3291 2014-07-11  Pedro Alves  <palves@redhat.com>
3292
3293         * linux-low.c (kill_wait_lwp): New function, based on
3294         kill_one_lwp_callback, but use my_waitpid directly.
3295         (kill_one_lwp_callback, linux_kill): Use it.
3296
3297 2014-06-23  Pedro Alves  <palves@redhat.com>
3298
3299         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3300         before setting DR0..DR3.
3301
3302 2014-06-20  Gary Benson  <gbenson@redhat.com>
3303
3304         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3305         * configure: Regenerated.
3306         * config.in: Likewise.
3307
3308 2014-06-20  Gary Benson  <gbenson@redhat.com>
3309
3310         * Makefile.in (SFILES): Update locations for files moved
3311         from common to nat.
3312         (object file files): Reordered.
3313
3314 2014-06-20  Gary Benson  <gbenson@redhat.com>
3315
3316         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3317         (i386_dr_low_set_addr): Likewise.
3318         (i386_dr_low_get_addr): Likewise.
3319         (i386_dr_low_can_set_control): Likewise.
3320         (i386_dr_low_set_control): Likewise.
3321         (i386_dr_low_get_control): Likewise.
3322         (i386_dr_low_get_status): Likewise.
3323         (i386_get_debug_register_length): Likewise.
3324         * linux-x86-low.c (i386_dr_low_set_addr):
3325         Changed signature.  Made static.
3326         (i386_dr_low_get_addr): Likewise.
3327         (i386_dr_low_set_control): Likewise.
3328         (i386_dr_low_get_control): Likewise.
3329         (i386_dr_low_get_status): Likewise.
3330         (i386_dr_low): New global variable.
3331         * win32-i386-low.c (i386_dr_low_set_addr):
3332         Changed signature.  Made static.
3333         (i386_dr_low_get_addr): Likewise.
3334         (i386_dr_low_set_control): Likewise.
3335         (i386_dr_low_get_control): Likewise.
3336         (i386_dr_low_get_status): Likewise.
3337         (i386_dr_low): New global variable.
3338
3339 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3340
3341         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3342         * Makefile.in (AR, AR_FLAGS): Define.
3343         * configure: Regenerate.
3344
3345 2014-06-19  Gary Benson  <gbenson@redhat.com>
3346
3347         * Makefile.in (i386-dregs.o): New rule.
3348         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3349         * i386-low.c (target.h): Remove include.
3350         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3351         (DR_CONTROL_SHIFT): Likewise.
3352         (DR_CONTROL_SIZE): Likewise.
3353         (DR_RW_EXECUTE): Likewise.
3354         (DR_RW_WRITE): Likewise.
3355         (DR_RW_READ): Likewise.
3356         (DR_RW_IORW): Likewise.
3357         (DR_LEN_1): Likewise.
3358         (DR_LEN_2): Likewise.
3359         (DR_LEN_4): Likewise.
3360         (DR_LEN_8): Likewise.
3361         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3362         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3363         (DR_ENABLE_SIZE): Likewise.
3364         (DR_LOCAL_SLOWDOWN): Likewise.
3365         (DR_GLOBAL_SLOWDOWN): Likewise.
3366         (DR_CONTROL_RESERVED): Likewise.
3367         (I386_DR_CONTROL_MASK): Likewise.
3368         (I386_DR_VACANT): Likewise.
3369         (I386_DR_LOCAL_ENABLE): Likewise.
3370         (I386_DR_GLOBAL_ENABLE): Likewise.
3371         (I386_DR_DISABLE): Likewise.
3372         (I386_DR_SET_RW_LEN): Likewise.
3373         (I386_DR_GET_RW_LEN): Likewise.
3374         (I386_DR_WATCH_HIT): Likewise.
3375         (i386_wp_op_t): Likewise.
3376         (i386_show_dr): Likewise.
3377         (i386_length_and_rw_bits): Likewise.
3378         (i386_insert_aligned_watchpoint): Likewise.
3379         (i386_remove_aligned_watchpoint): Likewise.
3380         (i386_handle_nonaligned_watchpoint): Likewise.
3381         i386_update_inferior_debug_regs(): Likewise.
3382         (i386_dr_insert_watchpoint): Likewise.
3383         (i386_dr_remove_watchpoint): Likewise.
3384         (i386_dr_region_ok_for_watchpoint): Likewise.
3385         (i386_dr_stopped_data_address): Likewise.
3386         (i386_dr_stopped_by_watchpoint): Likewise.
3387
3388 2014-06-19  Gary Benson  <gbenson@redhat.com>
3389
3390         * i386-low.c (i386_dr_show): Renamed to
3391         i386_show_dr and made static.  All uses updated.
3392         (i386_dr_length_and_rw_bits): Renamed to
3393         i386_length_and_rw_bits and made static.
3394         All uses updated.
3395         (i386_dr_insert_aligned_watchpoint): Renamed to
3396         i386_insert_aligned_watchpoint and made static.
3397         All uses updated.
3398         (i386_dr_remove_aligned_watchpoint): Renamed to
3399         i386_remove_aligned_watchpoint and made static.
3400         All uses updated.
3401         (i386_dr_update_inferior_debug_regs): Renamed to
3402         i386_update_inferior_debug_regs and made static.
3403         All uses updated.
3404
3405 2014-06-18  Gary Benson  <gbenson@redhat.com>
3406
3407         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3408         (i386_dr_low_can_set_control): Likewise.
3409         (i386_get_debug_register_length): Likewise.
3410         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3411         (i386_dr_low_can_set_control): Likewise.
3412         (i386_get_debug_register_length): Likewise.
3413
3414 2014-06-17  Gary Benson  <gbenson@redhat.com>
3415
3416         * i386-low.h (i386-dregs.h): New include.
3417         (DR_FIRSTADDR): Now in i386-dregs.h.
3418         (DR_LASTADDR): Likewise.
3419         (DR_NADDR): Likewise.
3420         (DR_STATUS): Likewise.
3421         (DR_CONTROL): Likewise.
3422         (i386_debug_reg_state): Likewise.
3423         (i386_dr_insert_watchpoint): Likewise.
3424         (i386_dr_remove_watchpoint): Likewise.
3425         (i386_dr_region_ok_for_watchpoint): Likewise.
3426         (i386_dr_stopped_data_address): Likewise.
3427         (i386_dr_stopped_by_watchpoint): Likewise.
3428         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3429
3430 2014-06-18  Gary Benson  <gbenson@redhat.com>
3431
3432         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3433         i386_dr_insert_watchpoint.
3434         (i386_low_remove_watchpoint): Renamed to
3435         i386_dr_remove_watchpoint.
3436         (i386_low_region_ok_for_watchpoint): Renamed to
3437         i386_dr_region_ok_for_watchpoint.
3438         (i386_low_stopped_data_address): Renamed to
3439         i386_dr_stopped_data_address.
3440         (i386_low_stopped_by_watchpoint): Renamed to
3441         i386_dr_stopped_by_watchpoint.
3442         * i386-low.c (i386_show_dr): Renamed to
3443         i386_dr_show and made nonstatic.  All uses updated.
3444         (i386_length_and_rw_bits): Renamed to
3445         i386_dr_length_and_rw_bits and made nonstatic.
3446         All uses updated.
3447         (i386_insert_aligned_watchpoint): Renamed to
3448         i386_dr_insert_aligned_watchpoint and made nonstatic.
3449         All uses updated.
3450         (i386_remove_aligned_watchpoint): Renamed to
3451         i386_dr_remove_aligned_watchpoint and made nonstatic.
3452         All uses updated.
3453         (i386_update_inferior_debug_regs): Renamed to
3454         i386_dr_update_inferior_debug_regs and made nonstatic.
3455         All uses updated.
3456         (i386_low_insert_watchpoint): Renamed to
3457         i386_dr_insert_watchpoint.  All uses updated.
3458         (i386_low_remove_watchpoint): Renamed to
3459         i386_dr_remove_watchpoint.  All uses updated.
3460         (i386_low_region_ok_for_watchpoint): Renamed to
3461         i386_dr_region_ok_for_watchpoint.  All uses updated.
3462         (i386_low_stopped_data_address): Renamed to
3463         i386_dr_stopped_data_address.  All uses updated.
3464         (i386_low_stopped_by_watchpoint): Renamed to
3465         i386_dr_stopped_by_watchpoint.  All uses updated.
3466
3467 2014-06-18  Gary Benson  <gbenson@redhat.com>
3468
3469         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3470         (i386_dr_low_can_set_control): Likewise.
3471         (i386_insert_aligned_watchpoint): New check.
3472
3473 2014-06-18  Gary Benson  <gbenson@redhat.com>
3474
3475         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3476         Renamed to state.
3477
3478 2014-06-18  Gary Benson  <gbenson@redhat.com>
3479
3480         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3481         instead of fatal and error.
3482         (i386_handle_nonaligned_watchpoint): Likewise.
3483
3484 2014-06-18  Gary Benson  <gbenson@redhat.com>
3485
3486         * i386-low.c (i386_get_debug_register_length): New macro.
3487         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3488         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3489         phex to format values.
3490
3491 2014-06-18  Gary Benson  <gbenson@redhat.com>
3492
3493         * i386-low.h: Comment changes.
3494         * i386-low.c: Likewise.
3495
3496 2014-06-18  Gary Benson  <gbenson@redhat.com>
3497
3498         * i386-low.c: Whitespace changes.
3499
3500 2014-06-12  Tom Tromey  <tromey@redhat.com>
3501
3502         * utils.c (freeargv): Remove.
3503
3504 2014-06-12  Tom Tromey  <tromey@redhat.com>
3505
3506         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3507         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3508         (parse_debug_format_options): Likewise.
3509         (gdbserver_usage): Likewise.
3510         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3511         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3512         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3513         against libiberty.
3514         ($(LIBGNU)): Depend on libiberty.
3515         (all-lib): Recurse into all subdirs.
3516         (install-only): Invoke "install" target in subdirs.
3517         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3518         targets.
3519         * configure: Rebuild.
3520         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3521         for vasprintf, vsnprintf, or gettimeofday.
3522         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3523         srv_tgtobj.
3524
3525 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3526
3527         * development.sh: Delete.
3528         * Makefile.in (config.status): Adjust dependency on development.sh.
3529         * configure.ac: Adjust development.sh source call.
3530         * configure: Regenerate.
3531
3532 2014-06-02  Pedro Alves  <palves@redhat.com>
3533
3534         * ax.c (gdb_free_agent_expr): New function.
3535         * ax.h (gdb_free_agent_expr): New declaration.
3536         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3537         list.
3538         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3539         static.
3540         (clear_breakpoint_conditions_and_commands): New function.
3541         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3542         (clear_breakpoint_conditions_and_commands): New declaration.
3543
3544 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3545
3546         * linux-aarch64-low.c (asm/ptrace.h): Include.
3547
3548 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3549
3550         Fix TLS access for -static -pthread.
3551         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3552         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3553         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3554
3555 2014-05-20  Pedro Alves  <palves@redhat.com>
3556
3557         * linux-aarch64-low.c (aarch64_insert_point)
3558         (aarch64_remove_point): No longer check whether the type is
3559         supported here.  Adjust to new interface.
3560         (the_low_target): Install aarch64_supports_z_point_type as
3561         supports_z_point_type method.
3562         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3563         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3564         instead of a Z packet char.  Adjust.
3565         (arm_supports_z_point_type): New function.
3566         (arm_insert_point, arm_remove_point): Adjust to new interface.
3567         (the_low_target): Install arm_supports_z_point_type.
3568         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3569         (cris_insert_point, cris_remove_point): Adjust to new interface.
3570         Don't check whether the type is supported here.
3571         (the_low_target): Install cris_supports_z_point_type.
3572         * linux-low.c (linux_supports_z_point_type): New function.
3573         (linux_insert_point, linux_remove_point): Adjust to new interface.
3574         * linux-low.h (struct linux_target_ops) <insert_point,
3575         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3576         raw_breakpoint pointer parameter.
3577         <supports_z_point_type>: New method.
3578         * linux-mips-low.c (mips_supports_z_point_type): New function.
3579         (mips_insert_point, mips_remove_point): Adjust to new interface.
3580         Use mips_supports_z_point_type.
3581         (the_low_target): Install mips_supports_z_point_type.
3582         * linux-ppc-low.c (the_low_target): Install NULL as
3583         supports_z_point_type method.
3584         * linux-s390-low.c (the_low_target): Install NULL as
3585         supports_z_point_type method.
3586         * linux-sparc-low.c (the_low_target): Install NULL as
3587         supports_z_point_type method.
3588         * linux-x86-low.c (x86_supports_z_point_type): New function.
3589         (x86_insert_point): Adjust to new insert_point interface.  Use
3590         insert_memory_breakpoint.  Adjust to new
3591         i386_low_insert_watchpoint interface.
3592         (x86_remove_point): Adjust to remove_point interface.  Use
3593         remove_memory_breakpoint.  Adjust to new
3594         i386_low_remove_watchpoint interface.
3595         (the_low_target): Install x86_supports_z_point_type.
3596         * lynx-low.c (lynx_target_ops): Install NULL as
3597         supports_z_point_type callback.
3598         * nto-low.c (nto_supports_z_point_type): New.
3599         (nto_insert_point, nto_remove_point): Adjust to new interface.
3600         (nto_target_ops): Install nto_supports_z_point_type.
3601         * mem-break.c: Adjust intro comment.
3602         (struct raw_breakpoint) <raw_type, size>: New fields.
3603         <inserted>: Update comment.
3604         <shlib_disabled>: Delete field.
3605         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3606         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3607         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3608         (raw_bkpt_type_to_target_hw_bp_type): New function.
3609         (find_enabled_raw_code_breakpoint_at): New function.
3610         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3611         (insert_memory_breakpoint): New function, based off
3612         set_raw_breakpoint_at.
3613         (remove_memory_breakpoint): New function.
3614         (set_raw_breakpoint_at): Reimplement.
3615         (set_breakpoint): New, based on set_breakpoint_at.
3616         (set_breakpoint_at): Reimplement.
3617         (delete_raw_breakpoint): Go through the_target->remove_point
3618         instead of assuming memory breakpoints.
3619         (find_gdb_breakpoint_at): Delete.
3620         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3621         (find_gdb_breakpoint): New function.
3622         (set_gdb_breakpoint_at): Delete.
3623         (z_type_supported): New function.
3624         (set_gdb_breakpoint_1): New function, loosely based off
3625         set_gdb_breakpoint_at.
3626         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3627         (delete_gdb_breakpoint_at): Delete.
3628         (delete_gdb_breakpoint_1): New function, loosely based off
3629         delete_gdb_breakpoint_at.
3630         (delete_gdb_breakpoint): New function.
3631         (clear_gdb_breakpoint_conditions): Rename to ...
3632         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
3633         breakpoint.
3634         (add_condition_to_breakpoint): Make static.
3635         (add_breakpoint_condition): Take a struct breakpoint pointer
3636         instead of an address.  Adjust.
3637         (gdb_condition_true_at_breakpoint): Rename to ...
3638         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3639         z_type parameter.
3640         (gdb_condition_true_at_breakpoint): Reimplement.
3641         (add_breakpoint_commands): Take a struct breakpoint pointer
3642         instead of an address.  Adjust.
3643         (gdb_no_commands_at_breakpoint): Rename to ...
3644         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
3645         parameter.  Return true if no breakpoint was found.  Change debug
3646         output.
3647         (gdb_no_commands_at_breakpoint): Reimplement.
3648         (run_breakpoint_commands): Rename to ...
3649         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
3650         and change return type to boolean.
3651         (run_breakpoint_commands): New function.
3652         (gdb_breakpoint_here): Also check for Z1 breakpoints.
3653         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3654         breakpoint.  Go through the_target->remove_point instead of
3655         assuming memory breakpoint.
3656         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3657         software and hardware breakpoints.
3658         (reinsert_raw_breakpoint): Go through the_target->insert_point
3659         instead of assuming memory breakpoint.
3660         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3661         software and hardware breakpoints.
3662         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3663         Check both software and hardware breakpoints.
3664         (validate_inserted_breakpoint): Assert the breakpoint is a
3665         software breakpoint.  Set the inserted flag to -1 instead of
3666         setting shlib_disabled.
3667         (delete_disabled_breakpoints): Adjust.
3668         (validate_breakpoints): Only validate software breakpoints.
3669         Adjust to inserted flag change.
3670         (check_mem_read, check_mem_write): Skip breakpoint types other
3671         than software breakpoints.  Adjust to inserted flag change.
3672         * mem-break.h (enum raw_bkpt_type): New enum.
3673         (raw_breakpoint, struct process_info): Forward declare.
3674         (Z_packet_to_target_hw_bp_type): Delete declaration.
3675         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3676         (set_gdb_breakpoint, delete_gdb_breakpoint)
3677         (clear_breakpoint_conditions): New declarations.
3678         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3679         (breakpoint_inserted_here): Update comment.
3680         (add_breakpoint_condition, add_breakpoint_commands): Replace
3681         address parameter with a breakpoint pointer parameter.
3682         (gdb_breakpoint_here): Update comment.
3683         (delete_gdb_breakpoint_at): Delete.
3684         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3685         * server.c (process_point_options): Take a struct breakpoint
3686         pointer instead of an address.  Adjust.
3687         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3688         delete_gdb_breakpoint.
3689         * spu-low.c (spu_target_ops): Install NULL as
3690         supports_z_point_type method.
3691         * target.h: Include mem-break.h.
3692         (struct target_ops) <prepare_to_access_memory>: Update comment.
3693         <supports_z_point_type>: New field.
3694         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3695         instead of a char.  Also take a raw breakpoint pointer.
3696         * win32-arm-low.c (the_low_target): Install NULL as
3697         supports_z_point_type.
3698         * win32-i386-low.c (i386_supports_z_point_type): New function.
3699         (i386_insert_point, i386_remove_point): Adjust to new interface.
3700         (the_low_target): Install i386_supports_z_point_type.
3701         * win32-low.c (win32_supports_z_point_type): New function.
3702         (win32_insert_point, win32_remove_point): Adjust to new interface.
3703         (win32_target_ops): Install win32_supports_z_point_type.
3704         * win32-low.h (struct win32_target_ops):
3705         <supports_z_point_type>: New method.
3706         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3707         instead of a char.  Also take a raw breakpoint pointer.
3708
3709 2014-05-20  Pedro Alves  <palves@redhat.com>
3710
3711         * mem-break.h: Include break-common.h.
3712         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3713         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3714         (Z_packet_to_target_hw_bp_type): New declaration.
3715         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3716         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3717         (Z_PACKET_ACCESS_WP): Delete macros.
3718         (Z_packet_to_hw_type): Delete function.
3719         * i386-low.h: Don't include break-common.h here.
3720         (Z_packet_to_hw_type): Delete declaration.
3721         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3722         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3723         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3724         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3725         * linux-aarch64-low.c: Don't include break-common.h here.
3726         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3727         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3728         (Z_packet_to_target_hw_bp_type): Delete function.
3729         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3730         function.
3731         (mips_insert_point, mips_remove_point): Use
3732         Z_packet_to_target_hw_bp_type.
3733
3734 2014-05-20  Pedro Alves  <palves@redhat.com>
3735
3736         * linux-aarch64-low.c: Include break-common.h.
3737         (enum target_point_type): Delete.
3738         (Z_packet_to_point_type): Rename to ...
3739         (Z_packet_to_target_hw_bp_type): ... this, and return a
3740         target_hw_bp_type instead.
3741         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3742         instead of an enum target_point_type.
3743         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
3744         breakpoint type.
3745         (aarch64_dr_state_insert_one_point)
3746         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3747         (aarch64_handle_aligned_watchpoint)
3748         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3749         Take an enum target_hw_bp_type instead of an enum
3750         target_point_type.
3751         (aarch64_supports_z_point_type): New function.
3752         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
3753         use Z_packet_to_target_hw_bp_type.
3754
3755 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
3756
3757         * configure.ac: Only use -Werror by default when DEVELOPMENT
3758         is true.
3759         * configure: Regenerate.
3760
3761 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3762
3763         Fix gdbserver qGetTLSAddr for x86_64 -m32.
3764         * linux-x86-low.c (X86_64_USER_REGS): New.
3765         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3766
3767 2014-04-28  Yao Qi  <yao@codesourcery.com>
3768
3769         * Makefile.in (i386-avx512.c): Fix the typo of generated file
3770         name.
3771
3772 2014-04-25  Pedro Alves  <palves@redhat.com>
3773
3774         PR server/16255
3775         * linux-low.c (linux_attach_fail_reason_string): New function.
3776         (linux_attach_lwp): Delete.
3777         (linux_attach_lwp_1): Rename to ...
3778         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
3779         argument.  Remove "initial" parameter.  Return int instead of
3780         void.  Don't error or warn here.
3781         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
3782         failure to attach to the tgid.  Call warning when failing to
3783         attach to an lwp.
3784         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3785         argument.  Remove "initial" parameter.  Return int instead of
3786         void.  Don't error or warn here.
3787         (linux_attach_fail_reason_string): New declaration.
3788         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3789         interface change.  Use linux_attach_fail_reason_string.
3790
3791 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
3792             Walfred Tedeschi  <walfred.tedeschi@intel.com>
3793
3794         * Makefile.in: Added rules to handle new files
3795         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3796         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3797         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3798         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3799         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3800         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3801         x32-avx512-linux.o.
3802         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3803         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3804         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3805         i386/x32-avx512.xml.
3806         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3807         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3808         i386/x32-avx512-linux.xml.
3809         * i387-fp.c (num_avx512_k_registers): New constant for number
3810         of K registers.
3811         (num_avx512_zmmh_low_registers): New constant for number of
3812         lower ZMM registers (0-15).
3813         (num_avx512_zmmh_high_registers): New constant for number of
3814         higher ZMM registers (16-31).
3815         (num_avx512_ymmh_registers): New contant for number of higher
3816         YMM registers (ymm16-31 added by avx521 on x86_64).
3817         (num_avx512_xmm_registers): New constant for number of higher
3818         XMM registers (xmm16-31 added by AVX512 on x86_64).
3819         (struct i387_xsave): Add space for AVX512 registers.
3820         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3821         Add code to handle AVX512 registers.
3822         (i387_xsave_to_cache): Add code to handle AVX512 registers.
3823         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3824         prototypei from generated file.
3825         (tdesc_amd64_avx512_linux): Likewise.
3826         (init_registers_x32_avx512_linux): Likewise.
3827         (tdesc_x32_avx512_linux): Likewise.
3828         (init_registers_i386_avx512_linux): Likewise.
3829         (tdesc_i386_avx512_linux): Likewise.
3830         (x86_64_regmap): Add AVX512 registers.
3831         (x86_linux_read_description): Add code to handle AVX512 XSTATE
3832         mask.
3833         (initialize_low_arch): Add code to initialize AVX512 registers.
3834
3835 2014-04-23  Pedro Alves  <palves@redhat.com>
3836
3837         * mem-break.c (find_gdb_breakpoint_at): Make static.
3838         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3839
3840 2014-04-23  Pedro Alves  <palves@redhat.com>
3841
3842         * i386-low.c: Don't include break-common.h here.
3843         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3844         prototype to take target_hw_bp_type as argument instead of a Z
3845         packet char.
3846         * i386-low.h: Include break-common.h here.
3847         (Z_packet_to_hw_type): Declare.
3848         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3849         prototypes.
3850         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3851         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3852         (x86_remove_point): Convert the packet number to a
3853         target_hw_bp_type before calling i386_low_remove_watchpoint.
3854         * win32-i386-low.c (i386_insert_point): Convert the packet number
3855         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3856         (i386_remove_point): Convert the packet number to a
3857         target_hw_bp_type before calling i386_low_remove_watchpoint.
3858
3859 2014-04-23  Pedro Alves  <palves@redhat.com>
3860
3861         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3862
3863 2014-04-10  Pedro Alves  <palves@redhat.com>
3864
3865         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3866         Check if the condition or command is NULL before checking if the
3867         breakpoint is known.  On success, return true.
3868         * mem-break.h (add_breakpoint_condition): Document return.
3869         (add_breakpoint_commands): Add describing comment.
3870         * server.c (skip_to_semicolon): New function.
3871         (process_point_options): Use it.
3872
3873 2014-04-09  Pedro Alves  <palves@redhat.com>
3874
3875         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3876         to lwpid_of.
3877
3878 2014-02-27  Pedro Alves  <palves@redhat.com>
3879
3880         PR 12702
3881         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3882         macros.
3883         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3884         output.
3885         (last_thread_of_process_p): Take a PID argument instead of a
3886         thread pointer.
3887         (linux_wait_for_lwp): Delete.
3888         (num_lwps, check_zombie_leaders, not_stopped_callback): New
3889         functions.
3890         (linux_low_filter_event): New function, party factored out from
3891         linux_wait_for_event.
3892         (linux_wait_for_event): Rename to ...
3893         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
3894         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
3895         sigsuspend.  Check for zombie leaders.
3896         (linux_wait_for_event): Reimplement as wrapper around
3897         linux_wait_for_event_filtered.
3898         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
3899         a normal or signal exit is seen, it's the whole process exiting.
3900         (wait_for_sigstop): No longer a for_each_inferior callback.
3901         Rewrite on top of linux_wait_for_event_filtered.
3902         (stop_all_lwps): Call wait_for_sigstop directly.
3903         * server.c (resume, handle_target_event): Handle
3904         TARGET_WAITKIND_NO_RESUMED.
3905
3906 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3907
3908         * win32-low.c (psapi_get_dll_name,
3909         * win32_CreateToolhelp32Snapshot): Delete.
3910         (win32_CreateToolhelp32Snapshot, win32_Module32First)
3911         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3912         Delete.
3913         (handle_load_dll): Add function description.
3914         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3915
3916 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3917
3918         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3919         Add comment.
3920         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3921         base address when calling win32_add_one_solib.
3922         (handle_load_dll): Delete local variable load_addr.
3923         Remove 0x1000 offset applied to DLL base address when calling
3924         win32_add_one_solib.
3925         (handle_unload_dll): Add comment.
3926
3927 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3928
3929         * win32-low.c (win32_add_all_dlls): Renames
3930         win32_ensure_ntdll_loaded.  Rewrite function documentation.
3931         Adjust implementation to always load all DLLs.
3932         Add 0x1000 offset to DLL base address when calling
3933         win32_add_one_solib.
3934         (child_initialization_done): New static global.
3935         (do_initial_child_stuff): Set child_initialization_done to
3936         zero during child initialization, and 1 after.  Replace call
3937         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3938         Add comment.
3939         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3940         (handle_unload_dll): Add function documentation.
3941         (get_child_debug_event): Ignore load and unload DLL events
3942         during child initialization.
3943
3944 2014-02-20  Doug Evans  <dje@google.com>
3945
3946         Remove global all_lwps.
3947         * inferiors.h (ptid_of): Move here from linux-low.h.
3948         (pid_of, lwpid_of): Ditto.
3949         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3950         parameter is a struct thread_info * now.
3951         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3952         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
3953         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3954         directly.
3955         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3956         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3957         * linux-arm-low.c (update_registers_callback): Update, "entry"
3958         parameter is a struct thread_info * now.
3959         Fetch lwpid from current_inferior directly.
3960         (arm_insert_point): Pass &all_threads to find_inferior instead of
3961         &all_lwps.
3962         (arm_remove_point): Ditto.
3963         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3964         (arm_prepare_to_resume): Fetch pid from thread.
3965         (arm_read_description): Fetch lwpid from current_inferior directly.
3966         * linux-low.c (all_lwps): Delete.
3967         (delete_lwp): Delete call to remove_inferior.
3968         (handle_extended_wait): Fetch lwpid from thread.
3969         (add_lwp): Don't set lwp->entry.id.  Remove call to
3970         add_inferior_to_list.
3971         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3972         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3973         (kill_one_lwp_callback): Ditto.
3974         (linux_kill): Don't dereference NULL pointer.
3975         Fetch ptid,lwpid from thread.
3976         (get_detach_signal): Fetch ptid from thread.
3977         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3978         Simplify call to regcache_invalidate_thread.
3979         (delete_lwp_callback): Update, "entry" parameter is a
3980         struct thread_info * now.  Fetch pid from thread.
3981         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3982         (status_pending_p_callback): Update, "entry" parameter is a
3983         struct thread_info * now.  Fetch ptid from thread.
3984         (find_lwp_pid): Update, "entry" parameter is a
3985         struct thread_info * now.
3986         (linux_wait_for_lwp): Fetch pid from thread.
3987         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3988         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3989         (enqueue_one_deferred_signal): Fetch lwpid from thread.
3990         (dequeue_one_deferred_signal): Ditto.
3991         (cancel_breakpoint): Fetch ptid from current_inferior.
3992         (linux_wait_for_event): Pass &all_threads to find_inferior,
3993         not &all_lwps.  Fetch ptid, lwpid from thread.
3994         (count_events_callback): Update, "entry" parameter is a
3995         struct thread_info * now.
3996         (select_singlestep_lwp_callback): Ditto.
3997         (select_event_lwp_callback): Ditto.
3998         (cancel_breakpoints_callback): Ditto.
3999         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4000         not &all_lwps.
4001         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4002         (unsuspend_one_lwp): Update, "entry" parameter is a
4003         struct thread_info * now.
4004         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4005         not &all_lwps.
4006         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4007         Fetch lwpid from thread, not lwp.
4008         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4009         Pass &all_threads to find_inferior, not &all_lwps.
4010         (send_sigstop): Fetch lwpid from thread, not lwp.
4011         (send_sigstop_callback): Update, "entry" parameter is a
4012         struct thread_info * now.
4013         (suspend_and_send_sigstop_callback): Ditto.
4014         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4015         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4016         struct thread_info * now.
4017         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4018         from thread, lwp.
4019         (lwp_running): Update, "entry" parameter is a
4020         struct thread_info * now.
4021         (stop_all_lwps): Fetch ptid from thread.
4022         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4023         (linux_resume_one_lwp): Fetch lwpid from thread.
4024         (linux_set_resume_request): Update, "entry" parameter is a
4025         struct thread_info * now.  Fetch pid, lwpid from thread.
4026         (resume_status_pending_p): Update, "entry" parameter is a
4027         struct thread_info * now.
4028         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4029         (start_step_over): Fetch lwpid from thread.
4030         (linux_resume_one_thread): Update, "entry" parameter is a
4031         struct thread_info * now.  Fetch lwpid from thread.
4032         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4033         (proceed_one_lwp): Update, "entry" parameter is a
4034         struct thread_info * now.  Fetch lwpid from thread.
4035         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4036         struct thread_info * now.
4037         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4038         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4039         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4040         directly.
4041         (regsets_store_inferior_registers): Ditto.
4042         (fetch_register, store_register): Ditto.
4043         (linux_read_memory, linux_write_memory): Ditto.
4044         (linux_request_interrupt): Ditto.
4045         (linux_read_auxv): Ditto.
4046         (linux_xfer_siginfo): Ditto.
4047         (linux_qxfer_spu): Ditto.
4048         (linux_qxfer_libraries_svr4): Ditto.
4049         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4050         moved to inferiors.h.
4051         (get_lwp): Delete.
4052         (get_thread_lwp): Update.
4053         (struct lwp_info): Delete member "entry".  Simplify comment for
4054         member "thread".
4055         (all_lwps): Delete.
4056         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4057         current_inferior directly.
4058         (update_watch_registers_callback): Update, "entry" parameter is a
4059         struct thread_info * now.  Fetch pid from thread.
4060         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4061         (mips_insert_point): Fetch lwpid from current_inferior.
4062         Pass &all_threads to find_inferior, not &all_lwps.
4063         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4064         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4065         directly.
4066         (mips_stopped_data_address): Ditto.
4067         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4068         directly.
4069         * linux-tile-low.c (tile_arch_setup): Ditto.
4070         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4071         (update_debug_registers_callback): Update, "entry" parameter is a
4072         struct thread_info * now.  Fetch pid from thread.
4073         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4074         Pass &all_threads to find_inferior, not &all_lwps.
4075         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4076         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4077         Pass &all_threads to find_inferior, not &all_lwps.
4078         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4079         (i386_dr_low_get_status): Ditto.
4080         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4081         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4082         (x86_linux_read_description): Ditto.
4083         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4084
4085 2014-02-20  Doug Evans  <dje@google.com>
4086
4087         * inferiors.c (get_first_inferior): Fix buglet.
4088
4089 2014-02-19  Doug Evans  <dje@google.com>
4090
4091         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4092         * inferiors.c (add_thread): Change result type to struct thread_info *.
4093         All callers updated.
4094         (add_lwp): Call add_thread here instead of in callers.
4095         All callers updated.
4096         * linux-low.h (get_lwp_thread): Rewrite.
4097         (struct lwp_info): New member "thread".
4098
4099 2014-02-19  Doug Evans  <dje@google.com>
4100
4101         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4102         All callers updated.
4103
4104 2014-02-19  Doug Evans  <dje@google.com>
4105
4106         * inferiors.c (add_thread): Fix whitespace.
4107
4108 2014-02-19  Doug Evans  <dje@google.com>
4109
4110         * dll.c (clear_dlls): Replace accessing list implemention details
4111         with API function.
4112         * gdbthread.h (get_first_thread): Declare.
4113         * inferiors.c (for_each_inferior_with_data): New function.
4114         (get_first_thread): New function.
4115         (find_thread_ptid): Simplify.
4116         (get_first_inferior): New function.
4117         (clear_list): Delete.
4118         (one_inferior_p): New function.
4119         (clear_inferior_list): New function.
4120         (clear_inferiors): Update.
4121         * inferiors.h (for_each_inferior_with_data): Declare.
4122         (clear_inferior_list): Declare.
4123         (one_inferior_p): Declare.
4124         (get_first_inferior): Declare.
4125         * linux-low.c (linux_wait_for_event): Replace accessing list
4126         implemention details with API function.
4127         * server.c (target_running): Ditto.
4128         (accumulate_file_name_length): New function.
4129         (emit_dll_description): New function.
4130         (handle_qxfer_libraries): Replace accessing list implemention
4131         details with API function.
4132         (handle_qxfer_threads_worker): New function.
4133         (handle_qxfer_threads_proper): Replace accessing list implemention
4134         details with API function.
4135         (handle_query): Ditto.
4136         (visit_actioned_threads_callback_ftype): New typedef.
4137         (visit_actioned_threads_data): New struct.
4138         (visit_actioned_threads): Rewrite to be find_inferior callback.
4139         (resume): Call find_inferior.
4140         (handle_status): Replace accessing list implemention
4141         details with API function.
4142         (process_serial_event): Replace accessing list implemention details
4143         with API function.
4144         * target.c (set_desired_inferior): Replace accessing list implemention
4145         details with API function.
4146         * tracepoint.c (same_process_p): New function.
4147         (gdb_agent_about_to_close): Replace accessing list implemention
4148         details with API function.
4149         * win32-low.c (child_delete_thread): Replace accessing list
4150         implemention details with API function.
4151         (match_dll_by_basename): New function.
4152         (dll_is_loaded_by_basename): New function.
4153         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4154         details call to dll_is_loaded_by_basename.
4155
4156 2014-02-19  Doug Evans  <dje@google.com>
4157
4158         * dll.h (struct dll_info): Add comment.
4159         * gdbthread.h (struct thread_info): Add comment.
4160         (current_ptid): Simplify.
4161         * inferiors.c (add_process): Update.
4162         (remove_process): Update.
4163         * inferiors.h (struct process_info): Rename member "head" to "entry".
4164         * linux-low.c (delete_lwp): Update.
4165         (add_lwp): Update.
4166         (last_thread_of_process_p): Update.
4167         (kill_one_lwp_callback, linux_kill): Update.
4168         (status_pending_p_callback): Update.
4169         (wait_for_sigstop): Update.  Simplify read of ptid.
4170         (start_step_over): Update.
4171         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4172         (get_lwp_thread): Update.
4173         (struct lwp_info): Rename member "head" to "entry".
4174         * regcache.h (inferior_list_entry): Delete.
4175         * server.c (kill_inferior_callback): Update.
4176         (detach_or_kill_inferior_callback): Update.
4177         (print_started_pid): Update.
4178         (print_attached_pid): Update.
4179         (process_serial_event): Simplify read of ptid.
4180         * thread-db.c (thread_db_create_event): Update.
4181         (thread_db_get_tls_address): Update.
4182         * win32-low.c (current_inferior_ptid): Simplify.
4183
4184 2014-02-19  Tom Tromey  <tromey@redhat.com>
4185
4186         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4187         argument.
4188         (target_supports_btrace): Update.
4189
4190 2014-02-14  Yao Qi  <yao@codesourcery.com>
4191
4192         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4193         (rsp-low-ipa.o): New target.
4194
4195 2014-02-12  Tom Tromey  <tromey@redhat.com>
4196
4197         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4198         convert_ascii_to_int.
4199         * regcache.c (registers_to_string): Likewise.
4200         * remote-utils.c (decode_M_packet): Likewise.
4201         * server.c (process_serial_event): Likewise.
4202
4203 2014-02-12  Tom Tromey  <tromey@redhat.com>
4204
4205         * server.c (handle_query, handle_v_run): Use hex2bin, not
4206         unhexify.
4207         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4208
4209 2014-02-12  Tom Tromey  <tromey@redhat.com>
4210
4211         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4212         convert_int_to_ascii.
4213         * regcache.c (registers_to_string, collect_register_as_string):
4214         Likewise.
4215         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4216         Likewise.
4217         * server.c (process_serial_event): Likewise.
4218         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4219         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4220
4221 2014-02-12  Tom Tromey  <tromey@redhat.com>
4222
4223         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4224         bin2hex, not hexify.
4225         * tracepoint.c (cmd_qtstatus): Likewise.
4226
4227 2014-02-12  Tom Tromey  <tromey@redhat.com>
4228
4229         * remote-utils.c (monitor_output): Pass explicit length to
4230         hexify.
4231
4232 2014-02-12  Tom Tromey  <tromey@redhat.com>
4233
4234         * tracepoint.c: Include rsp-low.h.
4235         * server.c: Include rsp-low.h.
4236         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4237         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4238         declare.
4239         * remote-utils.c: Include rsp-low.h.
4240         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4241         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4242         (convert_int_to_ascii, convert_ascii_to_int): Move to
4243         common/rsp-low.c.
4244         * regcache.c: Include rsp-low.h.
4245         * ax.c: Include rsp-low.h.
4246         * Makefile.in (SFILES): Add common/rsp-low.c.
4247         (OBS): Add rsp-low.o.
4248         (rsp-low.o): New target.
4249
4250 2014-02-12  Tom Tromey  <tromey@redhat.com>
4251
4252         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4253         Include print-utils.h.
4254         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4255         (plongest, thirty_two, phex_nz): Remove.
4256         * Makefile.in (SFILES): Add common/print-utils.c.
4257         (OBS): Add print-utils.o.
4258         (print-utils-ipa.o): New target.
4259         (print-utils.o): New target.
4260         (IPA_OBJS): Add print-utils-ipa.o.
4261
4262 2014-02-06  Tom Tromey  <tromey@redhat.com>
4263
4264         * Makefile.in (SFILES): Fix indentation.
4265
4266 2014-02-05  Doug Evans  <dje@google.com>
4267
4268         * linux-low.c (linux_wait_for_event): Improve comment.
4269         (linux_wait_1): Keep current_inferior in sync with event_child.
4270
4271 2014-01-22  Doug Evans  <dje@google.com>
4272
4273         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4274
4275 2014-01-22  Doug Evans  <dje@google.com>
4276
4277         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4278         * configure: Regenerate.
4279         * config.in: Regenerate.
4280         * Makefile.in (SFILES): Add debug.c.
4281         (OBS): Add debug.o.
4282         * debug.c: New file.
4283         * debug.h: New file.
4284         * linux-aarch64-low.c (*): Update all debugging printfs to use
4285         debug_printf instead of fprintf.
4286         * linux-arm-low.c (*): Ditto.
4287         * linux-cris-low.c (*): Ditto.
4288         * linux-crisv32-low.c (*): Ditto.
4289         * linux-m32r-low.c (*): Ditto.
4290         * linux-sparc-low.c (*): Ditto.
4291         * linux-x86.c (*): Ditto.
4292         * linux-low.c (*): Ditto.
4293         (linux_wait_1): Add calls to debug_enter, debug_exit.
4294         (linux_wait): Remove redundant debugging printf.
4295         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4296         (linux_resume, unstop_all_lwps): Ditto.
4297         * mem-break.c (*): Update all debugging printfs to use
4298         debug_printf instead of fprintf.
4299         * remote-utils.c (*): Ditto.
4300         * thread-db.c (*): Ditto.
4301         * server.c #include <ctype.h>, "gdb_vecs.h".
4302         (debug_threads): Moved to debug.c.
4303         (*): Update all debugging printfs to use debug_printf instead of
4304         fprintf.
4305         (start_inferior): Replace call to fflush with call to debug_flush.
4306         (monitor_show_help): Mention set debug-format.
4307         (parse_debug_format_options): New function.
4308         (handle_monitor_command): Handle "monitor set debug-format".
4309         (gdbserver_usage): Mention --debug-format.
4310         (main): Parse --debug-format.
4311         * server.h (debug_threads): Declaration moved to debug.h.
4312         #include "debug.h".
4313         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4314         trace_debug_1 that uses debug_printf.
4315         (tracepoint_look_up_symbols): Update all debugging printfs to use
4316         debug_printf instead of fprintf.
4317
4318 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4319
4320         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4321         sys/ptrace.h.
4322
4323 2014-01-17  Pedro Alves  <palves@redhat.com>
4324
4325         PR build/16445
4326         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4327         defined after including gdb_proc_service.h.
4328
4329 2014-01-16  Doug Evans  <dje@google.com>
4330
4331         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4332         (match_dll): Use it.
4333
4334 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4335
4336         * target.h (target_ops) <read_btrace>: Change parameters and
4337         return type to allow error reporting.
4338         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4339         trace reading errors on.
4340         * linux-low.c (linux_low_read_btrace): Pass trace reading
4341         errors on.
4342         (linux_low_disable_btrace): New.
4343
4344 2014-01-15  Doug Evans  <dje@google.com>
4345
4346         * inferiors.c (thread_id_to_gdb_id): Delete.
4347         * inferiors.h (thread_id_to_gdb_id): Delete.
4348
4349 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4350
4351         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4352         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4353         versions.
4354
4355 2014-01-08  Pedro Alves  <palves@redhat.com>
4356
4357         * server.c (handle_status): Don't discard previous queued stop
4358         replies or thread's pending status here.
4359         (main) <disconnection>: Do it here instead.
4360
4361 2014-01-08  Pedro Alves  <palves@redhat.com>
4362
4363         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4364         * server.c (visit_actioned_threads, handle_pending_status): New
4365         function.
4366         (handle_v_cont): Factor out parts to ...
4367         (resume): ... this new function.  If in all-stop, and a thread
4368         being resumed has a pending status, report it without actually
4369         resuming.
4370         (myresume): Adjust to use the new 'resume' function.
4371         (clear_pending_status_callback, set_pending_status_callback)
4372         (find_status_pending_thread_callback): New functions.
4373         (handle_status): Handle the case of multiple threads having
4374         interesting statuses to report.  Report threads' real last signal
4375         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4376         with an interesting thread to report the status for, instead of
4377         always reporting the status of the first thread.
4378
4379 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4380
4381         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4382         * gdbreplay.c (gdbreplay_version): Likewise.
4383
4384 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4385
4386         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4387         iov.iov_len with the real length in use.
4388
4389 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4390
4391         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4392         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4393         for all targets that use win32-low.c.
4394         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4395         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4396
4397 2013-12-13  Pedro Alves  <palves@redhat.com>
4398
4399         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4400         if equal to TARGET_WAITKIND_LOADED.
4401         * win32-low.c (cached_status): New static global.
4402         (win32_wait): Add declaration.
4403         (do_initial_child_stuff): Flush all initial pending debug events
4404         up to the initial breakpoint.
4405         (win32_wait): If CACHED_STATUS was set, return that instead
4406         of doing a real wait.  Remove the code resuming the execution
4407         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4408         during the initial phase.  Also remove the code changing
4409         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4410         TARGET_WAITKIND_STOPPED.
4411
4412 2013-12-11  Yao Qi  <yao@codesourcery.com>
4413
4414         * notif.c (handle_notif_ack): Return 0 if no notification
4415         matches.
4416
4417 2013-11-20  Doug Evans  <dje@google.com>
4418
4419         * linux-low.c (linux_set_resume_request): Fix comment.
4420
4421 2013-11-20  Doug Evans  <dje@google.com>
4422
4423         * linux-low.c (resume_status_pending_p): Tweak comment.
4424
4425 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4426
4427         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4428         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4429         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4430         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4431         (srv_amd64_regobj): Add amd64-mpx.o.
4432         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4433         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4434         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4435         * i387-fp.c (num_pl_bnd_register) Added constant.
4436         (num_pl_bnd_cfg_registers) Added constant.
4437         (struct i387_xsave) Added reserved area and MPX fields.
4438         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4439         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4440         function.
4441         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4442         (init_registers_amd64_mpx_linux): Declare new function.
4443         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4444         (x86_64_regmap): Add MPX registers.
4445         (x86_linux_read_description): Add MPX case.
4446         (initialize_low_arch): Initialize MPX targets.
4447
4448 2013-11-18  Tom Tromey  <tromey@redhat.com>
4449
4450         * configure: Rebuild.
4451         * configure.ac: Don't check for stdlib.h.
4452         * gdbreplay.c: Unconditionally include stdlib.h.
4453
4454 2013-11-18  Tom Tromey  <tromey@redhat.com>
4455
4456         * config.in: Rebuild.
4457         * configure: Rebuild.
4458         * configure.ac: Don't use AC_HEADER_DIRENT.
4459
4460 2013-11-18  Tom Tromey  <tromey@redhat.com>
4461
4462         * server.h: Don't check HAVE_STRING_H.
4463         * gdbreplay.c: Don't check HAVE_STRING_H.
4464         * configure: Rebuild.
4465
4466 2013-11-18  Tom Tromey  <tromey@redhat.com>
4467
4468         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4469         LIBGNU.
4470
4471 2013-11-08  Tom Tromey  <tromey@redhat.com>
4472
4473         * configure, config.in: Rebuild.
4474         * configure.ac: Remove unused configury.
4475
4476 2013-11-08  Tom Tromey  <tromey@redhat.com>
4477
4478         * acinclude.m4: Include common.m4, codeset.m4.
4479         * configure, config.in: Rebuild.
4480         * configure.ac: Use GDB_AC_COMMON.
4481
4482 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4483
4484         * linux-s390-low.c (HWCAP_S390_TE): New define.
4485         (s390_arch_setup): Consider the TE field in the HWCAP for
4486         determining 'have_regset_tdb'.
4487
4488 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4489
4490         PR gdb/16014
4491         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4492         call to sizeof.
4493
4494 2013-10-02  Pedro Alves  <palves@redhat.com>
4495
4496         * server.c (process_serial_event): Don't output "GDBserver
4497         exiting" if GDB is connected through stdio.
4498         * target.c (mywait): Likewise, be silent if GDB is connected
4499         through stdio.
4500
4501 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4502
4503         * lynx-low.c (lynx_add_threads_after_attach): New function.
4504         (lynx_attach): Remove call to add_thread.  Add call to
4505         lynx_add_threads_after_attach instead.
4506
4507 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4508
4509         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4510         * config.in, configure: Regenerated.
4511
4512 2013-09-18  Yao Qi  <yao@codesourcery.com>
4513
4514         PR server/15959
4515         * server.c (start_inferior): Clear 'resume_info'.
4516
4517 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4518
4519         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4520         for each register.
4521
4522 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4523
4524         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4525         linux-tile-low.o to srv_tgtobj.
4526
4527 2013-09-16  Will Newton  <will.newton@linaro.org>
4528
4529         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4530         out regs.
4531
4532 2013-09-06  Pedro Alves  <palves@redhat.com>
4533
4534         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4535         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4536         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4537         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4538         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4539         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4540
4541 2013-09-06  Pedro Alves  <palves@redhat.com>
4542
4543         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4544         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4545
4546 2013-09-06  Pedro Alves  <palves@redhat.com>
4547
4548         * linux-amd64-ipa.c: Include tracepoint.h.
4549         * linux-i386-ipa.c: Include tracepoint.h.
4550
4551 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4552
4553         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4554         (ps_get_thread_area): New function.
4555
4556 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4557
4558         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4559         (initialize_low_arch): Call init_registers_crisv32 rather than
4560         init_register_crisv32.
4561
4562 2013-09-05  Pedro Alves  <palves@redhat.com>
4563
4564         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4565         to ...
4566         * hostio.h: ... this new file.
4567         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4568         win32-low.c: Include hostio.h.
4569
4570 2013-09-05  Pedro Alves  <palves@redhat.com>
4571
4572         * server.h (gdb_client_data, handler_func, callback_handler_func)
4573         (delete_file_handler, add_file_handler, append_callback_event)
4574         (delete_callback_event, start_event_loop, initialize_event_loop):
4575         Move to event-loop.h and include it.
4576         * event-loop.h: New file.
4577
4578 2013-09-05  Pedro Alves  <palves@redhat.com>
4579
4580         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4581         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4582         (loaded_dll, unloaded_dll): Move to ...
4583         * dll.h: ... this new file.
4584         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4585
4586 2013-09-05  Pedro Alves  <palves@redhat.com>
4587
4588         * server.h (current_process, get_thread_process, all_processes)
4589         (add_inferior_to_list, for_each_inferior, current_inferior)
4590         (remove_inferior, add_process, remove_process, find_process_pid)
4591         (have_started_inferiors_p, have_attached_inferiors_p)
4592         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4593         (clear_inferiors, find_inferior, find_inferior_id)
4594         (inferior_target_data, set_inferior_target_data)
4595         (inferior_regcache_data, set_inferior_regcache_data): Move to
4596         inferiors.h, and include it.
4597         * inferiors.h: New file.
4598
4599 2013-09-05  Pedro Alves  <palves@redhat.com>
4600
4601         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4602         Move ...
4603         * ax.h: ... here.
4604
4605 2013-09-05  Pedro Alves  <palves@redhat.com>
4606
4607         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4608         tracepoint.h.
4609         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4610         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4611         (handle_tracepoint_general_set, handle_tracepoint_query)
4612         (tracepoint_finished_step, tracepoint_was_hit)
4613         (release_while_stepping_state_list, current_traceframe)
4614         (in_readonly_region, traceframe_read_mem)
4615         (fetch_traceframe_registers, traceframe_read_sdata)
4616         (traceframe_read_info, struct fast_tpoint_collect_status)
4617         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4618         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4619         (supply_fast_tracepoint_registers)
4620         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4621         (ipa_tdesc, claim_trampoline_space)
4622         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4623         (agent_mem_read, agent_get_trace_state_variable_value)
4624         (agent_set_trace_state_variable_value, agent_tsv_read)
4625         (agent_mem_read_string, get_raw_reg_func_addr)
4626         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4627         * tracepoint.h: ... this new file.
4628
4629 2013-09-05  Pedro Alves  <palves@redhat.com>
4630
4631         * server.h (perror_with_name, error, fatal, warning, paddress)
4632         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4633         include it.
4634         * utils.h: New file.
4635
4636 2013-09-05  Pedro Alves  <palves@redhat.com>
4637
4638         * server.h (remote_debug, noack_mode, transport_is_reliable)
4639         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4640         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4641         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4642         (write_enn, initialize_async_io, enable_async_io)
4643         (disable_async_io, check_remote_input_interrupt_request)
4644         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4645         (dead_thread_notify, prepare_resume_reply)
4646         (decode_address_to_semicolon, decode_address, decode_m_packet)
4647         (decode_M_packet, decode_X_packet, decode_xfer_write)
4648         (decode_search_memory_packet, unhexify, hexify)
4649         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4650         (look_up_one_symbol, relocate_instruction)
4651         (monitor_output): Move to remote-utils.h, and include it.
4652         * remote-utils.h: New file.
4653
4654 2013-09-05  Pedro Alves  <palves@redhat.com>
4655
4656         * server.h (_): Delete.
4657
4658 2013-09-02  Pedro Alves  <palves@redhat.com>
4659
4660         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4661         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4662         allocated.
4663         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4664
4665 2013-09-02  Pierre Muller  <muller@sourceware.org>
4666
4667         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4668         or WriteProcessMemory complete successfully and handle
4669         ERROR_PARTIAL_COPY error.
4670
4671 2013-09-02  Pedro Alves  <palves@redhat.com>
4672
4673         * server.c (gdb_read_memory): Return -1 on traceframe memory read
4674         error instead of EIO.
4675
4676 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4677
4678         PR server/15604
4679         * linux-low.c: Include filestuff.h.
4680         (linux_create_inferior) <pid == 0>: Call close_most_fds.
4681         * lynx-low.c: Include filestuff.h.
4682         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4683         * server.c: Include filestuff.h.
4684         (main): Call notice_open_fds.
4685         * spu-low.c: Include filestuff.h.
4686         (spu_create_inferior) <pid == 0>: Call close_most_fds.
4687
4688 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
4689
4690         * Makefile.in: Explain why ../target and ../nat are not
4691         listed as include file search paths.
4692         (linux-waitpid.o): New object file rule.
4693         * configure.srv (srv_native_linux_obj): New variable.
4694         Replace all occurrences of linux native object files with
4695         $srv_native_linux_obj.
4696         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4697         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4698         (linux_enable_event_reporting): Remove declaration.
4699         (my_waitpid): Moved to common/linux-waitpid.c.
4700         (linux_wait_for_event): Pass ptid when calling
4701         linux_enable_event_reporting.
4702         (linux_supports_tracefork_flag): Remove.
4703         (linux_enable_event_reporting): Likewise.
4704         (linux_tracefork_grandchild): Remove.
4705         (STACK_SIZE): Moved to common/linux-ptrace.c.
4706         (linux_tracefork_child): Remove.
4707         (linux_test_for_tracefork): Remove.
4708         (linux_look_up_symbols): Call linux_supports_traceclone.
4709         (initialize_low): Remove call to linux_test_for_tracefork.
4710         * linux-low.h (PTRACE_TYPE_ARG3): Move to
4711         common/linux-ptrace.h.
4712         (PTRACE_TYPE_ARG4): Likewise.
4713         Include linux-ptrace.h.
4714
4715 2013-08-21  Pedro Alves  <palves@redhat.com>
4716
4717         * config.in: Renegerate.
4718
4719 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
4720
4721         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4722         (SFILES): Remove $(srcdir)/common/target-common.c and
4723         add $(srcdir)/target/waitstatus.c.
4724         (OBS): Remove target-common.o and add waitstatus.o.
4725         (server_h): Remove $(srcdir)/../common/target-common.h and
4726         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4727         and $(srcdir)/../target/waitstatus.h.
4728         (target-common.o): Remove.
4729         (waitstatus.o): New target object file.
4730         * target.h: Do not include target-common.h and
4731         include target/resume.h, target/wait.h and
4732         target/waitstatus.h.
4733
4734 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
4735
4736         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4737         to PTRACE_TYPE_ARG3.
4738         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4739         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4740         PTRACE_TYPE_ARG4.
4741         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4742         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4743
4744 2013-07-27  Jie Zhang  <jie@codesourcery.com>
4745             Daniel Jacobowitz  <dan@codesourcery.com>
4746             Yao Qi  <yao@codesourcery.com>
4747
4748         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4749         (mips-linux-watch.o): New rule.
4750         (mips_linux_watch_h): New variable.
4751         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4752         srv_tgtobj.
4753         * linux-mips-low.c: Include mips-linux-watch.h.
4754         (struct arch_process_info, struct arch_lwp_info): New.
4755         (update_watch_registers_callback): New function.
4756         (mips_linux_new_process, mips_linux_new_thread) New functions.
4757         (mips_linux_prepare_to_resume, mips_insert_point): New
4758         functions.
4759         (mips_remove_point, mips_stopped_by_watchpoint): New
4760         functions.
4761         (rsp_bp_type_to_target_hw_bp_type): New function.
4762         (mips_stopped_data_address): New function.
4763         (the_low_target): Add watchpoint support functions.
4764
4765 2013-07-27  Yao Qi  <yao@codesourcery.com>
4766
4767         * i386-low.c: Include break-common.h.
4768         (enum target_hw_bp_type): Remove.
4769
4770 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
4771
4772         * Makefile.in (SFILES): /common/target-common.c.
4773         (OBS): Add target-common.o.
4774         (server_h): Add $(srcdir)/../common/target-common.h.
4775         (target-common.o): New target.
4776         * server.c (queue_stop_reply_callback): Free
4777         status string after use.
4778         * target.c (target_waitstatus_to_string): Remove.
4779         * target.h: Include target-common.h.
4780         (resume_kind): Likewise.
4781         (target_waitkind): Likewise.
4782         (target_waitstatus): Likewise.
4783         (TARGET_WNOHANG): Likewise.
4784
4785 2013-07-04  Yao Qi  <yao@codesourcery.com>
4786
4787         * Makefile.in (host_alias): Use @host_noncanonical@.
4788         (target_alias): Use @target_noncanonical@.
4789         * configure.ac: Use ACX_NONCANONICAL_TARGET and
4790         ACX_NONCANONICAL_HOST.
4791         * configure: Regenerated.
4792
4793         Revert:
4794         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4795
4796         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4797         * configure: Rebuild.
4798         * Makefile.in (version_host, version_target): Get from configure.
4799         (version.c): Use $(version_host) and $(version_target).
4800
4801 2013-07-03  Pedro Alves  <palves@redhat.com>
4802
4803         * Makefile.in (config.status): Depend on development.sh.
4804         * acinclude.m4: Include libmcheck.m4.
4805         * configure: Regenerate.
4806
4807 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4808
4809         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4810         attribute inside the parentheses.
4811         (winapi_DebugSetProcessKillOnExit): Ditto.
4812         (winapi_DebugBreakProcess): Ditto.
4813         (winapi_GenerateConsoleCtrlEvent): Ditto.
4814
4815 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4816
4817         * notif.h (notif_event): Add a dummy member to avoid compiler
4818         errors.
4819
4820 2013-07-01  Pedro Alves  <palves@redhat.com>
4821
4822         * hostio.c (HOSTIO_PATH_MAX): Define.
4823         (require_filename, handle_open, handle_unlink, handle_readlink):
4824         Use it.
4825
4826 2013-07-01  Pedro Alves  <palves@redhat.com>
4827
4828         * server.h: Include "pathmax.h".
4829         * linux-low.c: Don't include sys/param.h.
4830         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4831         MAXPATHLEN.
4832         * win32-low.c: Don't include sys/param.h.
4833         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4834
4835 2013-07-01  Pedro Alves  <palves@redhat.com>
4836
4837         * event-loop.c: Don't check HAVE_UNISTD_H before including
4838         <unistd.h>.
4839         * gdbreplay.c: Likewise.
4840         * remote-utils.c: Likewise.
4841         * server.c: Likewise.
4842         * configure.ac: Don't check for unistd.h.
4843         * configure: Regenerate.
4844
4845 2013-06-28  Tom Tromey  <tromey@redhat.com>
4846
4847         * Makefile.in (version.c): Use version.in, not
4848         common/version.in.
4849
4850 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4851
4852         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4853         * configure: Rebuild.
4854         * Makefile.in (version_host, version_target): Get from configure.
4855         (version.c): Use $(version_host) and $(version_target).
4856
4857 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4858
4859         Fix trace-status to output user name without trailing colon.
4860         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4861
4862 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4863
4864         Fix trace-status to output proper start-time and stop-time.
4865         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4866         output start time and stop time in hex as gdb expects.
4867
4868 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
4869
4870         * tracepoint.c (build_traceframe_info_xml): Output trace state
4871         variables present in the trace buffer.
4872
4873 2013-06-24  Tom Tromey  <tromey@redhat.com>
4874
4875         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4876         create-version.sh.
4877         (version.o): Remove.
4878         * gdbreplay.c: Include version.h.
4879         (version, host_name): Don't declare.
4880         * server.h: Include version.h.
4881         (version, host_name): Don't declare.
4882
4883 2013-06-12  Pedro Alves  <palves@redhat.com>
4884
4885         * linux-x86-low.c (linux_is_elf64): Delete global.
4886         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4887         with local linux_pid_exe_is_elf_64_file use.
4888
4889 2013-06-11  Pedro Alves  <palves@redhat.com>
4890
4891         * linux-low.c (regset_disabled, disable_regset): New functions.
4892         (regsets_fetch_inferior_registers)
4893         (regsets_store_inferior_registers): Use them.
4894         (initialize_regsets_info); Don't allocate the disabled_regsets
4895         array here.
4896         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4897         comment.
4898
4899 2013-06-11  Pedro Alves  <palves@redhat.com>
4900
4901         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4902         xmalloc.
4903
4904 2013-06-11  Pedro Alves  <palves@redhat.com>
4905
4906         * linux-x86-low.c (initialize_low_arch): Call
4907         init_registers_x32_avx_linux.
4908
4909 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
4910
4911         Fix compatibility with Android Bionic.
4912         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4913         it is not empty.
4914
4915 2013-06-07  Pedro Alves  <palves@redhat.com>
4916
4917         PR server/14823
4918         * Makefile.in (OBS): Add tdesc.o.
4919         (IPA_OBJS): Add tdesc-ipa.o.
4920         (tdesc-ipa.o): New rule.
4921         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4922         interface.
4923         * linux-low.c (new_inferior): Delete.
4924         (disabled_regsets, num_regsets): Delete.
4925         (linux_add_process): Adjust to set the new per-process
4926         new_inferior flag.
4927         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4928         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
4929         was a stop.  When calling arch_setup, switch the current inferior
4930         to the thread that got an event.
4931         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4932         (regsets_fetch_inferior_registers)
4933         (regsets_store_inferior_registers): New regsets_info parameter.
4934         Adjust to use it.
4935         (linux_register_in_regsets): New regs_info parameter.  Adjust to
4936         use it.
4937         (register_addr, fetch_register, store_register): New usrregs_info
4938         parameter.  Adjust to use it.
4939         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4940         parameter regs_info.  Adjust to use it.
4941         (linux_fetch_registers): Get the current inferior's regs_info, and
4942         adjust to use it.
4943         (linux_store_registers): Ditto.
4944         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4945         (initialize_low): Don't initialize the target_regsets here.  Call
4946         initialize_low_arch.
4947         * linux-low.h (target_regsets): Delete declaration.
4948         (struct regsets_info): New.
4949         (struct usrregs_info): New.
4950         (struct regs_info): New.
4951         (struct process_info_private) <new_inferior>: New field.
4952         (struct linux_target_ops): Delete the num_regs, regmap, and
4953         regset_bitmap fields.  New field regs_info.
4954         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4955         * i387-fp.c (num_xmm_registers): Delete.
4956         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4957         calls to new interface.
4958         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4959         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4960         Infer the number of xmm registers from the regcache's target
4961         description.
4962         * i387-fp.h (num_xmm_registers): Delete.
4963         * inferiors.c (add_thread): Don't install the thread's regcache
4964         here.
4965         * proc-service.c (gregset_info): Fetch the current inferior's
4966         regs_info.  Adjust to use it.
4967         * regcache.c: Include tdesc.h.
4968         (register_bytes, reg_defs, num_registers)
4969         (gdbserver_expedite_regs): Delete.
4970         (get_thread_regcache): If the thread doesn't have a regcache yet,
4971         create one, instead of aborting gdbserver.
4972         (regcache_invalidate_one): Rename to ...
4973         (regcache_invalidate_thread): ... this.
4974         (regcache_invalidate_one): New.
4975         (regcache_invalidate): Only invalidate registers of the current
4976         process.
4977         (init_register_cache): Add target_desc parameter, and use it.
4978         (new_register_cache): Ditto.  Assert the target description has a
4979         non zero registers_size.
4980         (regcache_cpy): Add assertions.  Adjust.
4981         (realloc_register_cache, set_register_cache): Delete.
4982         (registers_to_string, registers_from_string): Adjust.
4983         (find_register_by_name, find_regno, find_register_by_number)
4984         (register_cache_size): Add target_desc parameter, and use it.
4985         (free_register_cache_thread, free_register_cache_thread_one)
4986         (regcache_release, register_cache_size): New.
4987         (register_size): Add target_desc parameter, and use it.
4988         (register_data, supply_register, supply_register_zeroed)
4989         (supply_regblock, supply_register_by_name, collect_register)
4990         (collect_register_as_string, collect_register_by_name): Adjust.
4991         * regcache.h (struct target_desc): Forward declare.
4992         (struct regcache) <tdesc>: New field.
4993         (init_register_cache, new_register_cache): Add target_desc
4994         parameter.
4995         (regcache_invalidate_thread): Declare.
4996         (regcache_invalidate_one): Delete declaration.
4997         (regcache_release): Declare.
4998         (find_register_by_number, register_cache_size, register_size)
4999         (find_regno): Add target_desc parameter.
5000         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5001         declarations.
5002         * remote-utils.c: Include tdesc.h.
5003         (outreg, prepare_resume_reply): Adjust.
5004         * server.c: Include tdesc.h.
5005         (gdbserver_xmltarget): Delete declaration.
5006         (get_features_xml, process_serial_event): Adjust.
5007         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5008         declare.
5009         (struct process_info) <tdesc>: New field.
5010         (ipa_tdesc): Declare.
5011         * tdesc.c: New file.
5012         * tdesc.h: New file.
5013         * tracepoint.c: Include tdesc.h.
5014         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5015         (get_context_regcache): Adjust to pass ipa_tdesc down.
5016         (do_action_at_tracepoint): Adjust to get the register cache size
5017         from the context regcache's description.
5018         (traceframe_walk_blocks): Adjust to get the register cache size
5019         from the current trace frame's description.
5020         (traceframe_get_pc): Adjust to get current trace frame's
5021         description and pass it down.
5022         (gdb_collect): Adjust to get the register cache size from the
5023         IPA's description.
5024         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5025         (gdbserver_xmltarget): Delete.
5026         (initialize_low_tracepoint): Set the ipa's target description.
5027         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5028         (initialize_low_tracepoint): Set the ipa's target description.
5029         * linux-x86-low.c: Include tdesc.h.
5030         [__x86_64__] (is_64bit_tdesc): New.
5031         (ps_get_thread_area, x86_get_thread_area): Use it.
5032         (i386_cannot_store_register): Rename to ...
5033         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5034         (i386_cannot_fetch_register): Rename to ...
5035         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5036         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5037         to new interface.
5038         (target_regsets): Rename to ...
5039         (x86_regsets): ... this.
5040         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5041         interface.
5042         (x86_siginfo_fixup): Use is_64bit_tdesc.
5043         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5044         (tdesc_x32_avx_linux, tdesc_x32_linux)
5045         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5046         Declare.
5047         (x86_linux_update_xmltarget): Delete.
5048         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5049         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5050         (AMD64_LINUX_USER64_CS): New.
5051         (x86_linux_read_description): New, based on
5052         x86_linux_update_xmltarget.
5053         (same_process_callback): New.
5054         (x86_arch_setup_process_callback): New.
5055         (x86_linux_update_xmltarget): New.
5056         (x86_regsets_info): New.
5057         (amd64_linux_regs_info): New.
5058         (i386_linux_usrregs_info): New.
5059         (i386_linux_regs_info): New.
5060         (x86_linux_regs_info): New.
5061         (x86_arch_setup): Reimplement.
5062         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5063         (x86_emit_ops): Ditto.
5064         (the_low_target): Adjust.  Install x86_linux_regs_info,
5065         x86_cannot_fetch_register, and x86_cannot_store_register.
5066         (initialize_low_arch): New.
5067         * linux-ia64-low.c (tdesc_ia64): Declare.
5068         (ia64_fetch_register): Adjust.
5069         (ia64_usrregs_info, regs_info): New globals.
5070         (ia64_regs_info): New function.
5071         (the_low_target): Adjust.
5072         (initialize_low_arch): New function.
5073         * linux-sparc-low.c (tdesc_sparc64): Declare.
5074         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5075         Adjust.
5076         (sparc_arch_setup): New function.
5077         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5078         (the_low_target): Adjust.
5079         (initialize_low_arch): New function.
5080         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5081         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5082         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5083         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5084         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5085         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5086         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5087         (tdesc_powerpc_isa205_vsx64l): Declare.
5088         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5089         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5090         (ppc_set_pc, ppc_get_hwcap): Adjust.
5091         (ppc_usrregs_info): Forward declare.
5092         (!__powerpc64__) ppc_regmap_adjusted: New global.
5093         (ppc_arch_setup): Adjust to the current process'es target
5094         description.
5095         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5096         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5097         (ppc_store_evrregset): Adjust.
5098         (target_regsets): Rename to ...
5099         (ppc_regsets): ... this, and make static.
5100         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5101         (ppc_regs_info): New function.
5102         (the_low_target): Adjust.
5103         (initialize_low_arch): New function.
5104         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5105         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5106         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5107         (tdesc_s390x_linux64v2): Declare.
5108         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5109         (s390_fill_gregset, s390_store_last_break): Adjust.
5110         (target_regsets): Rename to ...
5111         (s390_regsets): ... this, and make static.
5112         (s390_get_pc, s390_set_pc): Adjust.
5113         (s390_get_hwcap): New target_desc parameter, and use it.
5114         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5115         (s390_arch_setup): Adjust to set the current process'es target
5116         description.  Don't adjust the regmap.
5117         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5118         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5119         (regs_info_3264): New globals.
5120         (s390_regs_info): New function.
5121         (the_low_target): Adjust.
5122         (initialize_low_arch): New function.
5123         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5124         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5125         [__mips64] (init_registers_mips_linux)
5126         (init_registers_mips_dsp_linux): Delete defines.
5127         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5128         (have_dsp): New global.
5129         (mips_read_description): New, based on mips_arch_setup.
5130         (mips_arch_setup): Reimplement.
5131         (get_usrregs_info): New function.
5132         (mips_cannot_fetch_register, mips_cannot_store_register)
5133         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5134         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5135         (target_regsets): Rename to ...
5136         (mips_regsets): ... this, and make static.
5137         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5138         (dsp_regs_info, regs_info): New globals.
5139         (mips_regs_info): New function.
5140         (the_low_target): Adjust.
5141         (initialize_low_arch): New function.
5142         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5143         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5144         Declare.
5145         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5146         (arm_read_description): New, with bits factored from
5147         arm_arch_setup.
5148         (arm_arch_setup): Reimplement.
5149         (target_regsets): Rename to ...
5150         (arm_regsets): ... this, and make static.
5151         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5152         (arm_regs_info): New function.
5153         (the_low_target): Adjust.
5154         (initialize_low_arch): New function.
5155         * linux-m68k-low.c (tdesc_m68k): Declare.
5156         (target_regsets): Rename to ...
5157         (m68k_regsets): ... this, and make static.
5158         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5159         (m68k_regs_info): New function.
5160         (m68k_arch_setup): New function.
5161         (the_low_target): Adjust.
5162         (initialize_low_arch): New function.
5163         * linux-sh-low.c (tdesc_sharch): Declare.
5164         (target_regsets): Rename to ...
5165         (sh_regsets): ... this, and make static.
5166         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5167         (sh_regs_info, sh_arch_setup): New functions.
5168         (the_low_target): Adjust.
5169         (initialize_low_arch): New function.
5170         * linux-bfin-low.c (tdesc_bfin): Declare.
5171         (bfin_arch_setup): New function.
5172         (bfin_usrregs_info, regs_info): New globals.
5173         (bfin_regs_info): New function.
5174         (the_low_target): Adjust.
5175         (initialize_low_arch): New function.
5176         * linux-cris-low.c (tdesc_cris): Declare.
5177         (cris_arch_setup): New function.
5178         (cris_usrregs_info, regs_info): New globals.
5179         (cris_regs_info): New function.
5180         (the_low_target): Adjust.
5181         (initialize_low_arch): New function.
5182         * linux-cris-low.c (tdesc_crisv32): Declare.
5183         (cris_arch_setup): New function.
5184         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5185         (cris_regs_info): New function.
5186         (the_low_target): Adjust.
5187         (initialize_low_arch): New function.
5188         * linux-m32r-low.c (tdesc_m32r): Declare.
5189         (m32r_arch_setup): New function.
5190         (m32r_usrregs_info, regs_info): New globals.
5191         (m32r_regs_info): Adjust.
5192         (initialize_low_arch): New function.
5193         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5194         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5195         (tic6x_usrregs_info): Forward declare.
5196         (tic6x_read_description): New function, based on ...
5197         (tic6x_arch_setup): ... this.  Reimplement.
5198         (target_regsets): Rename to ...
5199         (tic6x_regsets): ... this, and make static.
5200         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5201         (tic6x_regs_info): New function.
5202         (the_low_target): Adjust.
5203         (initialize_low_arch): New function.
5204         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5205         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5206         (target_regsets): Rename to ...
5207         (xtensa_regsets): ... this, and make static.
5208         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5209         globals.
5210         (xtensa_arch_setup, xtensa_regs_info): New functions.
5211         (the_low_target): Adjust.
5212         (initialize_low_arch): New function.
5213         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5214         (nios2_arch_setup): Set the current process'es tdesc.
5215         (target_regsets): Rename to ...
5216         (nios2_regsets): ... this.
5217         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5218         (nios2_regs_info): New function.
5219         (the_low_target): Adjust.
5220         (initialize_low_arch): New function.
5221         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5222         (aarch64_arch_setup): Set the current process'es tdesc.
5223         (target_regsets): Rename to ...
5224         (aarch64_regsets): ... this.
5225         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5226         (aarch64_regs_info): New function.
5227         (the_low_target): Adjust.
5228         (initialize_low_arch): New function.
5229         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5230         globals.
5231         (target_regsets): Rename to ...
5232         (tile_regsets): ... this.
5233         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5234         (tile_regs_info): New function.
5235         (tile_arch_setup): Set the current process'es tdesc.
5236         (the_low_target): Adjust.
5237         (initialize_low_arch): New function.
5238         * spu-low.c (tdesc_spu): Declare.
5239         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5240         * win32-arm-low.c (tdesc_arm): Declare.
5241         (arm_arch_setup): New function.
5242         (the_low_target): Install arm_arch_setup instead of
5243         init_registers_arm.
5244         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5245         (init_windows_x86): Rename to ...
5246         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5247         (the_low_target): Adjust.
5248         * win32-low.c (win32_tdesc): New global.
5249         (child_add_thread): Don't create the thread cache here.
5250         (do_initial_child_stuff): Set the new process'es tdesc.
5251         * win32-low.h (struct target_desc): Forward declare.
5252         (win32_tdesc): Declare.
5253         * lynx-i386-low.c (tdesc_i386): Declare global.
5254         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5255         * lynx-low.c (lynx_tdesc): New global.
5256         (lynx_add_process): Set the new process'es tdesc.
5257         * lynx-low.h (struct target_desc): Forward declare.
5258         (lynx_tdesc): Declare global.
5259         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5260         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5261         * nto-low.c (nto_tdesc): New global.
5262         (do_attach): Set the new process'es tdesc.
5263         * nto-low.h (struct target_desc): Forward declare.
5264         (nto_tdesc): Declare.
5265         * nto-x86-low.c (tdesc_i386): Declare.
5266         (nto_x86_arch_setup): Set `nto_tdesc'.
5267
5268 2013-06-04  Gary Benson  <gbenson@redhat.com>
5269
5270         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5271         to qSupported response when appropriate.
5272         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5273         with nonzero-length annex.
5274         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5275         arguments supplied in annex.
5276
5277 2013-05-31  Doug Evans  <dje@google.com>
5278
5279         PR server/15594
5280         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5281         64 bits in 64-cross-32 environment.
5282
5283 2013-05-28  Pedro Alves  <palves@redhat.com>
5284
5285         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5286         (aarch64-without-fpu.c): Delete rule.
5287         * configure.srv (aarch64*-*-linux*): Remove references to
5288         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5289         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5290         declaration.
5291
5292 2013-05-24  Pedro Alves  <palves@redhat.com>
5293
5294         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5295         instead of strchr/decode_address.  Error if the range isn't split
5296         with a ','.  Don't assume there's be a ':' in the action.
5297
5298 2013-05-23  Yao Qi  <yao@codesourcery.com>
5299             Pedro Alves  <palves@redhat.com>
5300
5301         * linux-low.c (lwp_in_step_range): New function.
5302         (linux_wait_1): If the thread was range stepping and stopped
5303         outside the stepping range, report the stop to GDB.  Otherwise,
5304         continue stepping.  Add range stepping debug output.
5305         (linux_set_resume_request): Copy the step range from the resume
5306         request to the lwp.
5307         (linux_supports_range_stepping): New.
5308         (linux_target_ops) <supports_range_stepping>: Set to
5309         linux_supports_range_stepping.
5310         * linux-low.h (struct linux_target_ops)
5311         <supports_range_stepping>: New field.
5312         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5313         * linux-x86-low.c (x86_supports_range_stepping): New.
5314         (the_low_target) <supports_range_stepping>: Set to
5315         x86_supports_range_stepping.
5316         * server.c (handle_v_cont): Handle 'r' action.
5317         (handle_v_requests): Append ";r" if the target supports range
5318         stepping.
5319         * target.h (struct thread_resume) <step_range_start,
5320         step_range_end>: New fields.
5321         (struct target_ops) <supports_range_stepping>:
5322         New field.
5323         (target_supports_range_stepping): New macro.
5324
5325 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5326
5327         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5328         confusion in comment.
5329
5330 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5331
5332         * lynx-low.c (struct process_info_private): New type.
5333         (lynx_add_process): New function.
5334         (lynx_create_inferior, lynx_attach): Replace calls to
5335         add_process by calls to lynx_add_process.
5336         (lynx_resume): If PTID is null, then try using
5337         current_process()->private->last_wait_event_ptid.
5338         Add comments.
5339         (lynx_clear_inferiors): Delete.  The contents of that function
5340         has been inlined in lynx_mourn;
5341         (lynx_wait_1): Save the ptid in the process's private data.
5342         (lynx_mourn): Free the process' private data.  Replace call
5343         to lynx_clear_inferiors by call to clear_inferiors.
5344
5345 2013-05-17  Yao Qi  <yao@codesourcery.com>
5346
5347         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5348         the right place.
5349
5350 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5351
5352         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5353         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5354         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5355         PT_TEXT_END_ADDR guards.  Update comments.
5356         (linux_target_op) <read_offsets>: Conditionally define to
5357         linux_read_offsets if the target is UCLIBC and if it defines
5358         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5359
5360 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5361             Andrew Jenner  <andrew@codesourcery.com>
5362
5363         * Makefile.in (SFILES): Add linux-nios2-low.c.
5364         (clean): Add action to delete nios2-linux.c.
5365         (nios2-linux.c): New rule.
5366         * configure.srv: Add nios2*-*-linux*.
5367         * linux-nios2-low.c: New.
5368
5369 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5370
5371         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5372
5373 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5374
5375         PR gdb/15186
5376         * ax.c (ax_printf): Add fflush.
5377
5378 2013-04-22  Tom Tromey  <tromey@redhat.com>
5379
5380         * Makefile.in (SFILES): Add filestuff.c.
5381         (OBS): Add filestuff.o.
5382         (filestuff.o): New target.
5383         * config.in, configure: Rebuild.
5384         * configure.ac: Check for fdwalk, pipe2.
5385
5386 2013-04-17  Pedro Alves  <palves@redhat.com>
5387
5388         * configure.ac (USE_THREAD_DB): Delete variable.
5389         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5390         Don't AC_SUBST USE_THREAD_DB.
5391         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5392         * config.in, configure: Regenerate.
5393
5394 2013-04-16  Pedro Alves  <palves@redhat.com>
5395
5396         * linux-low.h (struct lwp_info) <thread_known>: Move under
5397         the USE_THREAD_DB #ifdef.
5398
5399 2013-04-16  Pedro Alves  <palves@redhat.com>
5400
5401         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5402         (linux-low.o): Delete rule.
5403         * linux-low.h: Always include "gdb_thread_db.h" instead of
5404         conditionally including thread_db.h.
5405         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5406         HAVE_THREAD_DB_H.
5407
5408 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5409
5410         * Makefile.in (install-only): Fix make install regression.
5411
5412 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5413
5414         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5415         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5416         installation.
5417         * gdbserver.1: Remove.
5418
5419 2013-03-22  Pedro Alves  <palves@redhat.com>
5420
5421         * linux-low.c (handle_extended_wait): Don't call
5422         linux_enable_event_reporting.
5423
5424 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5425
5426         PR build/9098:
5427         * Makefile.in (SHELL): Use @SHELL@.
5428
5429 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5430
5431         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5432         compiler warning.
5433
5434 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5435
5436         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5437         Remove extraneous NULL element.
5438
5439 2013-03-13  Yao Qi  <yao@codesourcery.com>
5440
5441         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5442         'V' block in trace frame.
5443
5444 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5445
5446         * target.h (struct target_ops): Add btrace ops.
5447         (target_supports_btrace): New macro.
5448         (target_enable_btrace): New macro.
5449         (target_disable_btrace): New macro.
5450         (target_read_btrace): New macro.
5451         * gdbthread.h (struct thread_info): Add btrace field.
5452         * server.c: Include btrace-common.h.
5453         (handle_btrace_general_set): New function.
5454         (handle_btrace_enable): New function.
5455         (handle_btrace_disable): New function.
5456         (handle_general_set): Call handle_btrace_general_set.
5457         (handle_qxfer_btrace): New function.
5458         (struct qxfer qxfer_packets[]): Add btrace entry.
5459         * inferiors.c (remove_thread): Disable btrace.
5460         * linux-low: Include linux-btrace.h.
5461         (linux_low_enable_btrace): New function.
5462         (linux_low_read_btrace): New function.
5463         (linux_target_ops): Add btrace ops.
5464         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5465         Add srv_linux_btrace=yes.
5466         (x86_64-*-linux*): Add linux-btrace.o.
5467         Add srv_linux_btrace=yes.
5468         * configure.ac: Define HAVE_LINUX_BTRACE.
5469         * config.in: Regenerated.
5470         * configure: Regenerated.
5471
5472 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5473
5474         * server.c (handle_qxfer): Preserve error message if -3 is
5475         returned.
5476         (qxfer): Document the -3 return value.
5477
5478 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5479
5480         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5481         (linux_btrace_h): New variable.
5482         (linux-btrace.o): New rule.
5483
5484 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5485             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5486
5487         * tracepoint.c (trace_buffer_size): New global.
5488         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5489         (init_trace_buffer): Change to one-argument function. Allocate
5490         trace buffer memory.
5491         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5492         handle QTBuffer:size packet.
5493         (cmd_bigqtbuffer_size): New function.
5494         (initialize_tracepoint): Call init_trace_buffer with
5495         DEFAULT_TRACE_BUFFER_SIZE.
5496         * server.c (handle_query): Add QTBuffer:size in the
5497         supported packets.
5498
5499 2013-03-07  Yao Qi  <yao@codesourcery.com>
5500
5501         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5502         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5503         of -1.
5504         (cmd_qtsp): Adjust condition.  Do post increment.
5505         Set cur_action and cur_step_action back to 0.
5506
5507 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5508
5509         PR server/15236
5510         * linux-low.c (linux_write_memory): Return early success if LEN is
5511         zero.
5512
5513 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5514
5515         * configure.srv: Add x86_64-*-cygwin* as target.
5516
5517 2013-02-28  Tom Tromey  <tromey@redhat.com>
5518
5519         * configure.ac: Invoke AC_SYS_LARGEFILE.
5520         * configure, config.in: Rebuild.
5521
5522 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5523
5524         * win32-low.c: Throughout, fix format strings and casts of
5525         printf-like functions to avoid type related warnings on all
5526         platforms.
5527         (get_child_debug_event): Print dwDebugEventCode as hex since
5528         that's how it's usually documented.
5529
5530 2013-02-28  Yao Qi  <yao@codesourcery.com>
5531
5532         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5533         pulongest.
5534
5535 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5536
5537         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5538         (reg-tilegx32.c): New rule.
5539         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5540         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5541         different register info initializer according to elf class.
5542         (init_registers_tilgx32): New function.  The tilegx32 register info
5543         initializer.
5544         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5545         (tile_store_gregset): Likewise.
5546
5547 2013-02-27  Yao Qi  <yao@codesourcery.com>
5548
5549         * server.c (process_point_options): Print debug message when
5550         debug_threads is true.
5551
5552 2013-02-26  Yao Qi  <yao@codesourcery.com>
5553
5554         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5555
5556 2013-02-19  Pedro Alves  <palves@redhat.com>
5557             Kai Tietz <ktietz@redhat.com>
5558
5559         PR gdb/15161
5560
5561         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5562         instead of strtoul to extract address from packet.
5563         (process_serial_event) <'z'>: Likewise.
5564
5565 2013-02-18  Yao Qi  <yao@codesourcery.com>
5566
5567         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5568
5569 2013-02-14  Pedro Alves  <palves@redhat.com>
5570
5571         Plug memory leak.
5572
5573         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5574         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5575
5576 2013-02-14  Pedro Alves  <palves@redhat.com>
5577
5578         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5579
5580 2013-02-14  Pedro Alves  <palves@redhat.com>
5581
5582         * tracepoint.c (save_string): Delete.
5583         (add_tracepoint_action): Use savestring instead of save_string.
5584
5585 2013-02-12  Pedro Alves  <palves@redhat.com>
5586
5587         * linux-xtensa-low.c: Ditto.
5588         * xtensa-xtregs.c: Ditto.
5589
5590 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5591
5592         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5593         thread_db.
5594
5595 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5596
5597         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5598         aarch64_num_wp_regs and aarch64_num_bp_regs to
5599         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5600
5601 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5602
5603         * linux-aarch64-low.c (ps_get_thread_area): Replace
5604         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5605
5606 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5607             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5608             Nigel Stephens  <nigel.stephens@arm.com>
5609             Yufeng Zhang  <yufeng.zhang@arm.com>
5610
5611         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5612         (aarch64.c, aarch64-without-fpu.c): New targets.
5613         * configure.srv (aarch64*-*-linux*): New.
5614         * linux-aarch64-low.c: New file.
5615
5616 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5617
5618         * linux-low.c (handle_extended_wait, linux_create_inferior)
5619         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5620         (dequeue_one_deferred_signal, linux_resume_one_thread)
5621         (fetch_register, linux_write_memory, linux_enable_event_reporting)
5622         (linux_tracefork_grandchild, linux_test_for_tracefork)
5623         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5624         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5625         where the argument is 0.
5626
5627 2013-01-25  Yao Qi  <yao@codesourcery.com>
5628
5629         * event-loop.c: Include "queue.h".
5630         (gdb_event_p): New typedef.
5631         (struct gdb_event) <next_event>: Remove.
5632         (event_queue): Change to QUEUE(gdb_event_p).
5633         (async_queue_event): Remove.
5634         (gdb_event_xfree): New.
5635         (initialize_event_loop): New.
5636         (process_event): Use API from QUEUE.
5637         (wait_for_event): Likewise.
5638         * server.c (main): Call initialize_event_loop.
5639         * server.h (initialize_event_loop): Declare.
5640
5641 2013-01-18  Yao Qi  <yao@codesourcery.com>
5642
5643         * ax.h (struct eval_agent_expr_context): New.
5644         (gdb_eval_agent_expr): Update declaration.
5645         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5646         TFRAME.  Add new argument CTX.
5647         * server.h (struct eval_agent_expr_context): Declare.
5648         (agent_mem_read, agent_tsv_read): Update declaration.
5649         (agent_mem_read_string): Likewise.
5650         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5651         (add_traceframe_block): Add new argument TPOINT.
5652         Increase TPOINT->traceframe_usage.
5653         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5654         eval_tracepoint_agent_expr.
5655         (condition_true_at_tracepoint): Likewise.
5656         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
5657         (agent_mem_read_string, agent_tsv_read): Likewise.
5658
5659 2013-01-16  Yao Qi  <yao@codesourcery.com>
5660
5661         * linux-low.c (linux_resume_one_lwp): Don't check
5662         'lwp->bp_reinsert != 0'.
5663
5664 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5665             Pedro Alves  <palves@redhat.com>
5666
5667         * lynx-low.c (ptrace_request_to_str): Define a temporary
5668         macro and use it to simplify this function's implementation.
5669
5670 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5671
5672         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5673         sets errno.
5674
5675 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5676
5677         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5678
5679 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5680
5681         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5682
5683 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5684
5685         * lynx-low.c (lynx_resume): Use the resume_info parameter
5686         to determine the ptid for the lynx_ptrace call, unless
5687         it is equal to minus_one_ptid, in which case we use the
5688         ptid of the current_inferior.
5689         (lynx_wait_1): After having received a thread create/exit
5690         event, resume the inferior's execution using the signaling
5691         thread's ptid, rather than the old ptid.
5692
5693 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5694
5695         * lynx-low.c (lynx_resume): Delete variable ret.
5696
5697 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
5698
5699         * gdbreplay.c (gdbreplay_version): Update copyright year.
5700         * server.c (gdbserver_version): Likewise.
5701
5702 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5703
5704         * lynx-low.c (lynx_wait_1): Add debug trace before adding
5705         new thread.
5706
5707 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5708
5709         * lynx-low.c (ptrace_request_to_str): Add handling for
5710         PTRACE_GETTRACESIG.
5711
5712 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5713
5714         * lynx-low.c (lynx_attach): Delete variable new_process.
5715
5716 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5717
5718         * lynx-low.c (lynx_create_inferior): Delete variable
5719         new_process.
5720
5721 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5722
5723         * lynx-low.c (ptrace_request_to_str): Do not handle
5724         PTRACE_GETTHREADLIST if this macro does not exist.
5725
5726 2012-12-15  Yao Qi  <yao@codesourcery.com>
5727
5728         * Makefile.in (OBS): Add notif.o.
5729         * notif.c, notif.h: New.
5730         * server.c: Include "notif.h".
5731         (struct vstop_notif) <next>: Remove.
5732         <base>: New field.
5733         (queue_stop_reply): Update.
5734         (push_event, send_next_stop_reply): Remove.
5735         (discard_queued_stop_replies): Update.
5736         (notif_stop): New variable.
5737         (handle_v_stopped): Remove.
5738         (handle_v_requests): Don't call handle_v_stopped.  Call
5739         handle_ack_notif instead.
5740         (queue_stop_reply_callback): Call notif_event_enque instead
5741         of queue_stop_reply.
5742         (handle_status): Don't call send_next_stop_reply, call
5743         notif_write_event instead.
5744         (kill_inferior_callback): Likewise.
5745         (detach_or_kill_inferior_callback): Likewise.
5746         (main): Call initialize_notif.
5747         (process_serial_event): Call QUEUE_is_empty.
5748         (handle_target_event): Call notif_push instead of push event.
5749         * server.h (push_event): Remove declaration.
5750
5751 2012-12-10  Tom Tromey  <tromey@redhat.com>
5752
5753         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5754         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5755         macros.
5756         (.c.o): Rewrite.
5757         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5758         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5759         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5760         (amd64-linux-ipa.o, ax.o): Rewrite.
5761         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5762         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5763         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5764         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5765         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5766         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5767         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5768         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5769         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5770         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5771         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5772         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5773         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5774         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5775         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5776         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5777         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5778         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5779         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5780         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5781         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5782         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5783         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5784         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5785         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5786         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5787         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5788         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5789         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5790         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5791         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5792         (reg-tilegx.o): Remove.
5793         (all_object_files): New macro.
5794         Include .deps files.
5795         * aclocal.m4, configure: Rebuild.
5796         * acinclude.m4: Include depstand.m4, lead-dot.m4.
5797         * configure.ac: Invoke ZW_CREATE_DEPDIR,
5798         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
5799
5800 2012-12-05  Tom Tromey  <tromey@redhat.com>
5801
5802         PR gdb/14917:
5803         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5804
5805 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
5806
5807         * configure.ac: Check for linux/perf_event.h.
5808         * config.in: Regenerated.
5809         * configure: Regenerated.
5810
5811 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
5812
5813         * hostio.c (handle_readlink): Decrease buffer size
5814         parameter passed to readlink by one byte.
5815
5816 2012-11-26  Yao Qi  <yao@codesourcery.com>
5817
5818         * configure.ac (build_warnings): Append '-Wempty-body'.
5819         * configure: Regenerated.
5820         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5821         body.
5822
5823 2012-11-15  Pierre Muller  <muller@sourceware.org>
5824
5825         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5826         * config.in: Regenerate.
5827         * configure: Regenerate.
5828         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5829         Use "gdb_wait.h" header instead of <sys/wait.h> header.
5830         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5831         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5832         header.
5833         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
5834         instead of <sys/wait.h> header.
5835         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5836
5837 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
5838
5839         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5840         (various make rules): Remove -DGDBSERVER
5841
5842 2012-11-09  Yao Qi  <yao@codesourcery.com>
5843
5844         * spu-low.c (current_ptid): Move it to ..
5845         * gdbthread.h: ... here.  New.
5846         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5847         * server.c (myresume, process_serial_event): Likewise.
5848         * thread-db.c (thread_db_find_new_threads): Likewise.
5849         * tracepoint.c (run_inferior_command): Likewise.
5850
5851 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5852
5853         * server.c (handle_search_memory_1): Include access length in
5854         warning message.
5855
5856 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5857
5858         * linux-crisv32-low.c: Fix compile errors.
5859
5860 2012-09-04  Yao Qi  <yao@codesourcery.com>
5861
5862         * tracepoint.c (cmd_qtsv): Adjust debug message.
5863         Don't check CUR_TPOINT.
5864
5865 2012-08-28  Yao Qi  <yao@codesourcery.com>
5866
5867         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5868         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5869         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5870         Remove declarations of xmalloc, xreallloc, xstrdup and
5871         freeargv.
5872         * Makefile.in (libiberty_h): New.
5873         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5874         (linux-bfin-low.o): Append dependency 'libiberty.h'.
5875
5876 2012-08-23  Yao Qi  <yao@codesourcery.com>
5877
5878         * server.h: Remove declaration of 'xsnprintf'.
5879
5880 2012-08-22  Keith Seitz  <keiths@redhat.com>
5881
5882         * server.h: Include build-gnulib-gbserver/config.h.
5883         * gdbreplay.c: Likewise.
5884
5885 2012-08-08  Doug Evans  <dje@google.com>
5886
5887         * Makefile.in (SFILES): Add gdb_vecs.c.
5888         (OBS): Add gdb_vecs.o.
5889         (gdb_vecs_h, host_defs_h): New variables.
5890         (thread-db.o): Add $(gdb_vecs_h) dependency.
5891         (gdb_vecs.o): New rule.
5892         * thread-db.c: #include "gdb_vecs.h".
5893         (thread_db_load_search): Use a vector to iterate over path elements.
5894         Handle text appearing after "$pdir".
5895
5896         * configure.ac: Add check for strstr.
5897         * config.in: Regenerate.
5898         * configure: Regenerate.
5899
5900 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
5901
5902         * hostio.c (handle_pread): If pread fails, fall back to attempting
5903         lseek/read.
5904         (handle_pwrite): Likewise for pwrite.
5905
5906 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
5907
5908         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5909         between unsupported TYPE and unimplementable ADDR/LEN combination.
5910         (arm_insert_point): Act on new return value.
5911
5912 2012-07-31  Pedro Alves  <palves@redhat.com>
5913
5914         * server.c (process_point_options): Only skip tokens if we find
5915         one that is unrecognized.  Don't treat 'X' specially while
5916         skipping unrecognized tokens.
5917
5918 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
5919
5920         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5921         to 4-byte-align HW breakpoint addresses for Thumb.
5922
5923 2012-07-27  Yao Qi  <yao@codesourcery.com>
5924
5925         PR remote/14161.
5926
5927         * server.h: Declare gdb_agent_about_to_close.
5928         * target.c (kill_inferior): Include "agent.h".
5929         New.  Send command 'kill'.
5930         * target.h (kill_inferior): Removed macro.
5931         * tracepoint.c (gdb_agent_about_to_close): New.
5932         (gdb_agent_helper_thread): Handle command 'close'.
5933         Wait endlessly until the inferior stops.
5934         Install gdb_agent_remove_socket to atexit hook.
5935         (agent_socket_name): New static variable.
5936         (gdb_agent_socket_init): Replace local variable 'name' with
5937         'agent_socket_name'.
5938         (gdb_agent_remove_socket): New.
5939
5940 2012-07-27  Yao Qi  <yao@codesourcery.com>
5941
5942         * server.c (process_point_options): Stop at 'X' when parsing.
5943
5944 2012-07-19  Michael Eager  <eager@eagercon.com>
5945
5946         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5947         to hw_execute.
5948         * linux-x86-low.c (x86_insert_point, x86_remove_point):
5949         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5950         hardware breakpoint.
5951
5952 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5953
5954         * gdbserver/linux-low.c (initialize_low): Call
5955         linux_ptrace_init_warnings.
5956
5957 2012-07-02  Doug Evans  <dje@google.com>
5958
5959         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5960         pointer to int.
5961
5962 2012-07-02  Stan Shebs  <stan@codesourcery.com>
5963
5964         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5965         (ax.o): Add it to build rule.
5966         (ax-ipa.o): Ditto.
5967         (OBS): Add format.o.
5968         (IPA_OBS): Add format.o.
5969         * server.c (handle_query): Claim support for breakpoint commands.
5970         (process_point_options): Add command case.
5971         (process_serial_event): Leave running if there are printfs in
5972         effect.
5973         * mem-break.h (any_persistent_commands): Declare.
5974         (add_breakpoint_commands): Declare.
5975         (gdb_no_commands_at_breakpoint): Declare.
5976         (run_breakpoint_commands): Declare.
5977         * mem-break.c (struct point_command_list): New struct.
5978         (struct breakpoint): New field command_list.
5979         (any_persistent_commands): New function.
5980         (add_commands_to_breakpoint): New function.
5981         (add_breakpoint_commands): New function.
5982         (gdb_no_commands_at_breakpoint): New function.
5983         (run_breakpoint_commands): New function.
5984         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5985         locally.
5986         * ax.c: Include format.h.
5987         (ax_printf): New function.
5988         (gdb_eval_agent_expr): Add printf opcode.
5989
5990 2012-06-13  Yao Qi  <yao@codesourcery.com>
5991
5992         * server.c (start_inferior): Remove duplicated writes to fields
5993         'last_resume_kind' and 'last_status' of 'current_inferior'.
5994
5995 2012-06-12  Yao Qi  <yao@codesourcery.com>
5996             Pedro Alves  <palves@redhat.com>
5997
5998         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
5999         comment.
6000         * server.c (handle_v_cont): Extend comment.
6001
6002 2012-06-11  Yao Qi  <yao@codesourcery.com>
6003
6004         * linux-low.c (linux_attach): Add 'static'.
6005
6006 2012-06-06  Yao Qi  <yao@codesourcery.com>
6007
6008         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6009
6010 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6011
6012         Fix gcc -flto compilation warning.
6013         * server.c (main): Make variable multi_mode and attach volatile.
6014
6015 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6016
6017         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6018         if the platform doesn't know about it.
6019
6020 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6021
6022         * Makefile.in (SFILES): Add linux-tile-low.c.
6023         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6024         * configure.srv: Handle tilegx-*-linux*.
6025         * linux-tile-low.c: New file.
6026
6027 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6028
6029         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6030
6031 2012-05-24  Pedro Alves  <palves@redhat.com>
6032
6033         PR gdb/7205
6034
6035         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6036
6037 2012-05-24  Pedro Alves  <palves@redhat.com>
6038
6039         PR gdb/7205
6040
6041         Replace target_signal with gdb_signal throughout.
6042
6043 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6044
6045         * linux-low.c (linux_store_registers): Avoid the copying sequence
6046         when no data has been retrieved by ptrace.
6047
6048 2012-05-22  Will Deacon  <will.deacon@arm.com>
6049
6050         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6051         Include asm/ptrace.h.
6052         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6053         already defined.
6054
6055 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6056
6057         * linux-low.c (linux_store_registers): Don't re-retrieve data
6058         with ptrace that has already been obtained from /proc.  Always
6059         copy any data retrieved with ptrace to the buffer supplied.
6060
6061 2012-05-11  Yao Qi  <yao@codesourcery.com>
6062             Pedro Alves  <palves@redhat.com>
6063
6064         * linux-low.c (enum stopping_threads_kind): New.
6065         (stopping_threads): Change type to `enum stopping_threads_kind'.
6066         (handle_extended_wait): If stopping and suspending threads, leave
6067         the new_lwp suspended too.
6068         (linux_wait_for_event): Adjust.
6069         (stop_all_lwps): Set `stopping_threads' to
6070         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6071         whether we're suspending threads or just stopping them.  Assert no
6072         recursion happens.
6073
6074 2012-04-29  Yao Qi  <yao@codesourcery.com>
6075
6076         * server.h: Move some code to ...
6077         * gdbthread.h: ... here.  New.
6078         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6079         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6080         (nto-low.o, win32-low.o): Likewise.
6081         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6082         * regcache.c, remote-utils.c, server.c: Likewise.
6083         * target.c, tracepoint.c, win32-low.c: Likewise.
6084
6085 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6086
6087         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6088         (PTRACE_ARG4_TYPE): Likewise.
6089         (PTRACE_XFER_TYPE): Likewise.
6090         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6091         ptrace to PTRACE_ARG3_TYPE.
6092         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6093         (PTRACE_ARG4_TYPE): Likewise.
6094         (PTRACE_XFER_TYPE): Likewise.
6095         (linux_detach_one_lwp): Cast fourth argument of
6096         ptrace to long then PTRACE_ARG4_TYPE.
6097         (regsets_fetch_inferior_registers): Cast third argument of
6098         ptrace to long then PTRACE_ARG3_TYPE.
6099         (regsets_store_inferior_registers): Likewise.
6100
6101 2012-04-20  Pedro Alves  <palves@redhat.com>
6102
6103         * configure: Regenerate.
6104
6105 2012-04-19  Pedro Alves  <palves@redhat.com>
6106
6107         * Makefile.in (GNULIB_BUILDDIR): New.
6108         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6109         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6110         (all, install-only, uninstall, clean-info, all-lib, clean): No
6111         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6112         (maintainer-clean realclean distclean): Use subdir_do.
6113         (subdir_do): New.
6114         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6115         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6116         * acinclude.m4: Include acx_configure_dir.m4.
6117         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6118         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6119         ACX_CONFIGURE_DIR.
6120         (GNULIB): New.
6121         (GNULIB_STDINT_H): Adjust.
6122         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6123         * gdbreplay.c: Include build-gnulib/config.h.
6124         * server.h: Likewise.
6125         * aclocal.m4: Regenerate.
6126         * config.in: Regenerate.
6127         * configure: Regenerate.
6128
6129 2012-04-19  Pedro Alves  <palves@redhat.com>
6130
6131         * Makefile.in (LIBGNU, INCGNU): Adjust.
6132         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6133         (all, install-only, uninstall, clean-info, all-lib, clean)
6134         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6135         * configure.ac: Adjust AC_OUTPUT output.
6136         * aclocal.m4: Regenerate.
6137         * configure: Regenerate.
6138
6139 2012-04-19  Pedro Alves  <palves@redhat.com>
6140
6141         * Makefile.in (generated_files): New.
6142         (server_h): Remove the explicit dependency on config.h, and depend
6143         on $generated_files.
6144
6145 2012-04-19  Pedro Alves  <palves@redhat.com>
6146
6147         * Makefile.in (INCGNU): Add -Ignulib.
6148
6149 2012-04-19  Pedro Alves  <palves@redhat.com>
6150
6151         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6152         (INCGNU): ... this, and spell out -I here.
6153         (GNULIB_LIB): Rename to ...
6154         (LIBGNU): ... this.
6155         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6156
6157 2012-04-19  Pedro Alves  <palves@redhat.com>
6158
6159         * config.in: Regenerate.
6160
6161 2012-04-19  Pedro Alves  <palves@redhat.com>
6162
6163         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6164         * server.h (memmem): Remove declaration.
6165         * config.in: Regenerate.
6166         * configure: Regenerate.
6167
6168 2012-04-19  Yao Qi  <yao@codesourcery.com>
6169
6170         * Makefile.in (SFILES): Add common/vec.c.
6171         (OBS): Add vec.o.
6172         (vec.o): New rule.
6173
6174 2012-04-19  Yao Qi  <yao@codesourcery.com>
6175
6176         * remote-utils.c (prepare_resume_reply): Replace with macro
6177         target_core_of_thread.
6178         * server.c (handle_qxfer_threads_proper): Likewise.
6179         * target.h (traget_core_of_thread): New macro.
6180
6181 2012-04-18  Pedro Alves  <palves@redhat.com>
6182
6183         * aclocal.m4: Regenerate.
6184         * configure: Regenerate.
6185
6186 2012-04-16  Yao Qi  <yao@codesourcery.com>
6187
6188         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6189         duplicated on address.
6190
6191 2012-04-16  Yao Qi  <yao@codesourcery.com>
6192
6193         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6194         (struct tracepoint_action_ops) <send>: New field.
6195         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6196         (agent_expr_send, x_tracepoint_action_send): New.
6197         (l_tracepoint_action_send): New.
6198         (cmd_qtdp): Download and install tracepoint
6199         according to `use_agent'.
6200         (run_inferior_command): Add one more parameter `len'.
6201         Update callers.
6202         (tracepoint_send_agent): New.
6203         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6204
6205 2012-04-16  Yao Qi  <yao@codesourcery.com>
6206
6207         * tracepoint.c (download_tracepoints): Moved to ...
6208         (cmd_qtstart): ... here.
6209
6210 2012-04-14  Yao Qi  <yao@codesourcery.com>
6211
6212         * tracepoint.c: Include inttypes.h.
6213         (struct collect_memory_action): Use sized types.
6214         (struct tracepoint): Likewise.
6215         (cmd_qtdp, stop_tracing): Update print specifiers.
6216         (cmd_qtp, response_tracepoint): Likewise.
6217         (collect_data_at_tracepoint): Likewise.
6218         (collect_data_at_step): Likewise.
6219
6220 2012-04-14  Yao Qi  <yao@codesourcery.com>
6221
6222         Import gnulib module inttypes.
6223         * aclocal.m4, config.in, configure: Regenerated.
6224
6225 2012-04-14  Yao Qi  <yao@codesourcery.com>
6226
6227         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6228         Makefile and config.status at last.
6229
6230 2012-04-13  Yao Qi  <yao@codesourcery.com>
6231
6232         * tracepoint.c: Include stdint.h unconditionally.
6233
6234 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6235
6236         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6237         on BFD_HAVE_SYS_PROCFS_TYPE.
6238         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6239         * configure: Regenerate.
6240         * config.in: Likewise.
6241
6242 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6243
6244         * Makefile.in (clean): Also remove x32.c x32-linux.c
6245         x32-avx.c x32-avx-linux.c.
6246         (x32.o): New target.
6247         (x32.c): Likewise.
6248         (x32-linux.o): Likewise.
6249         (x32-linux.c): Likewise.
6250         (x32-avx.o): Likewise.
6251         (x32-avx.c): Likewise.
6252         (x32-avx-linux.o): Likewise.
6253         (x32-avx-linux.c): Likewise.
6254
6255         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6256         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6257         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6258         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6259         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6260         i386/x32-avx-linux.xml.
6261
6262         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6263         (init_registers_x32_avx_linux): Likwise.
6264         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6265         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6266
6267 2012-04-13  Pedro Alves  <palves@redhat.com>
6268
6269         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6270         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6271         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6272         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6273         the sub-make.
6274
6275 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6276
6277         * linux-x86-low.c (compat_x32_clock_t): New.
6278         (compat_x32_siginfo_t): Likewise.
6279         (compat_x32_siginfo_from_siginfo): Likewise.
6280         (siginfo_from_compat_x32_siginfo): Likewise.
6281         (linux_is_elf64): Likewise.
6282         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6283         and siginfo_from_compat_x32_siginfo for x32.
6284         (x86_arch_setup): Set linux_is_elf64.
6285
6286 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6287
6288         PR gdb/13969
6289         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6290         e_machine field.
6291         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6292         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6293         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6294         compatible with process.
6295
6296 2012-04-12  Yao Qi  <yao@codesourcery.com>
6297
6298         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6299         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6300         (install-only, install-info, clean): Handle sub dir gnulib.
6301         (all-lib, am--refresh): New targets.
6302         (memmem.o): Remove target.
6303         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6304         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6305         (AC_REPLACE_FUNCS): Remove memmem.
6306         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6307         (AC_OUTPUT): Generate Makefile in gnulib/.
6308         * aclocal.m4, config.in, configure: Regenerated.
6309
6310 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6311
6312         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6313
6314 2012-04-05  Pedro Alves  <palves@redhat.com>
6315
6316         -Werror=strict-aliasing
6317
6318         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6319         pointer.
6320
6321 2012-04-04  Pedro Alves  <palves@redhat.com>
6322
6323         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6324         (sparc_store_gregset_from_stack, sparc_store_gregset)
6325         (sparc_breakpoint_at): Fix formatting.
6326
6327 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6328
6329         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6330         are available.
6331         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6332         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6333         * config.in: Regenerate.
6334         * configure: Likewise.
6335
6336 2012-03-29  Pedro Alves  <palves@redhat.com>
6337
6338         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6339         Correct ptrace arguments.
6340
6341 2012-03-28  Pedro Alves  <palves@redhat.com>
6342
6343         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6344         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6345         (IA64_FR1_REGNUM): New defines.
6346         (ia64_fetch_register): New.
6347         (the_low_target): Install it.
6348         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6349         field.
6350         * linux-low.c (linux_fetch_registers): Try the
6351         the_low_target.fetch_register hook first.
6352
6353         * linux-arm-low.c (the_low_target): Adjust.
6354         * linux-bfin-low.c (the_low_target): Adjust.
6355         * linux-cris-low.c (the_low_target): Adjust.
6356         * linux-crisv32-low.c (the_low_target): Adjust.
6357         * linux-m32r-low.c (the_low_target): Adjust.
6358         * linux-m68k-low.c (the_low_target): Adjust.
6359         * linux-mips-low.c (the_low_target): Adjust.
6360         * linux-ppc-low.c (the_low_target): Adjust.
6361         * linux-s390-low.c (the_low_target): Adjust.
6362         * linux-sh-low.c (the_low_target): Adjust.
6363         * linux-sparc-low.c (the_low_target): Adjust.
6364         * linux-tic6x-low.c (the_low_target): Adjust.
6365         * linux-x86-low.c (the_low_target): Adjust.
6366         * linux-xtensa-low.c (the_low_target): Adjust.
6367
6368 2012-03-26  Pedro Alves  <palves@redhat.com>
6369
6370         * server.c (handle_qxfer_libraries): Don't bail early if
6371         the_target->qxfer_libraries_svr4 is not NULL.
6372
6373 2012-03-26  Pedro Alves  <palves@redhat.com>
6374
6375         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6376
6377 2012-03-23  Pedro Alves  <palves@redhat.com>
6378
6379         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6380         "library-list-svr4" element's start tag when the the DSO list is
6381         empty.
6382
6383 2012-03-23  Pedro Alves  <palves@redhat.com>
6384
6385         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6386         a variable whose type size is the same as the inferior's pointer
6387         size.
6388
6389 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6390
6391         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6392         struct siginfo.
6393         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6394         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6395         * linux-low.h: Include <signal.h>.
6396         (struct siginfo): Remove forward declaration.
6397         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6398         struct siginfo.
6399
6400 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6401
6402         * .gitignore: Ignore more files.
6403
6404 2012-03-19  Pedro Alves  <palves@redhat.com>
6405             Jan Kratochvil  <jan.kratochvil@redhat.com>
6406
6407         * server.c (cont_thread, general_thread): Add describing comments.
6408         (start_inferior): Clear `cont_thread'.
6409         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6410         of a process.
6411
6412 2012-03-15  Yao Qi  <yao@codesourcery.com>
6413
6414         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6415         handling to ...
6416         (cmd_qtdp): ... here.
6417
6418 2012-03-15  Yao Qi  <yao@codesourcery.com>
6419
6420         * tracepoint.c (struct tracepoint_action_ops): New.
6421         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6422         (m_tracepoint_action_download): New.
6423         (r_tracepoint_action_download): New.
6424         (x_tracepoint_action_download): New.
6425         (l_tracepoint_action_download): New.
6426         (add_tracepoint_action): Install `action->ops' according type.
6427         (download_tracepoint_1): Move code `download' function pointer
6428         of various tracepoint_action_ops.
6429
6430 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6431
6432         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6433         linux_ptrace_attach_warnings.
6434
6435 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6436
6437         * Makefile.in (linux-ptrace.o): New.
6438         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6439         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6440         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6441         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6442         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6443         of these targets.
6444         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6445
6446 2012-03-08  Yao Qi  <yao@codesourcery.com>
6447             Pedro Alves  <palves@redhat.com>
6448
6449         Fix PR server/13392.
6450         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6451         offset of JMP insn.
6452         * tracepoint.c (remove_tracepoint): New.
6453         (cmd_qtdp): Call remove_tracepoint when failed to install.
6454
6455 2012-03-07  Pedro Alves  <palves@redhat.com>
6456
6457         * linux-low.c (get_detach_signal): New.
6458         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6459         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6460         ptrace call.
6461         * server.c (program_signals, program_signals_p): New.
6462         (handle_general_set): Handle QProgramSignals.
6463         * server.h (program_signals, program_signals_p): Declare.
6464
6465 2012-03-05  Pedro Alves  <palves@redhat.com>
6466             Jan Kratochvil  <jan.kratochvil@redhat.com>
6467
6468         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6469         New comment why.
6470
6471 2012-03-03  Yao Qi  <yao@codesourcery.com>
6472
6473         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6474         agent_look_up_symbols.
6475
6476 2012-03-03  Yao Qi  <yao@codesourcery.com>
6477
6478         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6479         (linux-x86-low.o): Likewise.
6480         * server.h: Remove in_process_agent_loaded.
6481         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6482         common/agent.c.
6483         Update callers.
6484
6485 2012-03-03  Yao Qi  <yao@codesourcery.com>
6486
6487         * tracepoint.c (gdb_agent_capability): New global.
6488         (in_process_agent_loaded_ust): Renamed to
6489         `in_process_agent_supports_ust'.
6490         Update callers.
6491         (in_process_agent_supports_ust): Call agent_capability_check.
6492         (clear_installed_tracepoints): Assert that agent supports
6493         agent.
6494
6495 2012-03-03  Yao Qi  <yao@codesourcery.com>
6496
6497         * linux-low.c (linux_supports_agent): New.
6498         (linux_target_ops): Initialize field `supports_agent' with
6499         linux_supports_agent.
6500         * target.h (struct target_ops) <supports_agent>: New.
6501         (target_supports_agent): New macro.
6502         * server.c (handle_general_set): Handle packet 'QAgent'.
6503         (handle_query): Send `QAgent+'.
6504         * Makefile.in (server.o): Depends on agent.h.
6505
6506 2012-03-03  Yao Qi  <yao@codesourcery.com>
6507
6508         * Makefile.in (OBS): Add agent.o.
6509         Add new rule for agent.o.
6510         Track dependence of tracepoint.c on agent.h.
6511         * tracepoint.c (run_inferior_command_1):
6512         (run_inferior_command): Call agent_run_command.
6513         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6514         common/agent.c.
6515         (resume_thread, stop_thread): Likewise.
6516         (gdb_ust_socket_init): Renamed to ...
6517         (gdb_agent_socket_init): ... New.
6518         (gdb_ust_thread): Renamed to ...
6519         (gdb_agent_helper_thread): ... New.
6520         (gdb_ust_init): Move some code to ...
6521         (gdb_agent_init): ... here.  New.
6522         [HAVE_UST]: Call gdb_ust_init.
6523         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6524         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6525         * config.in, configure: Regenerated.
6526
6527 2012-03-02  Pedro Alves  <palves@redhat.com>
6528
6529         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6530         * linux-low.c (struct simple_pid_list): New.
6531         (stopped_pids): New a struct simple_pid_list pointer.
6532         (add_to_pid_list, pull_pid_from_list): New.
6533         (handle_extended_wait): Don't assume the first signal new children
6534         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6535         (linux_wait_for_lwp): Adjust.
6536
6537 2012-03-02  Yao Qi  <yao@codesourcery.com>
6538
6539         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6540         debug log.
6541
6542 2012-03-02  Yao Qi  <yao@codesourcery.com>
6543
6544         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6545         `stop_pc' and `tpoint'.  Update caller.
6546
6547 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6548
6549         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6550         * linux-low.c (use_linux_regsets): New macro.
6551         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6552         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6553         (linux_register_in_regsets): New function.
6554         (usr_fetch_inferior_registers): Skip registers covered by
6555         regsets.
6556         (usr_store_inferior_registers): Likewise.
6557         (usr_fetch_inferior_registers): New macro.
6558         (usr_store_inferior_registers): Likewise.
6559         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6560         (linux_store_registers): Likewise.
6561         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6562         prototype.
6563         (init_registers_mips64_dsp_linux): Likewise.
6564         (init_registers_mips_linux): New macro.
6565         (init_registers_mips_dsp_linux): Likewise.
6566         (mips_dsp_num_regs): Likewise.
6567         (DSP_BASE, DSP_CONTROL): New fallback macros.
6568         (mips_base_regs): New macro.
6569         (mips_regmap): Use it.  Fix the size.
6570         (mips_dsp_regmap): New variable.
6571         (mips_dsp_regset_bitmap): Likewise.
6572         (mips_arch_setup): New function.
6573         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6574         than mips_regmap.
6575         (mips_cannot_store_register): Likewise.
6576         (the_low_target): Update .arch_setup, .num_regs and .regmap
6577         initializers.  Add .regset_bitmap initializer.
6578         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6579         initializer.
6580         * linux-bfin-low.c (the_low_target): Likewise.
6581         * linux-cris-low.c (the_low_target): Likewise.
6582         * linux-crisv32-low.c (the_low_target): Likewise.
6583         * linux-ia64-low.c (the_low_target): Likewise.
6584         * linux-m32r-low.c (the_low_target): Likewise.
6585         * linux-m68k-low.c (the_low_target): Likewise.
6586         * linux-ppc-low.c (the_low_target): Likewise.
6587         * linux-s390-low.c (the_low_target): Likewise.
6588         * linux-sh-low.c (the_low_target): Likewise.
6589         * linux-sparc-low.c (the_low_target): Likewise.
6590         * linux-tic6x-low.c (the_low_target): Likewise.
6591         * linux-x86-low.c (the_low_target): Likewise.
6592         * linux-xtensa-low.c (the_low_target): Likewise.
6593         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6594         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6595         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6596         srv_xmlfiles.
6597         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6598         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6599
6600 2012-02-29  Yao Qi  <yao@codesourcery.com>
6601             Pedro Alves  <palves@redhat.com>
6602
6603         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6604         `step_over_finished' is true.
6605
6606 2012-02-27  Pedro Alves  <palves@redhat.com>
6607
6608         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6609         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6610
6611 2012-02-27  Pedro Alves  <palves@redhat.com>
6612
6613         PR server/9684
6614         * linux-low.c (pid_is_stopped): New.
6615         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6616
6617 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6618
6619         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6620         of conditions.
6621
6622 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
6623
6624         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6625
6626 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6627
6628         * server.c (handle_query): Advertise support for target-side
6629         breakpoint condition evaluation.
6630         (process_point_options): New function.
6631         (process_serial_event): When inserting a breakpoint, check for
6632         a target-side condition that should be evaluated.
6633
6634         * mem-break.c: Include regcache.h and ax.h.
6635         (point_cond_list_t): New data structure.
6636         (breakpoint) <cond_list>: New field.
6637         (find_gdb_breakpoint_at): Make non-static.
6638         (delete_gdb_breakpoint_at): Clear any target-side
6639         conditions.
6640         (clear_gdb_breakpoint_conditions): New function.
6641         (add_condition_to_breakpoint): Likewise.
6642         (add_breakpoint_condition): Likewise.
6643         (gdb_condition_true_at_breakpoint): Likewise.
6644         (gdb_breakpoint_here): Return result directly instead
6645         of going through a local variable.
6646
6647         * mem-break.h (find_gdb_breakpoint_at): New prototype.
6648         (clear_gdb_breakpoint_conditions): Likewise.
6649         (add_breakpoint_condition): Likewise.
6650         (gdb_condition_true_at_breakpoint): Likewise.
6651
6652         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6653         (need_step_over_p): Take target-side breakpoint condition into
6654         consideration.
6655
6656 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6657
6658         * server.h: Include tracepoint.h.
6659         (agent_mem_read, agent_get_trace_state_variable_value,
6660         agent_set_trace_state_variable_value,
6661         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6662         get_set_tsv_func_addr): New prototypes.
6663
6664         * ax.h: New include file.
6665         * ax.c: New source file.
6666
6667         * tracepoint.c: Include ax.h.
6668         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6669         agent_expr, eval_result_type): Move to ax.h.
6670         (parse_agent_expr): Rename to ...
6671         (gdb_parse_agent_expr): ... this, make it non-static and move
6672         to ax.h.
6673         (unparse_agent_expr) Rename to ...
6674         (gdb_unparse_agent_expr): ... this, make it non-static and move
6675         to ax.h.
6676         (eval_agent_expr): Rename to ...
6677         (eval_tracepoint_agent_expr): ... this.
6678         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6679         forward declarations.
6680         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6681         (agent_get_trace_state_variable_value): New function.
6682         (agent_set_trace_state_variable_value): New function.
6683         (cmd_qtdp): Call gdb_parse_agent_expr (...).
6684         (response_tracepoint): Call gdb_unparse_agent_expr (...).
6685         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6686         (condition_true_at_tracepoint): Likewise.
6687         (parse_agent_expr): Rename to ...
6688         (gdb_parse_agent_expr): ... this and move to ax.c.
6689         (unparse_agent_expr): Rename to ...
6690         (gdb_unparse_agent_expr): ... this and move to ax.c.
6691         (gdb_agent_op_name): Move to ax.c.
6692         (eval_agent_expr): Rename to ...
6693         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6694         and move to ax.c.
6695         (eval_tracepoint_agent_expr): New function.
6696         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6697         non-static.
6698         (current_insn_ptr, emit_error, struct bytecode_address): Move to
6699         ax.c.
6700         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6701         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6702         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6703         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6704         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6705         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6706         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6707         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6708         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6709         (compile_bytecodes): Remove forward declaration.
6710         (is_goto_target): Move to ax.c.
6711         (compile_bytecodes): Move to ax.c and call
6712         agent_get_trace_state_variable_value (...) and
6713         agent_set_trace_state_variable_value (...).
6714
6715         * Makefile.in: Update ax.c and IPA dependencies.
6716
6717 2012-02-24  Pedro Alves  <palves@redhat.com>
6718
6719         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6720         (cmd_bigqtbuffer_circular): ... this.  Only handle
6721         'QTBuffer:circular:'.
6722         (handle_tracepoint_general_set): Adjust.
6723
6724 2012-02-16  Yao Qi  <yao@codesourcery.com>
6725
6726         * inferiors.c: Move code to ...
6727         * dll.c: .... here.  New.
6728         * server.h: Declare clear_dlls.
6729         * Makefile.in (SFILES): Add dll.c.
6730         (OBS): Add dll.o
6731         (dll.o): New rule.
6732
6733 2012-02-11  Yao Qi  <yao@codesourcery.com>
6734
6735         * server.c: (handle_monitor_command): Add a new parameter
6736         `own_buf'.
6737         (handle_query): Update caller.
6738
6739 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
6740
6741         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6742         * configure, config.in: Regenerate.
6743         * hostio.c: Provide an alternate implementation if HAVE_READLINK
6744         is not defined.
6745
6746 2012-02-02  Pedro Alves  <palves@redhat.com>
6747
6748         Try SIGKILL first, then PTRACE_KILL.
6749         * linux-low.c (linux_kill_one_lwp): New.
6750         (linux_kill_one_lwp): Rename to ...
6751         (kill_one_lwp_callback): ... this.  Use the new
6752         linux_kill_one_lwp.
6753
6754 2012-02-02  Pedro Alves  <palves@redhat.com>
6755
6756         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6757         inferior.
6758
6759 2012-01-27  Pedro Alves  <palves@redhat.com>
6760
6761         * linux-low.c (linux_child_pid_to_exec_file): Delete.
6762         (elf_64_file_p): Make static.
6763         (linux_pid_exe_is_elf_64_file): New.
6764         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6765         Delete declarations.
6766         (linux_pid_exe_is_elf_64_file): Declare.
6767         * linux-x86-low.c (x86_arch_setup): Use
6768         linux_pid_exe_is_elf_64_file.
6769
6770 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6771
6772         * linux-low.c (linux_wait_for_event_1): Rename to ...
6773         (linux_wait_for_event): ... here and merge it with former
6774         linux_wait_for_event - new variable wait_ptid, use it.
6775         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6776
6777 2012-01-23  Pedro Alves  <palves@redhat.com>
6778
6779         * server.c (main): Avoid yet another case of infinite loop while
6780         detaching/killing after a longjmp.
6781
6782 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6783
6784         Code cleanup.
6785         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6786
6787 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
6788
6789         * hostio.c (handle_readlink): New function.
6790         (handle_vFile): Call it to handle "vFile:readlink" packets.
6791
6792 2012-01-20  Pedro Alves  <palves@redhat.com>
6793             Ulrich Weigand  <ulrich.weigand@linaro.org>
6794
6795         * server.c (handle_v_requests): Only support vAttach and vRun to
6796         start multiple processes when in extended protocol mode.
6797
6798 2012-01-17  Pedro Alves  <palves@redhat.com>
6799
6800         * tracepoint.c (initialize_tracepoint): Use mmap instead of
6801         memalign plus mprotect to allocate the scratch buffer.
6802
6803 2012-01-13  Pedro Alves  <palves@redhat.com>
6804
6805         * server.c (attach_inferior): Clear `cont_thread'.
6806
6807 2012-01-13  Pedro Alves  <palves@redhat.com>
6808
6809         * server.c (main): Avoid infinite loop while detaching/killing
6810         after a longjmp.
6811
6812 2012-01-09  Doug Evans  <dje@google.com>
6813
6814         * server.c (start_inferior): Set last_ptid in --wrapper case.
6815
6816 2012-01-06  Yao Qi  <yao@codesourcery.com>
6817
6818         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6819         defined.
6820         [IN_PROCESS_AGENT] (debug_agent): New global variable.
6821
6822 2012-01-04  Yao Qi  <yao@codesourcery.com>
6823
6824         * tracepoint.c (cmd_qtdp): Print debug message
6825         for static tracepoint.
6826
6827 2012-01-04  Yao Qi  <yao@codesourcery.com>
6828
6829         * tracepoint.c (trace_vdebug): Differentiate debug message
6830         between gdbserver and IPA.
6831
6832 2012-01-03  Yao Qi  <yao@codesourcery.com>
6833
6834         * tracepoint.c (tracepoint_was_hit): Don't collect for
6835         static tracepoint.
6836
6837 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6838
6839         * terminal.h: Reformat copyright header.
6840
6841 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6842
6843         * server.c (gdbserver_version): Update copyright year.
6844         * gdbreplay.c (gdbreplay_version): Likewise.
6845
6846 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6847
6848         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6849
6850         Revert:
6851         2011-12-18  Hui Zhu  <teawater@gmail.com>
6852         * linux-low.c (linux_create_inferior): Save return value to ret.
6853
6854 2011-12-18  Hui Zhu  <teawater@gmail.com>
6855
6856         * linux-low.c (linux_create_inferior): Save return value to ret.
6857
6858 2011-12-16  Doug Evans  <dje@google.com>
6859
6860         * linux-low.c (linux_create_inferior): If stdio connection,
6861         redirect stdin from /dev/null, stdout to stderr.
6862         * remote-utils.c (remote_is_stdio): New static global.
6863         (remote_connection_is_stdio): New function.
6864         (remote_prepare): Handle stdio connection.
6865         (remote_open): Ditto.
6866         (remote_close): Don't close stdin for stdio connections.
6867         (read_prim,write_prim): New functions.  Replace all calls to
6868         read/write to these.
6869         * server.c (main): Watch for "-" argument.  Move call to
6870         remote_prepare before start_inferior.
6871         * server.h (STDIO_CONNECTION_NAME): New macro.
6872         (remote_connection_is_stdio): Declare.
6873
6874         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6875         in debugging output.
6876
6877 2011-12-15  Yao Qi  <yao@codesourcery.com>
6878
6879         * tracepoint.c: Include sys/syscall.h.
6880         (gdb_ust_thread): Remove preprocessor conditional.
6881
6882 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
6883
6884         * linux-low.c (linux_detach_one_lwp): Call
6885         the_low_target.prepare_to_resume before detaching.
6886
6887 2011-12-14  Yao Qi  <yao@codesourcery.com>
6888
6889         * tracepoint.c (gdb_ust_thread): Don't ignore return value
6890         of write.
6891
6892 2011-12-14  Yao Qi  <yao@codesourcery.com>
6893
6894         * i386-low.c (i386_low_stopped_data_address): Initialize local
6895         variable `control'.
6896
6897 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
6898
6899         PR remote/13492
6900
6901         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6902         DR_CONTROL unless necessary.  Extend comments.
6903         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6904         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
6905
6906 2011-12-13  Yao Qi  <yao@codesourcery.com>
6907
6908         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6909         macros.
6910         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6911
6912 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
6913
6914         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6915         Print new debug message for such case.
6916
6917 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6918
6919         Fix overlapping memcpy.
6920         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
6921         the read_inferior_memory transfer.
6922         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
6923         write_inferior_memory transfer.
6924         (set_fast_tracepoint_jump): New variable buf.  Use it for the
6925         read_inferior_memory and write_inferior_memory transfers.
6926         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6927         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6928         Use it for the write_inferior_memory transfer.
6929         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6930         buffers.
6931
6932 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6933
6934         * linux-low.c (fetch_register, store_register): Make code
6935         consistent, fix formatting.
6936
6937 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6938
6939         * linux-low.c (usr_store_inferior_registers): Factor out code
6940         to handle individual registers into...
6941         (store_register): ... this new function.
6942
6943 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
6944
6945         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6946         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6947         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6948         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6949         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6950         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6951         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6952         (srv_xmlfiles): Add new XML files.
6953
6954         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6955         and <sys/uio.h>.
6956         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6957         (init_registers_s390_linux32v1): Add prototype.
6958         (init_registers_s390_linux32v2): Likewise.
6959         (init_registers_s390_linux64v1): Likewise.
6960         (init_registers_s390_linux64v2): Likewise.
6961         (init_registers_s390x_linux64v1): Likewise.
6962         (init_registers_s390x_linux64v2): Likewise.
6963         (s390_num_regs): Increment to 52.
6964         (s390_regmap): Add orig_r2 register.
6965         (s390_num_regs_3264): Increment to 68.
6966         (s390_regmap_3264): Add orig_r2 register.
6967         (s390_collect_ptrace_register): Handle orig_r2 register.
6968         (s390_supply_ptrace_register): Likewise.
6969         (s390_fill_last_break): New function.
6970         (s390_store_last_break): Likewise.
6971         (s390_fill_system_call): New function.
6972         (s390_store_system_call): Likewise.
6973         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6974         register sets.
6975         (s390_check_regset): New function.
6976         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6977         NT_S390_SYSTEM_CALL regsets and use appropriate description.
6978         Update target_regsets for available register sets.
6979
6980 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
6981             Jan Kratochvil  <jan.kratochvil@redhat.com>
6982
6983         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6984         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6985         New.
6986         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6987         * linux-low.h (struct process_info_private): New member r_debug.
6988         * server.c (handle_qxfer_libraries): Call
6989         the_target->qxfer_libraries_svr4.
6990         (handle_qxfer_libraries_svr4): New function.
6991         (qxfer_packets): New entry "libraries-svr4".
6992         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6993         * target.h (struct target_ops): New member qxfer_libraries_svr4.
6994         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6995         PACKET_qXfer_libraries_svr4.
6996
6997 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
6998
6999         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7000         PSW address/mask between 8-byte and 16-byte formats.
7001         (s390_supply_ptrace_register): Likewise.
7002         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7003         basic addressing mode bit.
7004
7005 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7006
7007         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7008
7009 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7010
7011         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7012         (tracing_start_time): New global.
7013         (tracing_stop_time): New global.
7014         (tracing_user_name): New global.
7015         (tracing_notes): New global.
7016         (tracing_stop_note): New global.
7017         (cmd_qtstart): Set traceframe_usage, start_time.
7018         (stop_tracing): Set stop_time.
7019         (cmd_qtstatus): Report additional status.
7020         (cmd_qtp): New function.
7021         (handle_tracepoint_query): Call it.
7022         (cmd_qtnotes): New function.
7023         (handle_tracepoint_general_set): Call it.
7024         (get_timestamp): Rename from tsv_get_timestamp.
7025
7026 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7027             Kwok Cheung Yeung  <kcy@codesourcery.com>
7028
7029         * linux-x86-low.c (small_jump_insn): New.
7030         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7031         trampoline and error message, build a trampoline and issue a small
7032         jump instruction to it.
7033         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7034         trampoline and error message.
7035         (x86_get_min_fast_tracepoint_insn_len): New.
7036         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7037         * linux-low.h (struct linux_target_ops): Add arguments to
7038         install_fast_tracepoint_jump_pad operation, add new operation.
7039         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7040         arguments.
7041         (linux_get_min_fast_tracepoint_insn_len): New function.
7042         (linux_target_op): Add new operation.
7043         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7044         (gdb_trampoline_buffer_end): Ditto.
7045         (gdb_trampoline_buffer_error): Ditto.
7046         (struct ipa_sym_addresses): Add fields for new IPA variables.
7047         (symbol_list): Add entries for new IPA variables.
7048         (struct tracepoint): Add fields to hold the address range of the
7049         trampoline used by the tracepoint.
7050         (trampoline_buffer_head): New static variable.
7051         (trampoline_buffer_tail): Ditto.
7052         (claim_trampoline_space): New function.
7053         (have_fast_tracepoint_trampoline_buffer): New function.
7054         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7055         structure.
7056         (install_fast_tracepoint): Ditto, also add error buffer argument.
7057         (cmd_qtminftpilen): New function.
7058         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7059         (fast_tracepoint_from_trampoline_address): New function.
7060         (fast_tracepoint_collecting): Handle trampoline as part of jump
7061         pad space.
7062         (set_trampoline_buffer_space): New function.
7063         (initialize_tracepoint): Initialize new IPA variables.
7064         * target.h (struct target_ops): Add arguments to
7065         install_fast_tracepoint_jump_pad operation, add new
7066         get_min_fast_tracepoint_insn_len operation.
7067         (target_get_min_fast_tracepoint_insn_len): New.
7068         (install_fast_tracepoint_jump_pad): Add arguments.
7069         * server.h (IPA_BUFSIZ): Define.
7070         * linux-i386-ipa.c: Include extra header files.
7071         (initialize_fast_tracepoint_trampoline_buffer): New function.
7072         (initialize_low_tracepoint): Call it.
7073         * server.h (set_trampoline_buffer_space): Declare.
7074         (claim_trampoline_space): Ditto.
7075         (have_fast_tracepoint_trampoline_buffer): Ditto.
7076
7077 2011-11-14  Yao Qi  <yao@codesourcery.com>
7078
7079         * server.c (handle_query): Handle InstallInTrace for qSupported.
7080         * tracepoint.c (add_tracepoint): Sort list.
7081         (install_tracepoint, download_tracepoint): New.
7082         (cmd_qtdp): Call them to install and download tracepoints.
7083         (sort_tracepoints): Removed.
7084         (cmd_qtstart): Update.
7085
7086 2011-11-14  Yao Qi  <yao@codesourcery.com>
7087
7088         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7089         * mem-break.h: Declare.
7090         * tracepoint.c (cmd_qtstart): Move some code to ...
7091         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7092         New.
7093         (download_tracepoints): Move some code to ...
7094         (download_tracepoint_1): ... here.  New.
7095
7096 2011-11-08  Yao Qi  <yao@codesourcery.com>
7097
7098         * remote-utils.c (relocate_instruction): A comment fix.
7099
7100 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7101
7102         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7103         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7104         dr_status_mirror and dr_control_mirror from debug_reg_state.
7105         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7106         (i386_initial_stuff): Remove use of deleted globals.
7107         (i386_get_thread_context, i386_set_thread_context,
7108         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7109         from debug_reg_state.
7110
7111 2011-11-05  Yao Qi  <yao@codesourcery.com>
7112
7113         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7114         address as TPOINT's.
7115
7116 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7117
7118         * tracepoint.c (agent_mem_read_string): New function.
7119         (eval_agent_expr): Call it for tracenz.
7120         * server.c (handle_query): Report support for tracenz.
7121
7122 2011-11-02  Yao Qi  <yao@codesourcery.com>
7123
7124         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7125
7126 2011-11-02  Yao Qi  <yao@codesourcery.com>
7127
7128         * target.h: Fix a typo in comment.
7129
7130 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7131
7132         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7133         clobber the breakpoints' shadows with fast tracepoint jumps.
7134         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7135         * target.c (write_inferior_memory): Also pass MYADDR down to
7136         check_mem_write.
7137
7138 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7139
7140         * configure.ac: Check support for personality routine.
7141         * configure: Regenerate.
7142         * config.in: Likewise.
7143         * linux-low.c: Include <sys/personality.h>.
7144         Define ADDR_NO_RANDOMIZE if necessary.
7145         (linux_create_inferior): Disable address space randomization when
7146         forking inferior, if requested.
7147         (linux_supports_disable_randomization): New function.
7148         (linux_target_ops): Install it.
7149         * server.h (disable_randomization): Declare.
7150         * server.c (disable_randomization): New global variable.
7151         (handle_general_set): Handle QDisableRandomization.
7152         (handle_query): Likewise for qSupported.
7153         (main): Support --disable-randomization and --no-disable-randomization
7154         command line arguments.
7155         * target.h (struct target_ops): Add supports_disable_randomization.
7156         (target_supports_disable_randomization): New macro.
7157
7158 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7159
7160         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7161         ifdef check.
7162         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7163         [!PT_GETDSBT] (target_loadmap): New definition.
7164         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7165         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7166         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7167         and PT_GETDSBT to LINUX_LOADMAP.
7168         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7169         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7170
7171 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7172
7173         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7174         (arm_linux_hwbp_cap): New static variable.
7175         (arm_linux_get_hwbp_cap): Replace by ...
7176         (arm_linux_init_hwbp_cap): ... this new function.
7177         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7178         (arm_linux_get_hw_watchpoint_count): Likewise.
7179         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7180         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7181         (arm_prepare_to_resume): Use perror_with_name instead of error.
7182
7183 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7184
7185         * linux-arm-low.c: Include <signal.h>.
7186         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7187         (struct arm_linux_hwbp_cap): New data type.
7188         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7189         (struct arm_linux_hw_breakpoint): New data type.
7190         (MAX_BPTS, MAX_WPTS): Define.
7191         (struct arch_process_info, struct arch_lwp_info): New data types.
7192         (arm_linux_get_hwbp_cap): New function.
7193         (arm_linux_get_hw_breakpoint_count): Likewise.
7194         (arm_linux_get_hw_watchpoint_count): Likewise.
7195         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7196         (arm_hwbp_control_initialize): Likewise.
7197         (arm_hwbp_control_is_enabled): Likewise.
7198         (arm_hwbp_control_is_initialized): Likewise.
7199         (arm_hwbp_control_disable): Likewise.
7200         (arm_linux_hw_breakpoint_equal): Likewise.
7201         (arm_linux_hw_point_initialize): Likewise.
7202         (struct update_registers_data): New data structure.
7203         (update_registers_callback: New function.
7204         (arm_insert_point): Likewise.
7205         (arm_remove_point): Likewise.
7206         (arm_stopped_by_watchpoint): Likewise.
7207         (arm_stopped_data_address): Likewise.
7208         (arm_new_process): Likewise.
7209         (arm_new_thread): Likewise.
7210         (arm_prepare_to_resume): Likewise.
7211         (the_low_target): Register arm_insert_point, arm_remove_point,
7212         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7213         arm_new_thread, and arm_prepare_to_resume.
7214
7215 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7216
7217         * server.h (struct emit_ops): Add compare-goto fields.
7218         * tracepoint.c (gdb_agent_op_sizes): New table.
7219         (emit_eq_goto): New function.
7220         (emit_ne_goto): New function.
7221         (emit_lt_goto): New function.
7222         (emit_le_goto): New function.
7223         (emit_gt_goto): New function.
7224         (emit_ge_goto): New function.
7225         (is_goto_target): New function.
7226         (compile_bytecodes): Recognize special cases of compare-goto
7227         combinations and call specialized emitters for them.
7228         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7229         (amd64_emit_ne_goto): New function.
7230         (amd64_emit_lt_goto): New function.
7231         (amd64_emit_le_goto): New function.
7232         (amd64_emit_gt_goto): New function.
7233         (amd64_emit_ge_goto): New function.
7234         (amd64_emit_ops): Add the new functions.
7235         (i386_emit_eq_goto): New function.
7236         (i386_emit_ne_goto): New function.
7237         (i386_emit_lt_goto): New function.
7238         (i386_emit_le_goto): New function.
7239         (i386_emit_gt_goto): New function.
7240         (i386_emit_ge_goto): New function.
7241         (i386_emit_ops): Add the new functions.
7242
7243 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7244
7245         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7246         (i386_emit_epilogue): Restore %ebx.
7247
7248 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7249
7250         * server.c (step_thread): Remove definition.
7251         (process_serial_event): Don't handle Hs.
7252         * server.h (step_thread): Remove declaration.
7253         * target.c (set_desired_inferior): Remove use of step_thread.
7254
7255 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7256
7257         * linux-low.c: Include linux-procfs.h.
7258         (linux_attach_lwp_1): Update comments.
7259         (linux_attach): Scan for existing threads when attaching to a
7260         process that is the tgid.
7261         * Makefile.in: Update dependencies.
7262
7263 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7264
7265         * configure.srv: Add linux-procfs.o dependencies.
7266
7267 2011-08-14  Yao Qi  <yao@codesourcery.com>
7268
7269         * target.h (struct target_ops): Fix indent.
7270         * win32-low.c (win32_target_ops): Fix comment.
7271
7272 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7273             Yao Qi  <yao@codesourcery.com>
7274
7275         * Makefile.in (clean): Remove tic6x-*.c files.
7276         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7277         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7278         (tic6x-c64xp-linux.c): Likewise.
7279         * configure.srv: Add support for tic6x-*-uclinux.
7280         * linux-tic6x-low.c: New.
7281         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7282
7283 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7284             Yao Qi  <yao@codesourcery.com>
7285
7286         * target.h (struct target_ops): Add read_loadmap.
7287         * linux-low.c (struct target_loadseg): New type.
7288         (struct target_loadmap): New type.
7289         (linux_read_loadmap): New function.
7290         (linux_target_ops): Add linux_read_loadmap.
7291         * server.c (handle_query): Support qXfer:fdpic:read packet.
7292         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7293         to NULL.
7294
7295 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7296
7297         * win32-low.c: Include <stdint.h>.
7298
7299 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7300
7301         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7302         to the inferior here.
7303         (i386_remove_aligned_watchpoint): Ditto.
7304         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7305         fit part of the watchpoint in the debug registers.
7306         (i386_update_inferior_debug_regs): New.
7307         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7308         registers, and only update the inferior on success.
7309         (i386_low_remove_watchpoint): Ditto.
7310
7311 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7312
7313         * linux-low.c (compare_ints, unique, list_threads, show_process,
7314         linux_core_of_thread): Delete.
7315         (linux_target_ops): Change linux_core_of_thread to
7316         linux_common_core_of_thread.
7317         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7318         * utils.c (malloc_failure): Change type of argument.
7319         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7320         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7321         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7322         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7323         (IPA_OBJS): Add common-utils-ipa.o.
7324         (ptid_h, linux_osdata_h): New macros.
7325         (server_h): Add common/common-utils.h, common/xml-utils.h,
7326         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7327         common/ptid.h.
7328         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7329         ptid.o, buffer.o): New rules.
7330         (linux-low.o): Add common/linux-osdata.h as a dependency.
7331         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7332         * configure.ac: Add AC_HEADER_DIRENT check.
7333         * config.in: Regenerate.
7334         * configure: Regenerate.
7335         * remote-utils.c (xml_escape_text): Delete.
7336         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7337         buffer_xml_printf): Move to common/buffer.c.
7338         * server.c (main): Remove call to initialize_inferiors.
7339         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7340         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7341         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7342         internal_error, gdb_assert, gdb_assert_fail): Delete.
7343         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7344         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7345         common/buffer.h.
7346         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7347         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7348         initialize_inferiors): Delete.
7349
7350 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7351
7352         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7353         symbol error.
7354
7355 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7356
7357         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7358         assertion.
7359         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7360
7361 2011-05-26  Yao Qi  <yao@codesourcery.com>
7362
7363         * Makefile.in (thread-db.o): Track dependence to
7364         common/gdb_thread_db.h.
7365         * thread-db.c: include gdb_thread_db.h from right place.
7366
7367 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7368
7369         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7370         __FILE__ and __LINE__ to internal_error.
7371
7372 2011-05-13  Doug Evans  <dje@google.com>
7373
7374         * thread-db.c (try_thread_db_load_from_sdir): New function.
7375         (try_thread_db_load_from_dir): New function.
7376         (thread_db_load_search): Handle $sdir, ignore $pdir.
7377         Remove trying of system directories if search of
7378         libthread-db-search-path fails, that is now done via $sdir.
7379
7380 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7381
7382         * server.c (handle_query): Add EnableDisableTracepoints to the list
7383         of supported features.
7384         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7385         tracepoints.
7386         (cmd_qtenable_disable): New.
7387         (cmd_qtstart): Install tracepoints even if disabled.
7388         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7389         receiving a QTEnable or QTDisable packet.
7390         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7391         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7392         tracepoints.
7393         (gdb_probe): Skip data collection if static tracepoint is disabled.
7394
7395 2011-05-10  Doug Evans  <dje@google.com>
7396
7397         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7398
7399 2011-05-04  Doug Evans  <dje@google.com>
7400
7401         * linux-low.c (linux_join): Skip process lookup.
7402         * spu-low.c (spu_join): Ditto.
7403         * server.c (join_inferiors_callback): Delete.
7404         (process_serial_event): For 'D' packet (detach) call join_inferior
7405         directly.
7406
7407 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7408
7409         * README: Don't mention xscale*-*-linux*.
7410         * configure.srv (xscale*-*-linux*): Don't handle target.
7411
7412 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7413
7414         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7415         casting pointers.
7416         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7417         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7418         (i386_emit_void_call_2): Likewise.
7419
7420 2011-04-26  Yao Qi  <yao@codesourcery.com>
7421
7422         * linux-low.c: Move common macros to linux-ptrace.h.
7423         Include linux-ptrace.h.
7424         * Makefile.in (linux_ptrace_h): New.
7425         (linux-low.o): Depends on linux-ptrace.h.
7426
7427 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7428
7429         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7430         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7431         (remote_prepare): New function with most of the TCP code from ...
7432         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7433         setting transport_is_reliable.
7434         * server.c (run_once): New variable.
7435         (gdbserver_usage): Document it.
7436         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7437         the first run if RUN_ONCE.
7438         * server.h (run_once, remote_prepare): New declarations.
7439
7440 2011-04-19  Tom Tromey  <tromey@redhat.com>
7441
7442         * win32-low.c (handle_load_dll): Remove duplicate "the".
7443
7444 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7445
7446         Remove support for old Cygwin 1.5 versions.
7447         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7448         function to avoid warning.
7449         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7450         warning.
7451
7452 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7453
7454         * gdbserver/server.h (Macro _): Define it if not available.
7455
7456 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7457
7458         * hostio.c (handle_close): Remove unnecessary null test.
7459
7460 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7461
7462         * Makefile.in (maintainer-clean realclean distclean): Remove
7463         "make ...  subdir_do" command.
7464
7465 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7466
7467         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7468
7469         * server.c (handle_v_run): Free alloced buffer on early return.
7470
7471 2011-03-09  Yao Qi  <yao@codesourcery.com>
7472
7473         Revert:
7474         2011-03-04  Yao Qi  <yao@codesourcery.com>
7475
7476         * Makefile.in: Remove GNU make feature --directory.
7477
7478         2011-03-05  Yao Qi  <yao@codesourcery.com>
7479
7480         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7481         (subdir_do): New make target.  Copied from gdb/Makefile.
7482         (maintainer-clean, realclean, distclean, clean): Call corresponding
7483         make targets in common/Makefile.
7484
7485         2011-02-11  Yao Qi  <yao@codesourcery.com>
7486
7487         * configure.ac: Call AC_PROG_RANLIB.
7488         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7489         * configure: Regenerate.
7490
7491 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7492
7493         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7494
7495 2011-03-06  Yao Qi  <yao@codesourcery.com>
7496
7497         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7498
7499 2011-03-05  Yao Qi  <yao@codesourcery.com>
7500
7501         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7502         (subdir_do): New make target.  Copied from gdb/Makefile.
7503         (maintainer-clean, realclean, distclean, clean): Call corresponding
7504         make targets in common/Makefile.
7505
7506 2011-03-04  Yao Qi  <yao@codesourcery.com>
7507
7508         * Makefile.in: Remove GNU make feature --directory.
7509
7510 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7511
7512         * server.c (queue_stop_reply): Call xmalloc not malloc.
7513
7514 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7515
7516         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7517
7518 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7519
7520         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7521         (cmd_qtframe): Ditto.
7522         (cmd_qtbuffer): Ditto.
7523         (cmd_bigqtbuffer): Ditto.
7524
7525         * utils.c (decimal2str): Initialize 'width' to nine, then
7526         don't mess with it.
7527
7528 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7529
7530         * hostio.c (require_data): Free *data, not data.
7531
7532 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7533
7534         * hostio.c (require_data): Use free, not xfree.
7535
7536 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7537
7538         * server.c (handle_query): Discard unused value.
7539
7540         * hostio.c (require_data): Free malloc memory before returning
7541         error.
7542
7543 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7544
7545         * linux-low.c (list_threads): Call closedir for dirent.
7546
7547 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7548
7549         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7550         a case statement falls through.
7551
7552         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7553
7554         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7555         in comparison.
7556
7557 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7558
7559         * utils.c (decimal2str): Eliminate dead code and dead param.
7560         (pulongest): Drop dead param from call to decimal2str.
7561         (plongest): Ditto.
7562
7563 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7564
7565         Revert the following patch (not approved yet):
7566         2011-02-21  Hui Zhu  <teawater@gmail.com>
7567         * tracepoint.c (tp_printf): New function.
7568         (eval_agent_expr): Handle gdb_agent_op_printf.
7569
7570 2011-02-21  Hui Zhu  <teawater@gmail.com>
7571
7572         * tracepoint.c (tp_printf): New function.
7573         (eval_agent_expr): Handle gdb_agent_op_printf.
7574
7575 2011-02-18  Tom Tromey  <tromey@redhat.com>
7576
7577         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7578         (tracepoint.o): Likewise.
7579         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7580         (gdb_agent_op_names): Likewise.
7581
7582 2011-02-18  Tom Tromey  <tromey@redhat.com>
7583
7584         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7585         gdb_agent_op_rot>: New constants.
7586         (gdb_agent_op_names): Add pick and roll.
7587         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7588         cases.
7589
7590 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7591
7592         * aclocal.m4: Regenerated with aclocal-1.11.1.
7593
7594 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7595
7596         * server.c (handle_qxfer_traceframe_info): New.
7597         (qxfer_packets): Register "traceframe-info".
7598         (handle_query): Report support for qXfer:traceframe-info:read+.
7599         * tracepoint.c (match_blocktype): New.
7600         (traceframe_find_block_type): Rename to ...
7601         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7602         and use it.
7603         (traceframe_find_block_type): New, reimplemented on top of
7604         traceframe_walk_blocks.
7605         (build_traceframe_info_xml): New.
7606         (traceframe_read_info): New.
7607         * server.h (traceframe_read_info): Declare.
7608
7609 2011-02-11  Yao Qi  <yao@codesourcery.com>
7610
7611         * configure.ac: Call AC_PROG_RANLIB.
7612         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7613         * configure: Regenerate.
7614
7615 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7616
7617         * server.c (gdb_read_memory): Change return semantics to allow
7618         partial transfers.
7619         (handle_search_memory_1): Adjust.
7620         (process_serial_event) <'m' packet>: Handle partial transfers.
7621         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7622
7623 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7624
7625         * regcache.c (init_register_cache): Initialize
7626         regcache->register_status.
7627         (free_register_cache): Release regcache->register_status.
7628         (regcache_cpy): Copy register_status.
7629         (registers_to_string): Print 'x's for unavailable registers.
7630         (supply_register): Mark the register's status valid or
7631         unavailable, depending on whether a buffer was passed in or not.
7632         (supply_register_zeroed): New.
7633         (supply_regblock): Mark the registers' status valid or
7634         unavailable, depending on whether a buffer was passed in or not.
7635         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7636         (struct regcache): New `register_status' field.
7637         (supply_register_zeroed): Declare.
7638         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7639         supply_register_zeroed, rather than passing a NULL buffer to
7640         supply_register.
7641         * tracepoint.c (fetch_traceframe_registers): Update comment.
7642
7643 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7644
7645         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7646         buffer explicit.
7647
7648 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
7649
7650         * server.h (decode_xfer_write): Change prototype.
7651         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7652         and don't extract the annex here.
7653         * server.c (decode_xfer_read): Remove `annex' parameter,
7654         and don't extract the annex here.
7655         (decode_xfer): New.
7656         (struct qxfer): New.
7657         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7658         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7659         (handle_qxfer_statictrace): New functions, abstracted out from
7660         handle_query, and made to use the struct qxfer interface.
7661         (handle_threads_qxfer_proper): Rename to ...
7662         (handle_qxfer_threads_proper): ... this.
7663         (handle_threads_qxfer): Rename to ...
7664         (handle_qxfer_threads): ... this.  Adjust.
7665         (qxfer_packets): New array.
7666         (handle_qxfer): New function.
7667         (handle_query): Use handle_qxfer.
7668
7669 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
7670
7671         * gdbreplay.c: Shorten lines of >= 80 columns.
7672         * linux-low.c: Ditto.
7673         * linux-ppc-low.c: Ditto.
7674         * linux-s390-low.c: Ditto.
7675         * linux-sparc-low.c: Ditto.
7676         * linux-x86-low.c: Ditto.
7677         * linux-xtensa-low.c: Ditto.
7678         * mem-break.c: Ditto.
7679         * nto-low.c: Ditto.
7680         * regcache.h: Ditto.
7681         * remote-utils.c: Ditto.
7682         * server.c: Ditto.
7683         * server.h: Ditto.
7684         * thread-db.c: Ditto.
7685         * tracepoint.c: Ditto.
7686         * utils.c: Ditto.
7687         * win32-low.h: Ditto.
7688
7689 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
7690
7691         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7692         update.
7693
7694 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
7695
7696         * server.c (gdbserver_version): Update copyright year in version
7697         output.
7698         * gdbreplay.c (gdbreplay_version): Ditto.
7699
7700 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
7701
7702         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7703         * linux-bfin-low.c: New file.
7704         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7705         PT_DATA_ADDR for BFIN targets.
7706         * Makefile.in (SFILES): Add linux-bfin-low.c.
7707         (clean): Remove reg-bfin.c.
7708         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7709         * README: Mention supported Blackfin targets.
7710
7711 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
7712
7713         * .gitignore: New file.
7714
7715 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
7716
7717         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7718
7719 2010-10-22  Jie Zhang  <jie@codesourcery.com>
7720
7721         * Makefile.in: Add FLAGS_TO_PASS variable.
7722         (install): Remove dependency of install-only and recursively
7723         invoke make for install-only.
7724
7725 2010-10-04  Doug Evans  <dje@google.com>
7726
7727         * Makefile.in (uninstall): Use $(DESTDIR).
7728
7729 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
7730
7731         PR gdb/11842
7732
7733         * linux-x86-low.c (compat_siginfo_from_siginfo)
7734         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7735         si_code is < 0.  Check for si_code == SI_TIMER before checking for
7736         si_code < 0.
7737
7738 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7739
7740         * lynx-i386-low.c: New file.
7741         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7742
7743 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7744
7745         * lynx-low.c (ptrace_request_to_str): Remove handling for
7746         request values that have been removed in LynxOS 5.x.
7747
7748 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7749
7750         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7751         <ptrace.h>
7752
7753 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
7754
7755         * configure.ac: Add --enable-inprocess-agent option.
7756         * configure: Rebuilt.
7757
7758 2010-09-06  Yao Qi  <yao@codesourcery.com>
7759
7760         * linux-low.c (linux_kill): Remove unused variable.
7761         (linux_stabilize_threads): Likewise.
7762         * server.c (start_inferior): Likewise.
7763         (queue_stop_reply_callback): Likewise.
7764         * tracepoint.c (do_action_at_tracepoint): Likewise.
7765
7766 2010-09-06  Yao Qi  <yao@codesourcery.com>
7767
7768         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7769         on return.
7770
7771 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7772
7773         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7774
7775 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
7776
7777         * Makefile.in (install-only): Replace $IPA_DEPFILES with
7778         "$(IPA_DEPFILES)".
7779
7780 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7781
7782         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7783         gdbserver/lynx-ppc-low.c: New files.
7784         * Makefile.in (lynx_low_h): New variable.
7785         (lynx-low.o, lynx-ppc-low.o): New rules.
7786         * configure.ac: On LynxOS, link with -lnetinet.
7787         * configure.srv: Add handling of powerpc-*-lynxos* targets.
7788         * configure: regenerate.
7789
7790 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7791
7792         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7793         * configure.ac: Add check for vasprintf and vsnprintf.
7794         * configure, config.in: Regenerate.
7795         * server.h (vasprintf, vsnprintf): Add conditional declarations.
7796
7797 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7798
7799         * gdbreplay.c: Move include of alloca.h up, next to include of
7800         malloc.h.
7801         * server.h: Add include of malloc.h.
7802         * mem-break.c: Remove include of malloc.h.
7803         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7804
7805 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7806
7807         * Makefile.in (memmem.o): Build with -Wno-error.
7808
7809 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7810
7811         * utils.c (xsnprintf): Make non-static.
7812         * server.h: Add xsnprintf declaration.
7813         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7814         replace calls to snprintf by calls to xsnprintf throughout.
7815
7816 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7817
7818         * configure.ac: Add configure check for alloca.
7819         * configure, config.in: Regenerate.
7820         * server.h: Include alloca.h if it exists.
7821         * gdbreplay.c: Include alloca.h if it exists.
7822
7823 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7824
7825         * linux-low.c (__SIGRTMIN): Define if not already defined.
7826         (linux_create_inferior): Check for __ANDROID__ rather than
7827         __SIGRTMIN.
7828         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7829         are already deferred.
7830         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7831         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7832         stopped and already has a pending signal to report.
7833         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7834         a pending signal to report or is moving out of a jump pad.
7835         (linux_init_signals): Check for __ANDROID__ rather than
7836         __SIGRTMIN.
7837
7838 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7839
7840         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7841         debug_threads check.  Avoid a linear search when not doing debug
7842         output.
7843
7844 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7845
7846         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7847         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7848         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7849         (process_event): Change local fd's type to gdb_fildes_t.
7850         (create_file_handler): Adjust prototype.
7851         (delete_file_handler): Adjust prototype.
7852         (handle_file_event): Adjust prototype.  Use pfildes.
7853         (create_file_event): Adjsut prototype.
7854         * remote-utils.c (remote_desc, listen_desc): Change type to
7855         gdb_fildes_t.
7856         * server.h: New gdb_fildes_t typedef.
7857         [USE_WIN32API]: Include winsock2.h.
7858         (delete_file_handler, add_file_handler): Adjust prototypes.
7859         (pfildes): Declare.
7860         * utils.c (pfildes): New.
7861
7862 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7863
7864         * configure.ac (build_warnings): Add -Wno-char-subscripts.
7865         * configure: Regenerate.
7866
7867 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7868
7869         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7870         (linux_done_accessing_memory): ... this.
7871         (linux_target_ops): Adjust.
7872         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7873         * nto-low.c (nto_target_ops): Adjust comment.
7874         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7875         * spu-low.c (spu_target_ops): Adjust comment.
7876         * target.h (target_ops): Rename unprepare_to_access_memory field
7877         to done_accessing_memory.
7878         (unprepare_to_access_memory): Rename to ...
7879         (done_accessing_memory): ... this.
7880
7881 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7882
7883         * linux-low.c (linux_prepare_to_access_memory): New.
7884         (linux_unprepare_to_access_memory): New.
7885         (linux_target_ops): Install them.
7886         * server.c (read_memory): Rename to ...
7887         (gdb_read_memory): ... this.  Use
7888         prepare_to_access_memory/prepare_to_access_memory.
7889         (write_memory): Rename to ...
7890         (gdb_write_memory): ... this.  Use
7891         prepare_to_access_memory/prepare_to_access_memory.
7892         (handle_search_memory_1): Adjust.
7893         (process_serial_event): Adjust.
7894         * target.h (struct target_ops): New fields
7895         prepare_to_access_memory and unprepare_to_access_memory.
7896         (prepare_to_access_memory, unprepare_to_access_memory): New.
7897         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7898         prepare_to_access_memory/prepare_to_access_memory.
7899         * nto-low.c (nto_target_ops): Adjust.
7900         * spu-low.c (spu_target_ops): Adjust.
7901         * win32-low.c (win32_target_ops): Adjust.
7902
7903 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7904
7905         * Makefile.in (WARN_CFLAGS): Get it from configure.
7906         (WERROR_CFLAGS): New.
7907         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7908         * configure.ac: Introduce --enable-werror, which adds -Werror to
7909         the compiler command line.  Enabled by default.  Disable with
7910         --disable-werror.  Add -Wdeclaration-after-statement
7911         Wpointer-arith and -Wformat-nonliteral to warning flags.
7912         * configure: Regenerate.
7913
7914 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7915
7916         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7917
7918 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7919
7920         * gdbreplay.c (remote_error): New.
7921         (gdbchar): New.
7922         (expect): Use gdbchar.  Check for error reading from GDB.
7923         Clarify sync error output.
7924         (play): Check for errors writing to GDB.
7925         * linux-low.c (sigchld_handler): Really ignore `write' errors.
7926         * remote-utils.c (getpkt): Check for errors writing to the remote
7927         descriptor.
7928
7929 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7930
7931         * linux-low.c (linux_wait_1): Move non-debugging code out of
7932         `debug_threads' control.
7933
7934 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7935
7936         * linux-low.c (linux_wait_1): Don't set last_status here.
7937         * server.c (push_event, queue_stop_reply_callback): Assert we're
7938         not pushing a TARGET_WAITKIND_IGNORE event.
7939         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7940         (myresume, handle_target_event): Set the thread's last_resume_kind
7941         and last_status from the target returned status.
7942
7943 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7944
7945         PR threads/10729
7946
7947         * linux-x86-low.c (update_debug_registers_callback): New.
7948         (i386_dr_low_set_addr): Use it.
7949         (i386_dr_low_get_addr): New.
7950         (i386_dr_low_set_control): Use update_debug_registers_callback.
7951         (i386_dr_low_get_control): New.
7952         (i386_dr_low_get_status): Adjust.
7953         * linux-low.c (linux_stop_lwp): New.
7954         * linux-low.h (linux_stop_lwp): Declare.
7955
7956         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7957         argument instead of a i386_debug_reg_state.
7958         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7959         a i386_debug_reg_state.
7960         (i386_insert_aligned_watchpoint): Adjust.
7961         (i386_remove_aligned_watchpoint): Adjust.
7962         (i386_low_stopped_data_address): Read the debug registers from the
7963         inferior instead of from the mirrors.
7964         * i386-low.h (struct i386_debug_reg_state): Extend comment.
7965         (i386_dr_low_get_addr): Declare.
7966         (i386_dr_low_get_control): Declare.
7967         (i386_dr_low_get_status): Change prototype.
7968
7969         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7970         (i386_dr_low_get_addr): New.
7971         (i386_dr_low_get_control): New.
7972         (i386_dr_low_get_status): Adjust prototype.  Return
7973         dr_status_mirror.
7974         (i386_initial_stuff): Clear dr_status_mirror and
7975         dr_control_mirror.
7976         (i386_get_thread_context): Adjust.
7977         (i386_set_thread_context): Adjust.
7978         (i386_thread_added): Adjust.
7979
7980 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
7981
7982         * linux-low.h (linux_thread_area): Delete declaration.
7983
7984 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
7985
7986         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7987         after its termination.
7988
7989 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
7990
7991         * linux-low.c (gdb_wants_lwp_stopped): Delete.
7992         (gdb_wants_all_stopped): Delete.
7993         (linux_wait_1): Don't call them.
7994         * server.c (handle_v_cont): Tag all threads as want-stopped.
7995         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
7996         stopped as "client-wants-stopped".
7997
7998 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
7999
8000         * Makefile.in (signals_h): New.
8001         (server_h): Depend on it.
8002         (server.o): Don't depend on $(signals_def).
8003         (signals.o): Depend on $(signals_def).
8004
8005 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8006
8007         * Makefile.in (signals_def): New.
8008         (server_h): Append include/gdb/signals.h and signals_def.
8009         (server.o): Append signals_def.
8010
8011 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8012
8013         * server.c (handle_target_event): Use target_signal_to_host for
8014         resume_info.sig initialization.
8015         * target.h (struct thread_resume) <sig>: New comment.
8016
8017 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8018
8019         * server.c (handle_query): strcpy() the returned string from paddress()
8020         instead of sprintf().
8021         * utils.c (paddress): Return phex_nz().
8022
8023 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8024
8025         * server.c (handle_v_cont): Call mourn_inferior if process
8026         just exited.
8027         (myresume): Likewise.
8028
8029 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8030
8031         Static tracepoints, and integration with UST.
8032
8033         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8034         * mem-break.c (uninsert_all_breakpoints)
8035         (reinsert_all_breakpoints): New.
8036         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8037         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8038         (gdb_agent_ust_loaded, helper_thread_id)
8039         (gdb_agent_helper_thread_id): New macros.
8040         (struct ipa_sym_addresses): Add addr_ust_loaded,
8041         addr_helper_thread_id, addr_cmd_buf.
8042         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8043         (in_process_agent_loaded_ust): New.
8044         (write_e_ust_not_loaded): New.
8045         (maybe_write_ipa_ust_not_loaded): New.
8046         (struct collect_static_trace_data_action): New.
8047         (enum tracepoint_type) <static_tracepoint>: New.
8048         (struct tracepoint) <handle>: Mention static tracepoints.
8049         (struct static_tracepoint_ctx): New.
8050         (CMD_BUF_SIZE): New.
8051         (add_tracepoint_action): Handle static tracepoint actions.
8052         (unprobe_marker_at): New.
8053         (clear_installed_tracepoints): Handle static tracepoints.
8054         (cmd_qtdp): Handle static tracepoints.
8055         (probe_marker_at): New.
8056         (cmd_qtstart): Handle static tracepoints.
8057         (response_tracepoint): Handle static tracepoints.
8058         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8059         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8060         (get_context_regcache): Handle static tracepoints.
8061         (do_action_at_tracepoint): Handle static tracepoint actions.
8062         (traceframe_find_block_type): Handle static trace data blocks.
8063         (traceframe_read_sdata): New.
8064         (download_tracepoints): Download static tracepoint actions.
8065         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8066         (GDB_PROBE_NAME): New.
8067         (ust_ops): New.
8068         (GET_UST_SYM): New.
8069         (USTF): New.
8070         (dlsym_ust): New.
8071         (ust_marker_to_static_tracepoint): New.
8072         (gdb_probe): New.
8073         (collect_ust_data_at_tracepoint): New.
8074         (gdb_ust_probe): New.
8075         (UNIX_PATH_MAX, SOCK_DIR): New.
8076         (gdb_ust_connect_sync_socket): New.
8077         (resume_thread, stop_thread): New.
8078         (run_inferior_command): New.
8079         (init_named_socket): New.
8080         (gdb_ust_socket_init): New.
8081         (cstr_to_hexstr): New.
8082         (next_st): New.
8083         (first_marker, next_marker): New.
8084         (response_ust_marker): New.
8085         (cmd_qtfstm, cmd_qtsstm): New.
8086         (unprobe_marker_at, probe_marker_at): New.
8087         (cmd_qtstmat, gdb_ust_thread): New.
8088         (gdb_ust_init): New.
8089         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8090         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8091         (ST_REGENTRY): New.
8092         (x86_64_st_collect_regmap): New.
8093         (X86_64_NUM_ST_COLLECT_GREGS): New.
8094         (AMD64_RIP_REGNUM): New.
8095         (supply_static_tracepoint_registers): New.
8096         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8097         (ST_REGENTRY): New.
8098         (i386_st_collect_regmap): New.
8099         (i386_NUM_ST_COLLECT_GREGS): New.
8100         (supply_static_tracepoint_registers): New.
8101         * server.c (handle_query): Handle qXfer:statictrace:read.
8102         <qSupported>: Report support for StaticTracepoints, and
8103         qXfer:statictrace:read features.
8104         * server.h (traceframe_read_sdata)
8105         (supply_static_tracepoint_registers): Declare.
8106         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8107         (unpack_varlen_hex): Include in IPA build.
8108         * Makefile.in (ustlibs, ustinc): New.
8109         (IPA_OBJS): Add remote-utils-ipa.o.
8110         ($(IPA_LIB)): Link -ldl and -lpthread.
8111         (UST_CFLAGS): New.
8112         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8113         * config.in, configure: Regenerate.
8114
8115 2010-06-20  Ian Lance Taylor  <iant@google.com>
8116             Pedro Alves  <pedro@codesourcery.com>
8117
8118         * linux-x86-low.c (always_true): Delete.
8119         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8120         trying to fool the compiler with always_true.
8121
8122 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8123
8124         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8125         conditions in gdbserver.
8126
8127 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8128
8129         * spu-low.c (spu_read_memory): Wrap around local store limit.
8130         (spu_write_memory): Likewise.
8131
8132 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8133
8134         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8135         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8136         LONGEST uses.
8137         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8138         uses.
8139         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8140         uses with LONGEST uses.
8141
8142 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8143             Pedro Alves  <pedro@codesourcery.com>
8144
8145         Bytecode compiler.
8146
8147         * linux-x86-low.c: Include limits.h.
8148         (add_insns): New.
8149         (always_true): New.
8150         (EMIT_ASM): New.
8151         (EMIT_ASM32): New.
8152         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8153         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8154         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8155         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8156         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8157         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8158         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8159         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8160         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8161         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8162         (amd64_emit_void_call_2): New.
8163         (amd64_emit_ops): New.
8164         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8165         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8166         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8167         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8168         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8169         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8170         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8171         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8172         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8173         (i386_emit_stack_adjust, i386_emit_int_call_1)
8174         (i386_emit_void_call_2): New.
8175         (i386_emit_ops): New.
8176         (x86_emit_ops): New.
8177         (the_low_target): Install x86_emit_ops.
8178         * server.h (struct emit_ops): New.
8179         (get_raw_reg_func_addr): Declare.
8180         (current_insn_ptr, emit_error): Declare.
8181         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8182         (set_trace_state_variable_value): New defines.
8183         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8184         addr_get_trace_state_variable_value and
8185         addr_set_trace_state_variable_value.
8186         (symbol_list): New fields for get_raw_reg,
8187         get_trace_state_variable_value and set_trace_state_variable_value.
8188         (condfn): New typedef.
8189         (struct tracepoint): New field `compiled_cond'.
8190         (do_action_at_tracepoint): Clear compiled_cond.
8191         (get_trace_state_variable_value, set_trace_state_variable_value):
8192         Export in the IPA.
8193         (condition_true_at_tracepoint): If there's a compiled condition,
8194         run that.
8195         (current_insn_ptr, emit_error): New globals.
8196         (struct bytecode_address): New.
8197         (get_raw_reg_func_addr): New.
8198         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8199         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8200         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8201         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8202         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8203         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8204         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8205         (compile_tracepoint_condition, compile_bytecodes): New.
8206         * target.h (emit_ops): Forward declare.
8207         (struct target_ops): New field emit_ops.
8208         (target_emit_ops): New.
8209         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8210         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8211         * linux-low.c (linux_emit_ops): New.
8212         (linux_target_ops): Install it.
8213         * linux-low.h (struct linux_target_ops): New field emit_ops.
8214
8215 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8216
8217         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8218         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8219
8220 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8221             Stan Shebs  <stan@codesourcery.com>
8222
8223         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8224         (all): Depend on $(extra_libraries).
8225         (install-only): Install the IPA.
8226         (IPA_OBJS, IPA_LIB): New.
8227         (clean): Remove the IPA lib.
8228         (IPAGENT_CFLAGS): New.
8229         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8230         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8231         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8232         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8233         * configure.ac: Check for atomic builtins support in the compiler.
8234         (IPA_DEPFILES, extra_libraries): Define.
8235         * configure.srv (ipa_obj): Add description.
8236         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8237         (i[34567]86-*-linux*): Set ipa_obj.
8238         (x86_64-*-linux*): Set ipa_obj.
8239         * linux-low.c (stabilizing_threads): New.
8240         (supports_fast_tracepoints): New.
8241         (linux_detach): Stabilize threads before detaching.
8242         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8243         the lwp is either not stabilizing, or is moving out of a jump pad.
8244         (linux_fast_tracepoint_collecting): New.
8245         (maybe_move_out_of_jump_pad): New.
8246         (enqueue_one_deferred_signal): New.
8247         (dequeue_one_deferred_signal): New.
8248         (linux_wait_for_event_1): If moving out of a jump pad, defer
8249         pending signals to later.
8250         (linux_stabilize_threads): New.
8251         (linux_wait_1): Check if threads need moving out of jump pads, and
8252         do it if so.
8253         (stuck_in_jump_pad_callback): New.
8254         (move_out_of_jump_pad_callback): New.
8255         (lwp_running): New.
8256         (linux_resume_one_lwp): Handle moving out of jump pads.
8257         (linux_set_resume_request): Dequeue deferred signals.
8258         (need_step_over_p): Also step over fast tracepoint jumps.
8259         (start_step_over): Also uninsert fast tracepoint jumps.
8260         (finish_step_over): Also reinsert fast tracepoint jumps.
8261         (linux_install_fast_tracepoint_jump): New.
8262         (linux_target_ops): Install linux_stabilize_threads and
8263         linux_install_fast_tracepoint_jump_pad.
8264         * linux-low.h (linux_target_ops) <get_thread_area,
8265         install_fast_tracepoint_jump_pad>: New fields.
8266         (struct lwp_info) <collecting_fast_tracepoint,
8267         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8268         (linux_get_thread_area): Declare.
8269         * linux-x86-low.c (jump_insn): New.
8270         (x86_get_thread_area): New.
8271         (append_insns): New.
8272         (push_opcode): New.
8273         (amd64_install_fast_tracepoint_jump_pad): New.
8274         (i386_install_fast_tracepoint_jump_pad): New.
8275         (x86_install_fast_tracepoint_jump_pad): New.
8276         (the_low_target): Install x86_get_thread_area and
8277         x86_install_fast_tracepoint_jump_pad.
8278         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8279         (struct fast_tracepoint_jump): New.
8280         (fast_tracepoint_jump_insn): New.
8281         (fast_tracepoint_jump_shadow): New.
8282         (find_fast_tracepoint_jump_at): New.
8283         (fast_tracepoint_jump_here): New.
8284         (delete_fast_tracepoint_jump): New.
8285         (set_fast_tracepoint_jump): New.
8286         (uninsert_fast_tracepoint_jumps_at): New.
8287         (reinsert_fast_tracepoint_jumps_at): New.
8288         (set_breakpoint_at): Use write_inferior_memory.
8289         (uninsert_raw_breakpoint): Use write_inferior_memory.
8290         (check_mem_read): Mask out fast tracepoint jumps.
8291         (check_mem_write): Mask out fast tracepoint jumps.
8292         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8293         (set_fast_tracepoint_jump): Declare.
8294         (delete_fast_tracepoint_jump)
8295         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8296         (reinsert_fast_tracepoint_jumps_at): Declare.
8297         * regcache.c: Don't compile many functions when building the
8298         in-process agent library.
8299         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8300         the register buffer in the heap.
8301         (free_register_cache): If the register buffer isn't owned by the
8302         regcache, don't free it.
8303         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8304         pre-existing register caches.
8305         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8306         type.
8307         (convert_ascii_to_int): : Constify `from' parameter type.
8308         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8309         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8310         the needed buffer in-place.
8311         (relocate_instruction): New.
8312         * server.c (handle_query) <qSymbols>: If the target supports
8313         tracepoints, give it a chance of looking up symbols.  Report
8314         support for fast tracepoints.
8315         (handle_status): Stabilize threads.
8316         (process_serial_event): Adjust.
8317         * server.h (struct fast_tracepoint_jump): Forward declare.
8318         (struct process_info) <fast_tracepoint_jumps>: New field.
8319         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8320         (decode_X_packet, decode_M_packet): Adjust.
8321         (relocate_instruction): Declare.
8322         (in_process_agent_loaded): Declare.
8323         (tracepoint_look_up_symbols): Declare.
8324         (struct fast_tpoint_collect_status): Declare.
8325         (fast_tracepoint_collecting): Declare.
8326         (force_unlock_trace_buffer): Declare.
8327         (handle_tracepoint_bkpts): Declare.
8328         (initialize_low_tracepoint)
8329         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8330         * target.h (struct target_ops) <stabilize_threads,
8331         install_fast_tracepoint_jump_pad>: New fields.
8332         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8333         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8334         [HAVE_STDINT_H]: Include stdint.h.
8335         (trace_debug_1): Rename to ...
8336         (trace_vdebug): ... this.
8337         (trace_debug): Rename to ...
8338         (trace_debug_1): ... this.  Add `level' parameter.
8339         (trace_debug): New.
8340         (ATTR_USED, ATTR_NOINLINE): New.
8341         (IP_AGENT_EXPORT): New.
8342         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8343         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8344         (about_to_request_buffer_space, trace_buffer_is_full)
8345         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8346         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8347         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8348         (traceframe_write_count, traceframes_created)
8349         (trace_state_variables)
8350         New renaming defines.
8351         (struct ipa_sym_addresses): New.
8352         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8353         (symbol_list): New.
8354         (ipa_sym_addrs): New.
8355         (all_tracepoint_symbols_looked_up): New.
8356         (in_process_agent_loaded): New.
8357         (write_e_ipa_not_loaded): New.
8358         (maybe_write_ipa_not_loaded): New.
8359         (tracepoint_look_up_symbols): New.
8360         (debug_threads) [IN_PROCESS_AGENT]: New.
8361         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8362         (UNKNOWN_SIDE_EFFECTS): New.
8363         (stop_tracing): New.
8364         (flush_trace_buffer): New.
8365         (stop_tracing_bkpt): New.
8366         (flush_trace_buffer_bkpt): New.
8367         (read_inferior_integer): New.
8368         (read_inferior_uinteger): New.
8369         (read_inferior_data_pointer): New.
8370         (write_inferior_data_pointer): New.
8371         (write_inferior_integer): New.
8372         (write_inferior_uinteger): New.
8373         (struct collect_static_trace_data_action): Delete.
8374         (enum tracepoint_type): New.
8375         (struct tracepoint) <type>: New field `type'.
8376         <actions_str, step_actions, step_actions_str>: Only include in
8377         GDBserver.
8378         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8379         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8380         (tracepoints): Use IP_AGENT_EXPORT.
8381         (last_tracepoint): Don't include in the IPA.
8382         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8383         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8384         (alloced_trace_state_variables): New.
8385         (trace_state_variables): Use IP_AGENT_EXPORT.
8386         (traceframe_t): Delete unused variable.
8387         (circular_trace_buffer): Don't include in the IPA.
8388         (trace_buffer_start): Delete.
8389         (struct trace_buffer_control): New.
8390         (trace_buffer_free): Delete.
8391         (struct ipa_trace_buffer_control): New.
8392         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8393         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8394         New.
8395         (trace_buffer_ctrl): New.
8396         (TRACE_BUFFER_CTRL_CURR): New.
8397         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8398         Reimplement as macros.
8399         (trace_buffer_wrap): Delete.
8400         (traceframe_write_count, traceframe_read_count)
8401         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8402         (struct tracepoint_hit_ctx) <type>: New field.
8403         (struct fast_tracepoint_ctx): New.
8404         (memory_barrier): New.
8405         (cmpxchg): New.
8406         (record_tracepoint_error): Update atomically in the IPA.
8407         (clear_inferior_trace_buffer): New.
8408         (about_to_request_buffer_space): New.
8409         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8410         updating the same buffer.
8411         (add_tracepoint): Default the tracepoint's type to trap
8412         tracepoint, and orig_size to -1.
8413         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8414         internal variables.
8415         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8416         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8417         (cmd_qtdp): Handle fast tracepoints.
8418         (cmd_qtdv): Adjust.
8419         (max_jump_pad_size): New.
8420         (gdb_jump_pad_head): New.
8421         (get_jump_space_head): New.
8422         (claim_jump_space): New.
8423         (sort_tracepoints): New.
8424         (MAX_JUMP_SIZE): New.
8425         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8426         IPA.
8427         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8428         support.  Upload fast traceframes, and delete internal IPA
8429         breakpoints.
8430         (stop_tracing_handler): New.
8431         (flush_trace_buffer_handler): New.
8432         (cmd_qtstop): Upload fast tracepoints.
8433         (response_tracepoint): Handle fast tracepoints.
8434         (tracepoint_finished_step): Upload fast traceframes.  Set the
8435         tracepoint hit context's tracepoint type.
8436         (handle_tracepoint_bkpts): New.
8437         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8438         type.  Add comment about fast tracepoints.
8439         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8440         non-existing action_str field.
8441         (get_context_regcache): Handle fast tracepoints.
8442         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8443         to the regcache.
8444         (fast_tracepoint_from_jump_pad_address): New.
8445         (fast_tracepoint_from_ipa_tpoint_address): New.
8446         (collecting_t): New.
8447         (force_unlock_trace_buffer): New.
8448         (fast_tracepoint_collecting): New.
8449         (collecting): New.
8450         (gdb_collect): New.
8451         (write_inferior_data_ptr): New.
8452         (target_tp_heap): New.
8453         (target_malloc): New.
8454         (download_agent_expr): New.
8455         (UALIGN): New.
8456         (download_tracepoints): New.
8457         (download_trace_state_variables): New.
8458         (upload_fast_traceframes): New.
8459         (IPA_FIRST_TRACEFRAME): New.
8460         (IPA_NEXT_TRACEFRAME_1): New.
8461         (IPA_NEXT_TRACEFRAME): New.
8462         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8463         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8464         (gdb_jump_pad_buffer_end): New.
8465         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8466         (initialize_tracepoint): Adjust.
8467         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8468         buffer.  Initialize the low module.
8469         * utils.c (PREFIX, TOOLNAME): New.
8470         (malloc_failure): Use PREFIX.
8471         (error): In the IPA, an error causes an exit.
8472         (fatal, warning): Use PREFIX.
8473         (internal_error): Use TOOLNAME.
8474         (NUMCELLS): Increase to 10.
8475         * configure, config.in: Regenerate.
8476
8477 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8478
8479         * server.c (handle_query) <qSupported>: Do two passes over the
8480         qSupported string to avoid nesting strtok.
8481
8482 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8483
8484         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8485         (CDEPS): New.
8486         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8487         -Wl,--dynamic-list.
8488         * configure: Regenerate.
8489         * proc-service.list: New.
8490
8491 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8492
8493         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8494         New comment.
8495
8496 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8497
8498         * gdbreplay.c (remote_open): Check error return from socket() call by
8499         its equality to -1 not by it being negative.
8500         * remote-utils.c (remote_open): Likewise.
8501
8502 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8503
8504         * config.h: Regenerate.
8505
8506 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8507
8508         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8509         doesn't provide PTRACE_GET_THREAD_AREA.
8510
8511 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8512
8513         * linux-m68k-low.c: Include <asm/ptrace.h>
8514         (ps_get_thread_area): Implement.
8515
8516 2010-05-03  Doug Evans  <dje@google.com>
8517
8518         * event-loop.c (struct callback_event): New struct.
8519         (callback_list): New global.
8520         (append_callback_event, delete_callback_event): New functions.
8521         (process_callback): New function.
8522         (start_event_loop): Call it.
8523         * remote-utils.c (NOT_SCHEDULED): Define.
8524         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8525         moved out of readchar.
8526         (readchar): Rewrite.  Call reschedule before returning.
8527         (reset_readchar): New function.
8528         (remote_close): Call it.
8529         (process_remaining, reschedule): New functions.
8530         * server.h (callback_handler_func): New typedef.
8531         (append_callback_event, delete_callback_event): Declare.
8532
8533 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8534
8535         * proc-service.c (ps_pglobal_lookup): Use
8536         thread_db_look_up_one_symbol.
8537         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8538         parameter.  Use it instead of all_symbols_looked_up.
8539         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8540         field.
8541         (all_symbols_looked_up): Don't declare.
8542         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8543         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8544         field.
8545         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8546         Set all_symbols_looked_up here.
8547         (thread_db_look_up_one_symbol): New.
8548         (thread_db_get_tls_address): Adjust.
8549         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8550         thread_db object on the heap, and tentatively set it in the
8551         process structure.
8552         (thread_db_init): Don't set all_symbols_looked_up here.
8553         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8554
8555 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8556
8557         * linux-low.c (linux_kill, linux_detach): Adjust.
8558         (status_pending_p_callback): Remove redundant statement.  Check
8559         for !TARGET_WAITIKIND_IGNORE, instead of
8560         TARGET_WAITKIND_STOPPED.
8561         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8562         (linux_wait_for_event_1): Adjust.
8563         (linux_cancel_breakpoints): New.
8564         (unsuspend_one_lwp): New.
8565         (unsuspend_all_lwps): New.
8566         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8567         (send_sigstop_callback): Change return type to int, add new
8568         `except' parameter and handle it.
8569         (suspend_and_send_sigstop_callback): New.
8570         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8571         pass them down.  If SUSPEND, also increment the lwp's suspend
8572         count.
8573         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8574         (need_step_over_p): Don't consider suspended LWPs.
8575         (start_step_over): Adjust.
8576         (proceed_one_lwp): Change return type to int, add new `except'
8577         parameter and handle it.
8578         (unsuspend_and_proceed_one_lwp): New.
8579         (proceed_all_lwps): Use find_inferior instead of
8580         for_each_inferior.
8581         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8582         also decrement the suspend count of LWPs.  Pass `except' down,
8583         instead of hacking its suspend count.
8584         (linux_pause_all): Add `freeze' parameter.  Adjust.
8585         (linux_unpause_all): New.
8586         (linux_target_ops): Install linux_unpause_all.
8587         * server.c (handle_status): Adjust.
8588         * target.h (struct target_ops): New fields `unpause_all' and
8589         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8590         (pause_all): Add new `freeze' parameter.
8591         (unpause_all): New.
8592         (cancel_breakpoints): New.
8593         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8594         cancel breakpoints.
8595         (cmd_qtstart): Pause threads.
8596         (stop_tracing): Pause threads, and cancel breakpoints.
8597         * win32-low.c (win32_target_ops): Adjust.
8598
8599 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8600
8601         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8602         the inferior right away from here...
8603         (linux_wait_1): ... to here, and adjust to check the thread's
8604         last_resume_kind instead of the lwp's step or stop_expected flags.
8605
8606 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8607
8608         * README: Use consistent `GDB' and `GDBserver' spellings.
8609
8610 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8611
8612         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8613         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8614         (linux_detach_one_lwp): Assume the lwp is stopped.
8615         (any_thread_of): Delete.
8616         (linux_detach): Stop all lwps here.  Don't blindly delete all
8617         breakpoints.
8618         (delete_lwp_callback): New.
8619         (linux_mourn): Delete all lwps of the process that is gone.
8620         (linux_wait_1): Don't delete the last lwp of the process here.
8621         * mem-break.h (mark_breakpoints_out): Declare.
8622         * mem-break.c (mark_breakpoints_out): New.
8623         (free_all_breakpoints): Use it.
8624         * server.c (handle_target_event): If the process is gone, mark
8625         breakpoints out.
8626         * thread-db.c (struct thread_db) <create_bp>: New field.
8627         (thread_db_enable_reporting): Fix prototype.  Store a thread event
8628         breakpoint reference in the thread_db struct.
8629         (thread_db_load_search): Clear the thread_db object.
8630         (try_thread_db_load_1): Ditto.
8631         (switch_to_process): New.
8632         (disable_thread_event_reporting): Use it.
8633         (remove_thread_event_breakpoints): New.
8634         (thread_db_detach, thread_db_mourn): Use it.
8635
8636 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
8637
8638         * linux-low.c (linux_enable_event_reporting): New.
8639         (linux_wait_for_event_1, handle_extended_wait): Use it.
8640
8641 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
8642
8643         * linux-low.c (linux_kill_one_lwp, linux_kill)
8644         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8645         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
8646         SIGSTOP even if the LWP is stopped.
8647         (send_sigstop_callback): New.
8648         (stop_all_lwps): Use send_sigstop_callback instead.
8649         (linux_resume_one_thread): Adjust.
8650         (proceed_one_lwp): Still proceed an LWP that the client has
8651         requested to stop, if we haven't reported it as stopped yet.  Make
8652         sure that LWPs the client want stopped, have a pending SIGSTOP.
8653
8654 2010-04-26  Doug Evans  <dje@google.com>
8655
8656         * server.c (handle_general_set): Make static.
8657
8658         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8659         Print received char after testing for error/eof instead of before.
8660         (input_interrupt): Tweak comment.
8661
8662 2010-04-23  Doug Evans  <dje@google.com>
8663
8664         * server.c (start_inferior): Print inferior argv if --debug.
8665
8666 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
8667
8668         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8669         * nto-x86-low.c: Include server.h
8670
8671 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8672
8673         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8674         be consistent with other sources of this directory.
8675         (init_registers_amd64): Correct name of source file of this function
8676         in the comment.
8677
8678 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8679
8680         * configure.srv (x86_64-*-mingw*): New configuration for Windows
8681         64-bit executables.
8682
8683 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8684
8685         * win32-i386-low.c: Add 64-bit support.
8686         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8687         (init_registers_amd64): Declare.
8688         (mappings): Add 64-bit version of array.
8689         (init_windows_x86): New function.
8690         (the_low_target): Change init_arch field to init_windows_x86.
8691
8692 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8693
8694         * win32-low.c: Adapt to support also 64-bit architecture.
8695         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8696         (get_image_name): Use SIZE_T type for local variable `done'.
8697         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8698         (toolhelp_get_dll_name): Idem.
8699         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8700         Use uintptr_t typecast to avoid warning.
8701         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8702         (handle_exception): Use phex_nz to avoid warning.
8703         (win32_wait): Remove unused local variable `process'.
8704
8705 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8706
8707         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8708         `amd64-avx.o'.
8709
8710 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
8711
8712         * configure.ac: Use `ws2_32' library for srv_mingw.
8713         * configure: Regenerate.
8714         * gdbreplay.c: Include winsock2.h instead of winsock.h.
8715         * remote-utils.c: Likewise.
8716
8717 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8718
8719         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8720         if __x86_64__ is defined.
8721
8722 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8723
8724         * configure: Regenerate.
8725
8726 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8727
8728         * server.c (handle_query): Handle 'qGetTIBAddr' query.
8729         * target.h (target_ops): New get_tib_address field.
8730         * win32-low.h (win32_thread_info): Add thread_local_base field.
8731         * win32-low.c (child_add_thread): Add tlb argument.
8732         Set thread_local_base field to TLB.
8733         (get_child_debug_event): Adapt to child_add_thread change.
8734         (win32_get_tib_address): New function.
8735         (win32_target_ops): Set get_tib_address field to
8736         win32_get_tib_address.
8737         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8738
8739 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8740
8741         * linux-low.c (linux_mourn): Also remove the process.
8742         * server.c (handle_target_event): Don't remove the process here.
8743         * nto-low.c (nto_mourn): New.
8744         (nto_target_ops): Install it.
8745         * spu-low.c (spu_mourn): New.
8746         (spu_target_ops): Install it.
8747         * win32-low.c (win32_mourn): New.
8748         (win32_target_ops): Install it.
8749
8750 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8751
8752         * server.h (buffer_xml_printf): Remove redundant `;'.
8753
8754 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8755
8756         * regcache.c (set_register_cache): Invalidate regcaches before
8757         changing the register cache layout.
8758         (regcache_invalidate_one): Allow a NULL regcache.
8759         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8760         regcaches before changing the register cache layout or the target
8761         regsets.
8762
8763 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8764
8765         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8766         variable warning on Linux/x86-64.
8767
8768 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8769
8770         GDBserver disconnected tracing support.
8771
8772         * linux-low.c (linux_remove_process): Delete.
8773         (add_lwp): Don't set last_resume_kind here.
8774         (linux_kill): Use `mourn'.
8775         (linux_detach): Use `thread_db_detach', and `mourn'.
8776         (linux_mourn): New.
8777         (linux_attach_lwp_1): Adjust comment.
8778         (linux_attach): last_resume_kind moved the thread_info; adjust.
8779         (status_pending_p_callback): Adjust.
8780         (linux_wait_for_event_1): Adjust.
8781         (count_events_callback, select_singlestep_lwp_callback)
8782         (select_event_lwp_callback, cancel_breakpoints_callback)
8783         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8784         (proceed_one_lwp): Adjust.
8785         (linux_async): Add debug output.
8786         (linux_thread_stopped): New.
8787         (linux_pause_all): New.
8788         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8789         linux_pause_all.
8790         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8791         (thread_db_free): Delete declaration.
8792         (thread_db_detach, thread_db_mourn): Declare.
8793         * thread-db.c (thread_db_init): Use thread_db_mourn.
8794         (thread_db_free): Delete, split in two.
8795         (disable_thread_event_reporting): New.
8796         (thread_db_detach): New.
8797         (thread_db_mourn): New.
8798
8799         * server.h (struct thread_info) <last_resume_kind>: New field.
8800         <attached>: Add comment.
8801         <gdb_detached>: New field.
8802         (handler_func): Change return type to int.
8803         (handle_serial_event, handle_target_event): Ditto.
8804         (gdb_connected): Declare.
8805         (tracing): Delete.
8806         (disconnected_tracing): Declare.
8807         (stop_tracing): Declare.
8808
8809         * server.c (handle_query) <qSupported>: Report support for
8810         disconnected tracing.
8811         (queue_stop_reply_callback): Account for running threads.
8812         (gdb_wants_thread_stopped): New.
8813         (gdb_wants_all_threads_stopped): New.
8814         (gdb_reattached_process): New.
8815         (handle_status): Clear the `gdb_detached' flag of all processes.
8816         In all-stop, stop all threads.
8817         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
8818         (process_serial_event): If the remote connection breaks, or if an
8819         exit was forced with "monitor exit", force an event loop exit.
8820         Handle disconnected tracing on detach.
8821         (handle_serial_event): Adjust.
8822         (handle_target_event): If GDB isn't connected, forward events back
8823         to the inferior, unless the last process exited, in which case,
8824         exit gdbserver.  Adjust interface.
8825
8826         * remote-utils.c (remote_open): Don't block in accept.  Instead
8827         register an event loop source on the listen socket file
8828         descriptor.  Refactor bits into ...
8829         (listen_desc): ... this new global.
8830         (gdb_connected): ... this new function.
8831         (enable_async_notification): ... this new function.
8832         (handle_accept_event): ... this new function.
8833         (remote_close): Clear remote_desc.
8834
8835         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8836
8837         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8838         New fields.
8839         (mourn_inferior): Define.
8840         (target_process_qsupported): Avoid the dangling else problem.
8841         (thread_stopped): Define.
8842         (pause_all): Define.
8843         (target_waitstatus_to_string): Declare.
8844         * target.c (target_waitstatus_to_string): New.
8845
8846         * tracepoint.c (tracing): Make extern.
8847         (disconnected_tracing): New.
8848         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8849         disconnecting.
8850         (cmd_qtdisconnected): New.
8851         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8852         (handle_tracepoint_general_set): Handle QTDisconnected.
8853
8854         * event-loop.c (event_handler_func): Change return type to int.
8855         (process_event): Bail out if the event handler wants the event
8856         loop to stop.
8857         (handle_file_event): Ditto.
8858         (start_event_loop): Bail out if the event handler wants the event
8859         loop to stop.
8860
8861         * nto-low.c (nto_target_ops): Adjust.
8862         * spu-low.c (spu_wait): Don't remove the process here.
8863         (spu_target_ops): Adjust.
8864         * win32-low.c (win32_wait): Don't remove the process here.
8865         (win32_target_ops): Adjust.
8866
8867 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8868
8869         * regcache.c (realloc_register_cache): Invalidate inferior's
8870         regcache before recreating it.
8871
8872 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
8873
8874         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8875
8876 2010-04-09  Stan Shebs  <stan@codesourcery.com>
8877             Pedro Alves  <pedro@codesourcery.com>
8878
8879         * server.h (LONGEST): New.
8880         (struct thread_info) <while_stepping>: New field.
8881         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8882         Declare.
8883         (initialize_tracepoint, handle_tracepoint_general_set)
8884         (handle_tracepoint_query, tracepoint_finished_step)
8885         (tracepoint_was_hit, release_while_stepping_state_list):
8886         (current_traceframe): Declare.
8887         * server.c (handle_general_set): Handle tracepoint packets.
8888         (read_memory): New.
8889         (write_memory): New.
8890         (handle_search_memory_1): Use read_memory.
8891         (handle_query): Report support for conditional tracepoints, trace
8892         state variables, and tracepoint sources.  Handle tracepoint
8893         queries.
8894         (main): Initialize the tracepoints module.
8895         (process_serial_event): Handle traceframe reads/writes.
8896
8897         * linux-low.c (handle_tracepoints): New.
8898         (linux_wait_1): Call it.
8899         (linux_resume_one_lwp): Handle while-stepping.
8900         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8901         (linux_target_ops): Install them.
8902         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8903         New field.
8904         * linux-x86-low.c (x86_supports_tracepoints): New.
8905         (the_low_target). Install it.
8906
8907         * mem-break.h (delete_breakpoint): Declare.
8908         * mem-break.c (delete_breakpoint): Make external.
8909
8910         * target.h (struct target_ops): Add `supports_tracepoints',
8911         `read_pc', and `write_pc' fields.
8912         (target_supports_tracepoints): Define.
8913         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8914         (phex_nz): New.
8915
8916         * regcache.h (struct regcache) <registers_owned>: New field.
8917         (init_register_cache, regcache_cpy): Declare.
8918         (regcache_read_pc, regcache_write_pc): Declare.
8919         (register_cache_size): Declare.
8920         (supply_regblock): Declare.
8921         * regcache.c (init_register_cache): New.
8922         (new_register_cache): Use it.
8923         (regcache_cpy): New.
8924         (register_cache_size): New.
8925         (supply_regblock): New.
8926         (regcache_read_pc, regcache_write_pc): New.
8927
8928         * tracepoint.c: New.
8929
8930         * Makefile.in (OBS): Add tracepoint.o.
8931         (tracepoint.o): New rule.
8932
8933 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
8934
8935         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8936         (i386-mmx.o): New.
8937         (i386-mmx.c): Likewise.
8938         (i386-mmx-linux.o): Likewise.
8939         (i386-mmx-linux.c): Likewise.
8940
8941         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8942         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8943         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8944         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8945
8946         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8947         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8948         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8949
8950 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
8951
8952         * Makefile.in (clean): Updated.
8953         (i386-avx.o): New.
8954         (i386-avx.c): Likewise.
8955         (i386-avx-linux.o): Likewise.
8956         (i386-avx-linux.c): Likewise.
8957         (amd64-avx.o): Likewise.
8958         (amd64-avx.c): Likewise.
8959         (amd64-avx-linux.o): Likewise.
8960         (amd64-avx-linux.c): Likewise.
8961
8962         * configure.srv (srv_i386_regobj): Add i386-avx.o.
8963         (srv_i386_linux_regobj): Add i386-avx-linux.o.
8964         (srv_amd64_regobj): Add amd64-avx.o.
8965         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8966         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8967         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8968         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8969         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8970         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8971         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8972
8973         * i387-fp.c: Include "i386-xstate.h".
8974         (i387_xsave): New.
8975         (i387_cache_to_xsave): Likewise.
8976         (i387_xsave_to_cache): Likewise.
8977         (x86_xcr0): Likewise.
8978
8979         * i387-fp.h (i387_cache_to_xsave): Likewise.
8980         (i387_xsave_to_cache): Likewise.
8981         (x86_xcr0): Likewise.
8982
8983         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8984         * linux-crisv32-low.c (target_regsets): Likewise.
8985         * linux-m68k-low.c (target_regsets): Likewise.
8986         * linux-mips-low.c (target_regsets): Likewise.
8987         * linux-ppc-low.c (target_regsets): Likewise.
8988         * linux-s390-low.c (target_regsets): Likewise.
8989         * linux-sh-low.c (target_regsets): Likewise.
8990         * linux-sparc-low.c (target_regsets): Likewise.
8991         * linux-xtensa-low.c (target_regsets): Likewise.
8992
8993         * linux-low.c: Include <sys/uio.h>.
8994         (regsets_fetch_inferior_registers): Support nt_type.
8995         (regsets_store_inferior_registers): Likewise.
8996         (linux_process_qsupported): New.
8997         (linux_target_ops): Add linux_process_qsupported.
8998
8999         * linux-low.h (regset_info): Add nt_type.
9000         (linux_target_ops): Add process_qsupported.
9001
9002         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9003         and <sys/uio.h>.
9004         (init_registers_i386_avx_linux): New.
9005         (init_registers_amd64_avx_linux): Likewise.
9006         (xmltarget_i386_linux_no_xml): Likewise.
9007         (xmltarget_amd64_linux_no_xml): Likewise.
9008         (PTRACE_GETREGSET): Likewise.
9009         (PTRACE_SETREGSET): Likewise.
9010         (x86_fill_xstateregset): Likewise.
9011         (x86_store_xstateregset): Likewise.
9012         (use_xml): Likewise.
9013         (x86_linux_update_xmltarget): Likewise.
9014         (x86_linux_process_qsupported): Likewise.
9015         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9016         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9017         init_registers_i386_linux here.  Call
9018         x86_linux_update_xmltarget.
9019         (the_low_target): Add x86_linux_process_qsupported.
9020
9021         * server.c (handle_query): Call target_process_qsupported.
9022
9023         * target.h (target_ops): Add process_qsupported.
9024         (target_process_qsupported): New.
9025
9026 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9027
9028         * inferiors.c (add_thread): Set last_status kind to
9029         TARGET_WAITKIND_IGNORE.
9030         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9031         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9032         (linux_wait_1): Move `thread' local definition to block that uses
9033         it.  Don't NULL initialize `event_child'.
9034         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9035         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9036         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9037
9038 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9039
9040         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9041         an extended waitstatus, or by a watchpoint.
9042         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9043         thread was stepping or has been stopped by a watchpoint.
9044
9045 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9046
9047         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9048         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9049         of another, then delete the previous, and validate all
9050         breakpoints.
9051         (validate_inserted_breakpoint): New.
9052         (delete_disabled_breakpoints): New.
9053         (validate_breakpoints): New.
9054         (check_mem_read): Validate breakpoints before trusting their
9055         shadow.  Delete disabled breakpoints.
9056         (check_mem_write): Validate breakpoints before trusting they
9057         should be inserted.  Delete disabled breakpoints.
9058         * mem-break.h (validate_breakpoints):
9059         * server.c (handle_query): Validate breakpoints when we see a
9060         qSymbol query.
9061
9062 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9063
9064         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9065         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9066         if we could tell there's a GDB breakpoint at stop_pc.
9067         (need_step_over_p): Don't do a step over if we find a GDB
9068         breakpoint at the resume PC.
9069
9070         * mem-break.c (struct raw_breakpoint): New.
9071         (enum bkpt_type): New type `gdb_breakpoint'.
9072         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9073         fields.  New field `raw'.
9074         (find_raw_breakpoint_at): New.
9075         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9076         breakpoint instead.
9077         (set_breakpoint_at): Adjust.
9078         (delete_raw_breakpoint): New.
9079         (release_breakpoint): New.
9080         (delete_breakpoint): Rename to...
9081         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9082         release_breakpoint.  Return ENOENT.
9083         (delete_breakpoint): Reimplement.
9084         (find_breakpoint_at): Delete.
9085         (find_gdb_breakpoint_at): New.
9086         (delete_breakpoint_at): Delete.
9087         (set_gdb_breakpoint_at): New.
9088         (delete_gdb_breakpoint_at): New.
9089         (gdb_breakpoint_here): New.
9090         (set_reinsert_breakpoint): Use release_breakpoint.
9091         (uninsert_breakpoint): Rename to ...
9092         (uninsert_raw_breakpoint): ... this.
9093         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9094         (reinsert_raw_breakpoint): Change parameter type to
9095         raw_breakpoint.
9096         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9097         instead.
9098         (check_breakpoints): Adjust.  Use release_breakpoint.
9099         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9100         (breakpoint_inserted_here): Ditto.
9101         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9102         Don't trust the breakpoint's shadow if it is not inserted.
9103         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9104         (delete_all_breakpoints): Adjust.
9105         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9106         use delete_breakpoint_1.
9107
9108         * mem-break.h (breakpoints_supported): Delete declaration.
9109         (set_gdb_breakpoint_at): Declare.
9110         (gdb_breakpoint_here): Declare.
9111         (delete_breakpoint_at): Delete.
9112         (delete_gdb_breakpoint_at): Declare.
9113
9114         * server.h (struct raw_breakpoint): Forward declare.
9115         (struct process_info): New field `raw_breakpoints'.
9116
9117         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9118         breakpoints.
9119
9120 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9121
9122         * linux-low.c (status_pending_p_callback): Fix comment.
9123         (linux_wait_for_event_1): Move most of the internal breakpoint
9124         handling from here...
9125         (linux_wait_1): ... to here.
9126         (count_events_callback): New.
9127         (select_singlestep_lwp_callback): New.
9128         (select_event_lwp_callback): New.
9129         (cancel_breakpoints_callback): New.
9130         (select_event_lwp): New.
9131         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9132         priority to all LWPs that have had events that should be reported
9133         to the client.  Cancel breakpoints when about to reporting the
9134         event to the client, not while stopping lwps.  No longer cancel
9135         finished single-steps here.
9136         (cancel_finished_single_step): Delete.
9137         (cancel_finished_single_steps): Delete.
9138
9139 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9140
9141         * mem-break.c (enum bkpt_type): New.
9142         (struct breakpoint): New field `type'.
9143         (set_breakpoint_at): Change return type to struct breakpoint
9144         pointer.  Set type to `other_breakpoint' by default.
9145         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9146         in the breakpoint list.
9147         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9148         (reinsert_breakpoint): Rename to ...
9149         (reinsert_raw_breakpoint): ... this.
9150         (reinsert_breakpoints_at): Adjust.
9151         * mem-break.h (struct breakpoint): Declare.
9152         (set_breakpoint_at): Change return type to struct breakpoint
9153         pointer.
9154
9155 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9156
9157         * server.c (handle_query): Assign, not compare.
9158
9159 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9160
9161         Teach linux gdbserver to step-over-breakpoints.
9162
9163         * linux-low.c (can_hardware_single_step): New.
9164         (supports_breakpoints): New.
9165         (handle_extended_wait): If stopping threads, read the stop pc of
9166         the new cloned LWP.
9167         (get_pc): New.
9168         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9169         low target doesn't support retrieving the PC.
9170         (add_lwp): Set last_resume_kind to resume_continue.
9171         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9172         (linux_attach): Don't clear stop_expected.  Set the lwp's
9173         last_resume_kind to resume_stop.
9174         (linux_detach_one_lwp): Don't check for removed breakpoints.
9175         (check_removed_breakpoint): Delete.
9176         (status_pending_p): Rename to ...
9177         (status_pending_p_callback): ... this.  Don't check for removed
9178         breakpoints.  Don't consider threads that are stopped from GDB's
9179         perspective.
9180         (linux_wait_for_lwp): Always read the stop_pc here.
9181         (cancel_breakpoint): New.
9182         (step_over_bkpt): New global.
9183         (linux_wait_for_event_1): Implement stepping over breakpoints.
9184         (gdb_wants_lwp_stopped): New.
9185         (gdb_wants_all_stopped): New.
9186         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9187         single-step traps here.  Store the thread's last reported target
9188         wait status.
9189         (send_sigstop): Don't clear stop_expected.  Always set it,
9190         instead.
9191         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9192         (cancel_finished_single_step): New.
9193         (cancel_finished_single_steps): New.
9194         (wait_for_sigstop): Don't cancel finished single-step traps here.
9195         (linux_resume_one_lwp): Don't check for removed breakpoints.
9196         Don't set `step' on non-hardware step archs.
9197         (linux_set_resume_request): Ignore resume_stop requests if already
9198         stopping or stopped.  Set the lwp's last_resume_kind.
9199         (resume_status_pending_p): Don't check for removed breakpoints.
9200         (need_step_over_p): New.
9201         (start_step_over): New.
9202         (finish_step_over): New.
9203         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9204         requests.  Clear the thread's last reported target waitstatus.
9205         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9206         (linux_resume): Start a step-over if necessary.
9207         (proceed_one_lwp): New.
9208         (proceed_all_lwps): New.
9209         (unstop_all_lwps): New.
9210         * linux-low.h (struct lwp_info): Rewrite comment for the
9211         `suspended' flag.  Add the `stop_pc' field.  Delete the
9212         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9213         Add `'last_resume_kind' and `need_step_over' fields.
9214         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9215         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9216         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9217         (set_raw_breakpoint_at): New.
9218         (set_breakpoint_at): Rewrite to use it.
9219         (reinsert_breakpoint_handler): Delete.
9220         (set_reinsert_breakpoint): New.
9221         (reinsert_breakpoint_by_bp): Delete.
9222         (delete_reinsert_breakpoints): New.
9223         (uninsert_breakpoint): Rewrite.
9224         (uninsert_breakpoints_at): New.
9225         (reinsert_breakpoint): Rewrite.
9226         (reinsert_breakpoints_at): New.
9227         (check_breakpoints): Rewrite.
9228         (breakpoint_here): New.
9229         (breakpoint_inserted_here): New.
9230         (check_mem_read): Adjust.
9231         * mem-break.h (breakpoints_supported, breakpoint_here)
9232         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9233         (reinsert_breakpoint_by_bp): Delete declaration.
9234         (delete_reinsert_breakpoints): Declare.
9235         (reinsert_breakpoint): Delete declaration.
9236         (reinsert_breakpoints_at): Declare.
9237         (uninsert_breakpoint): Delete declaration.
9238         (uninsert_breakpoints_at): Declare.
9239         (check_breakpoints): Adjust prototype.
9240         * server.h: Adjust include order.
9241         (struct thread_info): Declare here.  Add a `last_status' field.
9242
9243 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9244
9245         * server.c (crc32): New function.
9246         (handle_query): Add handling for 'qCRC:' request.
9247
9248 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9249
9250         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9251         lwp had been stopped by a watchpoint.
9252
9253 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9254
9255         * server.h (internal_error): Declare.
9256         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9257         * utils.c (internal_error): New function.
9258
9259 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9260
9261         * configure.srv: Fix typo setting srv_regobj.
9262
9263 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9264
9265         * linux-low.c (fetch_register): Avoid passing a non string literal
9266         format to `error'.
9267         (usr_store_inferior_registers): Ditto.
9268
9269 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9270
9271         * linux-low.c (linux_write_memory): Bail out early if peeking
9272         memory failed.
9273
9274 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9275
9276         * linux-low.h (struct lwp_info): New fields
9277         `stopped_by_watchpoint' and `stopped_data_address'.
9278         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9279         here, and cache them in the lwp object.
9280         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9281         directly.
9282         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9283         field.
9284         (linux_stopped_by_watchpoint): Rewrite.
9285         (linux_stopped_data_address): Rewrite.
9286
9287 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9288
9289         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9290         switching the current inferior, not before.
9291
9292 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9293
9294         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9295         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9296         i386-linux.c and amd64-linux.c.
9297         (reg-i386.o): Removed.
9298         (reg-i386.c): Likewise.
9299         (reg-i386-linux.o): Likewise.
9300         (reg-i386-linux.c): Likewise.
9301         (reg-x86-64.o): Likewise.
9302         (reg-x86-64.c): Likewise.
9303         (reg-x86-64-linux.o): Likewise.
9304         (reg-x86-64-linux.c): Likewise.
9305         (i386.o): New.
9306         (i386.c): Likewise.
9307         (i386-linux.o): Likewise.
9308         (i386-linux.c): Likewise.
9309         (amd64.o): Likewise.
9310         (amd64.c): Likewise.
9311         (amd64-linux.o): Likewise.
9312         (amd64-linux.c): Likewise.
9313
9314         * configure.srv (srv_i386_regobj): New.
9315         (srv_i386_linux_regobj): Likewise.
9316         (srv_amd64_regobj): Likewise.
9317         (srv_amd64_linux_regobj): Likewise.
9318         (srv_i386_32bit_xmlfiles): Likewise.
9319         (srv_i386_64bit_xmlfiles): Likewise.
9320         (srv_i386_xmlfiles): Likewise.
9321         (srv_amd64_xmlfiles): Likewise.
9322         (srv_i386_linux_xmlfiles): Likewise.
9323         (srv_amd64_linux_xmlfiles): Likewise.
9324         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9325         srv_xmlfiles to $srv_i386_xmlfiles.
9326         (i[34567]86-*-mingw32ce*): Likewise.
9327         (i[34567]86-*-mingw*): Likewise.
9328         (i[34567]86-*-nto*): Likewise.
9329         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9330         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9331         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9332         (x86_64-*-linux*): Likewise.
9333
9334         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9335         (init_registers_amd64_linux): New.
9336         (x86_arch_setup): Replace init_registers_x86_64_linux with
9337         init_registers_amd64_linux.
9338
9339 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9340
9341         * configure.ac: Check for libdl.  If it is not available link against
9342         static libthread_db.
9343         * configure: Regenerate.
9344
9345 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9346
9347         PR9605
9348
9349         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9350         handing a read watchpoint.
9351         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9352
9353 2010-02-12  Doug Evans  <dje@google.com>
9354
9355         * linux-low.c (linux_supports_tracefork_flag): Document.
9356         (linux_look_up_symbols): Add comment.
9357
9358 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9359
9360         * regcache.c (supply_register): Clear regcache if buf is NULL.
9361
9362 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9363             Joel Brobecker  <brobecker@adacore.com>
9364
9365         * inferiors.c (find_inferior): Add function documentation.
9366         (unloaded_dll): Handle the case where the unloaded dll has not
9367         been previously registered in the dll list.
9368
9369 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9370
9371         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9372         (thumb2_breakpoint): New.
9373         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9374
9375 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9376
9377         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9378         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9379         breakpoints.
9380
9381 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9382
9383         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9384
9385 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9386
9387         * linux-s390-low.c (s390_collect_ptrace_register)
9388         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9389
9390 2010-01-21  Doug Evans  <dje@google.com>
9391
9392         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9393         (PTRACE_ARG4_TYPE): New macro.
9394         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9395         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9396         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9397         (usr_store_inferior_registers): Ditto.
9398         (linux_read_memory, linux_write_memory): Ditto.
9399         (linux_test_for_tracefork): Ditto.
9400
9401         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9402         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9403
9404 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9405
9406         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9407         target.
9408
9409 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9410
9411         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9412         prototype to take a regcache.  Adjust.
9413
9414 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9415
9416         * regcache.h (struct thread_info): Forward declare.
9417         (struct regcache): New.
9418         (new_register_cache): Adjust prototype.
9419         (get_thread_regcache): Declare.
9420         (free_register_cache): Adjust prototype.
9421         (registers_to_string, registers_from_string): Ditto.
9422         (supply_register, supply_register_by_name, collect_register)
9423         (collect_register_as_string, collect_register_by_name): Ditto.
9424         * regcache.c (struct inferior_regcache_data): Delete.
9425         (get_regcache): Rename to ...
9426         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9427         fetching registers.
9428         (regcache_invalidate_one): Adjust.
9429         (regcache_invalidate): Fix prototype.
9430         (new_register_cache): Return the new register cache.
9431         (free_register_cache): Change prototype.
9432         (realloc_register_cache): Adjust.
9433         (registers_to_string): Change prototype to take a regcache.  Adjust.
9434         (registers_from_string): Ditto.
9435         (register_data): Ditto.
9436         (supply_register): Ditto.
9437         (supply_register_by_name): Ditto.
9438         (collect_register): Ditto.
9439         (collect_register_as_string): Ditto.
9440         (collect_register_by_name): Ditto.
9441         * server.c (process_serial_event): Adjust.
9442         * linux-low.h (regset_fill_func, regset_store_func): Change
9443         prototype.
9444         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9445         Change prototype.
9446         * linux-low.c (get_stop_pc): Adjust.
9447         (check_removed_breakpoint): Adjust.
9448         (linux_wait_for_event): Adjust.
9449         (linux_resume_one_lwp): Adjust.
9450         (fetch_register): Add regcache parameter.  Adjust.
9451         (usr_store_inferior_registers): Ditto.
9452         (regsets_fetch_inferior_registers): Ditto.
9453         (regsets_store_inferior_registers): Ditto.
9454         (linux_fetch_registers, linux_store_registers): Ditto.
9455         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9456         regcache.  Adjust.
9457         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9458         Ditto.
9459         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9460         prototype to take a regcache.
9461         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9462         * remote-utils.c (convert_ascii_to_int, outreg)
9463         (prepare_resume_reply): Change prototype to take a regcache.
9464         Adjust.
9465         * target.h (struct target_ops) <fetch_registers, store_registers>:
9466         Change prototype to take a regcache.
9467         (fetch_inferior_registers, store_inferior_registers): Change
9468         prototype to take a regcache.  Adjust.
9469         * proc-service.c (ps_lgetregs): Adjust.
9470         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9471         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9472         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9473         take a regcache.  Adjust.
9474         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9475         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9476         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9477         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9478         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9479         (cris_cannot_fetch_register):
9480         (cris_breakpoint_at): Change prototype to take a regcache.
9481         Adjust.
9482         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9483         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9484         to take a regcache.  Adjust.
9485         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9486         Adjust.
9487         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9488         take a regcache.  Adjust.
9489         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9490         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9491         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9492         * linux-mips-low.c (mips_get_pc):
9493         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9494         (mips_reinsert_addr): Adjust.
9495         (mips_collect_register): Change prototype to take a regcache.
9496         Adjust.
9497         (mips_supply_register):
9498         (mips_collect_register_32bit, mips_supply_register_32bit)
9499         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9500         (mips_store_fpregset): Ditto.
9501         * linux-ppc-low.c (ppc_supply_ptrace_register)
9502         (ppc_supply_ptrace_register): Ditto.
9503         (parse_spufs_run): Adjust.
9504         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9505         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9506         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9507         take a regcache.  Adjust.
9508         * linux-s390-low.c (s390_collect_ptrace_register)
9509         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9510         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9511         (s390_arch_setup): Adjust.
9512         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9513         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9514         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9515         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9516         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9517         regcache.  Adjust.
9518         (sparc_breakpoint_at): Adjust.
9519         * linux-xtensa-low.c (xtensa_fill_gregset):
9520         (xtensa_store_gregset):
9521         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9522         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9523         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9524         prototype to take a regcache.  Adjust.
9525         * win32-arm-low.c (arm_fetch_inferior_register)
9526         (arm_store_inferior_register): Change prototype to take a
9527         regcache.  Adjust.
9528         * win32-i386-low.c (i386_fetch_inferior_register)
9529         (i386_store_inferior_register): Change prototype to take a
9530         regcache.  Adjust.
9531         * win32-low.c (child_fetch_inferior_registers)
9532         (child_store_inferior_registers): Change prototype to take a
9533         regcache.  Adjust.
9534         (win32_wait): Adjust.
9535         (win32_fetch_inferior_registers): Change prototype to take a
9536         regcache.  Adjust.
9537         (win32_store_inferior_registers): Adjust.
9538         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9539         store_inferior_register>: Change prototype to take a regcache.
9540
9541 2010-01-20  Doug Evans  <dje@google.com>
9542
9543         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9544         #ifdef.
9545         (linux_wait_for_event1, linux_init_signals): Ditto.
9546         (W_STOPCODE): Provide definition if missing.
9547
9548 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9549
9550         * linux-low.c (linux_core_of_thread): New.
9551         (compare_ints, show_process, list_threads): New.
9552         (linux_qxfer_osdata): Report threads and cores.
9553         (linux_target_op): Register linux_core_of_thread.
9554         * remote-utils.c (prepare_resume_reply): Report the core.
9555         (buffer_xml_printf): Support %d specifier.
9556         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9557         New.
9558         (handle_query): Handle qXfer:threads.  Announce availability
9559         thereof.
9560         * target.h (struct target_ops): New field core_of_thread.
9561
9562 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9563
9564         * Makefile.in (clean): Remove new generated files.
9565         (reg-s390.o, reg-s390.c): Remove rules.
9566         (reg-s390x.o, reg-s390x.c): Likewise.
9567         (s390-linux32.o, s390-linux32.c): Add rules.
9568         (s390-linux64.o, s390-linux64.c): Likewise.
9569         (s390x-linux64.o, s390x-linux64.c): Likewise.
9570         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9571         * linux-s390-low.c: Include <elf.h>.
9572         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9573         (init_registers_s390): Remove prototype.
9574         (init_registers_s390x): Likewise.
9575         (init_registers_s390_linux32): Add prototype.
9576         (init_registers_s390_linux64): Likewise.
9577         (init_registers_s390x_linux64): Likewise.
9578         (s390_num_regs_3264): New define.
9579         (s390_regmap_3264): New global variable.
9580         (s390_cannot_fetch_register): Remove obsolete check.
9581         (s390_cannot_store_register): Likewise.
9582         (s390_collect_ptrace_register): Handle upper/lower register halves.
9583         (s390_supply_ptrace_register): Likewise.
9584         (s390_fill_gregset): Update to register number changes.
9585         (s390_get_hwcap): New routine.
9586         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9587         Install appropriate regmap and register set.
9588
9589 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9590
9591         * server.c (gdbserver_version): Update copyright year to 2010.
9592         * gdbreplay.c (gdbreplay_version): Likewise.
9593
9594 2009-12-28  Doug Evans  <dje@google.com>
9595
9596         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9597         elf/external.h.  Include <elf.h> instead but only if necessary.
9598
9599 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9600
9601         * linux-low.c (linux_remove_process): Remove `detaching'
9602         parameter.  Don't release/detach from thread_db here.
9603         (linux_kill): Release/detach from thread_db here, ...
9604         (linux_detach): ... and here, before actually detaching.
9605         (linux_wait_1): ... and here, when a process exits.
9606         * thread-db.c (any_thread_of): New.
9607         (thread_db_free): Switch the current inferior to a thread of the
9608         passed in process.
9609
9610 2009-12-21  Doug Evans  <dje@google.com>
9611
9612         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9613
9614         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9615         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9616         warning ifndef __NR_tkill.  Move setting of errno there too.
9617         Delete unnecessary resetting of errno after syscall.
9618         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9619
9620         * configure.ac: Check for dladdr.
9621         * config.in: Regenerate.
9622         * configure: Regenerate.
9623         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9624         (try_thread_db_load): Update.
9625
9626         * linux-low.c (my_waitpid): Delete unnecessary prototype.
9627
9628 2009-12-18  Doug Evans  <dje@google.com>
9629
9630         * event-loop.c: Include unistd.h if it exists.
9631
9632         * linux-low.c (my_waitpid): Move definition away from being in
9633         between linux_tracefork_child/linux_test_for_tracefork.
9634
9635         * gdb_proc_service.h (psaddr_t): Fix type.
9636         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9637         signature to match glibc.
9638
9639 2009-12-16  Doug Evans  <dje@google.com>
9640
9641         * linux-low.c (linux_read_memory): Fix argument to read.
9642
9643 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9644
9645         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9646         events, don't leave current_inferior pointing at null.
9647
9648 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9649
9650         * win32-low.c (LOG): Delete.
9651         (OUTMSG): Output to stderr.
9652         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9653         on compile time LOG macro.
9654         (win32_wait): Fix debug output.
9655
9656 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9657
9658         * win32-low.c (win32_add_one_solib): If the dll name is
9659         "ntdll.dll", prepend the system directory to the dll path.
9660
9661 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
9662
9663         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9664
9665 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9666             Vladimir Prus  <vladimir@codesourcery.com>
9667
9668         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9669         * configure.ac: Check for __mcoldfire__ and set
9670         gdb_cv_m68k_is_coldfire.
9671         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9672         reg-cf.o and reg-m68k.o.
9673         * configure: Regenerated.
9674
9675 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
9676
9677         * linux-low.c (linux_remove_process): Add `detaching' parameter.
9678         Pass it to thread_db_free.
9679         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9680         proper `detaching' argument to linux_remove_process.
9681         * linux-low.h (thread_db_free): Add `detaching' parameter.
9682         * thread-db.c (thread_db_init): Pass false as `detaching' argument
9683         to thread_db_free.
9684         (thread_db_free): Add `detaching' parameter.  Only
9685         call td_ta_clear_event if detaching from process.
9686
9687 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
9688
9689         * thread-db.c (thread_db_free): Fix typo.
9690
9691 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
9692
9693         PR gdb/10838
9694         * thread-db.c (thread_db_free): Call td_ta_clear_event.
9695
9696 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9697
9698         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9699         with an i686 compiler.
9700         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9701         needed.
9702         * configure: Rebuilt.
9703
9704 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
9705
9706         PR gdb/10783
9707
9708         * server.c (handle_search_memory_1): Correct read_addr initialization
9709         in loop for searching subsequent chunks.
9710
9711 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
9712
9713         * configure.ac: New --with-libthread-db option.
9714         * thread-db.c: Allow direct dependence on libthread_db.
9715         (thread_db_free): Adjust.
9716         * config.in: Regenerate.
9717         * configure: Likewise.
9718
9719 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
9720
9721         PR gdb/10757
9722         * thread-db.c (attach_thread): New function.
9723         (maybe_attach_thread): Return success/failure.
9724         (find_new_threads_callback): Adjust.
9725         (thread_db_find_new_threads): Loop until no new threads.
9726
9727 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
9728
9729         * proc-service.c (ps_lgetregs): Formatting.
9730
9731 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
9732
9733         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9734         * configure.ac: Adjust.
9735         * linux-low.h (struct process_info_private): Move members to struct
9736         thread_db.
9737         (thread_db_free, thread_db_handle_monitor_command): New prototype.
9738         * linux-low.c (linux_remove_process): Adjust.
9739         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9740         * server.c (handle_query): Move code ...
9741         (handle_monitor_command): ... here. New function.
9742         * target.h (struct target_ops): New member.
9743         * thread-db.c (struct thread_db): New.
9744         (libthread_db_search_path): New variable.
9745         (thread_db_create_event, thread_db_enable_reporting)
9746         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9747         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9748         (try_thread_db_load_1, dladdr_to_soname): New functions.
9749         (try_thread_db_load, thread_db_load_search): New functions.
9750         (thread_db_init): Search for libthread_db.
9751         (thread_db_free): New function.
9752         (thread_db_handle_monitor_command): Likewise.
9753         * config.in: Regenerate.
9754         * configure: Regenerate.
9755
9756 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
9757
9758         * spu-low.c (spu_kill): Wait for inferior to terminate.
9759         Call clear_inferiors.
9760         (spu_detach): Call clear_inferiors.
9761
9762 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9763
9764         * aclocal.m4: Regenerate.
9765         * config.in: Likewise.
9766         * configure: Likewise.
9767
9768 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9769
9770         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9771         (parse_spufs_run): New function.
9772         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9773         (ppc_breakpoint_at): Handle SPU breakpoints.
9774
9775 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9776
9777         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9778         (SPUFS_MAGIC): Define.
9779         (spu_enumerate_spu_ids): New function.
9780         (linux_qxfer_spu): New function.
9781         (linux_target_ops): Install linux_qxfer_spu.
9782
9783 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9784
9785         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9786         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
9787         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9788         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9789         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9790         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9791         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9792         (init_registers_powerpc_cell32l): Add prototype.
9793         (init_registers_powerpc_cell64l): Likewise.
9794         (ppc_arch_setup): Detect Cell/B.E. architecture.
9795
9796 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9797
9798         * Makefile.in (datarootdir): New variable.
9799
9800 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9801
9802         * linux-low.c (linux_write_memory): Update debugging output.
9803         * Makefile.in (clean): Add new descriptions.
9804         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9805         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9806         * configure.srv: Add new files for arm*-*-linux*.
9807         * linux-arm-low.c: Add new declarations.
9808         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9809         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9810         (HWCAP_VFPv3D16): New.
9811         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9812         instead of __IWMMXT__.
9813         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9814         (arm_arch_setup): New.
9815         (target_regsets): Remove #ifdef.  Add VFP regset.
9816         (the_low_target): Use arm_arch_setup.
9817
9818 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9819
9820         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9821         the main thread again.
9822
9823 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
9824
9825         Adding Neutrino gdbserver.
9826         * configure: Regenerated.
9827         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9828         * configure.srv (i[34567]86-*-nto*): New target.
9829         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9830         * remote-utils.c [__QNX__]: Include sys/iomgr.h
9831         (nto_comctrl) [__QNX__]: New function.
9832         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9833
9834 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
9835
9836         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9837         srv_tgtobj.
9838
9839 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
9840             Pedro Alves  <pedro@codesourcery.com>
9841
9842         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9843         don't support CONTEXT_EXTENDED_REGISTERS.
9844         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9845         (the_low_target): Install them.
9846         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9847         failing with ERROR_PIPE_NOT_CONNECTED.
9848
9849 2009-06-30  Doug Evans  <dje@google.com>
9850             Pierre Muller  <muller@ics.u-strasbg.fr>
9851
9852         Add h/w watchpoint support to x86-linux, win32-i386.
9853         * Makefile.in (SFILES): Add i386-low.c
9854         (i386_low_h): Define.
9855         (i386-low.o): Add dependencies.
9856         (linux-x86-low.o): Add i386-low.h dependency.
9857         (win32-i386-low.o): Ditto.
9858         * i386-low.c: New file.
9859         * i386-low.h: New file.
9860         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9861         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9862         * linux-low.c (linux_add_process): Initialize arch_private.
9863         (linux_remove_process): Free arch_private.
9864         (add_lwp): Initialize arch_private.
9865         (delete_lwp): Free arch_private.
9866         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9867         provided.
9868         * linux-low.h (process_info_private): New member arch_private.
9869         (lwp_info): New member arch_private.
9870         (linux_target_ops): New members new_process, new_thread,
9871         prepare_to_resume.
9872         (ptid_of): New macro.
9873         * linux-x86-low.c: Include stddef.h, i386-low.h.
9874         (arch_process_info): New struct.
9875         (arch_lwp_info): New struct.
9876         (x86_linux_dr_get, x86_linux_dr_set): New functions.
9877         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9878         (i386_dr_low_get_status): New function.
9879         (x86_insert_point, x86_remove_point): New functions.
9880         (x86_stopped_by_watchpoint): New function.
9881         (x86_stopped_data_address): New function.
9882         (x86_linux_new_process, x86_linux_new_thread): New functions.
9883         (x86_linux_prepare_to_resume): New function.
9884         (the_low_target): Add entries for insert_point, remove_point,
9885         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9886         prepare_to_resume.
9887         * server.c (debug_hw_points): New global.
9888         (monitor_show_help): Document set debug-hw-points.
9889         (handle_query): Process "set debug-hw-points".
9890         * server.h (debug_hw_points): Declare.
9891         (paddress): Declare.
9892         * utils.c (NUMCELLS, CELLSIZE): New macros.
9893         (get_sell, xsnprintf, paddress): New functions.
9894         * win32-arm-low.c (the_low_target): Add entries for insert_point,
9895         remove_point, stopped_by_watchpoint, stopped_data_address.
9896         * win32-i386-low.c: Include i386-low.h.
9897         (debug_reg_state): Replaces dr.
9898         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9899         (i386_dr_low_get_status): New function.
9900         (i386_insert_point, i386_remove_point): New functions.
9901         (i386_stopped_by_watchpoint): New function.
9902         (i386_stopped_data_address): New function.
9903         (i386_initial_stuff): Update.
9904         (get_thread_context,set_thread_context,i386_thread_added): Update.
9905         (the_low_target): Add entries for insert_point,
9906         remove_point, stopped_by_watchpoint, stopped_data_address.
9907         * win32-low.c (win32_insert_watchpoint): New function.
9908         (win32_remove_watchpoint): New function.
9909         (win32_stopped_by_watchpoint): New function.
9910         (win32_stopped_data_address): New function.
9911         (win32_target_ops): Add entries for insert_watchpoint,
9912         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9913         * win32-low.h (win32_target_ops): New members insert_point,
9914         remove_point, stopped_by_watchpoint, stopped_data_address.
9915
9916 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
9917
9918         * server.c (process_serial_event): Re-return unsupported, not
9919         error, if the type isn't recognized.  Re-allow supporting only
9920         insert or remove packets.  Also call require_running for
9921         breakpoints.  Add missing break statement to default case.  Tidy.
9922         * target.h (struct target_ops): Rename insert_watchpoint to
9923         insert_point, and remove_watchpoint to remove_point.
9924
9925         * linux-low.h (struct linux_target_ops): Likewise.
9926         * linux-low.c (linux_insert_watchpoint): Rename to ...
9927         (linux_insert_point): ... this.  Adjust.
9928         (linux_remove_watchpoint): Rename to ...
9929         (linux_remove_point): ... this.  Adjust.
9930         (linux_target_ops): Adjust.
9931         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9932         (cris_insert_point): ... this.
9933         (cris_remove_watchpoint): Rename to ...
9934         (cris_remove_point): ... this.
9935         (the_low_target): Adjust.
9936
9937 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
9938
9939         * server.c (handle_v_kill): Pass signal_pid to
9940         kill_inferior if multi_process is zero.
9941
9942 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
9943
9944         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9945         * target.h (target_ops): Comment for *_watchpoint to make it clear
9946         the functions can get types '0' and '1'.
9947
9948 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
9949
9950         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9951         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9952         * regcache.c (get_regcache): Likewise.
9953         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9954         * win32-low.c (child_fetch_inferior_registers): Remove check for
9955         regno 0.
9956
9957 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
9958             Pedro Alves <pedro@codesourcery.com>
9959
9960         * target.h (struct target_ops) <supports_multi_process>: New
9961         callback.
9962         (target_supports_multi_process): New.
9963         * server.c (handle_query): Even if GDB reports support, only
9964         enable multi-process if the target also supports it.  Report
9965         multi-process support only if the target backend supports it.
9966         * linux-low.c (linux_supports_multi_process): New function.
9967         (linux_target_ops): Install it as target_supports_multi_process
9968         callback.
9969
9970 2009-05-24  Doug Evans  <dje@google.com>
9971
9972         Global renaming of find_thread_pid to find_thread_ptid.
9973         * server.h (find_thread_ptid): Renamed from find_thread_pid.
9974         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9975         All callers updated.
9976
9977         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9978         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9979         directly.
9980
9981         * linux-low.c (get_stop_pc): Print pc if debug_threads.
9982         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9983         (linux_resume_one_lwp): Ditto.
9984
9985 2009-05-23  Doug Evans  <dje@google.com>
9986
9987         * linux-low.c (linux_resume_one_lwp): Change type of first arg
9988         from struct inferior_list_entry * to struct lwp_info *.
9989         All callers updated.
9990
9991 2009-05-13  Doug Evans  <dje@google.com>
9992
9993         * linux-x86-low.c: Don't include assert.h.
9994         (x86_siginfo_fixup): Use fatal, not assert.
9995         (x86_arch_setup): Fix comment.
9996
9997 2009-05-12  Doug Evans  <dje@google.com>
9998
9999         Biarch support for i386/amd64 gdbserver.
10000         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10001         Add linux-x86-low.c.
10002         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10003         (linux-x86-low.o): Add.
10004         * linux-x86-64-low.c: Delete.
10005         * linux-i386-low.c: Delete.
10006         * linux-x86-low.c: New file.
10007         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10008         linux-x86-low.o.
10009         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10010         linux-x86-low.o.
10011         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10012         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10013         (linux_child_pid_to_exec_file): New function.
10014         (elf_64_header_p, elf_64_file_p): New functions.
10015         (siginfo_fixup): New function.
10016         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10017         give target a chance to convert layout.
10018         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10019         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10020
10021 2009-05-07  Doug Evans  <dje@google.com>
10022
10023         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10024         (regsets_store_inferior_registers): Ditto.
10025
10026 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10027
10028         PR server/10048
10029
10030         * linux-low.c (must_set_ptrace_flags): Delete.
10031         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10032         of the global.
10033         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10034         `lwp->must_set_ptrace_flags' instead.
10035         (linux_wait_for_event_1): Set ptrace options here.
10036         (linux_wait_1): ... not here.
10037
10038 2009-04-30  Doug Evans  <dje@google.com>
10039
10040         * inferiors.c (started_inferior_callback): New function.
10041         (attached_inferior_callback): New function.
10042         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10043         * server.c (print_started_pid, print_attached_pid): New functions.
10044         (detach_or_kill_for_exit): New function.
10045         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10046         * server.h (have_started_inferiors_p): Declare.
10047         (have_attached_inferiors_p): Declare.
10048
10049         * inferiors.c (remove_process): Fix memory leak, free process.
10050         * linux-low.c (linux_remove_process): New function.
10051         (linux_kill): Call it instead of remove_process.
10052         (linux_detach, linux_wait_1): Ditto.
10053
10054 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10055
10056         * configure.srv: Add x86 Windows CE target.
10057
10058 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10059
10060         * inferiors.c (get_thread_process): Make global.
10061         * server.h (get_thread_process): Add prototype.
10062         * thread-db.c (find_one_thread): Use get_thread_process
10063         instead of current_process.
10064         (thread_db_get_tls_address): Do not crash if called when
10065         thread layer is not yet initialized.
10066
10067 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10068
10069         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10070         * spu-low.c (current_tid): Rename to ...
10071         (current_ptid): ... this.
10072         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10073         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10074         ptid_get_lwp (current_ptid) instead of current_tid.
10075         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10076         instead of current_tid.  Use find_process_pid to verify pid
10077         argument is valid.  Pass proper argument to remove_process.
10078         (spu_thread_alive): Compare current_ptid instead of current_tid.
10079         (spu_resume): Likewise.
10080
10081 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10082
10083         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10084         variable.
10085
10086 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10087
10088         Implement the multiprocess extensions, and add linux multiprocess
10089         support.
10090
10091         * server.h (ULONGEST): Declare.
10092         (struct ptid, ptid_t): New.
10093         (minus_one_ptid, null_ptid): Declare.
10094         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10095         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10096         (struct inferior_list_entry): Change `id' type from unsigned from
10097         to ptid_t.
10098         (struct sym_cache, struct breakpoint, struct
10099         process_info_private): Forward declare.
10100         (struct process_info): Declare.
10101         (current_process): Declare.
10102         (all_processes): Declare.
10103         (initialize_inferiors): Declare.
10104         (add_thread): Adjust to use ptid_t.
10105         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10106         (add_process, remove_process, find_thread_pid): Declare.
10107         (find_inferior_id): Adjust to use ptid_t.
10108         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10109         (multi_process): Declare.
10110         (push_event): Adjust to use ptid_t.
10111         (read_ptid, write_ptid): Declare.
10112         (prepare_resume_reply): Adjust to use ptid_t.
10113         (clear_symbol_cache): Declare.
10114         * inferiors.c (all_processes): New.
10115         (null_ptid, minus_one_ptid): New.
10116         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10117         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10118         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10119         parameter.  Adjust.
10120         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10121         (gdb_id_to_thread): Rename to ...
10122         (find_thread_pid): ... this.  Change unsigned long to ptid.
10123         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10124         (loaded_dll, pull_pid_from_list): Adjust.
10125         (add_process, remove_process, find_process_pid)
10126         (get_thread_process, current_process, initialize_inferiors): New.
10127         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10128         (struct target_waitstatus) <related_pid>: Ditto.
10129         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10130         return type to int.
10131         (struct target_ops) <join>: Add `pid' argument.
10132         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10133         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10134         to ptid.
10135         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10136         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10137         (target_pid_to_str): Declare.
10138         * target.c (set_desired_inferior): Adjust to use ptids.
10139         (mywait): Add new `ptid' argument.  Adjust.
10140         (target_pid_to_str): New.
10141         * mem-break.h (free_all_breakpoints): Declare.
10142         * mem-break.c (breakpoints): Delelete.
10143         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10144         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10145         to use per-process breakpoint list.
10146         (free_all_breakpoints): New.
10147         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10148         (symbol_cache, all_symbols_looked_up): Delete.
10149         (hexchars): New.
10150         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10151         read_ptid): New.
10152         (prepare_resume_reply): Change ptid argument's type from unsigned
10153         long to ptid_t.  Adjust.  Implement W;process and X;process.
10154         (free_sym_cache, clear_symbol_cache): New.
10155         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10156         * server.c (cont_thread, general_thread, step_thread): Change type
10157         to ptid_t.
10158         (attached): Delete.
10159         (multi_process): New.
10160         (last_ptid): Change type to ptid_t.
10161         (struct vstop_notif) <ptid>: Change type to ptid_t.
10162         (queue_stop_reply, push_event): Change `ptid' argument's type to
10163         ptid_t.
10164         (discard_queued_stop_replies): Add `pid' argument.
10165         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10166         changes.  Don't reference the `attached' global.
10167         (attach_inferior): Adjust to mywait interface changes.
10168         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10169         features.  Handle and report "multiprocess+".  Handle
10170         "qAttached:PID".
10171         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10172         changes.
10173         (handle_v_kill): New.
10174         (handle_v_stopped): Adjust to use target_pid_to_str.
10175         (handle_v_requests): Allow multiple attaches and runs when
10176         multiprocess extensions are in effect.  Handle "vKill".
10177         (myresume): Adjust to use ptids.
10178         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10179         (handle_status): Adjust to discard_queued_stop_replies interface
10180         change.
10181         (first_thread_of, kill_inferior_callback)
10182         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10183         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10184         and detaching from all inferiors.  Handle multiprocess packet
10185         variants.
10186         * linux-low.h: Include gdb_proc_service.h.
10187         (struct process_info_private): New.
10188         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10189         <lwpid_of>: Use ptid_get_lwp.
10190         (get_lwp_thread): Adjust.
10191         (struct lwp_info): Add `dead' member.
10192         (find_lwp_pid): Declare.
10193         * linux-low.c (thread_db_active): Delete.
10194         (new_inferior): Adjust comment.
10195         (inferior_pid): Delete.
10196         (linux_add_process): New.
10197         (handle_extended_wait): Adjust.
10198         (add_lwp): Change unsigned long to ptid.
10199         (linux_create_inferior): Add process to processes table.  Adjust
10200         to use ptids.  Don't set new_inferior here.
10201         (linux_attach_lwp): Rename to ...
10202         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10203         it.  Adjust to use ptids.
10204         (linux_attach_lwp): New.
10205         (linux_attach): Add process to processes table.  Don't set
10206         new_inferior here.
10207         (struct counter): New.
10208         (second_thread_of_pid_p, last_thread_of_process_p): New.
10209         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10210         multiple processes.
10211         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10212         processes.  Remove process from process table.
10213         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10214         to multiple processes.
10215         (any_thread_of): New.
10216         (linux_detach): Add `pid' argument, and handle it.  Remove process
10217         from processes table.
10218         (linux_join): Add `pid' argument.  Handle it.
10219         (linux_thread_alive): Change unsighed long argument to ptid_t.
10220         Consider dead lwps as not being alive.
10221         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10222         threads we're not interested in.
10223         (same_lwp, find_lwp_pid): New.
10224         (linux_wait_for_lwp): Change `pid' argument's type from int to
10225         ptid_t.  Adjust.
10226         (linux_wait_for_event): Rename to ...
10227         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10228         from int to ptid_t.  Adjust.
10229         (linux_wait_for_event): New.
10230         (linux_wait_1): Add `ptid' argument.  Change return type to
10231         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10232         that exit from the process table.
10233         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10234         Adjust.
10235         (mark_lwp_dead): New.
10236         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10237         stopping all threads, mark its main lwp as dead.
10238         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10239         ptids.
10240         (fetch_register, usr_store_inferior_registers)
10241         (regsets_fetch_inferior_registers)
10242         (regsets_store_inferior_registers, linux_read_memory)
10243         (linux_write_memory): Inline `inferior_pid'.
10244         (linux_look_up_symbols): Adjust to use per-process
10245         `thread_db_active'.
10246         (linux_request_interrupt): Adjust to use ptids.
10247         (linux_read_auxv): Inline `inferior_pid'.
10248         (initialize_low): Don't reference thread_db_active.
10249         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10250         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10251         (ps_getpid): Return the pid of the current inferior.
10252         * thread-db.c (proc_handle, thread_agent): Delete.
10253         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10254         per-process data.
10255         (find_one_thread): Change argument type to ptid_t.  Adjust to
10256         per-process data.
10257         (maybe_attach_thread): Adjust to per-process data and ptids.
10258         (thread_db_find_new_threads): Ditto.
10259         (thread_db_init): Ditto.
10260         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10261         processes table.  Adjust to use ptids.
10262         (spu_kill, spu_detach): Adjust interface.  Remove process from
10263         processes table.
10264         (spu_join, spu_thread_alive): Adjust interface.
10265         (spu_wait): Adjust interface.  Remove process from processes
10266         table.  Adjust to use ptids.
10267         * win32-low.c (current_inferior_tid): Delete.
10268         (current_inferior_ptid): New.
10269         (debug_event_ptid): New.
10270         (thread_rec): Take a ptid.  Adjust.
10271         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10272         (child_delete_thread): Ditto.
10273         (do_initial_child_stuff): Add `attached' argument.  Add process to
10274         processes table.
10275         (child_fetch_inferior_registers, child_store_inferior_registers):
10276         Adjust.
10277         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10278         (win32_attach): Pass 1 to do_initial_child_stuff.
10279         (win32_kill): Adjust interface.  Remove process from processes
10280         table.
10281         (win32_detach): Ditto.
10282         (win32_join): Adjust interface.
10283         (win32_thread_alive): Take a ptid.
10284         (win32_resume): Adjust to use ptids.
10285         (get_child_debug_event): Ditto.
10286         (win32_wait): Adjust interface.  Remove exiting process from
10287         processes table.
10288
10289 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10290
10291         Non-stop mode support.
10292
10293         * server.h (non_stop): Declare.
10294         (gdb_client_data, handler_func): Declare.
10295         (delete_file_handler, add_file_handler, start_event_loop):
10296         Declare.
10297         (handle_serial_event, handle_target_event, push_event)
10298         (putpkt_notif): Declare.
10299         * target.h (enum resume_kind): New.
10300         (struct thread_resume): Replace `step' field by `kind' field.
10301         (TARGET_WNOHANG): Define.
10302         (struct target_ops) <wait>: Add `options' argument.
10303         <supports_non_stop, async, start_non_stop>: New fields.
10304         (target_supports_non_stop, target_async): New.
10305         (start_non_stop): Declare.
10306         (mywait): Add `options' argument.
10307         * target.c (mywait): Add `options' argument.  Print child exit
10308         notifications here.
10309         (start_non_stop): New.
10310         * server.c (non_stop, own_buf, mem_buf): New globals.
10311         (struct vstop_notif): New.
10312         (notif_queue): New global.
10313         (queue_stop_reply, push_event, discard_queued_stop_replies)
10314         (send_next_stop_reply): New.
10315         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10316         interface changes.
10317         (attach_inferior): In non-stop mode, don't wait for the target
10318         here.
10319         (handle_general_set): Handle QNonStop.
10320         (handle_query): When handling qC, return the current general
10321         thread, instead of the first thread of the list.
10322         (handle_query): If the backend supports non-stop mode, include
10323         QNonStop+ in the qSupported query response.
10324         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10325         and non-stop mode.
10326         (handle_v_attach, handle_v_run): Handle non-stop mode.
10327         (handle_v_stopped): New.
10328         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10329         (myresume): Adjust to use resume_kind.  Handle non-stop.
10330         (queue_stop_reply_callback): New.
10331         (handle_status): Handle non-stop mode.
10332         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10333         Refactor serial protocol handling from here ...
10334         (process_serial_event): ... to this new function.  When GDB
10335         selects any thread, select one here.  In non-stop mode, wait until
10336         GDB acks all pending events before exiting.
10337         (handle_serial_event, handle_target_event): New.
10338         * remote-utils.c (remote_open): Install remote_desc in the event
10339         loop.
10340         (remote_close): Remove remote_desc from the event loop.
10341         (putpkt_binary): Rename to...
10342         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10343         (putpkt_binary): New as wrapper around putpkt_binary_1.
10344         (putpkt_notif): New.
10345         (prepare_resume_reply): In non-stop mode, don't change the
10346         general_thread.
10347         * event-loop.c: New.
10348         * Makefile.in (OBJ): Add event-loop.o.
10349         (event-loop.o): New rule.
10350
10351         * linux-low.h (pid_of): Moved here.
10352         (lwpid_of): New.
10353         (get_lwp_thread): Use lwpid_of.
10354         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10355         * linux-low.c (pid_of): Delete.
10356         (inferior_pid): Use lwpid_of.
10357         (linux_event_pipe): New.
10358         (target_is_async_p): New.
10359         (delete_lwp): New.
10360         (handle_extended_wait): Use lwpid_of.
10361         (add_lwp): Don't set lwpid field.
10362         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10363         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10364         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10365         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10366         first.  Adjust to linux_wait_for_event interface changes.  Use
10367         lwpid_of.
10368         (linux_detach): Don't delete the main lwp here.
10369         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10370         (status_pending_p): Don't consider explicitly suspended lwps.
10371         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10372         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10373         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10374         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10375         pointer.  Add status pointer argument.  Return a pid instead of a
10376         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10377         changes.  In non-stop mode, don't switch to a random thread.
10378         (linux_wait): Rename to...
10379         (linux_wait_1): ... this.  Add target_options argument, and handle
10380         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10381         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10382         clean exit and signal exit code.  Don't stop all threads in
10383         non-stop mode.  In all-stop mode, only stop all threads when
10384         reporting a stop to GDB.  Handle explicit thread stop requests.
10385         (async_file_flush, async_file_mark): New.
10386         (linux_wait): New.
10387         (send_sigstop): Use lwpid_of.
10388         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10389         interface changes.  In non-stop mode, don't switch to a random
10390         thread.
10391         (linux_resume_one_lwp): Use lwpid_of.
10392         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10393         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10394         non-stop mode, don't look for pending flag in all threads.
10395         (resume_status_pending_p): Don't consider explicitly suspended
10396         threads.
10397         (my_waitpid): Reimplement.  Emulate __WALL.
10398         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10399         Use lwpid_of.
10400         (sigchld_handler, linux_supports_non_stop, linux_async)
10401         (linux_start_non_stop): New.
10402         (linux_target_ops): Register linux_supports_non_stop, linux_async
10403         and linux_start_non_stop.
10404         (initialize_low): Install SIGCHLD handler.
10405         * thread-db.c (thread_db_create_event, find_one_thread)
10406         (thread_db_get_tls_address): Use lwpid_of.
10407         * win32-low.c (win32_detach): Adjust to use resume_kind.
10408         (win32_wait): Add `options' argument.
10409         * spu-low.c (spu_resume): Adjust to use resume_kind.
10410         (spu_wait): Add `options' argument.
10411
10412 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10413
10414         Decouple target code from remote protocol.
10415
10416         * target.h (enum target_waitkind): New.
10417         (struct target_waitstatus): New.
10418         (struct target_ops) <wait>: Return an unsigned long.  Take a
10419         target_waitstatus pointer instead of a char pointer.
10420         (mywait): Likewise.
10421         * target.c (mywait): Change prototype to return an unsigned long.
10422         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10423         * server.h (thread_from_wait, old_thread_from_wait): Delete
10424         declarations.
10425         (prepare_resume_reply): Change prototype to take a
10426         target_waitstatus.
10427         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10428         (last_status, last_ptid): New.
10429         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10430         pid instead of a signal.
10431         (attach_inferior): Remove "status" and "signal" parameters.
10432         Adjust.
10433         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10434         not as an address.
10435         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10436         (handle_v_requests, myresume): Remove "status" and "signal"
10437         parameters.  Adjust.
10438         (handle_status): New.
10439         (main): Delete local `status'.  Adjust.
10440         * remote-utils.c: Include target.h.
10441         (prepare_resume_reply): Change prototype to take a
10442         target_waitstatus.  Adjust.
10443
10444         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10445         interface.
10446         * spu-low.c (spu_wait): Adjust.
10447         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10448         Delete.
10449         (win32_wait): Adjust.
10450
10451 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10452
10453         * target.h (struct thread_resume): Delete leave_stopped member.
10454         (struct target_ops): Add a `n' argument to the `resume' callback.
10455         * server.c (start_inferior): Adjust.
10456         (handle_v_cont, myresume): Adjust.
10457         * linux-low.c (check_removed_breakpoint): Adjust to resume
10458         interface change, and to removed leave_stopped field.
10459         (resume_ptr): Delete.
10460         (struct thread_resume_array): New.
10461         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10462         resume interface change.
10463         (linux_continue_one_thread, linux_queue_one_thread)
10464         (resume_status_pending_p): Check if the resume field is NULL
10465         instead of checking the leave_stopped member.
10466         (linux_resume): Adjust to the target resume interface change.
10467         * spu-low.c (spu_resume): Adjust to the target resume interface
10468         change.
10469         * win32-low.c (win32_detach, win32_resume): Ditto.
10470
10471 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10472
10473         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10474         flag.
10475         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10476         pending.
10477         (linux_continue_one_thread): Only preserve the stepping flag if
10478         there's a pending breakpoint.
10479
10480 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10481
10482         * server.c (main): After the inferior having exited, call
10483         remote_close before exiting gdbserver.
10484
10485 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10486
10487         Fix size of FPSCR in Power 7 processors.
10488         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10489         (PPC_FEATURE_HAS_DFP): New #define.
10490         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10491         size of the FPSCR.
10492
10493 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10494
10495         * server.c (handle_query) Whitespace and formatting.
10496
10497 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10498
10499         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10500         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10501         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10502         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10503         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10504         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10505         Makefile.in, configure.ac: Fix whitespace throughout.
10506         * configure: Regenerate.
10507
10508 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10509
10510         * inferiors.c (find_inferior): Make it safe for the callback
10511         function to delete the currently iterated inferior.
10512
10513 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10514
10515         * Makefile.in (linuw_low_h): Move higher.
10516         (thread-db.o): Depend on $(linux_low_h).
10517
10518 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10519
10520         Rename "process" to "lwp" throughout.
10521
10522         * linux-low.c (all_processes): Rename to...
10523         (all_lwps): ... this.
10524         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10525         (add_process): Rename to ...
10526         (add_lwp): ... this.  Adjust.
10527         (linux_create_inferior): Adjust.
10528         (linux_attach_lwp): Adjust.
10529         (linux_attach): Adjust.
10530         (linux_kill_one_process): Rename to ...
10531         (linux_kill_one_lwp): ... this.  Adjust.
10532         (linux_kill): Adjust.
10533         (linux_detach_one_process): Rename to ...
10534         (linux_detach_one_lwp): ... this.  Adjust.
10535         (linux_detach): Adjust.
10536         (check_removed_breakpoint): Adjust.
10537         (status_pending_p): Adjust.
10538         (linux_wait_for_process): Rename to ...
10539         (linux_wait_for_lwp): ... this.  Adjust.
10540         (linux_wait_for_event): Adjust.
10541         (send_sigstop): Adjust.
10542         (wait_for_sigstop): Adjust.
10543         (stop_all_processes): Rename to ...
10544         (stop_all_lwps): ... this.
10545         (linux_resume_one_process): Rename to ...
10546         (linux_resume_one_lwp): ... this.  Adjust.
10547         (linux_set_resume_request, linux_continue_one_thread)
10548         (linux_queue_one_thread, resume_status_pending_p)
10549         (usr_store_inferior_registers, regsets_store_inferior_registers)
10550         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10551         Adjust.
10552         * linux-low.h (get_process): Rename to ...
10553         (get_lwp): ... this.  Adjust.
10554         (get_thread_process): Rename to ...
10555         (get_thread_lwp): ... this.  Adjust.
10556         (get_process_thread): Rename to ...
10557         (get_lwp_thread): ... this.  Adjust.
10558         (struct process_info): Rename to ...
10559         (struct lwp_info): ... this.
10560         (all_processes): Rename to ...
10561         (all_lwps): ... this.
10562         * proc-service.c (ps_lgetregs): Adjust.
10563         * thread-db.c (thread_db_create_event, find_one_thread)
10564         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10565
10566 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10567
10568         * server.c (handle_query): Handle "qAttached".
10569
10570 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10571
10572         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10573         GPLv3, update license URL.
10574
10575 2009-03-01  Doug Evans  <dje@google.com>
10576
10577         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10578         (server_h): Add gdb_signals.h.
10579         (signals.o): Update.
10580         * server.h (target_signal_from_host,target_signal_to_host_p)
10581         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10582
10583 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10584
10585         * remote-utils.c (getpkt): Also generate remote-debug
10586         information if noack_mode is set.
10587
10588 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10589
10590         * server.c (handle_query): Report qXfer:siginfo:read and
10591         qXfer:siginfo:write as supported and handle them.
10592         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10593         * linux-low.c (linux_xfer_siginfo): New.
10594         (linux_target_ops): Set it.
10595
10596 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10597
10598         * server.c (gdbserver_usage): Mention --remote-debug.
10599         (main): Accept '--remote-debug' switch.
10600
10601 2009-01-18  Doug Evans  <dje@google.com>
10602
10603         * regcache.c (new_register_cache): No need to check result of xcalloc.
10604         * server.c (handle_search_memory): Back out calls to xmalloc,
10605         result is checked and error is returned to user upon failure.
10606         (handle_query): Ditto.  Add more checks for result of malloc.
10607         (handle_v_cont): Check result of malloc, report error back to
10608         user upon failure.
10609         (handle_v_run): Ditto.  Call freeargv.
10610         * server.h (freeargv): Declare.
10611         * utils.c (freeargv): New fn.
10612
10613 2009-01-15  Doug Evans  <dje@google.com>
10614
10615         * gdbreplay.c (perror_with_name): Make arg const char *.
10616         * server.h (target_signal_to_name): Make return type const char *.
10617         * thread-db.c (thread_db_err_str): Make return type const char *.
10618         * utils.c (perror_with_name): Make arg const char *.
10619
10620 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
10621
10622         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10623         when handling a EXIT_PROCESS_DEBUG_EVENT.
10624
10625 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
10626
10627         * gdbreplay.c (gdbreplay_version): Update copyright year.
10628         * server.c (gdbserver_version): Likewise.
10629
10630 2009-01-05  Doug Evans  <dje@google.com>
10631
10632         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10633         (handle_extended_wait): Improve comment.
10634
10635 2008-12-13  Doug Evans  <dje@google.com>
10636
10637         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10638         * server.h (ATTR_MALLOC): New macro.
10639         (xmalloc,xcalloc,xstrdup): Declare.
10640         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10641         * inferiors.c: Ditto.
10642         * linux-low.c: Ditto.
10643         * mem-break.c: Ditto.
10644         * regcache.c: Ditto.
10645         * remote-utils.c: Ditto.
10646         * server.c: Ditto.
10647         * target.c: Ditto.
10648         * win32-low.c: Ditto.
10649
10650 2008-12-12  Doug Evans  <dje@google.com>
10651
10652         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10653         in debugging printf.
10654
10655         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10656
10657 2008-12-09  Doug Evans  <dje@google.com>
10658
10659         * linux-low.h (struct process_info): Delete member tid, unused.
10660         * thread-db.c (find_one_thread): Update.
10661         (maybe_attach_thread): Update.
10662
10663 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
10664
10665         * target.h (struct target_ops): Add qxfer_osdata member.
10666         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10667         and dirent.h.
10668         (linux_qxfer_osdata): New functions.
10669         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10670         callback.
10671         * server.c (handle_query): Handle "qXfer:osdata:read:".
10672         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10673         (buffer_xml_printf): New functions.
10674         * server.h (struct buffer): New.
10675         (buffer_grow_str, buffer_grow_str0): New macros.
10676         (buffer_grow, buffer_free, buffer_init, buffer_finish)
10677         (buffer_xml_printf): Declare.
10678
10679 2008-11-24  Doug Evans  <dje@google.com>
10680
10681         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10682
10683 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
10684
10685         * server.c (handle_v_run): Always use the supplied argument list.
10686
10687 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
10688
10689         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10690         (xtensa_regmap_table): Add entry for scompare1.
10691
10692 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10693
10694         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10695         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10696         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10697         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10698         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10699         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10700         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10701         XML target descriptions.
10702         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10703         when inferior is running on an ISA 2.05 or later processor.  Add
10704         special case to return offset for full 64-bit slot of FPSCR when
10705         in 32-bits.
10706
10707 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
10708
10709         * Makefile.in (SFILES, clean): Added sparc64 files.
10710         (reg-sparc64.o, reg-sparc64.c): New.
10711         * configure.srv (sparc*-*-linux*): New configuration.
10712         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10713         syscall arguments for SPARC.
10714         (regsets_store_inferior_registers): Likewise.
10715         * linux-sparc-low.c: New file.
10716
10717 2008-10-21  Doug Evans  <dje@google.com>
10718
10719         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10720         (READLINE_DIR,READLINE_DEP): Delete.
10721         (INTERNAL_CFLAGS): Update.
10722         (LINTFLAGS): Update.
10723
10724 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
10725
10726         * server.c (handle_v_run): If GDB didn't specify an argv, use the
10727         whole argv from the last run, not just argv[0].
10728
10729 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
10730
10731         * regcache.c (new_register_cache): Return NULL if the register
10732         cache size isn't known yet.
10733         (free_register_cache): Avoid dereferencing a NULL regcache.
10734
10735 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10736
10737         * configure.srv: Merge MIPS and MIPS64.
10738
10739 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
10740
10741         * Makefile.in (uninstall): Apply $(EXEEXT) too.
10742
10743 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
10744
10745         * Makefile.in: Add required vsx dependencies.
10746
10747         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10748         Declare init_registers_powerpc_vsx32l.
10749         Declare init_registers_powerpc_vsx64l.
10750         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10751         (ppc_arch_setup): Check for VSX in hwcap.
10752         (ppc_fill_vsxregset): New function.
10753         (ppc_store_vsxregset): New function.
10754         Add new VSX entry in regset_info target_regsets.
10755
10756         * configure.srv: Add new VSX dependencies.
10757
10758 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
10759
10760         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10761         (remote_open): Set or clear transport_is_reliable.
10762         (putpkt_binary): Don't expect acks in noack mode.
10763         (getpkt): Don't send ack/nac in noack mode.
10764         * server.c (handle_general_set): Handle QStartNoAckMode.
10765         (handle_query): If connected by tcp pass QStartNoAckMode+ in
10766         qSupported.
10767         (main): Reset noack_mode on every connection.
10768         * server.h (noack_mode): Declare.
10769
10770 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10771
10772         * Makefile.in (GDBREPLAY_OBS): New variable.
10773         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10774
10775 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
10776             Daniel Jacobowitz  <dan@codesourcery.com>
10777
10778         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10779         (usr_store_inferior_registers): Likewise.
10780         (regsets_store_inferior_registers): Likewise.
10781
10782 2008-07-31  Rolf Jansen  <rj@surtec.com>
10783             Pedro Alves  <pedro@codesourcery.com>
10784
10785         * configure.ac: Check for memmem declaration.
10786         * server.c [HAVE_MALLOC_H]: Include malloc.h.
10787         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10788         (disable_packet_qfThreadInfo): Unconditionally compile.
10789         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10790         * configure, config.in: Regenerate.
10791
10792 2008-07-28  Doug Kwan  <dougkwan@google.com>
10793
10794         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10795         (linux_write_memory): Remove declaration of errno.
10796
10797 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
10798
10799         * linux-low.c (handle_extended_wait): Do not use "status"
10800         variable uninitialized.
10801
10802 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
10803
10804         * server.c (handle_v_attach): Inhibit reporting dll changes.
10805
10806 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
10807
10808         * remote-utils.c (prepare_resume_reply): If requested, don't
10809         output "thread:TID" in the T stop reply.
10810
10811         * server.c (disable_packet_vCont, disable_packet_Tthread)
10812         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10813         (handle_query): If requested, disable support for qC, qfThreadInfo
10814         and qsThreadInfo.
10815         (handle_v_requests): If requested, disable support for vCont.
10816         (gdbserver_show_disableable): New.
10817         (main): Handle --disable-packet and --disable-packet=LIST.
10818
10819         * server.h (disable_packet_vCont, disable_packet_Tthread)
10820         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10821
10822 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
10823
10824         * server.c (gdbserver_usage): Mention --version.
10825
10826 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
10827
10828         * Makefile.in (gdbreplay.o): New rule.
10829
10830 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
10831
10832         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10833         message, not gdbserver.
10834
10835 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
10836             Nathan Sidwell  <nathan@codesourcery.com>
10837             Joseph Myers  <joseph@codesourcery.com>
10838
10839         * acinclude.m4: Include ../../config/acx.m4.
10840         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10841         * configure, config.in: Regenerate.
10842         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10843         * server.c (gdbserver_version): Print PKGVERSION.
10844         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10845         (main): Adjust gdbserver_usage calls.
10846         * gdbreplay.c (version, host_name): Add declarations.
10847         (gdbreplay_version, gdbreplay_usage): New.
10848         (main): Accept --version and --help options.
10849
10850 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10851
10852         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10853         (arm_breakpoint_at): Handle Thumb.
10854         (the_low_target): Add comment.
10855
10856 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10857
10858         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10859
10860 2008-05-09  Doug Evans  <dje@google.com>
10861
10862         * server.h (decode_search_memory_packet): Declare.
10863         * remote-utils.c (decode_search_memory_packet): New fn.
10864         * server.c (handle_search_memory_1): New fn.
10865         (handle_search_memory): New fn.
10866         (handle_query): Process qSearch:memory packets.
10867
10868 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10869
10870         * regcache.c (registers_length): Remove.
10871         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10872         full register packet.
10873         * regcache.h (registers_length): Remove prototype.
10874         * server.h (PBUFSIZ): Define to 16384.
10875
10876 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
10877
10878         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10879         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10880         powerpc-64l.o, and powerpc-altivec64l.o.
10881         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10882         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10883         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10884         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10885         rs6000/power-linux.xml, and rs6000/power64-linux.xml
10886         to srv_xmlfiles.
10887
10888         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10889         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10890         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10891         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10892         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10893         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10894         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10895         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10896         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10897         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10898         (clean): Update.
10899
10900         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10901         (init_registers_powerpc_32l): ... this new prototype.
10902         (init_registers_powerpc_32): Remove, replace by ...
10903         (init_registers_powerpc_altivec32l): ... this new prototype.
10904         (init_registers_powerpc_e500): Remove, replace by ...
10905         (init_registers_powerpc_e500l): ... this new prototype.
10906         (init_registers_ppc64): Remove, replace by ...
10907         (init_registers_powerpc_64l): ... this new prototype.
10908         (init_registers_powerpc_64): Remove, replace by ...
10909         (init_registers_powerpc_altivec64l): ... this new prototype.
10910         (ppc_num_regs): Set to 73.
10911         (PT_ORIG_R3, PT_TRAP): Define if necessary.
10912         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10913         (ppc_cannot_store_register): Handle orig_r3 and trap.
10914         (ppc_arch_setup): Update init_registers_... calls.
10915         (ppc_fill_gregset): Handle orig_r3 and trap.
10916
10917         * inferiors.c (clear_inferiors): Reset current_inferior.
10918
10919 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
10920
10921         * acinclude.m4: Add override.m4.
10922         * configure: Regenerate.
10923
10924 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10925
10926         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10927         initial call to init_register_ppc64.
10928
10929 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10930
10931         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10932         single powerpc*-*-linux* case.
10933         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10934
10935 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
10936
10937         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10938         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10939         from reg_xmlfiles.
10940         * linux-ppc-low.c: Include <elf.h>.
10941         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10942         (ppc_hwcap): New global variable.
10943         (ppc_regmap): Remove __SPE__ #ifdef sections.
10944         (ppc_regmap_e500): New global variable.
10945         (ppc_cannot_store_register): Update __SPE__ special case.
10946         (ppc_get_hwcap): New function.
10947         (ppc_arch_setup): Use it to determine whether inferior supports
10948         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
10949         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10950         Do not access registers if target does not support AltiVec.
10951         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10952         Do not access registers if target does not support SPE.
10953         (target_regsets): Unconditionally include AltiVec and SPE regsets.
10954
10955 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
10956
10957         * linux-low.c (disabled_regsets, num_regsets): New.
10958         (use_regsets_p): Delete.
10959         (linux_wait_for_process): Clear disabled_regsets.
10960         (regsets_fetch_inferior_registers): Check and set it.
10961         (regsets_store_inferior_registers): Likewise.
10962         (linux_fetch_registers, linux_store_registers): Do not use
10963         use_regsets_p.
10964         (initialize_low): Allocate disabled_regsets.
10965
10966 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
10967
10968         * Makefile.in (LIBOBJS): New.
10969         (OBS): Use LIBOBJS.
10970         (memmem.o): New rule.
10971         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10972         * configure: Regenerated.
10973
10974 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
10975
10976         * server.c (handle_query): Never return "unsupported" for
10977         qXfer:features:read queries.
10978
10979 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
10980
10981         * server.c (get_features_xml): Fix inverted condition.
10982         (handle_query): Always support qXfer:feature:read.
10983
10984 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
10985
10986         * server.c (wrapper_argv): New.
10987         (start_inferior): Handle wrapper_argv.  If set, expect an extra
10988         trap.
10989         (gdbserver_usage): Document --wrapper.
10990         (main): Parse --wrapper.
10991
10992 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10993
10994         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10995         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10996         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10997         (ppc_set_pc): Likewise.
10998         (ppc_arch_setup): New function.
10999         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11000         of collect_register.
11001         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11002
11003 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11004
11005         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11006         instead of linux-ppc64-low.o.
11007         * linux-ppc64-low.c: Remove file.
11008         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11009         (linux-ppc64-low.o): Remove rule.
11010
11011         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11012         (init_registers_powerpc_64): Likewise.
11013         (ppc_regmap): Conditionally define depending on __powerpc64__.
11014         (ppc_cannot_store_register): Do not special-case "fpscr" when
11015         compiled on __powerpc64__.
11016         (ppc_collect_ptrace_register): New function.
11017         (ppc_supply_ptrace_register): New function.
11018         (ppc_breakpoint): Change type to "unsigned int".
11019         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11020         (the_low_target): Conditionally provide initializers for the
11021         arch_setup member depending on __powerpc64__.  Install
11022         collect_ptrace_register and supply_ptrace_register members.
11023
11024 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11025
11026         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11027         * server.c (gdbserver_xmltarget): Define.
11028         (get_features_xml): Use it to replace "target.xml" and arch_string.
11029
11030         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11031         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11032         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11033         srv_xmlfiles and srv_regobj to include all possible choices.
11034         * configure.ac (srv_xmltarget): Remove.
11035         (srv_xmlfiles): Do not add "target.xml".
11036         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11037         checks for supplementary target information.
11038         * configure: Regenerate.
11039         * Makefile.in (XML_TARGET): Remove.
11040         (target.xml): Remove rule.
11041         (clean): Do not clean up target.xml.
11042         (.PRECIOUS): Do not mention target.xml.
11043
11044         * target.h (struct target_ops): Remove arch_string member.
11045         * linux-low.c (linux_arch_string): Remove.
11046         (linux_target_ops): Remove arch_string initializer.
11047         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11048         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11049         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11050         * spu-low.c (spu_arch_string): Remove.
11051         (spu_target_ops): Remove arch_string initializer.
11052         * win32-low.c (win32_arch_string): Remove.
11053         (win32_target_ops): Remove arch_string initializer.
11054         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11055         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11056         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11057
11058 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11059
11060         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11061         by collect_ptrace_register and supply_ptrace_register hooks.
11062         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11063         instead of checking for the_low_target.left_pad_xfer.
11064         (usr_store_inferior_registers): Use collect_ptrace_register callback
11065         instead of checking for the_low_target.left_pad_xfer.
11066
11067         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11068         (s390_supply_ptrace_register): Likewise.
11069         (s390_fill_gregset): Call s390_collect_ptrace_register.
11070         (the_low_target): Update.
11071
11072         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11073         (ppc_supply_ptrace_register): Likewise.
11074         (the_low_target): Update.
11075
11076         * linux-i386-low.c (the_low_target): Update.
11077         * linux-x86-64-low.c (the_low_target): Update.
11078
11079 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11080
11081         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11082         reg-s390.o and reg-s390x.o.
11083
11084         * linux-low.c (new_inferior): New global variable.
11085         (linux_create_inferior, linux_attach): Set it.
11086         (linux_wait_for_process): Call the_low_target.arch_setup after the
11087         target has stopped for the first time.
11088         (initialize_low): Do not call the_low_target.arch_setup.
11089
11090         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11091         (s390_set_pc): Likewise.
11092         (s390_arch_setup): New function.
11093         (the_low_target): Use s390_arch_setup as arch_setup routine.
11094
11095         * regcache.c (realloc_register_cache): New function.
11096         (set_register_cache): Call it for each existing regcache.
11097
11098 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11099
11100         * server.h (init_registers): Remove prototype.
11101
11102         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11103         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11104         instead of init_registers ().
11105         * linux-arm-low.c (init_registers_arm): Add prototype.
11106         (init_registers_arm_with_iwmmxt): Likewise.
11107         (the_low_target): Add initializer for arch_setup field.
11108         * linux-cris-low.c (init_registers_cris): Add prototype.
11109         (the_low_target): Add initializer for arch_setup field.
11110         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11111         (the_low_target): Add initializer for arch_setup field.
11112         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11113         (the_low_target): Add initializer for arch_setup field.
11114         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11115         (the_low_target): Add initializer for arch_setup field.
11116         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11117         (the_low_target): Add initializer for arch_setup field.
11118         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11119         (the_low_target): Add initializer for arch_setup field.
11120         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11121         (init_registers_mips64_linux): Likewise.
11122         (the_low_target): Add initializer for arch_setup field.
11123         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11124         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11125         (the_low_target): Add initializer for arch_setup field.
11126         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11127         (init_registers_powerpc_64): Likewise.
11128         (the_low_target): Add initializer for arch_setup field.
11129         * linux-s390-low.c (init_registers_s390): Add prototype.
11130         (init_registers_s390x): Likewise.
11131         (the_low_target): Add initializer for arch_setup field.
11132         * linux-sh-low.c (init_registers_sh): Add prototype.
11133         (the_low_target): Add initializer for arch_setup field.
11134         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11135         (the_low_target): Add initializer for arch_setup field.
11136         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11137         (the_low_target): Add initializer for arch_setup field.
11138
11139         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11140         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11141         instead of init_registers ().
11142         * win32-arm-low.c (init_registers_arm): Add prototype.
11143         (the_low_target): Add initializer for arch_setup field.
11144         * win32-i386-low.c (init_registers_i386): Add prototype.
11145         (the_low_target): Add initializer for arch_setup field.
11146
11147         * spu-low.c (init_registers_spu): Add prototype.
11148         (initialize_low): Call initialie_registers_spu () instead of
11149         initialize_registers ().
11150
11151 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11152
11153         * server.c (handle_v_requests): When handling the vRun and vAttach
11154         packets, if already debugging a process, don't kill it.  Return an
11155         error instead.
11156
11157 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11158
11159         * server.c (handle_query): Correct length check.
11160
11161 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11162
11163         * win32-low.c (do_initial_child_stuff): Add process handle
11164         parameter.  Set current_process_handle and current_process_id from the
11165         parameters. Clear globals.
11166         (win32_create_inferior): Don't set current_process_handle and
11167         current_process_id here.  Instead pass them on the call to
11168         do_initial_child_stuff.
11169         (win32_attach): Likewise.
11170         (win32_clear_inferiors): New.
11171         (win32_kill): Don't close the current process handle or the
11172         current thread handle here.  Instead call win32_clear_inferiors.
11173         (win32_detach): Don't open a new handle to the process.  Call
11174         win32_clear_inferiors.
11175         (win32_join): Don't rely on current_process_handle; open a new
11176         handle using the process id.
11177         (win32_wait): Call win32_clear_inferiors when the inferior process
11178         has exited.
11179
11180 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11181
11182         * server.c (monitor_show_help): Add "exit".
11183
11184 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11185
11186         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11187         (clean): Add reg-xtensa.c.
11188         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11189         * configure.srv (xtensa*-*-linux*) New target.
11190         * linux-xtensa-low.c: New.
11191         * xtensa-xtregs.c: New.
11192
11193 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11194
11195         * hostio.c: Don't include errno.h.
11196         (errno_to_fileio_errno): Move to hostio-errno.
11197         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11198         error number outputting to the target->hostio_last_error callback.
11199         (hostio_packet_error): Use FILEIO_EINVAL directly.
11200         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11201         calls to hostio_error.
11202         * hostio-errno.c: New.
11203         * server.h (hostio_last_error_from_errno): Declare.
11204         * target.h (target_ops): Add hostio_last_error member.
11205         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11206         as hostio_last_error handler.
11207         * spu-low.c (spu_target_ops): Likewise.
11208         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11209         (wince_hostio_last_error): New functions.
11210         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11211         as hostio_last_error handler.
11212         (win32_target_ops) [!_WIN32_WCE]: Register
11213         hostio_last_error_from_errno as hostio_last_error handler.
11214         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11215         (hostio-errno.o): New rule.
11216         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11217         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11218         hostio-errno.o.
11219         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11220         * configure: Regenerate.
11221
11222 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11223
11224         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11225         (linux_kill, linux_detach): Clean up the process list.
11226         * remote-utils.c (remote_open): Improve port number parsing.
11227         (putpkt_binary, input_interrupt): Only send interrupts if the target
11228         is running.
11229         * server.c (extended_protocol): Make static.
11230         (attached): Define earlier.
11231         (exit_requested, response_needed, program_argv): New variables.
11232         (target_running): New.
11233         (start_inferior): Clear attached here.
11234         (attach_inferior): Set attached here.
11235         (require_running): Define.
11236         (handle_query): Use require_running and target_running.  Implement
11237         "monitor exit".
11238         (handle_v_attach, handle_v_run): New.
11239         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11240         (gdbserver_usage): Update.
11241         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11242         --attach along with other options or after the port.  Save
11243         program_argv.  Support no initial program.  Resynchronize
11244         communication with GDB after an error.  Handle "monitor exit".
11245         Use require_running and target_running.  Always allow the extended
11246         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11247         restart in extended mode.
11248         * README: Refer to the GDB manual.  Update --attach usage.
11249
11250 2007-12-20  Andreas Schwab  <schwab@suse.de>
11251
11252         * linux-low.c (STACK_SIZE): Define.
11253         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11254         (linux_test_for_tracefork): Likewise.
11255
11256 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11257
11258         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11259         reinsert auto-delete breakpoints.
11260         * mem-break.c (struct breakpoint): Change return type of handler to
11261         int.
11262         (set_breakpoint_at): Update handler type.
11263         (reinsert_breakpoint_handler): Return 1 instead of calling
11264         delete_breakpoint.
11265         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11266         setting a new one.
11267         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11268         * mem-break.h (set_breakpoint_at): Update handler type.
11269         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11270         * win32-low.c (auto_delete_breakpoint): New.
11271         (get_child_debug_event): Use it.
11272
11273 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11274
11275         * configure.ac: Check for pread and pwrite.
11276         * hostio.c (handle_pread): Fall back to lseek and read.
11277         (handle_pwrite): Fall back to lseek and write.
11278         * config.in, configure: Regenerated.
11279
11280 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11281
11282         * server.c (myresume): Add own_buf argument.
11283         (main): Update calls.
11284
11285 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11286
11287         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11288         * remote-utils.c (remote_open): Do not call disable_async_io.
11289         (block_async_io): Delete.
11290         (unblock_async_io): Make static.
11291         (initialize_async_io): New.
11292         * server.c (handle_v_cont): Handle async I/O here.
11293         (myresume): Likewise.  Move other common resume tasks here...
11294         (main): ... from here.  Call initialize_async_io.  Disable async
11295         I/O before the main loop.
11296         * server.h (initialize_async_io): Declare.
11297         (block_async_io, unblock_async_io): Delete prototypes.
11298         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11299
11300 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11301
11302         * remote-utils.c (readchar): Allow binary data in received messages.
11303
11304 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11305
11306         * win32-low.c (attaching): New global.
11307         (win32_create_inferior): Clear the `attaching' global.
11308         (win32_attach): Set the `attaching' global.
11309         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11310         attaching.  Only set a breakpoint at the entry point if not
11311         attaching.
11312
11313 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11314
11315         * server.c (main): Don't report dll events on the initial
11316         connection on attaches.
11317
11318 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11319
11320         * server.c (main): Relax numerical bases supported for the pid of
11321         the --attach command line argument.
11322
11323 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11324
11325         * win32-low.c (win32_attach): Call OpenProcess before
11326         DebugActiveProcess, not after.  Add last error output to error
11327         call.
11328
11329 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11330
11331         * win32-low.c (win32_get_thread_context)
11332         (win32_set_thread_context): New functions.
11333         (thread_rec): Use win32_get_thread_context.
11334         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11335         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11336         field.
11337
11338 2007-12-03  Leo Zayas
11339             Pedro Alves  <pedro_alves@portugalmail.pt>
11340
11341         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11342         global variables.
11343         (child_add_thread): Minor cleanup.
11344         (child_continue): Resume artificially suspended threads before
11345         calling ContinueDebugEvent.
11346         (suspend_one_thread): New.
11347         (fake_breakpoint_event): New.
11348         (get_child_debug_event): Change return type to int.  Check here if
11349         gdb sent an interrupt request.  If a soft interrupt was requested,
11350         fake a breakpoint event.  Return 0 if there is no event to handle,
11351         and 1 otherwise.
11352         (win32_wait): Don't check here if gdb sent an interrupt request.
11353         Ensure there is a valid event to handle.
11354         (win32_request_interrupt): Add soft interruption method as last
11355         resort.
11356
11357 2007-12-03  Leo Zayas
11358             Pedro Alves  <pedro_alves@portugalmail.pt>
11359
11360         * win32-low.h (win32_thread_info): Add descriptions to the
11361         structure members.  Replace `suspend_count' counter by a
11362         `suspended' flag.
11363         * win32-low.c (thread_rec): Update condition of when to get the
11364         context from the inferior.  Rely on ContextFlags being set if it
11365         has already been retrieved.  Only suspend the inferior thread if
11366         we haven't already.  Warn if that fails.
11367         (continue_one_thread): s/suspend_count/suspended/.  Only call
11368         ResumeThread once.  Warn if that fails.
11369
11370 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11371
11372         * win32-low.c (win32_wait): Don't read from the inferior when it
11373         has already exited.
11374
11375 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11376
11377         * Makefile.in (win32_low_h): New variable.
11378         (win32-low.o): Add dependency on $(win32_low_h).
11379         (win32-arm-low.o, win32-i386-low.o): New rules.
11380
11381 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11382
11383         * hostio.c: Correct copyright year.
11384
11385 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11386
11387         * Makefile.in (OBS): Add hostio.o.
11388         (hostio.o): New rule.
11389         * server.h (handle_vFile): Declare.
11390         * hostio.c: New file.
11391         * server.c (handle_v_requests): Take packet_len and new_packet_len
11392         for binary packets.  Call handle_vFile.
11393         (main): Update call to handle_v_requests.
11394
11395 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11396
11397         * linux-low.c: Include <sched.h>.
11398
11399 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11400
11401         * linux-low.c (linux_tracefork_grandchild): New.
11402         (linux_tracefork_child): Use clone.
11403         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11404
11405 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11406
11407         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11408
11409 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11410
11411         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11412
11413 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11414
11415         * inferiors.c (change_inferior_id): Delete.
11416         (add_pid_to_list, pull_pid_from_list): New.
11417         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11418         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11419         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11420         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11421         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11422         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11423         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11424         (using_threads): Always set to 1.
11425         (handle_extended_wait): New.
11426         (add_process): Do not set TID.
11427         (linux_create_inferior): Set must_set_ptrace_flags.
11428         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11429         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11430         (linux_thread_alive): Rename TID argument to LWPID.
11431         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11432         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11433         call to dead_thread_notify.  Call handle_extended_wait.
11434         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11435         (send_sigstop): Delete sigstop_sent.
11436         (wait_for_sigstop): Avoid TID.
11437         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11438         (linux_test_for_tracefork): New.
11439         (linux_lookup_signals): Use thread_db_active and
11440         linux_supports_tracefork_flag.
11441         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11442         * linux-low.h (get_process_thread): Avoid TID.
11443         (struct process_ifo): Move thread_known and tid to the end.  Remove
11444         sigstop_sent.
11445         (linux_attach_lwp, thread_db_init): Update prototypes.
11446         * server.h (change_inferior_id): Delete prototype.
11447         (add_pid_to_list, pull_pid_from_list): New prototypes.
11448         * thread-db.c (thread_db_use_events): New.
11449         (find_first_thread): Rename to...
11450         (find_one_thread): ...this.  Update callers and messages.  Do not
11451         call fatal.  Check thread_db_use_events.  Do not call
11452         change_inferior_id or new_thread_notify.
11453         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11454         (thread_db_init): Set thread_db_use_events.  Check use_events.
11455         * utils.c (fatal, warning): Correct message prefix.
11456
11457 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11458
11459         * Makefile.in (clean): Remove new files.
11460         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11461         (powerpc-64.o, powerpc-64.c): New rules.
11462         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11463         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11464         with SPE.
11465         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11466         SPE targets.
11467         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11468         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11469         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11470         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11471         (target_regsets): Add AltiVec and SPE register sets.
11472         * configure.ac: Check for AltiVec and SPE.
11473         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11474         (ppc_fill_vrregset, ppc_store_vrregset): New.
11475         (target_regsets): Add AltiVec register set.
11476         * configure: Regenerated.
11477
11478 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11479
11480         * linux-low.c (O_LARGEFILE): Define.
11481         (linux_read_memory): Use /proc/PID/mem.
11482         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11483         * configure, config.in: Regenerated.
11484
11485 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11486
11487         * linux-low.c (linux_wait_for_event): Do not pass signals while
11488         single-stepping.
11489
11490 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11491
11492         * win32-low.c (create_process): New.
11493         (win32_create_inferior): Use create_process instead of
11494         CreateProcess.  If create_process failed retry appending an ".exe"
11495         suffix.  Store the GetLastError result immediatelly after
11496         create_process calls and use it on the call to error.
11497
11498 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11499
11500         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11501
11502 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11503
11504         * configure.ac: Switch license to GPLv3.
11505
11506 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11507
11508         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11509
11510 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11511
11512         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11513         typedef.
11514         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11515         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11516         CloseToolhelp32Snapshot.
11517         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11518         CloseToolhelp32Snapshot.
11519
11520 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11521
11522         * server.c (main): Check for inferior exit before main loop.
11523
11524 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11525
11526         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11527         instead of on tmp_desc.
11528
11529 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11530             Daniel Jacobowitz  <dan@codesourcery.com>
11531
11532         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11533         (add_thread): Minor cleanups.
11534         (clear_inferiors): Move lower in the file.  Clear the DLL
11535         list.
11536         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11537         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11538         (xml_escape_text): New.
11539         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11540         for qSupported.
11541         (handle_v_cont): Report errors.
11542         (gdbserver_version): Update.
11543         (main): Correct size of own_buf.  Do not report initial DLL events.
11544         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11545         (unloaded_dll, xml_escape_text): New.
11546         * win32-low.c (enum target_waitkind): Update comments.
11547         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11548         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11549         (win32_EnumProcessModules, win32_GetModuleInformation)
11550         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11551         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11552         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11553         (win32_Module32First, win32_Module32Next, load_toolhelp)
11554         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11555         (get_child_debug_event): Handle DLL events.
11556         (win32_wait): Likewise.
11557
11558 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11559
11560         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11561         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11562
11563 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11564
11565         * win32-low.c (handle_output_debug_string): Ignore event if not
11566         waiting.
11567
11568 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11569
11570         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11571
11572 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11573
11574         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11575
11576 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11577
11578         * inferiors.c (change_inferior_id): Add comment.
11579         * linux-low.c (check_removed_breakpoint): Add an early
11580         prototype.  Improve debug output.
11581         (linux_attach): Doc update.
11582         (linux_detach_one_process, linux_detach): Clean up before releasing
11583         each process.
11584         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11585         * linux-low.h (struct process_info): Doc improvement.
11586         * mem-break.c (delete_all_breakpoints): New.
11587         * mem-break.h (delete_all_breakpoints): New prototype.
11588         * thread-db.c (find_first_thread): New.
11589         (thread_db_create_event): Call it instead of
11590         thread_db_find_new_threads.  Clean up unused variables.
11591         (maybe_attach_thread): Remove first thread handling.
11592         (thread_db_find_new_threads): Use find_first_thread.
11593         (thread_db_get_tls_address): Likewise.
11594
11595 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11596
11597         * thread-db.c (thread_db_find_new_threads): Add prototype.
11598         (thread_db_create_event): Check for the main thread before adding
11599         a new thread.
11600         (maybe_attach_thread): Only enable event reporting if TID == 0.
11601         (thread_db_get_tls_address): Check for new threads.
11602
11603 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11604
11605         * linux-low.c (linux_create_inferior): Try execv before execvp.
11606         * spu-low.c (spu_create_inferior): Likewise.
11607
11608 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11609
11610         * linux-low.c (linux_create_inferior): Change execv to execvp.
11611         * spu-low.c (spu_create_inferior): Likewies.
11612
11613 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11614
11615         * Makefile.in (clean): Clean new files instead of deleted ones.
11616         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11617         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11618         rules.
11619         * configure.srv: Specify XML files and new regformats for MIPS and
11620         MIPS64 GNU/Linux.
11621         * linux-mips-low.c (mips_num_regs): Set to only used registers.
11622         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
11623         an entry for the restart register.
11624         (mips_cannot_fetch_register, mips_cannot_store_register)
11625         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11626         register names to match the XML descriptions.
11627         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
11628         restart register instead of $0.
11629
11630 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11631             Markus Deuling  <deuling@de.ibm.com>
11632
11633         * remote-utils.c (decode_xfer_write): New function.
11634         * server.h (decode_xfer_write): Add prototype.
11635         * server.c (handle_query): Add PACKET_LEN argument.  Support
11636         qXfer:spu:read and qXfer:spu:write packets.
11637         (main): Pass packet_len to handle_query.
11638         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11639         * target.h (target_ops): Add qxfer_spu.
11640
11641 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11642
11643         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11644         accessing non-seekable spufs files.
11645
11646 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
11647
11648         * server.c (handle_query): Add reply for qC packet.
11649
11650 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11651             Leo Zayas  <lerele@champenstudios@com>
11652
11653         * server.h (check_remote_input_interrupt_request): New function.
11654         * remote_utils.c (INVALID_DESCRIPTOR): New define.
11655         (remote_desc): Initialize with INVALID_DESCRIPTOR.
11656         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
11657         (check_remote_input_interrupt_request): New function.
11658         * server.h (check_remote_input_interrupt_request): Declare.
11659         * win32-low.c (winapi_DebugBreakProcess,
11660         winapi_GenerateConsoleCtrlEvent): New typedefs.
11661         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11662         to 250 ms.
11663         (win32_wait): Check for remote interrupt request
11664         with check_remote_input_interrupt_request.
11665         (win32_request_interrupt): New function.
11666         (win32_target_op): Set request_interrupt to win32_request_interrupt.
11667
11668 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11669
11670         * win32-low.c (debug_registers_changed,
11671         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11672         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11673         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11674         (thread_rec): Get context using the low target.
11675         (child_add_thread): Call thread_added on the low target,
11676         which does the same thing.
11677         (regptr): Delete.
11678         (do_initial_child_stuff): Remove debug registers references.
11679         Set context using the low target.  Resume threads after
11680         setting the contexts.
11681         (child_continue): Remove dead variable.  Remove debug
11682         registers references.
11683         (child_fetch_inferior_registers): Go through the low target.
11684         (do_child_store_inferior_registers): Remove.
11685         (child_store_inferior_registers): Go through the low target.
11686         (win32_resume): Remove debug registers references.
11687         Set context using the low target.
11688         (handle_exception): Change return type to void.  Don't record
11689         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
11690         first chance exception.
11691         (get_child_debug_event): Change return type to void.  Remove
11692         goto loop.  Always return after waiting for debug event.
11693         (win32_wait): Convert to switch statement.  Handle spurious
11694         events.
11695
11696         * win32-i386-low.c (debug_registers_changed,
11697         debug_registers_used): New.
11698         (initial_stuff): Rename to ...
11699         (i386_initial_stuff): ... this.  Clear debug registers
11700         state variables.
11701         (store_debug_registers): Delete.
11702         (i386_get_thread_context): New.
11703         (load_debug_registers): Delete.
11704         (i386_set_thread_context): New.
11705         (i386_thread_added): New.
11706         (single_step): Rename to ...
11707         (i386_single_step): ... this.
11708         (do_fetch_inferior_registers): Rename to ...
11709         (i386_fetch_inferior_register): ... this.
11710         (i386_store_inferior_register): New.
11711         (the_low_target): Adapt to new interface.
11712
11713         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11714         (arm_get_thread_context): New.
11715         (arm_set_thread_context): New.
11716         (regptr): New.
11717         (do_fetch_inferior_registers): Rename to ...
11718         (arm_fetch_inferior_register): ... this.
11719         (arm_store_inferior_register): New.
11720         (arm_wince_breakpoint): Reimplement as unsigned long.
11721         (arm_wince_breakpoint_len): Define.
11722         (the_low_target): Adapt to new interface.
11723
11724         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11725         load_debug_registers.  Add get_thread_context, set_thread_context,
11726         thread_added and store_inferior_register.  Rename
11727         fetch_inferior_registers to fetch_inferior_register.
11728         (regptr): Remove declaration.
11729
11730 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11731
11732         * linux-low.c (linux_detach): Change return type to int.  Return 0.
11733         * spu-low.c (spu_detach): Likewise.
11734
11735 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11736
11737         * target.h (target_ops): Change return type of detach to int.
11738         Add join.
11739         (join_inferior): New.
11740         * server.c (main): Don't skip detach support on mingw32.
11741         If the inferior doesn't support detaching return error.
11742         Call join_inferior instead of using waitpid.
11743         * linux-low.c (linux_join): New.
11744         (linux_target_op): Add linux_join.
11745         * spu-low.c (spu_join): New.
11746         (spu_target_ops): Add spu_join.
11747         * win32-low.c (win32_detach): Adapt to new interface.
11748         Reopen current_process_handle before detaching.  Issue a child
11749         resume before detaching.
11750         (win32_join): New.
11751         (win32_target_op): Add win32_join.
11752
11753 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11754
11755         * win32-low.c (win32-attach): Fix return value.
11756         * target.h (target_ops): Describe ATTACH return values.
11757
11758 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11759
11760         * win32-low.c (GETPROCADDRESS): Define.
11761         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
11762         (winapi_DebugSetProcessKillOnExit): Likewise.
11763         (win32_create_inferior): Force usage of ansi CreateProcessA.
11764         (win32_attach): Use GETPROCADDRESS.
11765         (win32_detach): Likewise.
11766
11767 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11768
11769         * win32-low.c (win32_wait): Don't use WSTOPSIG.
11770
11771 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
11772
11773         * win32-low.c: Commit leftover changes from 2007-03-29.
11774
11775 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11776
11777         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11778         fields short instead of int.  Add explicit padding.
11779         (i387_cache_to_fsave): Remove unnecessary casts.
11780         (i387_fsave_to_cache): Doc fix.
11781         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11782
11783 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11784
11785         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11786         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11787
11788 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11789
11790         * configure.srv (arm*-*-mingw32ce*): Move near the other
11791         arm targets.
11792
11793 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11794
11795         * configure.ac: Add errno checking.
11796         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11797         sys/file.h and malloc.h.
11798         (AC_CHECK_DECLS): Add perror.
11799         (srv_mingwce): Handle.
11800         * configure.srv (i[34567]86-*-cygwin*): Add
11801         win32-i386-low.o to srv_tgtobj.
11802         (i[34567]86-*-mingw*): Likewise.
11803         (arm*-*-mingw32ce*): Add case.
11804         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11805         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11806         [__MINGW32CE__] (strerror): New function.
11807         [__MINGW32CE__] (errno): Define to GetLastError.
11808         [__MINGW32CE__] (COUNTOF): New macro.
11809         (remote_open): Remove extra close call.
11810         * mem-break.c (delete_breakpoint_at): New function.
11811         * mem-break.h (delete_breakpoint_at): Declare.
11812         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11813         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11814         [USE_WIN32API] (read, write): Add char* casts.
11815         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11816         * server.h: Include wincecompat.h on Windows CE.
11817         [HAVE_ERRNO_H]: Check.
11818         (perror): Declare if not declared.
11819         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11820         (perror_with_name): Remove errno declaration.
11821         * wincecompat.h: New.
11822         * wincecompat.c: New.
11823         * win32-low.h: New.
11824         * win32-arm-low.c: New.
11825         * win32-i386-low.c: New.
11826         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11827         (OUTMSG2): Make it safe.
11828         (_T): New macro.
11829         (COUNTOF): New macro.
11830         (NUM_REGS): Get it from the low target.
11831         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11832         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11833         (thread_rec): Let low target handle debug registers.
11834         (child_add_thread): Likewise.
11835         (child_init_thread_list): Likewise.
11836         (continue_one_thread): Likewise.
11837         (regptr): New.
11838         (do_child_fetch_inferior_registers): Move to ...
11839         * win32-i386-low.c: ... here, and rename to ...
11840         (do_fetch_inferior_registers): ... this.
11841         * win32-low.c (child_fetch_inferior_registers):
11842         Go through the low target.
11843         (do_child_store_inferior_registers): Use regptr.
11844         (strwinerror): New function.
11845         (win32_create_inferior): Handle Windows CE.
11846         Use strwinerror instead of strerror on Windows error
11847         codes.  Add program to the error output.
11848         Don't close the main thread handle on Windows CE.
11849         (win32_attach): Use coredll.dll on Windows CE.
11850         (win32_kill): Close current process and current
11851         thread handles.
11852         (win32_detach): Use coredll.dll on Windows CE.
11853         (win32_resume): Let low target handle debug registers, and
11854         step request.
11855         (handle_exception): Add/Remove initial breakpoint.  Avoid
11856         non-existant WSTOPSIG on Windows CE.
11857         (win32_read_inferior_memory): Cast to remove warning.
11858         (win32_arch_string): Go through the low target.
11859         (initialize_low): Call set_breakpoint_data with the low
11860         target's breakpoint.
11861         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11862         FOP_REGNUM, mappings): Move to ...
11863         * win32-i386-low.c: ... here.
11864         * win32-low.c (win32_thread_info): Move to ...
11865         * win32-low.h: ... here.
11866         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11867         win32-arm-low.c and wincecompat.c.
11868         (all:): Add $EXEEXT.
11869         (install-only:): Likewise.
11870         (gdbserver:): Likewise.
11871         (gdbreplay:): Likewise.
11872         * config.in: Regenerate.
11873         * configure: Regenerate.
11874
11875 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11876
11877         * win32-low.c: Rename typedef thread_info to
11878         win32_thread_info throughout.
11879
11880 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11881
11882         * win32-i386-low.c: Rename to ...
11883         * win32-low.c: ... this.
11884         * configure.srv: Replace win32-i386-low.o with win32-low.o.
11885         * Makefile.in: Likewise.
11886
11887 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
11888
11889         * remote-utils.c (monitor_output): Constify msg parameter.
11890         * server.h (monitor_output): Likewise.
11891         * win32-i386-low.c (handle_output_debug_string): New.
11892         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11893         handle_output_debug_string.
11894         (get_child_debug_event): Likewise.
11895
11896 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
11897
11898         * server.c (main): Correct strtoul check.
11899
11900 2007-03-27  Jon Ringle  <jon@ringle.org>
11901
11902         * linux-low.c: Check __ARCH_HAS_MMU__ also.
11903
11904 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
11905
11906         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11907
11908 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
11909
11910         * terminal.h: Check HAVE_SGTTY_H.
11911
11912 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
11913
11914         * remote-utils.c (remote_open): Print out the assigned port number.
11915
11916 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
11917
11918         * remote-utils.c (monitor_output): New function.
11919         * server.c (debug_threads): Define here.
11920         (monitor_show_help): New function.
11921         (handle_query): Handle qRcmd.
11922         (main): Do not handle 'd' packet.
11923         * server.h (debug_threads, remote_debug, monitor_output): Declare.
11924         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11925         of debug_threads.
11926
11927 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11928
11929         * Makefile.in (EXEEXT): New.
11930         (clean): Use $(EXEEXT).
11931
11932 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11933
11934         * target.h (target_ops): Rename send_signal to request_interrupt,
11935         and remove enum target_signal parameter.
11936         * linux-low.c (linux_request_interrupt): Rename from
11937         linux_send_signal, and always send SIGINT.
11938         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11939         and always send SIGINT.
11940         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11941         of send_signal.
11942         (input_interrupt): Likewise.
11943
11944 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11945
11946         * server.c (get_features_xml): Check if target implemented
11947         arch_string.
11948         * win32-i386-low.c (win32_arch_string): New.
11949         (win32_target_ops): Add win32_arch_string as arch_string member.
11950
11951 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
11952
11953         * spu-low.c (spu_arch_string): New.
11954         (spu_target_ops): Add spu_arch_string.
11955
11956 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
11957
11958         * remote-utils.c: Remove HAVE_TERMINAL_H check.
11959         * configure.ac: Do not check for terminal.h.
11960         * configure, config.in: Regenerated.
11961
11962 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
11963
11964         * Makefile.in (OBS): Add $(XML_BUILTIN).
11965         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11966         (clean): Update.
11967         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11968         (arm-with-iwmmxt.c): New.
11969         * config.in, configure: Regenerate.
11970         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
11971         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
11972         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11973         (arm*-*-linux*): Add iWMMXt and regset support.
11974         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11975         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11976         (arm_store_wmmxregset, target_regsets): New.
11977         * server.c (get_features_xml): Take annex argument.  Check builtin
11978         XML documents.
11979         (handle_query): Handle multiple annexes.
11980
11981 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11982
11983         * remote-utils.c [USE_WIN32API] (read, write): Define.
11984         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11985         write.
11986
11987 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
11988
11989         * linux-i386-low.c (the_low_target): Set arch_string.
11990         * linux-x86-64-low.c (the_low_target): Likewise.
11991         * linux-low.c (linux_arch_string): New.
11992         (linux_target_ops): Add it.
11993         * linux-low.h (struct linux_target_ops): Add arch_string.
11994         * server.c (write_qxfer_response): Use const void * for DATA.
11995         (get_features_xml): New.
11996         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
11997         * target.h (struct target_ops): Add arch_string method.
11998
11999 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12000             Daniel Jacobowitz  <dan@codesourcery.com>
12001
12002         * linux-low.c (linux_kill): Handle being called with no threads.
12003         * win32-i386-low.c (win32_kill): Likewise.
12004         (get_child_debug_event): Clear current_process_handle.
12005
12006 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12007             Daniel Jacobowitz  <dan@codesourcery.com>
12008
12009         * remote-utils.c (remote_open): Check the type of specified
12010         serial port devices before opening them.
12011         * server.c (main): Kill the inferior if an error occurs during
12012         the first remote_open.
12013
12014 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12015
12016         * README: Update supported targets.
12017
12018 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12019
12020         * Makefile.in (clean): Remove reg-mips64.c.
12021         (reg-mips64.c, reg-mips64.o): New rules.
12022         * configure.srv: Handle mips64.  Include regset support for mips.
12023         * linux-mips-low.c (union mips_register): New.
12024         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12025         (mips_breakpoint, mips_breakpoint_at): Use int.
12026         (mips_collect_register, mips_supply_register)
12027         (mips_collect_register_32bit, mips_supply_register_32bit)
12028         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12029         (mips_store_fpregset, target_regsets): New.
12030         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12031
12032 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12033
12034         * configure.srv: Add target "spu*-*-*".
12035         * Makefile.in (clean): Remove reg-spu.c.
12036         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12037         * spu-low.c: New file.
12038
12039 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12040
12041         * configure.ac: Correct td_thr_tls_get_addr test.
12042         * configure: Regenerated.
12043
12044 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12045
12046         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12047         pass_signals array.
12048         * remote-utils.c (decode_address_to_semicolon): New.
12049         * server.c (pass_signals, handle_general_set): New.
12050         (handle_query): Mention QPassSignals for qSupported.
12051         (main): Call handle_general_set.
12052         * server.h (pass_signals, decode_address_to_semicolon): New.
12053
12054 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12055
12056         * server.c (handle_query): Correct error handling for read_auxv.
12057
12058 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12059
12060         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12061         and srv_linux_thread_db to yes.
12062         * linux-s390-low.c (s390_fill_gregset): New function.
12063         (target_regsets): Define data structure.
12064
12065 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12066
12067         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12068         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12069         * config.in, configure: Regenerated.
12070         * inferiors.c (gdb_id_to_thread): New function.
12071         (gdb_id_to_thread_id): Use it.
12072         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12073         * linux-low.h (struct process_info): Add th member.
12074         (thread_db_get_tls_address): New prototype.
12075         * remote-utils.c (decode_address): Make non-static.
12076         * server.c (handle_query): Handle qGetTLSAddr.
12077         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12078         * target.h (struct target_ops): Add get_tls_address.
12079         * thread-db.c (maybe_attach_thread): Save the thread handle.
12080         (thread_db_get_tls_address): New.
12081
12082 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12083
12084         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12085         (linux_resume_one_process): Take a siginfo_t *.  Update all
12086         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12087         (struct pending_signals): Add a siginfo_t.
12088         (linux_wait_for_process): Always set last_status.
12089         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12090         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12091         * linux-low.h (struct process_info): Add last_status.
12092
12093 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12094
12095         * remote-utils.c (try_rle): New function.
12096         (putpkt_binary): Use it.
12097
12098 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12099
12100         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12101         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12102         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12103         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12104         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12105         point registers.
12106
12107 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12108
12109         * server.c (terminal_fd): New variable.
12110         (old_foreground_pgrp): Likewise.
12111         (restore_old_foreground_pgrp): New function.
12112         (start_inferior): Record the terminal file descriptor in terminal_fd
12113         and its original foreground group in old_foreground_pgrp.  Register
12114         restore_old_foreground_pgrp with atexit().
12115
12116 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12117
12118         * server.c (handle_query): Correct qPart to qXfer.
12119
12120 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12121
12122         * configure.ac: Check for more headers which are missing on
12123         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12124         * configure.srv: Add Cygwin and mingw32.
12125         * remote-utils.c: Don't include headers unconditionally which
12126         are missing on mingw32.  Include <winsock.h> for mingw32.
12127         (remote_open): Adjust for mingw32 support.  Flush
12128         standard error after writing to it.
12129         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12130         (unblock_async_io, enable_async_io, disable_async_io)
12131         (readchar, getpkt): Update for Winsock support.
12132         (prepare_resume_reply): Expect a protocol signal number.
12133         * server.c: Disable <sys/wait.h> on mingw32.
12134         (start_inferior): Adjust for mingw32 support.  Flush
12135         standard error after writing to it.
12136         (attach_inferior): Likewise.  Use protocol signal
12137         numbers.
12138         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12139         and names.
12140         * win32-i386-low.c: New file.
12141         * Makefile.in (XM_CLIBS): Set.
12142         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12143         (win32-i386-low.o): New dependency rule.
12144         * linux-low.c (linux_wait): Use target signal numbers.
12145         * target.h (struct target_ops): Doc fix.
12146         * server.h (target_signal_to_name): New prototype.
12147         * gdbreplay.c: Don't include headers unconditionally which
12148         are missing on mingw32.  Include <winsock.h> for mingw32.
12149         (remote_close, remote_open): Adjust for Winsock support.
12150         * configure, config.in: Regenerated.
12151
12152 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12153
12154         * server.c (decode_xfer_read, write_qxfer_response): New.
12155         (handle_query): Take a packet length argument.  Handle
12156         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12157         the qSupported response.
12158         (main): Update call to handle_query.
12159
12160 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12161
12162         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12163         (putpkt_binary): Renamed from putpkt and adjusted for binary
12164         data.
12165         (putpkt): New wrapper for putpkt_binary.
12166         (readchar): Don't mask off the high bit.
12167         (decode_X_packet): New function.
12168         * server.c (main): Call putpkt_binary if a handler sets the packet
12169         length.  Save the length of the incoming packet.  Handle 'X'.
12170         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12171
12172 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12173
12174         * server.c (handle_query): Handle qSupported.
12175
12176 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12177
12178         * remote-utils.c (all_symbols_looked_up): New variable.
12179         (look_up_one_symbol): Check it.
12180         * server.h (look_up_one_symbol): New declaration.
12181         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12182
12183 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12184
12185         * Makefile.in (linux-arm-low.o): Update dependencies.
12186         * linux-arm-low.c: Include "gdb_proc_service.h".
12187         (PTRACE_GET_THREAD_AREA): Define.
12188         (ps_get_thread_area): New function.
12189
12190 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12191
12192         * configure.srv (m68k*-*-uclinux*): New target.
12193         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12194         (linux_resume_one_process): Remove extraneous cast.
12195         (linux_read_offsets): New.
12196         (linux_target_op): Add linux_read_offsets on mmuless systems.
12197         * server.c (handle_query): Add qOffsets logic.
12198         * target.h (struct target_ops): Add read_offsets.
12199
12200 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12201
12202         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12203         (PTRACE_GET_THREAD_AREA): Define.
12204         (ps_get_thread_area): New function.
12205         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12206         (linux-x86-64-low.o): Update.
12207
12208 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12209
12210         * configure.ac: Remove checks for prfpregset_t.
12211         * gdb_proc_service.h: New file.
12212         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12213         new "gdb_proc_service.h".
12214         * proc-service.c: Likewise.
12215         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12216         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12217         * Makefile.in (gdb_proc_service_h): Updated.
12218         * configure, config.in: Regenerated.
12219
12220 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12221
12222         * remote-utils.c (prepare_resume_reply): Move declaration
12223         of gdb_id_from_wait to the top of the block.
12224
12225 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12226
12227         * linux-low.c (regsets_store_inferior_registers): Read the regset
12228         from the target before filling it.
12229
12230 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12231
12232         * server.c (attach_inferior): Return SIGTRAP for a successful
12233         attach.
12234
12235 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12236
12237         * Makefile.in (OBS): Add version.o.
12238         (STAGESTUFF): Delete.
12239         (version.o): Add dependencies.
12240         (version.c): Replace rule.
12241         (clean): Remove version.c.
12242         * server.c (gdbserver_version): New.
12243         (gdbserver_usage): Use printf.
12244         (main): Handle --version and --help.
12245         * server.h (version, host_name): Add declarations.
12246
12247 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12248
12249         * linux-arm-low.c:
12250         * linux-arm-low.c:
12251         * inferiors.c:
12252         * i387-fp.h:
12253         * i387-fp.c:
12254         * gdbreplay.c:
12255         * regcache.c:
12256         * proc-service.c:
12257         * mem-break.h:
12258         * mem-break.c:
12259         * linux-x86-64-low.c:
12260         * linux-sh-low.c:
12261         * linux-s390-low.c:
12262         * linux-ppc64-low.c:
12263         * linux-ppc-low.c:
12264         * linux-mips-low.c:
12265         * linux-m68k-low.c:
12266         * linux-m32r-low.c:
12267         * linux-low.h:
12268         * linux-low.c:
12269         * linux-ia64-low.c:
12270         * linux-i386-low.c:
12271         * linux-crisv32-low.c:
12272         * thread-db.c:
12273         * terminal.h:
12274         * target.h:
12275         * target.c:
12276         * server.h:
12277         * server.c:
12278         * remote-utils.c:
12279         * regcache.h:
12280         * utils.c:
12281         * Makefile.in:
12282         * configure.ac:
12283         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12284         address.
12285
12286 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12287
12288         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12289         (arm_breakpoint_at): Recognize both breakpoints.
12290         (the_low_target): Use the correct breakpoint instruction.
12291
12292 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12293
12294         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12295         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12296         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12297         (the_low_target): Update.
12298
12299 2005-10-25  Andreas Schwab  <schwab@suse.de>
12300
12301         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12302
12303         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12304         (ia64_num_regs): Reduce to 462.
12305
12306 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12307
12308         * acinclude.m4: Correct quoting.
12309         * aclocal.m4: Regenerated.
12310
12311         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12312         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12313         (thread_db_init): Call thread_db_err_str.
12314         * configure.ac: Check for TD_VERSION.
12315         * config.in, configure: Regenerated.
12316
12317 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12318
12319         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12320
12321 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12322
12323         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12324         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12325         * config.in, configure: Regenerated.
12326         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12327         * linux-i386-low.c, linux-m68k-low.c: Update to use
12328         HAVE_PTRACE_GETREGS.
12329         * linux-low.c (regsets_fetch_inferior_registers)
12330         (regsets_store_inferior_registers): Only return 0 if we processed
12331         GENERAL_REGS.
12332         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12333         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12334
12335 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12336
12337         * inferiors.c (struct thread_info): Add gdb_id.
12338         (add_thread): Add gdb_id argument.
12339         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12340         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12341         calls to add_thread.
12342         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12343         * server.c (handle_query): Use thread_to_gdb_id.
12344         (handle_v_cont, main): Use gdb_id_to_thread_id.
12345         * server.h (add_thread): Update prototype.
12346         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12347         prototypes.
12348
12349 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12350
12351         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12352         left-padded registers.
12353         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12354         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12355
12356 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12357
12358         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12359         * configure: Regenerate.
12360         * config.in: Regenerate.
12361         * server.h (NEED_DECLARATION_STRERROR):
12362         Replace with !HAVE_DECL_STRERROR.
12363
12364 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12365
12366         * linux-low.c (linux_wait, linux_send_signal): Don't test
12367         an unsigned long variable for > 0 if it could be MAX_ULONG.
12368         * server.c (myresume): Likewise.
12369         * target.c (set_desired_inferior): Likewise.
12370
12371 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12372
12373         * configure.ac: Simplify and improve check for socklen_t.
12374         * configure, config.in: Regenerate.
12375
12376 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12377
12378         * acconfig.h: Remove.
12379         * configure.ac: Add a test for socklen_t.  Use three-argument
12380         AC_DEFINE throughout.
12381         * config.in: Regenerated using autoheader 2.59.
12382         * configure: Regenerated.
12383
12384         * gdbreplay.c (socklen_t): Provide a default.
12385         (remote_open): Use socklen_t.
12386         * remote-utils.c (socklen_t): Provide a default.
12387         (remote_open): Use socklen_t.
12388         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12389         unsigned char.
12390
12391         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12392         char for buffers.
12393         * linux-low.c (linux_read_memory, linux_write_memory)
12394         (linux_read_auxv): Likewise.
12395         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12396         (check_mem_write): Likewise.
12397         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12398         Likewise.
12399         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12400         (registers_from_string, register_data): Likewise.
12401         * server.c (handle_query, main): Likewise.
12402         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12403         (decode_M_packet): Likewise.
12404         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12405         * target.h (struct target_ops): Update read_memory, write_memory,
12406         and read_auxv.
12407         (read_inferior_memory, write_inferior_memory): Update.
12408         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12409         to unsigned char *.
12410         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12411         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12412         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12413         linux-s390-low.c, linux-sh-low.c: Update for changes in
12414         read_inferior_memory and the_low_target->breakpoint.
12415
12416 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12417
12418         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12419         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12420         * configure.srv: Add powerpc64-*-linux*.
12421         * linux-ppc64-low.c: New file.
12422
12423 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12424
12425         * linux-cris-low.c: New file with support for CRIS.
12426         * linux-crisv32-low.c: Ditto for CRISv32.
12427         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12428         (clean): Add reg-cris.c and reg-crisv32.c.
12429         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12430         reg-crisv32.o, and reg-crisv32.c to make rules.
12431         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12432         recognized targets.
12433
12434 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12435
12436         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12437         of sizeof (PTRACE_XFER_TYPE).
12438         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12439
12440 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12441
12442         * target.h (struct target_ops): Add insert_watchpoint,
12443         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12444         pointers for hardware watchpoint support.
12445         * linux-low.h (struct linux_target_ops): Ditto.
12446         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12447         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12448         to linux_target_ops.
12449         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12450         reply packet.
12451         * server.c (main): Recognize 'Z' and 'z' packets.
12452
12453 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12454
12455         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12456         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12457         (the_low_target): Add new members.
12458
12459 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12460
12461         * proc-service.c (ps_lgetregs): Search all_processes instead of
12462         all_threads.
12463
12464 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12465
12466         * server.c (start_inferior): Change return type to int.
12467         (attach_inferior): Change sigptr to int *.
12468         (handle_v_cont, handle_v_requests): Change signal to int *.
12469         (main): Change signal to int.
12470
12471 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12472
12473         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12474         * configure.srv: Add m32r*-*-linux*.
12475         * linux-m32r-low.c: New file.
12476
12477 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12478
12479         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12480
12481 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12482
12483         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12484         Take unsigned long arguments for PIDs.
12485         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12486         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12487         (wait_for_sigstop, linux_resume_one_process)
12488         (regsets_fetch_inferior_registers, linux_send_signal)
12489         (linux_read_auxv): Likewise.  Update the types of variables holding
12490         PIDs.  Update format string specifiers.
12491         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12492         * remote-utils.c (prepare_resume_reply): Likewise.
12493         * server.c (cont_thread, general_thread, step_thread)
12494         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12495         unsigned long.
12496         (handle_query): Update format specifiers.
12497         (handle_v_cont, main): Use strtoul for thread IDs.
12498         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12499         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12500         (general_thread, step_thread, thread_from_wait)
12501         (old_thread_from_wait): Update.
12502         * target.h (struct thread_resume): Use unsigned long for THREAD.
12503         (struct target_ops): Use unsigned long for arguments to attach and
12504         thread_alive.
12505
12506 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12507
12508         * acinclude.m4: Include bfd/bfd.m4 directly.
12509         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12510         <agriffis@toolchain.org>.
12511         * aclocal.m4, configure: Regenerated.
12512
12513 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12514
12515         * configure.ac: Rename configure.in, require autoconf 2.59.
12516         * configure: Re-generate.
12517
12518 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12519
12520         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12521         LIBS when finished.
12522         * aclocal.m4: Regenerated.
12523         * configure: Regenerated.
12524
12525 2004-11-21  Andreas Schwab  <schwab@suse.de>
12526
12527         * linux-m68k-low.c (m68k_num_gregs): Define.
12528         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12529         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12530         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12531         (m68k_breakpoint_at): New.  Add to the_low_target.
12532
12533         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12534         srv_linux_thread_db to yes.
12535
12536 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12537
12538         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12539         (ARCH_SET_FS): Likewise.
12540         (ARCH_GET_FS): Likewise.
12541         (ARCH_GET_GS): Likewise.
12542
12543 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12544
12545         * linux-i386-low.c (ps_get_thread_area): New.
12546         * linux-x86-64-low.c (ps_get_thread_area): New.
12547         * linux-low.c: Include <sys/syscall.h>.
12548         (linux_kill_one_process): Don't kill the first thread here.
12549         (linux_kill): Kill the first thread here.
12550         (kill_lwp): New function.
12551         (send_sigstop, linux_send_signal): Use it.
12552         * proc-service.c: Clean up #ifdefs.
12553         (fpregset_info): Delete.
12554         (ps_lgetregs): Update and enable implementation.
12555         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12556         implementations.
12557         * remote-utils.c (struct sym_cache, symbol_cache): New.
12558         (input_interrupt): Print a clearer message.
12559         (async_io_enabled): New variable.
12560         (enable_async_io, disable_async_io): Use it.  Update comments.
12561         (look_up_one_symbol): Use the symbol cache.
12562         * thread-db.c (thread_db_look_up_symbols): New function.
12563         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12564
12565 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12566
12567         * configure.in: Test for -rdynamic.
12568         * configure: Regenerated.
12569         * Makefile (INTERNAL_LDFLAGS): New.
12570         (gdbserver, gdbreplay): Use it.
12571
12572 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12573
12574         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12575
12576 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12577
12578         * linux-low.c (linux_wait): Clear all_processes list also.
12579
12580 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12581
12582         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12583         errno.
12584
12585 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12586
12587         * gdbreplay.c, server.h, utils.c: Update copyright years.
12588
12589 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12590
12591         * server.c (main): Print child status or termination signal from
12592         variable 'signal', not 'sig'.
12593
12594 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12595
12596         * linux-low.c (linux_read_memory): Change return type to
12597         int.  Check for and return error from ptrace().
12598         * target.c (read_inferior_memory): Change return type to int.  Pass
12599         back return status from the_target->read_memory().
12600         * target.h (struct target_ops): Adapt *read_memory() prototype.
12601         Update comment.
12602         (read_inferior_memory): Adapt prototype.
12603         * server.c (main): Return an error packet if
12604         read_inferior_memory() returns an error.
12605
12606 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12607
12608         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12609         Unify with other clean targets.
12610
12611 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12612
12613         * server.c (handle_v_cont): Call set_desired_inferior.
12614
12615 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12616
12617         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12618
12619 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12620
12621         * linux-low.c (linux_wait): Unblock async I/O.
12622         (linux_resume): Block and enable async I/O.
12623         * remote-utils.c (block_async_io, unblock_async_io): New functions.
12624         * server.h (block_async_io, unblock_async_io): Add prototypes.
12625
12626 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12627
12628         * remote-utils.c (remote_open): Print a status notice after
12629         opening a TCP port.
12630         * server.c (attach_inferior): Print a status notice after
12631         attaching.
12632
12633 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12634
12635         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12636
12637 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
12638
12639         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12640         error packet.
12641         * server.c, target.h: Update copyright years.
12642
12643 2004-02-25  Roland McGrath  <roland@redhat.com>
12644
12645         * target.h (struct target_ops): New member `read_auxv'.
12646         * server.c (handle_query): Handle qPart:auxv:read: query using that.
12647         * linux-low.c (linux_read_auxv): New function.
12648         (linux_target_ops): Initialize `read_auxv' member to that.
12649
12650 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12651
12652         Committed by Jim Blandy  <jimb@redhat.com>.
12653
12654         * linux-s390-low.c (s390_num_regs): Update.
12655         (s390_regmap): Remove control registers.  Use __s390x__ predefine
12656         instead of GPR_SIZE to distiguish s390 and s390x targets.
12657
12658 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
12659
12660         * linux-low.c: Update copyright year.
12661         (check_removed_breakpoint): Clear pending_is_breakpoint.
12662         (linux_set_resume_request, linux_queue_one_thread)
12663         (resume_status_pending_p): New functions.
12664         (linux_continue_one_thread): Use process->resume.
12665         (linux_resume): Only resume threads if there are no pending events.
12666         * linux-low.h (struct process_info): Add resume request
12667         pointer.
12668
12669 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
12670
12671         * regcache.c (new_register_cache): Clear the allocated register
12672         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12673
12674 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
12675
12676         * linux-low.c (linux_resume): Take a struct thread_resume *
12677         argument.
12678         (linux_wait): Update call.
12679         (resume_ptr): New static variable.
12680         (linux_continue_one_thread): Renamed from
12681         linux_continue_one_process.  Use resume_ptr.
12682         (linux_resume): Use linux_continue_one_thread.
12683         * server.c (handle_v_cont, handle_v_requests): New functions.
12684         (myresume): New function.
12685         (main): Handle 'v' case.
12686         * target.h (struct thread_resume): New type.
12687         (struct target_ops): Change argument of "resume" to struct
12688         thread_resume *.
12689         (myresume): Delete macro.
12690
12691 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
12692
12693         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12694         (uninstall): Support DESTDIR.
12695
12696 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
12697
12698         * configure.srv: Add xscale*linux copy of arm*linux entry.
12699
12700 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
12701
12702         * linux-arm-low.c (arm_reinsert_addr): New function.
12703         (the_low_target): Add arm_reinsert_addr.
12704
12705 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
12706
12707         * mem-break.c: Remove whitespace at end of file.
12708
12709 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12710
12711         * configure.in: Check whether we need to prototype strerror.
12712         * server.h: Optionally prototype strerror.
12713         * gdbreplay.c (perror_with_name): Use strerror.
12714         * linux-low.c (linux_attach_lwp): Use strerror.
12715         * utils.c (perror_with_name): Use strerror.
12716         * config.in, configure: Regenerated.
12717
12718 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12719
12720         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12721         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12722
12723 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
12724
12725         * Makefile.in (SFILES): Update.
12726         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12727         low-sun3.c: Remove files.
12728
12729 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
12730
12731         * linux-low.c: Move comment to linux_thread_alive where it belonged.
12732         (linux_detach_one_process, linux_detach): New functions.
12733         (linux_target_ops): Add linux_detach.
12734         * server.c (main): Handle 'D' packet.
12735         * target.h (struct target_ops): Add "detach" member.
12736         (detach_inferior): Define.
12737
12738 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
12739
12740         From Kelley Cook  <kelleycook@wideopenwest.com>:
12741         * configure.srv: Accept i[34567]86 variants.
12742
12743 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
12744
12745         * linux-low.c (linux_wait_for_event): Correct comment typos.
12746         (linux_resume_one_process): Call check_removed_breakpoint.
12747         (linux_send_signal): New function.
12748         (linux_target_ops): Add linux_send_signal.
12749         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12750         of kill.
12751         * target.h (struct target_ops): Add send_signal.
12752
12753 2003-05-29  Jim Blandy  <jimb@redhat.com>
12754
12755         * linux-low.c (usr_store_inferior_registers): Transfer buf in
12756         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
12757         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12758         away part of the register's value.
12759
12760 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
12761
12762         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12763         (linux_wait_for_event, linux_init_signals): Likewise.
12764
12765 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
12766
12767         * configure.in: Check for stdlib.h.
12768         * configure: Regenerated.
12769         * config.in: Regenerated.
12770
12771 2003-01-04  Andreas Schwab  <schwab@suse.de>
12772
12773         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12774
12775 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
12776
12777         * Makefile.in: Remove obsolete code.
12778
12779 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
12780
12781         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12782         defined(PT_FPR0_HI).
12783
12784 2002-11-17  Stuart Hughes  <seh@zee2.com>
12785
12786         * linux-arm-low.c (arm_num_regs): Increase.
12787         (arm_regmap): Include status register.
12788
12789 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
12790
12791         * linux-low.c (register_addr): Remove incorrect -1 check.
12792
12793 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
12794
12795         * linux-low.c (linux_create_inferior): Call setpgid.  Return
12796         the new PID.
12797         (unstopped_p, linux_signal_pid): Remove.
12798         (linux_target_ops): Remove linux_signal_pid.
12799         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12800         global instead of target method.
12801         * target.h (struct target_ops): Remove signal_pid.  Update comment
12802         for create_inferior.
12803         * server.c (signal_pid): New variable.
12804         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
12805         gdbserver.  Set the child to be the foreground process group.
12806         (attach_inferior): Set signal_pid.
12807
12808 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
12809
12810         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12811
12812 2002-08-20  Jim Blandy  <jimb@redhat.com>
12813
12814         * Makefile.in (LDFLAGS): Allow the configure script to establish a
12815         default for this.
12816
12817 2002-08-01  Andrew Cagney  <cagney@redhat.com>
12818
12819         * Makefile.in: Make chill references obsolete.
12820
12821 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
12822
12823         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12824         * configure: Regenerate.
12825         * config.in: Regenerate.
12826
12827 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
12828
12829         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12830         (perror_with_name, remote_close, remote_open, expect, play): Static.
12831
12832 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
12833
12834         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12835         byte offsets instead of an array of indexes.
12836         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12837
12838 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
12839
12840         * regcache.c: Add comment.
12841
12842 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12843
12844         * thread-db.c: New file.
12845         * proc-service.c: New file.
12846         * acinclude.m4: New file.
12847         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12848         proc-service.o, and thread-db.o.
12849         (linux-low.o): Add USE_THREAD_DB.
12850         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12851         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12852         * aclocal.m4: Regenerated.
12853         * config.in: Regenerated.
12854         * configure: Regenerated.
12855         * configure.in: Check for proc_service.h, sys/procfs.h,
12856         thread_db.h, and linux/elf.h headrs.
12857         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12858         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
12859         Check for -lthread_db and thread support.
12860         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12861         PowerPC, and SuperH.
12862         * i387-fp.c: Constify arguments.
12863         * i387-fp.h: Likewise.
12864         * inferiors.c: (struct thread_info): Renamed from
12865         `struct inferior_info'.  Remove PID member.  Use generic inferior
12866         list header.  All uses updated.
12867         (inferiors, signal_pid): Removed.
12868         (all_threads): New variable.
12869         (get_thread): Define.
12870         (add_inferior_to_list): New function.
12871         (for_each_inferior): New function.
12872         (change_inferior_id): New function.
12873         (add_inferior): Removed.
12874         (remove_inferior): New function.
12875         (add_thread): New function.
12876         (free_one_thread): New function.
12877         (remove_thread): New function.
12878         (clear_inferiors): Use for_each_inferior and free_one_thread.
12879         (find_inferior): New function.
12880         (find_inferior_id): New function.
12881         (inferior_target_data): Update argument type.
12882         (set_inferior_target_data): Likewise.
12883         (inferior_regcache_data): Likewise.
12884         (set_inferior_regcache_data): Likewise.
12885         * linux-low.c (linux_bp_reinsert): Remove.
12886         (all_processes, stopping_threads, using_thrads)
12887         (struct pending_signals, debug_threads, pid_of): New.
12888         (inferior_pid): Replace with macro.
12889         (struct inferior_linux_data): Remove.
12890         (get_stop_pc, add_process): New functions.
12891         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12892         Use add_process and add_thread.
12893         (linux_attach_lwp): New function, based on old linux_attach.  Use
12894         add_process and add_thread.  Set stop_expected for new threads.
12895         (linux_attach): New function.
12896         (linux_kill_one_process): New function.
12897         (linux_kill): Kill all LWPs.
12898         (linux_thread_alive): Use find_inferior_id.
12899         (check_removed_breakpoints, status_pending_p): New functions.
12900         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12901         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
12902         struct for the found process.
12903         (linux_wait_for_event): New function.
12904         (linux_wait): Use it.  Support LWPs.
12905         (send_sigstop, wait_for_sigstop, stop_all_processes)
12906         (linux_resume_one_process, linux_continue_one_process): New functions.
12907         (linux_resume): Support LWPs.
12908         (REGISTER_RAW_SIZE): Remove.
12909         (fetch_register): Use register_size instead.  Call supply_register.
12910         (usr_store_inferior_registers): Likewise.  Call collect_register.
12911         Fix recursive case.
12912         (regsets_fetch_inferior_registers): Improve error message.
12913         (regsets_store_inferior_registers): Add debugging.
12914         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12915         (unstopped_p, linux_signal_pid): New functions.
12916         (linux_target_ops): Add linux_signal_pid.
12917         (linux_init_signals): New function.
12918         (initialize_low): Call it.  Initialize using_threads.
12919         * regcache.c (inferior_regcache_data): Add valid
12920         flag.
12921         (get_regcache): Fetch registers lazily.  Add fetch argument
12922         and update all callers.
12923         (regcache_invalidate_one, regcache_invalidate): New
12924         functions.
12925         (new_register_cache): Renamed from create_register_cache.
12926         Return the new regcache.
12927         (free_register_cache): Change argument to a void *.
12928         (registers_to_string, registers_from_string): Call get_regcache
12929         with fetch flag set.
12930         (register_data): Make static.  Pass fetch flag to get_regcache.
12931         (supply_register): Call get_regcache with fetch flag clear.
12932         (collect_register): Call get_regcache with fetch flag set.
12933         (collect_register_as_string): New function.
12934         * regcache.h: Update.
12935         * remote-utils.c (putpkt): Flush after debug output and use
12936         stderr.
12937         Handle input interrupts while waiting for an ACK.
12938         (input_interrupt): Use signal_pid method.
12939         (getpkt): Flush after debug output and use stderr.
12940         (outreg): Use collect_register_as_string.
12941         (new_thread_notify, dead_thread_notify): New functions.
12942         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
12943         and general_thread.
12944         (look_up_one_symbol): Flush after debug output.
12945         * server.c (step_thread, server_waiting): New variables.
12946         (start_inferior): Don't use signal_pid.  Update call to mywait.
12947         (attach_inferior): Update call to mywait.
12948         (handle_query): Handle qfThreadInfo and qsThreadInfo.
12949         (main): Don't fetch/store registers explicitly.  Use
12950         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
12951         calls to mywait.
12952         * server.h: Update.
12953         (struct inferior_list, struct_inferior_list_entry): New.
12954         * target.c (set_desired_inferior): New.
12955         (write_inferior_memory): Constify.
12956         (mywait): New function.
12957         * target.h: Update.
12958         (struct target_ops): New signal_pid method.
12959         (mywait): Removed macro, added prototype.
12960
12961         * linux-low.h (regset_func): Removed.
12962         (regset_fill_func, regset_store_func): New.
12963         (enum regset_type): New.
12964         (struct regset_info): Add type field.  Use new operation types.
12965         (struct linux_target_ops): stop_pc renamed to get_pc.
12966         Add decr_pc_after_break and breakpoint_at.
12967         (get_process, get_thread_proess, get_process_thread)
12968         (strut process_info, all_processes, linux_attach_lwp)
12969         (thread_db_init): New.
12970
12971         * linux-arm-low.c (arm_get_pc, arm_set_pc,
12972         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12973         (the_low_target): Add new members.
12974         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12975         (i386_store_fpxregset): Constify.
12976         (target_regsets): Add new kind identifier.
12977         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
12978         (i386_set_pc): Add debugging.
12979         (i386_breakpoint_at): New function.
12980         (the_low_target): Add new members.
12981         * linux-mips-low.c (mips_get_pc, mips_set_pc)
12982         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12983         (mips_breakpoint_at): New.
12984         (the_low_target): Add new members.
12985         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12986         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12987         (the_low_target): Add new members.
12988         * linux-sh-low.c (sh_get_pc, sh_set_pc)
12989         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12990         (the_low_target): Add new members.
12991         * linux-x86-64-low.c (target_regsets): Add new kind
12992         identifier.
12993
12994 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
12995
12996         From Martin Pool <mbp@samba.org>:
12997         * server.c (gdbserver_usage): New function.
12998         (main): Call it.
12999
13000 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13001
13002         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13003         stop_at -> stop_pc.
13004
13005 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13006
13007         * Makefile.in: Remove obsolete code.
13008
13009 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13010
13011         * linux-low.c (regsets_fetch_inferior_registers),
13012         (regsets_store_inferior_registers): Removed cast to int from
13013         ptrace() calls.
13014         * regcache.h: Added declaration of struct inferior_info.
13015
13016 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13017
13018         * inferiors.c (struct inferior_info): Add regcache_data.
13019         (add_inferior): Call create_register_cache.
13020         (clear_inferiors): Call free_register_cache.
13021         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13022         * regcache.c (struct inferior_regcache_data): New.
13023         (registers): Remove.
13024         (get_regcache): New function.
13025         (create_register_cache, free_register_cache): New functions.
13026         (set_register_cache): Don't initialize the register cache here.
13027         (registers_to_string, registers_from_string, register_data): Call
13028         get_regcache.
13029         * regcache.h: Add prototypes.
13030         * server.h: Likewise.
13031
13032 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13033
13034         * mem-break.c: New file.
13035         * mem-break.h: New file.
13036         * Makefile.in: Add mem-break.o rule; update server.h
13037         dependencies.
13038         * inferiors.c (struct inferior_info): Add target_data
13039         member.
13040         (clear_inferiors): Free target_data member if set.
13041         (inferior_target_data, set_inferior_target_data): New functions.
13042         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13043         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13044         * linux-low.c (linux_bp_reinsert): New variable.
13045         (struct inferior_linux_data): New.
13046         (linux_create_inferior): Use set_inferior_target_data.
13047         (linux_attach): Likewise.  Call add_inferior.
13048         (linux_wait_for_one_inferior): New function.
13049         (linux_wait): Call it.
13050         (linux_write_memory): Add const.
13051         (initialize_low): Call set_breakpoint_data.
13052         * linux-low.h (struct linux_target_ops): Add breakpoint
13053         handling members.
13054         * server.c (attach_inferior): Remove extra add_inferior
13055         call.
13056         * server.h: Include mem-break.h.  Update inferior.c
13057         prototypes.
13058         * target.c (read_inferior_memory)
13059         (write_inferior_memory): New functions.
13060         * target.h (read_inferior_memory)
13061         (write_inferior_memory): Change macros to prototypes.
13062         (struct target_ops): Update comments.  Add const to write_memory
13063         definition.
13064
13065 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13066
13067         * linux-low.c (usr_store_inferior_registers): Support
13068         registers which are allowed to fail to store.
13069         * linux-low.h (linux_target_ops): Likewise.
13070         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13071         (ppc_cannot_store_register): FPSCR may not be storable.
13072
13073 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13074
13075         * server.h: Include <string.h> if HAVE_STRING_H.
13076         * ChangeLog: Correct paths in last ChangeLog entry.
13077
13078 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13079
13080         * linux-low.h: Remove obsolete prototypes.
13081         (struct linux_target_ops): New.
13082         (extern the_low_target): New.
13083         * linux-low.c (num_regs, regmap): Remove declarations.
13084         (register_addr): Use the_low_target explicitly.
13085         (fetch_register): Likewise.
13086         (usr_fetch_inferior_registers): Likewise.
13087         (usr_store_inferior_registers): Likewise.
13088         * linux-arm-low.c (num_regs): Remove.
13089         (arm_num_regs): Define.
13090         (arm_regmap): Renamed from regmap, made static.
13091         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13092         made static.
13093         (arm_cannot_store_register): Renamed from cannot_store_register,
13094         made static.
13095         (the_low_target): New.
13096         * linux-i386-low.c (num_regs): Remove.
13097         (i386_num_regs): Define.
13098         (i386_regmap): Renamed from regmap, made static.
13099         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13100         made static.
13101         (i386_cannot_store_register): Renamed from cannot_store_register,
13102         made static.
13103         (the_low_target): New.
13104         * linux-ia64-low.c (num_regs): Remove.
13105         (ia64_num_regs): Define.
13106         (ia64_regmap): Renamed from regmap, made static.
13107         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13108         made static.
13109         (ia64_cannot_store_register): Renamed from cannot_store_register,
13110         made static.
13111         (the_low_target): New.
13112         * linux-m68k-low.c (num_regs): Remove.
13113         (m68k_num_regs): Define.
13114         (m68k_regmap): Renamed from regmap, made static.
13115         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13116         made static.
13117         (m68k_cannot_store_register): Renamed from cannot_store_register,
13118         made static.
13119         (the_low_target): New.
13120         * linux-mips-low.c (num_regs): Remove.
13121         (mips_num_regs): Define.
13122         (mips_regmap): Renamed from regmap, made static.
13123         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13124         made static.
13125         (mips_cannot_store_register): Renamed from cannot_store_register,
13126         made static.
13127         (the_low_target): New.
13128         * linux-ppc-low.c (num_regs): Remove.
13129         (ppc_num_regs): Define.
13130         (ppc_regmap): Renamed from regmap, made static.
13131         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13132         made static.
13133         (ppc_cannot_store_register): Renamed from cannot_store_register,
13134         made static.
13135         (the_low_target): New.
13136         * linux-s390-low.c (num_regs): Remove.
13137         (s390_num_regs): Define.
13138         (s390_regmap): Renamed from regmap, made static.
13139         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13140         made static.
13141         (s390_cannot_store_register): Renamed from cannot_store_register,
13142         made static.
13143         (the_low_target): New.
13144         * linux-sh-low.c (num_regs): Remove.
13145         (sh_num_regs): Define.
13146         (sh_regmap): Renamed from regmap, made static.
13147         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13148         made static.
13149         (sh_cannot_store_register): Renamed from cannot_store_register,
13150         made static.
13151         (the_low_target): New.
13152         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13153         (the_low_target): New.
13154
13155 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13156
13157         * Makefile.in: Add stamp-h target.
13158         * configure.in: Create stamp-h.
13159         * configure: Regenerated.
13160
13161 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13162
13163         * inferiors.c: New file.
13164         * target.c: New file.
13165         * target.h: New file.
13166         * Makefile.in:  Add target.o and inferiors.o.  Update
13167         dependencies.
13168         * linux-low.c (inferior_pid): New static variable,
13169         moved from server.c.
13170         (linux_create_inferior): Renamed from create_inferior.
13171         Call add_inferior.  Return 0 on success instead of a PID.
13172         (linux_attach): Renamed from myattach.
13173         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13174         (linux_thread_alive): Renamed from mythread_alive.
13175         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13176         child dies.
13177         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13178         (regsets_store_inferior_registers): Correct error message.
13179         Add missing ``return 0''.
13180         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13181         (linux_store_registers): Renamed from store_inferior_registers.
13182         (linux_read_memory): Renamed from read_inferior_memory.
13183         (linux_write_memory): Renamed from write_inferior_memory.
13184         (linux_target_ops): New structure.
13185         (initialize_low): Call set_target_ops ().
13186         * remote-utils.c (unhexify): New function.
13187         (hexify): New function.
13188         (input_interrupt): Send signals to ``signal_pid''.
13189         * server.c (inferior_pid): Remove.
13190         (start_inferior): Update create_inferior call.
13191         (attach_inferior): Call add_inferior.
13192         (handle_query): New function.
13193         (main): Call handle_query for `q' packets.
13194         * server.h: Include "target.h".  Remove obsolete prototypes.
13195         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13196
13197 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13198
13199         * Makefile.in: Add WARN_CFLAGS.  Update configury
13200         dependencies.
13201         * configure.in: Check for <string.h>
13202         * configure: Regenerate.
13203         * config.in: Regenerate.
13204         * gdbreplay.c: Include needed system headers.
13205         (remote_open): Remove strchr prototype.
13206         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13207         * regcache.c (supply_register): Change buf argument to const void *.
13208         (supply_register_by_name): Likewise.
13209         (collect_register): Change buf argument to void *.
13210         (collect_register_by_name): Likewise.
13211         * regcache.h: Add missing prototypes.
13212         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13213         * server.c (handle_query): New function.
13214         (attached): New static variable, moved out of main.
13215         (main): Quiet longjmp clobber warnings.
13216         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13217         * utils.c (error): Remove NORETURN.
13218         (fatal): Likewise.